Repository navigation
fix(sleep): revalidate transient unlinked latest pointers - #305
Merged
Yifan Yang (Yif-Yang) merged 1 commit intoOct 6, 2026
Merged
Conversation
Concurrent atomic publication can leave a .latest metadata snapshot describing the replaced regular inode with zero links. Recheck only this derived pointer with bounded backoff, and publish only after observing a safe single-link file. Keep link, junction, nonregular-file and multi-link rejection on every attempt. Do not change live-target, receipt, backup, transaction or atomic-write guards. Extend the regression to cover unsafe transitions, exhaustion and recovery at the final allowed attempt. Preserve the original local fix's author credit.
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
Concurrent staging publications can fail when
.latestis atomically replaced while its metadata is being inspected. A snapshot of the replaced regular inode can report zero links, which the publisher currently treats as permanently unsafe..latestpointer after a zero-link regular-file observation.The atomic writer, pointer reader, adoption-target authorization, receipt/backup validation, and transaction recovery code are unchanged. This is not a claim to eliminate every filesystem replacement race.
Validation
fa4ca184573e42ec11472959dd57422381418096and revalidated: 1576 passed, 13 skipped, 359 subtests.Tests used isolated synthetic data on Linux with no real user transcripts or paid model calls. Junction detection was simulated; native Windows validation is not claimed. Local evidence does not replace official CI.