fix(publication): authenticate rotation handoffs - #48
Merged
Conversation
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.
Problem
Post-#47 preview testing safely exposed two remaining consumer-journal races: an authenticated claim can be removed while a reader still holds its inode, and a paused rotation can observe a pre-intent root handoff. The previous convergence checks did not bind removed claim bytes to an immutable identity, and a filename-only higher checkpoint could be mistaken for a real epoch advance.
Fix
+1successor can produce the typed epoch handoff.Deterministic coverage
Coverage includes same-inode removal convergence, equal-size overwrite with restored mtime in async and sync readers, pre-intent handoff, malicious same-epoch checkpoints in hostile readdir order, sibling epoch directories, malformed/missing/skipped/competing successors, injected I/O failures, canonical unindexed-claim ordering, crash points, live temporaries, and concurrent process waves. Root-competitor tests also prove no claim, terminal, or transition publication occurs.
Verification
node --checkon both changed libraries and the publication testnpm run check(Biome 964 files, tsgo, installer render, browser smoke)No workflow was rerun, and no release, tag, approval, or merge was performed.
Refs pylon-code/pylon#193
GPT-5.6 via Prime Agent
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.