Skip to content

coverage: judge every receipt against the parser and fail on new contradictions (D141) - #71

Merged
kvlonge merged 3 commits into
mainfrom
fix/receipt-contradictions
Nov 5, 2026
Merged

kvlonge merged 3 commits into
mainfrom
fix/receipt-contradictions

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

D141 (lane B). Lands through the D94 gate by fast-forward; this repo has no GitHub CI.

Why #68's regressions passed the gate. make check-merge runs syntax-coverage diff coverage/syntax/baseline.json on main's tree. That tree carries only the first 10 receipt imports, and the baseline (catalogue 443acff) has no parsed/refused case lists, so it can never report a parsed case newly refused. Separately, snapshot only reaches receipts through catalogue forms → obligations → cases, so receipts on retired or uncited case ids never counted, even on full evidence.

Change. The check judges every current receipt by statement (SQL, setup, session), with SQL from the citing case or from the hash-checked inputs of the run reports. It records receipt_contradictions and unjudged_receipts in the snapshot.

  • diff fails on contradictions the base did not have.
  • Documented (D113) ones go on their own non-failing line (D135).
  • Existing ones, and every one against a base snapshot that predates the fields, are listed in the JSON without failing.
  • Documented in docs/syntax-coverage.md.

Regression check (catalogue 8c9639e, evidence a82d976), D141 binaries built at 4203044 and at cbe394e: diff exits 1 with 53 new receipt contradictions. They include all 27 in the auditor's D118 list for #68, plus 26 more real ones: 8 catalogue accept cases now rejected (ALTER DYNAMIC TABLE ×7, CREATE EXPERIMENT) and 18 on uncited case ids (10 CREATE PROCEDURE backtick ARTIFACT_REPOSITORY 1003s now accepted, 4 CREATE EXTERNAL TABLE and 4 old hand rows now rejected). The 68 documented flips are on their own line, matching the auditor's 68. 30 receipts have no SQL in the tree and are listed as unjudged.

Tests: the coverage crate's tests, including new fixture tests for an uncited receipt judged from report SQL, an unjudged one, and the diff lines. A mutation that drops the report-SQL lookup fails the new test.

…radictions (D141)

The snapshot's case lists only reach receipts through catalogue forms, so a
receipt on a retired or uncited case id never counted. The check now judges
every current receipt by its statement (SQL, setup and session), with SQL from
the citing case or from the hash-checked inputs of the run reports, and records
receipt_contradictions and unjudged_receipts in the snapshot. diff fails on a
contradiction the base did not have; documented (D113) ones go on their own
non-failing line (D135), and existing ones are listed without failing.

On catalogue 8c9639e and evidence a82d976, 4203044 -> cbe394e reports 53 new
contradictions, including all 27 the D118 audit of #68 found, plus the 68
documented flips on their own line.

kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Landed with #72 via D94: main = abd037f, which contains this branch's head ff4f6d0. Gate exit 0 on abd037f; tree a1628e77 on both main and the head. The gate now fails on any receipt that the head newly contradicts compared with main. Regression check: against 4203044→cbe394ec it reports 53 new contradictions, including all 27 in the auditor's list, and 68 documented flips on their own line.

@kvlonge
kvlonge deleted the fix/receipt-contradictions branch November 9, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant