fix(runtime): report retired 0.1.x compaction checkpoints as superseded - #4853
Closed
Astro-Han wants to merge 1 commit into
Closed
fix(runtime): report retired 0.1.x compaction checkpoints as superseded#4853Astro-Han wants to merge 1 commit into
Astro-Han wants to merge 1 commit into
Conversation
#4779 retired the unmarked v0.1.x text summary contract by requiring a `summaryFormat` stamp on every V2 checkpoint. Every consumer already fails open on the retired records — compaction re-summarizes, copy drops them, the ledger load path skips them — but `execution-inspect` graded them `compaction_checkpoint_invalid` at error severity, because the superseded classifier keys on `source.policyVersion`, a field v0.1.x never wrote. So every Session carrying a checkpoint from before the stamp reports durable corruption on inspect, and the records that really are damaged no longer stand out. Classify the retired generation the only way it can be recognised: a V2 checkpoint with no stamp that would validate if the stamp were restored is history, not damage. A record that stays invalid with the stamp injected still grades as corruption. Generated-by: Claude Code
Astro-Han
deleted the
fix/history-compact-retired-checkpoint-diagnostic
branch
September 5, 2026 12:42
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.
Summary
#4779 retired the unmarked v0.1.x text summary contract: every V2 checkpoint now has to carry a
summaryFormat: 'sections_v1'stamp, and a checkpoint without one no longer passesvalidateHistoryCompactCheckpointShape. That is the right call, and every consumer already fails open on the retired records — Compaction re-summarizes,conversation-copydrops the checkpoint, the ledger load path skips it.Diagnostics did not get the message.
execution-inspectgrades an unrecognized checkpointcompaction_checkpoint_invalidat error severity unlessisSupersededHistoryCompactCheckpointrecognizes it — and that classifier keys onsource.policyVersion, a field v0.1.x never wrote (sourcearrived in #955, long after). So every Session carrying a checkpoint from before the stamp now reports durable corruption on inspect, and the records that really are damaged stop standing out.The retired generation cannot name itself: it predates both the source policy and the format stamp. The only thing separating it from a damaged record is that restoring the stamp would make it valid — so that is the test. A V2 checkpoint with no stamp that validates once the stamp is injected is history; one that stays invalid is still corruption.
Refs #4791
Verification
npm --workspace @maka/runtime run build,npm run format,npm run lintall clean. The new test fails onmain's classifier (it returnsfalsefor the unmarked checkpoint, so the assertion expectingtruefails).Not run: the rest of the runtime suite, E2E. No user-visible surface changes — this only moves one inspect diagnostic from
errortoinfo.AI use
Tool(s) and scope: Claude Code — found the gap while reviewing #4779's execution quality, wrote the classifier change and the regression test. Reproduced against built
distbefore writing the fix.Checklist
Does this PR entail a change in behavior?