Skip to content

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

Merged
squid-protocol merged 11 commits into
mainfrom
feat/4789-ledger-split
Oct 9, 2026
Merged

squid-protocol merged 11 commits into
mainfrom
feat/4789-ledger-split

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Fixes #4789

What

The two files every case PR and every evidence-refresh bot run rewrote, so that any two open PRs conflicted (#4759, #4780 and #4808 each went dirty 2-3 times on the ledger alone):

  1. Det-sweep coverage ledger: one file per case. tests/equivalence/det_sweep_coverage.json is replaced by tests/equivalence/det_sweep_coverage/<case>.json (format det-sweep-coverage/2: the entry as before plus "format"). Two PRs, or a PR and the bot, that sweep different cases now touch different files.
  2. docs/language_status/cics_spec_status.md is bot-generated on main, the same way evidence report: regenerate on main by bot, advisory in PRs, strict at release (stop per-PR report churn) #4703 handles the evidence report. The evidence-refresh refresh job runs cics_spec_status.py render and commits the page. The page-currency test is skipped under EVIDENCE_REPORT_ADVISORY=1, which CI already sets. smoke-test.yml prints an advisory "would change" line, and test_the_page_renders still runs. PRs keep committing cics_spec_status.json (the measured census and crucible data).
  3. The evidence-refresh workflow's add-paths now names tests/equivalence/det_sweep_coverage/*.json and docs/language_status/cics_spec_status.md. The blocker-slice and cics-command-slice skills are updated to match.

Evidence

  • Readers before and after, on real data: evidence_report.det_coverage() (80 cases) and proof_blockers.ledger_coverage() (65) give byte-identical output on origin/main (single file) and on this branch (per-case files).
  • det_coverage_ledger.py check on a sweep built from 6 real entries: "as expected". evidence_history.Tree('HEAD').ledger() == Tree('HEAD^').ledger() (per-case files vs the single file).
  • New tests cover: one file per case, only changed files written, a dropped entry deletes its file, split --all, split --base (applies only the branch's own changes and keeps main's newer entries for other cases; refuses a base with no single file), the compat failure, and the plan narrowing.
  • pr_gates.py --fast: 5/5 pass. --ratchets: 7 pass, 0 fail, 0 skipped.

Recipe for in-flight PRs (any branch from before this merges that touched the single ledger)

Merging origin/main gives a modify/delete conflict on tests/equivalence/det_sweep_coverage.json. Do not hand-merge it:

git merge origin/main                      # CONFLICT (modify/delete): tests/equivalence/det_sweep_coverage.json
python tests/tools/det_coverage_ledger.py split --base "$(git merge-base HEAD MERGE_HEAD)"
git add -A tests/equivalence/det_sweep_coverage.json tests/equivalence/det_sweep_coverage/
git commit --no-edit                       # finish the merge (resolve any other files as usual)

--base must be the merge base from before the merge, where the single file still existed. If the merge is already committed with the file still there, use --base "$(git merge-base HEAD^1 HEAD^2)". split --base writes only the entries your branch added, rewrote or dropped. Every other case keeps main's file. Alternatively, git rm the single file and re-run det_coverage_ledger.py update <your sweep DIR(s)>.
Also, do not commit docs/language_status/cics_spec_status.md: on a conflict take main's copy (git checkout origin/main -- docs/language_status/cics_spec_status.md). The bot re-renders it after merge.

If main changes the single file again before this PR lands, this branch merges main and re-runs split --all instead of hand-merging.

Idempotency (#4813)

Merged with #4813: build() keeps an entry whose numbers and inputs did not move (measured_at included), and write() rewrites a file only when its text changes. The result is that a bot re-sweep touches only the files of cases that actually moved. Checked on the real ledger: update on an unchanged sweep reports "65 cases, 0 file(s) written or removed". Test: test_an_unchanged_sweep_touches_no_case_file.

Follow-up (not in this PR)

  • Evidence records (tests/equivalence/*/evidence.json) are already per-case files. Moving their re-proof out of PRs is a separate step.
  • publish.yml does not gate on the CICS page being current (it is internal status, not a purchaser-facing report).

🤖 Generated with Claude Code

…e 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 <noreply@anthropic.com>
@squid-protocol squid-protocol added enhancement New feature, sensor, or structural signature ci-cd Continuous integration, delivery, and automated runners priority: medium labels Oct 9, 2026
Comment thread tests/tools/test_det_coverage_ledger.py Fixed
Comment thread tests/tools/test_det_coverage_ledger.py Fixed
Comment thread tests/tools/test_det_coverage_ledger.py Fixed
squid-protocol and others added 2 commits October 9, 2026 14:02
…-assert)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	tests/equivalence/det_sweep_coverage.json
@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

…-all re-run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: this PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them; see .claude/agents/gitgalaxy-pr-worker.md), then push.

…--all re-run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: real failure(s) on this head. Reproduce locally with the repro line; don't re-push to find out.

PR #4811 @ 4af15d1c8d3b: 1 failed check(s)

== ground-truth (failure) -- real
   https://github.com/squid-protocol/gitgalaxy/actions/runs/37987851394/job/114014206133
   repro: python tests/tools/pr_gates.py --ratchets --only-ratchets ground-truth
   log tail:
     (log unavailable: the response contains terminal escape sequences; pass --allow-escape-sequences to output it anyway)

@squid-protocol
squid-protocol marked this pull request as ready for review October 9, 2026 22:04
@squid-protocol
squid-protocol merged commit 195fef7 into main Oct 9, 2026
26 of 29 checks passed
@squid-protocol
squid-protocol deleted the feat/4789-ledger-split branch October 9, 2026 22:04
squid-protocol added a commit that referenced this pull request Oct 9, 2026
…cases; split --base + update from the sweep

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TBJdDBRtJis5hzE244NQKV
squid-protocol added a commit that referenced this pull request Oct 9, 2026
… split --base + update from the sweep

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TBJdDBRtJis5hzE244NQKV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd Continuous integration, delivery, and automated runners enhancement New feature, sensor, or structural signature priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bot-generate cics_spec_status.md (like the evidence report) and per-case coverage-ledger files, to end merge-main + re-render cycles

2 participants