Repository navigation
runner: accept a pre-integrity ledger of the current layout on open - #631
Conversation
…ng the accepted table layouts from one list The ledger open accepted its table counts from a hand-written list (3, 6, 7, 8, 9, 12). The delivery-summary tables raised the current layout to 12 tables, so the current layout without report_integrity (11) was refused, although a ledger written before integrity digests must resume with one verified replay that populates them (the documented contract). The ledger's tables are now one list with the stage that added each, and the supported layouts are derived from it: every layout a runner has written, and each of them without report_integrity. Counts 3, 6, 7, 8, 9 and 12 are accepted as before and 11 is new; every other count (1, 2, 4, 5, 10, 13 and above) is still refused with the same message. A new test builds each historical layout and the 11-table ledger, checks that each unsupported count is refused and that the 11-table ledger resumes with one replay and then exports a report byte-identical to the original. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; no formal proof of the changed code.
Graphify review — findings
Replaces the hard-coded list of accepted table counts in the ledger open with a single ledger_tables list (tagged by layout stage) that supported_layout checks against. It admits every layout a runner has written, plus each one missing report_integrity, and still refuses any other count. A ledger without integrity digests, including one that already has the delivery summaries (11 tables), now opens and gets the missing tables created, but export refuses until one verified run replay repopulates the digests. Adds tests that build each historical layout with that runner's own statements, drop report_integrity from a current ledger and replay it, and confirm unrelated table counts are still refused. The CHANGELOG gets a matching migration note.
No blocking issues surfaced. 1 lower-confidence candidate did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 262 functions depend on the 190 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
commit_input— 18 callers, 11 callees - worse:
verify_report— 6 callers, 11 callees - new:
pre_integrity_ledger()— 1 callers, 8 callees
Verification — 262 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 260 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 2 more finding(s) on lines outside this diff (see the check run).
| // test does: the current layout without report_integrity. It opens, export | ||
| // refuses until one verified replay populates the digests, and the replay | ||
| // restores the digests and the export the ledger had. | ||
| void pre_integrity_ledger() { |
There was a problem hiding this comment.
pre_integrity_ledger()
fans out to 8 callees (efferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
…nner report checkpoints branch The ledger open of main derives the table layouts it accepts from one list of the ledger's tables; this branch added a thirteenth table, report_checkpoints, and a hand-written list of counts at the same line. The merge keeps the derived rule only and adds report_checkpoints as the last stage of the list: accepted counts are 3, 6, 7, 8, 9 (older runners), 11 and 12 (the delivery summary layouts, with and without report_integrity or report_checkpoints) and 13 (this branch's layout); every other count, including 10 and 14, is refused. The store rows of both sides are reconciled to that set: the current layout is 13 tables, a pre-integrity layout with or without checkpoints resumes with one verified replay, and a written layout plus unrelated tables is refused. The changelog gets one bullet for the derived rule. No documentation sentence was replaced or deleted. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…nto the live runner report accumulator branch The checkpoints branch merged main (the pre-integrity ledger open fix, #631) and derives the ledger layouts it accepts, with report_checkpoints as the last stage, from one list: 3, 6, 7, 8, 9, 11, 12 and 13 tables are opened, every other count is refused. This merge brings that rule and its store rows, the changelog bullet and the main workflow and preflight changes into the accumulator branch; the merge needed no manual resolution. No documentation sentence was replaced or deleted. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The live runner refused a ledger written before integrity digests were added ("native ledger is not an empty or supported ledger database"). The runner README says such a ledger resumes with one verified replay, which repopulates the digests. The open check compared the table count against a hand-written list (3, 6, 7, 8, 9, 12). After the delivery-summary tables landed, the current layout minus the integrity table has 11 tables, which the list did not contain.
native_live_report_e2ehas failed on main's post-merge native-live jobs since then.This derives the accepted layouts from one list of schema stages: every historical layout, plus each one without the integrity table. A ledger with any other table count is still refused with the same message.
runner/store.cpp: one derived list replaces the hand-written counts.tests/test_native_live_store.cpp: rows for the 11-table pre-integrity ledger resuming with one replay, and for unknown counts (4, 5, 10, 13) still refused.CHANGELOG.md: one entry.🤖 Generated with Claude Code