Uh oh!
There was an error while loading. Please reload this page.
fix(publication): authenticate retired checkpoint reads - #49
Merged
Conversation
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Problem
The concurrent publication consumer tests exposed a cleanup interleaving where a retained or current checkpoint can be unlinked while another process has its bounded read pinned. Treating the changed root generically could either fail a valid epoch-2 handoff or let a weak successor shape reach projection repair.
Fix
Checkpoint reads now receive only context-authenticated digest anchors for the exact current checkpoint and its exact retained predecessor. A typed same-inode removal converges only after its description, path, digest, carried canonical bytes, epoch, and context role all match. The one stable-root proof then returns either byte-exact current authority or one fully bound immediate successor with the deterministic epoch ID, history, source authority, anchor, checkpoint paths, and epoch directory.
Repair, cleanup, rotation, and normal-operation callers consume that classified authority before effects. Mutation, inode replacement, unanchored unlink, ambiguous or malformed successors, competing final roots, and I/O failures remain terminal.
Verification
npm run checkpassed across 964 files with no fixes.git diff --checkpassed.Review
The regression replaces a previously authenticated successor after its final root read with a stable canonical forged
+1checkpoint. It keeps the predecessor and retired-directory fields while changing the epoch ID, history, source authority, and anchor. The operation fails closed, and its projection, claim, terminal, transition, and applied records remain byte-exact.Built with OpenAI Codex GPT-5.6 using Prime Agent.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.