Repository navigation
fix(windows): retain exact directory preparation identities - #825
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 1, 2026, 10:08 PM ET / October 2, 2026, 02:08 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR makes trusted absolute-directory preparation retain exact bigint identities and adds a large-file-ID replacement regression, documentation, and a changelog entry. Merge readiness⛔ Blocked before merge - 3 items remain The correction remains necessary on main and in v0.22.0. No concrete patch defect was found, but the previously identified Windows compatibility change still needs explicit acceptance and helper-level coverage. Priority: P2 Review scores
Verification
How this fits togetherAbsolute-directory preparation creates caller-trusted directory paths one segment at a time. Directory guards check identity around creation and before returning success; the helper also feeds durable-directory preparation. flowchart TD
A[Trusted absolute path] --> B[Inspect existing directory prefix]
B --> C[Capture exact directory identity]
C --> D[Check parent and create missing segment]
D --> E[Recheck directory identities]
E --> F[Return prepared path]
E --> G[Return policy failure]
Decision needed
Why: Repository policy favors fail-closed identity checks, but this public helper can now reject legitimate existing Windows workflows; the implementation intent alone does not establish acceptance of that operational change. Before merge
Agent review detailsSecurityNone. Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain exact identities and bounded fail-closed admission, with an explicitly approved and documented Windows unknown-ID contract validated through directory preparation. Do we have a high-confidence way to reproduce the issue? Yes: numeric capture on main can collapse the two distinct IDs used by the queued directory-replacement regression. This review established the mechanism from source and inspected the regression; it did not execute tests. Is this the best way to solve the issue? Yes for precision: reusing the existing exact guard is the narrowest repair. Acceptance and validation of its stricter unknown-ID behavior remain necessary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against aab1c65a80d1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
ensureAbsoluteDirectory()retained numeric directory identities. Distinct 64-bit Windows file IDs can round to the same JavaScript number, allowing a replaced directory to compare equal during the final guard check. Select the existing strict bigint guard for this private preparation flow; keep the public result shape and the ordinary guard API defaults unchanged.Extend the queued-replacement regression with distinct real directories whose reported IDs are
2^54and2^54 + 1. The case fails on unmodified main because preparation unexpectedly succeeds, and passes with exact identities. The ordinary case and neighboring result-contract tests remain covered. This helper still accepts caller-trusted absolute paths and retains its documented best-effort concurrency boundary.This bounded correction was identified while investigating the repeated Windows directory-scheduling coverage failure during #824. Validation: 79 focused local tests pass; real Windows AWS with Node 24.21.0 reproduces the large-ID failure on main and passes 75 tests with the fixed source (four existing platform skips). Codex autoreview is clean through P2. Exact-head CI, including pnpm check on Linux/macOS/Windows, Windows coverage, native builds, and CodeQL, passed. The Intel native sidecar-contention proof passed one targeted rerun; its independent unchanged-main replay passed too. Parallel and serial local full runs hit unrelated timeouts on a heavily loaded host, so the passing isolated CI runs supply the full-check gate.