Repository navigation
refactor(index): assert stored-form scan paths and describe the macOS backlog case - #365
Merged
Merged
Conversation
… paths The full index parses the files the scan returned, as the migration and the incremental sync do. Those two readers already assert in debug builds that every scanned path is in stored form; the full index now asserts the same before it joins the path to the project root. Release builds do not change.
…cket Cleanup removes a socket only when a non-blocking connect to it is refused. On Linux a listener whose accept backlog is full answers EAGAIN, so its socket is left alone. On macOS such a listener refuses the connect with ECONNREFUSED, the same answer a socket nobody listens on gives, so there the socket of a daemon with a full backlog counts as dead. The comment on dead_socket_entry and the daemon lifecycle section of docs/architecture.md said a full backlog always leaves the entry; they now describe both platforms.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #365 +/- ##
=======================================
Coverage 96.42% 96.42%
=======================================
Files 372 372
Lines 258295 258297 +2
=======================================
+ Hits 249070 249074 +4
+ Misses 9225 9223 -2
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
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
dead_socket_entryand the daemon lifecycle section ofdocs/architecture.mdsaid that a full accept backlog always leaves a socket in place. That holds on Linux, where such a listener answersEAGAIN. On macOS a listener whose backlog is full refuses the connect withECONNREFUSED, the same answer as a socket nobody listens on, so there it counts as dead. Both now describe the two platforms.Follow-up to #363 and #360; no change to the stored graph or to release behavior.
Verification
cargo fmt --all --check,make fmt-oxfmt-check,python3 scripts/docs-check.py.make pre-ci) ran the debug test suite, so every test that runs aninitexercised the new assertion; none failed.macos-15runner: with backlog 128, the 129th unaccepted non-blocking connect returnsECONNREFUSED; onubuntu-24.04it returnsEAGAIN.