Repository navigation
🐛 fix(strict): bound claim directory scans - #1040
Merged
gaborbernat merged 10 commits intoNov 20, 2026
Merged
Conversation
A crowded claims directory can keep a nonblocking acquisition busy well past the caller's deadline. Treat an oversized scan as contention before changing directory permissions, and cap abandoned-record cleanup work.
The first flood test stopped during POSIX directory validation, before the acquisition scan. Add a case that fills the directory after preflight, and avoid depending on directory iteration order when checking abandoned-record cleanup.
gaborbernat
marked this pull request as draft
November 20, 2026 15:32
gaborbernat
marked this pull request as ready for review
November 20, 2026 17:33
gaborbernat
marked this pull request as draft
November 20, 2026 19:33
gaborbernat
marked this pull request as ready for review
November 20, 2026 21:36
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.
A crowded claims directory can keep a nonblocking
StrictSoftFileLockacquisition busy reading records. Each acquisition scan now reads at most 1,024 public claims. If it finds more, a nonblocking acquisition raisesTimeoutand a blocking acquisition retries until its timeout. Operators can still inspect every public claim through theclaimsproperty. Draft advisory.Before publishing, the contender reserves four of the 16,384 directory entries for its intent and held claims, its private record, and a clock probe. If it finds more than 16,380 existing entries,
SoftFileLockProtocolErroridentifies the directory and reports how many hidden entries the scan checked. If the directory grows past 16,384 entries after publication, the contender withdraws its claims and follows the same timeout policy.In the sentinel directory, cleanup checks up to 1,024 matching private records. Unrelated files in that directory leave the full batch available for the lock's records.
Reported by OSS Scanner: ANT-2026-Q3X5FCZO.