Add file field to proof chain callouts

File association for callouts is derived from summary text via regex (`extractFileRefs`) every time the renderer groups callouts for Active Issues. The parser sees the full callout context but throws away file information. The renderer re-derives it. Downstream features (proof file queries, proof learn matching, resolution detection) would all need the same regex inference.

verdict PASSscore 14 / 14findings 4 (0 risk · 2 debt · 2 obs)duration 42mrejection cycles 0shipped Apr 24, 2026surface cli

Pipeline timeline

Intent to proven code in 42m across Think, Plan, Build, and Verify.

Think
10m
Plan
10m
Build
17m
Verify
15m

Assertion ledger

14 claims, each independently verified. Showing 8 — show all →

IDSaysMatcher
A001Parsing a callout that mentions a file stores that file referenceverifiedok
A002Parsing a callout without any file reference stores nullverifiedok
A003When a callout mentions multiple files, only the first is storedverifiedok
A004The callout type includes a file fieldverifiedok
A005Active Issues groups callouts by stored file field, not by re-parsingverifiedok
A006Callouts without a file reference appear under Generalverifiedok
A007The renderer does not call extractFileRefs to determine groupingverifiedok
A008The file extraction function remains available for other usesverifiedok

Findings 4 total

debtpackages/cli/src/utils/proofSummary.tsclosed
File extraction runs on truncated summary: `proofSummary.ts:412-415` — `extractFileRefs` is called on `summary` after `substring(0, 200).trim()`. If a callout's only file reference appears after character 200, `file` will be null. Practically unlikely (AnaVerify format puts file refs in the first ~80 chars), but the stored `file` is permanently null for those cases — unlike the old re-derivation approach where fixing the regex would fix all callouts. Design trade-off the spec intended, but worth knowing.
debtpackages/cli/tests/utils/proofSummary.test.tsclosed
`@ana A012` tag misplaced: `proofSummary.test.ts:324` — Tag `@ana A012` ("extractFileRefs tests unchanged") is on the `parseCallouts` describe block, not the `extractFileRefs` describe block at line 602. Pre-check counts it as COVERED since the tag exists in the file. Verified independently via diff, but the tag's semantic placement is wrong. A future tag-only search would find A012 covering parseCallouts, not extractFileRefs.
obspackages/cli/tests/utils/proofSummary.test.tsclosed
A009 backfill verification is indirect: `proofSummary.test.ts:748-763` — The `@ana A009` tag is on the "respects 20-callout cap" test, which exercises `file` fields in the cap logic. It doesn't directly verify that proof_chain.json was backfilled. The backfill was verified manually by reading the diff. A direct test (e.g., reading proof_chain.json and asserting every callout has `file`) would be more robust, but the migration is a one-time operation and the backfill is already committed.
obspackages/cli/tests/utils/findProjectRoot.test.tsclosed
Known extractFileRefs limitation propagated to stored data: The existing regex limitation where `findProjectRoot.test.ts` extracts as `test.ts` (dotted filenames lose their prefix) is now permanently stored in proof_chain.json `file` fields. Previously, a regex fix in `extractFileRefs` would retroactively fix all groupings. Now the incorrect `file: "test.ts"` values are baked into the data. If `extractFileRefs` is ever fixed, a second backfill of proof_chain.json would be needed. This was already flagged in the proof chain active issues index cycle.

Integrity seal

scopesha256:1848605c8a99b...
contractsha256:70f1805eeba99...
build-reportsha256:b1e3de41d2e71...
verify-reportsha256:7b456425b13e6...
audit cmd$ ana proof audit add-callout-file-field   → all hashes match