Skip to content

evidence refresh: harness-only coverage re-checks become receipts on the generated branch (Part of #8033) - #8037

Merged
squid-protocol merged 1 commit into
mainfrom
feat/8033-coverage-receipts
Nov 7, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/8033-coverage-receipts

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8033 (Phase 1: the det-sweep coverage ledger).

Why

A harness / oracle change stales every coverage-ledger entry at once while no number moves. In #7919, 270 of the 363 files were tests/equivalence/det_sweep_coverage/*.json changes that only re-stamped fingerprints. Committing those stamps made the daily Evidence Refresh PR huge, and it conflicted with whatever merged during its 1–3 h run (#8006).

What changes

  • det_coverage_ledger.py update --receipts (only the refresh passes it): when the sweep reproduces an entry's claim (every field except inputs / measured_at) and only its harness / oracle fingerprints moved, the committed entry is left as it is. A receipt goes to tests/equivalence/det_sweep_receipts.json instead: {"claim": sha256 of the claim, "inputs": fingerprints now, "measured_at": sha}.
  • The receipts file lives on the generated branch. It is git-ignored on main. refresh fetches the published copy before update, so cases the run didn't sweep (Db2 on a push run) keep their receipts. It uploads the file as coverage-receipts, and publish-report publishes it with generated_branch.py publish --stamp coverage-receipts.
  • load() applies a receipt only when it was taken for the entry's claim and its case / corpus fingerprints are the entry's. A later PR that changes the case or its numbers rewrites the entry, which retires the old receipt. load(receipts=False) gives the files exactly as committed; update, migrate and proof_sweep --record-ledger build on that.
  • Readers fetch the receipts:
    • publish.yml, before the release gate evidence_report.py --check --live. The published report is built with receipts, so the live side must see them too.
    • smoke-test.yml, before the advisory --deltas --live.
    • proof_blockers._ledger()'s cache key includes the receipts file.
  • Nothing is loosened: a claim change, a case / corpus change, or an unproven case is still rewritten on main by PR, and its receipt is dropped. check()'s rules are unchanged. A reader without the receipts sees main's entry, stale on harness / oracle only, which stays a warning as today.

Not in this PR

det_mutation ledgers (Phase 2) and evidence.json records (Phase 3) are still restamped by the bot PR.

Checked

  • tests/tools/test_det_coverage_ledger.py adds 5 receipt tests: harness-only → receipt and no rewrite; claim / case change → rewrite and receipt dropped; no receipt for a current entry; a receipt applies only to its claim and case; the update --receipts CLI round-trip and an unreadable file.
  • That file plus test_proof_blockers, test_proof_sweep, test_derived_check, test_generated_branch and test_evidence_report*: 227 passed.
  • All 39 test files that read the workflows: 1625 passed, 7 skipped.
  • tests/ruff_audit.py --ci and tests/mypy_audit.py --ci: no new findings.

To watch after merge

On the first Evidence Refresh run, the bot PR should carry no det_sweep_coverage/ files for a harness-only change, and generated should gain tests/equivalence/det_sweep_receipts.json (stamp coverage-receipts).

🤖 Generated with Claude Code

…the generated branch (Part of #8033)

A harness / oracle change stales every det-sweep coverage ledger entry while no
number moves (#7919: 270 of its 363 files were fingerprint-only), and committing
the new fingerprints made the Evidence Refresh bot PR huge and conflict-prone.

det_coverage_ledger.py update --receipts (used by the refresh) keeps such an
entry as committed and writes a receipt -- claim digest, new fingerprints,
measured_at -- to tests/equivalence/det_sweep_receipts.json (git-ignored on
main), which publish-report pushes to the generated branch. load() applies a
receipt only when it matches the entry's claim and case/corpus fingerprints.
Claim changes, case/corpus changes and unproven cases are rewritten on main by
PR exactly as before; no check is loosened. publish.yml (release gate) and
smoke-test.yml fetch the receipts before evidence_report.py --live.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit a7d2f6a into main Nov 7, 2026
50 checks passed
@squid-protocol
squid-protocol deleted the feat/8033-coverage-receipts branch November 7, 2026 22:08
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