fix(windows): recover scope retention and long private archives - #1958
Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07b6ec7cbc
ℹ️ 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".
| if wide.len() < 260 | ||
| || wide.starts_with(&[BACKSLASH, BACKSLASH, b'?' as u16, BACKSLASH]) | ||
| || wide.starts_with(&[BACKSLASH, BACKSLASH, b'.' as u16, BACKSLASH]) | ||
| { | ||
| return Ok(absolute); |
There was a problem hiding this comment.
Use one path form for sibling replacement
When only one sibling crosses the 260-code-unit threshold, this returns an extended \\?\ path for that sibling while leaving the other in ordinary absolute form. replace_file_atomically then compares the two lexical parent paths and rejects them as non-siblings. This occurs naturally when a destination is just below the threshold but its longer temporary filename is at or above it, causing an otherwise valid Windows atomic publication to fail with InvalidInput; normalize both siblings to a consistent path form before the parent comparison.
Useful? React with 👍 / 👎.
|
Native Windows run 35812131656 at exact head 07b6ec7 confirms a remaining blocker: |
|
Read-only root-cause trace for the shard-5 journal test: the fixture captures |
* test(retention): release crash handles and cover locked rename * fix(windows): preserve long private archive paths * fix(windows): fence exact scope during retention rename * fix(windows): close retention and long-path races * fix(retention): let collector use held scope fence (cherry picked from commit 7db00b0)
Problem
Native Windows CI found two distinct failures in the #919 lifecycle: scope quarantine cannot rename a directory while this process holds its child generation-lock handle (AccessDenied 5), and private archive retirement reaches a long Win32 path that fails with path-not-found 3. The first diagnostic run also proved the crash-recovery tests were retaining a handle a restarted process cannot retain.
Change
Verification
cargo test -p tracedecay-code-index-retention --lib scope_ --locked -- --nocapture: 22 passed locally.cargo check -p tracedecay-code-index-retention --tests --locked,cargo fmt --all --check, andgit diff --check: passed.