Repository navigation
evidence refresh: harness-only coverage re-checks become receipts on the generated branch (Part of #8033) - #8037
Merged
Conversation
…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]>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/*.jsonchanges 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 exceptinputs/measured_at) and only its harness / oracle fingerprints moved, the committed entry is left as it is. A receipt goes totests/equivalence/det_sweep_receipts.jsoninstead:{"claim": sha256 of the claim, "inputs": fingerprints now, "measured_at": sha}.generatedbranch. It is git-ignored on main.refreshfetches the published copy beforeupdate, so cases the run didn't sweep (Db2 on a push run) keep their receipts. It uploads the file ascoverage-receipts, andpublish-reportpublishes it withgenerated_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,migrateandproof_sweep --record-ledgerbuild on that.publish.yml, before the release gateevidence_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.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_mutationledgers (Phase 2) andevidence.jsonrecords (Phase 3) are still restamped by the bot PR.Checked
tests/tools/test_det_coverage_ledger.pyadds 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; theupdate --receiptsCLI round-trip and an unreadable file.test_proof_blockers,test_proof_sweep,test_derived_check,test_generated_branchandtest_evidence_report*: 227 passed.tests/ruff_audit.py --ciandtests/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, andgeneratedshould gaintests/equivalence/det_sweep_receipts.json(stampcoverage-receipts).🤖 Generated with Claude Code