Skip to content

det_coverage_ledger: keep unchanged entries (stops the evidence-refresh loop that dirties every ledger PR) - #4813

Merged
squid-protocol merged 1 commit into
mainfrom
fix/ledger-measured-at-churn
Oct 9, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/ledger-measured-at-churn

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Bug. det_coverage_ledger.py update restamped measured_at on every entry it re-measured, even when the numbers and the input fingerprints were identical. The evidence-refresh bot's merge is a push to main, and every push triggers a refresh, so the bot kept rewriting the whole ledger: #4805 → #4809 → #4812, where #4812 changed only measured_at. Every open PR that touches tests/equivalence/det_sweep_coverage.json (every case PR) went dirty about every 45 minutes. #4759 went dirty three times today while its CI ran.

Fix. build() keeps an entry exactly as it is, measured_at included, when everything but measured_at is equal to the new measurement. That is still true: those inputs gave those numbers at that commit. A refresh that measured nothing new now changes nothing, so the bot opens no PR and the loop stops. Changed numbers or any changed fingerprint (case, corpus, harness, oracle, components) still re-stamp as before.

Tests. test_update_is_idempotent_when_nothing_moved added; tests/tools/test_det_coverage_ledger.py 12 passed. pr_gates --fast 5/5; ruff audit: no new findings. The ledger file itself is not touched.

Related: #4789 (per-case ledger files) keeps this behaviour per file.

🤖 Generated with Claude Code

…ove (stops the evidence-refresh loop)

`update` restamped measured_at on every entry it re-measured, even when the numbers and input fingerprints were
identical. The evidence-refresh bot's merge is a push to main, which triggers the next refresh, which restamped every
entry again: #4805 -> #4809 -> #4812 each rewrote the ledger (#4812 changed only measured_at), so every open PR that
touches the ledger went dirty about every 45 minutes and could not land. Now an unchanged entry is kept as it is, so a
refresh that measured nothing new changes nothing and opens no PR.

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

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 9, 2026 18:30
@squid-protocol
squid-protocol merged commit 3840f7e into main Oct 9, 2026
18 checks passed
@squid-protocol
squid-protocol deleted the fix/ledger-measured-at-churn branch October 9, 2026 18:30
squid-protocol added a commit that referenced this pull request Oct 9, 2026
squid-protocol added a commit that referenced this pull request Oct 9, 2026
…e bot-generated (#4811)

* feat(#4789): per-case det-sweep coverage ledger; CICS spec status page bot-generated

The det-sweep coverage ledger (one tests/equivalence/det_sweep_coverage.json) and
docs/language_status/cics_spec_status.md were rewritten by every case PR and every
evidence-refresh bot run, so any two open PRs conflicted on them.

- det_coverage_ledger.py: one file per case, tests/equivalence/det_sweep_coverage/<case>.json
  (format det-sweep-coverage/2). load()/write() are the only file-aware parts; build, check,
  last_coverage, fresh_coverage, migrate keep their semantics (#4730 stale-readable,
  #4758 entry only while proven, #4731 per-component fingerprints). write() touches only
  changed files and deletes a dropped case's file.
- `split --all` (the one-shot migration, run here) and `split --base REV` (a pre-#4789
  branch merging main: applies only the entries it changed since REV).
- Compat: check / update / migrate and test_det_coverage_ledger fail while the single file
  exists, printing the split recipe.
- evidence_history reads the per-case files (single file for older commits).
- det_sweep_plan: a case's ledger file keeps the PR sweep narrow (that case).
- evidence-refresh bot commits the per-case files and renders cics_spec_status.md;
  the page's currency test is advisory in PR CI (EVIDENCE_REPORT_ADVISORY, as #4703),
  smoke-test prints whether it would change.

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

* test(#4789): no side effects inside asserts (CodeQL py/side-effect-in-assert)

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

* test(#4789): an unchanged re-sweep rewrites no per-case file (#4813 idempotency kept)

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

* Merge origin/main; re-render carddemo-tranadd's evidence page (main red since #4820, same fix as #4823)

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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