disclosure-bureau/investigator-runtime
Luiz Gustavo 25f19aee63
Some checks failed
CI / Web — typecheck + lint + build (push) Failing after 32s
CI / Scripts — Python smoke (push) Failing after 3s
CI / Web — npm audit (push) Failing after 27s
CI / Retrieval — golden set (Recall@5 + MRR) (push) Failing after 3s
W3.7 followup: harden Dupin scoping + chunk_id parsing
Two regressions surfaced in the smoke test that put Dupin from
0/3 contradictions written → 3/3 in the next run.

1. Single-doc scope was too narrow for Dupin's task.
   Holmes's question about Sandia returned 4 chunks scoped to one doc,
   but Dupin's terser "topic" form yielded only 1. Solution: Pass-1
   tries the requested doc_id; if the head is < 2 chunks, Pass-2
   widens to the whole corpus. Audit event carries `scope_widened`
   so the case-writer can later flag cross-doc contradictions
   distinctly. The unscoped retry hit 9 chunks and produced 3
   contradictions across 3 different docs.

2. Chunk-block header was ambiguous to the model.
   `--- doc-id/p007#c0042 ---` led Claude to parse `chunk_id` as
   "p007#c0042" or "p007/c0042" in the JSON output. write_contradiction
   then refused the FK lookup with "chunk not found". Fix:
   - Explicit `doc_id:` / `chunk_id:` / `page:` lines per chunk
     in the rendered block (no slashes/hashes the model can fold).
   - Defensive normalizeChunkId() in write_contradiction.ts strips
     any pNNN prefix and keeps only the trailing cNNNN — so the
     writer is forgiving without losing strictness on the topic +
     statement validation.

Smoke now produces (job 6deddf4b):
  R-0001 (3 chunks) — Color of the fireball(s) in incident summaries
  R-0002 (2 chunks) — Geographic confinement of green-fireball sightings
  R-0003 (3 chunks) — Whether the phenomenon was exclusively green or
                      also red/multicolored

R-0003 connects 3 different declassified documents: the Los Alamos
conference (exclusively-green category), a retrospective document
(red OR green), and Incident 229 (red, blue, yellow — no green).
Real cross-doc contradiction, fully cited.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 21:42:01 -03:00
..
prompts W3.7: Dupin contradiction-scan detective + UI integration 2026-05-23 21:34:04 -03:00
src W3.7 followup: harden Dupin scoping + chunk_id parsing 2026-05-23 21:42:01 -03:00
Dockerfile W3.1-W3.4: Investigation Bureau foundation — migrations, runtime, Locard 2026-05-23 19:49:33 -03:00
package-lock.json W3.1-W3.4: Investigation Bureau foundation — migrations, runtime, Locard 2026-05-23 19:49:33 -03:00
package.json W3.1-W3.4: Investigation Bureau foundation — migrations, runtime, Locard 2026-05-23 19:49:33 -03:00
tsconfig.json W3.1-W3.4: Investigation Bureau foundation — migrations, runtime, Locard 2026-05-23 19:49:33 -03:00