Propagate root-device lookup failures - #357
Merged
Merged
Conversation
<!-- agent --> A failed root-device lookup was replaced with device ID zero after the parallel traversal rewrite. For a dangling symlink, symlink metadata remained readable but failed the device check, hiding the initialization error and producing a successful exit status. Count the lookup failure on its root, mark that root complete for ordered output, and omit it from traversal. Flush completed roots after traversal because failed roots emit no completion event. Keep all roots in the shared parallel traversal pool; when hard links are deduplicated, per-root attribution is scheduling-dependent while the total remains correct, in the name of performance. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
<!-- agent --> Background traversal replaced failed root-device lookups with device ID zero. Readable root metadata could then be rejected as cross-device while the traversal incorrectly retained a successful error count. Skip roots whose lookup fails and carry their per-root errors in the traversal completion event, restoring the previous statistics and exit status. Keep interleaved overlapping and duplicate roots isolated by including each root path Arc allocation in private directory-map keys while preserving public traversal event types. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
Byron
marked this pull request as ready for review
August 3, 2026 04:09
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4d944ea98
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Tasks
This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.
Everything below this line was generated by
Codex GPT-5.Created by Codex on behalf of Byron. Byron will review before this is ready to merge.
Reported issue
Propagate root-device lookup failures**
With
--stay-on-filesystem, ifcrossdev::initfails whilesymlink_metadatacan still read the root (for example, an explicitly supplied dangling symlink), replacing the error with device ID 0 causes the valid root metadata to fail the same-device check. The command then reports zero bytes and no I/O error instead of retaining the previous nonzero error count and exit status; the same fallback is also used by background traversal. Treat the initialization failure as a per-root error rather than inventing a device ID.Summary
Validation
cargo test --all-targetscargo clippy --all-targets -- -D warningscargo fmt --check