Skip to content

evidence: the det coverage ledger reads batch (runs) and CALL (calls) coverage lines (#5008) - #5011

Merged
squid-protocol merged 5 commits into
mainfrom
churn/5008-20261012T2147Z
Oct 12, 2026
Merged

squid-protocol merged 5 commits into
mainfrom
churn/5008-20261012T2147Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Closes #5008.

Root cause

det_coverage_ledger.parse_line matched only proven on N scenarios, covering .... Each harness counts its own unit
(cobol_coverage.headline's what): CICS prints scenarios, batch (equivalence.py) prints runs, CALL
(equivalence_call.py) prints calls. So every batch and CALL det proof yielded None. update silently skipped
them and the CI check only warned ("proven with no coverage line"). The sweep and the coverage line were fine;
the ledger dropped them.

Fix (whole class)

  • _LINE reads scenario|run|call (singular or plural); the ledger's scenarios field is that count.
  • check() now fails when a proven case has a coverage line it cannot read (an empty line still only warns).
    An unknown future wording can no longer hide a case from the ledger.
  • Class table: every case kind in tests/equivalence/*/case.json against det_sweep_coverage/*.json:
kind cases had ledger files after
cics 90 89 (+ mortgage-csmrt known unproven, det_sweep_baseline.json) unchanged
batch 11 0 11
call 3 0 2 (mortgage-mpmt known unproven, baseline)

Regression tests (tests/tools/test_det_coverage_ledger.py)

  • test_every_case_kind_has_a_harness: every kind in the tree maps to a harness.
  • test_a_proven_case_of_every_kind_gets_a_ledger_entry: reads the unit each harness passes to cov.headline,
    builds the line a passing proof prints (1 and N units), and requires build to write an entry and check to pass.
    It fails on the old regex (4 failures: batch and call, 1 and 3 units).
  • test_check_fails_on_a_coverage_line_it_cannot_read.
    No counts are asserted.

Local det sweep (proof_sweep.py --det-only --cases <the 15 ledger-less cases>, on this branch merged with main)

case verdict coverage line
carddemo-cobtupdt PROVED proven on 4 runs, covering 9/9 paragraphs and 16/20 branches
carddemo-dailyval PROVED proven on 21 runs, covering 18/18 paragraphs and 65/66 branches
carddemo-dateutil PROVED proven on 17 calls, covering 2/2 paragraphs and 4/10 branches
carddemo-intcalc PROVED proven on 20 runs, covering 22/22 paragraphs and 85/86 branches
carddemo-intcalc-generated PROVED proven on 1 run, covering 20/22 paragraphs and 49/86 branches
carddemo-posttran PROVED proven on 29 runs, covering 26/26 paragraphs and 95/96 branches
carddemo-posttran-generated PROVED proven on 1 run, covering 24/26 paragraphs and 56/96 branches
carddemo-readacct PROVED proven on 13 runs, covering 16/16 paragraphs and 41/44 branches
carddemo-readcard PROVED proven on 7 runs, covering 5/5 paragraphs and 21/22 branches
carddemo-readcust PROVED proven on 7 runs, covering 5/5 paragraphs and 21/22 branches
carddemo-readxref PROVED proven on 7 runs, covering 5/5 paragraphs and 21/22 branches
carddemo-trnrpt PROVED proven on 25 runs, covering 26/26 paragraphs and 81/82 branches
mortgage-csmrt NOT PROVEN (baselined) proven on 5 scenarios, covering 1/1 paragraphs and 1/2 branches
mortgage-mpmt NOT PROVEN (baselined) —
mortgage-nbrvl PROVED proven on 15 calls, covering 3/3 paragraphs and 22/22 branches

Levels, from evidence_report.py --deltas --live (advisory; the committed report is regenerated by the
evidence-refresh bot; * = the translation survey is stale, not the coverage):

program case before after
CBACT01C carddemo-readacct L2 L3*
CBACT02C carddemo-readcard L2 L3*
CBACT03C carddemo-readxref L2 L3*
CBACT04C carddemo-intcalc L2 L3*
CBCUS01C carddemo-readcust L2 L3*
CBTRN01C carddemo-dailyval L2 L3*
CBTRN02C carddemo-posttran L2 L3*
CBTRN03C carddemo-trnrpt L2 L3*
CSUTLDTC carddemo-dateutil L2 L3*
epsnbrvl mortgage-nbrvl L2 L4*
COBTUPDT (Db2) carddemo-cobtupdt L1 L3* (its det verdict now comes from the ledger, #4758)
lgstsq (LINKed in genapp-lgipol01) L2 L2: by design, a LINKed program's coverage is its caller's (evidence_report.py role == "linked"); lgipol01 already has an entry

Each L3 stops short of L4 on the branch bar (100 net); the uncovered outcomes are listed per case in the sweep's
coverage.json. No infeasible-outcome claims were added here.

CI fix found on the way (det-sweep.yml)

The first CI run proved carddemo-cobtupdt in its one Db2 shard and then failed det with "no Db2 shard reported a
sweep.json". With exactly one matching artifact, actions/download-artifact extracts it straight into path/
(log: Starting download of artifact to: .../db2-shards, while the 5 normal shards went to .../shards/det-sweep-shard-N),
so ls db2-shards/*/sweep.json found nothing. Every PR whose plan moves exactly one Db2 shard hit this. Both found=
globs now accept either layout; the ratchet itself is unchanged.

Gates

  • pr_gates.py --fast: 5/5 pass.
  • pr_gates.py --ratchets: 7/7 pass (cics-spec, ports, port-surface, estate, fact-crosscheck, completeness, ground-truth).
  • det_coverage_ledger.py check <sweep>: as expected, with no stale warnings (re-swept after merging main, whose oracle change had staled the first sweep's entries; numbers identical across both sweeps).

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

…ifact extracts one match flat) (#5008)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol
squid-protocol marked this pull request as ready for review October 12, 2026 22:54
@squid-protocol
squid-protocol merged commit d067c87 into main Oct 12, 2026
49 checks passed
@squid-protocol
squid-protocol deleted the churn/5008-20261012T2147Z branch October 12, 2026 22:55
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.

evidence: batch and CALL det cases never get a det-sweep coverage ledger entry, so 11 programs are stuck at L2 'coverage not measured'

1 participant