Repository navigation
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: needs real behavior proof before merge. What this changesThis PR rejects rounded numeric filesystem identities and preserves exact bigint identities through publication, directory guards, writes, and trash checks. Example: File IDs 18014398509481984 and 18014398509481985 become the same JavaScript Number.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open: current main and v0.26.0 retain the identity precision defect, and no introduced correctness defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe identity layer compares caller expectations, retained descriptors, and current path observations before filesystem operations, returning metadata or typed errors. flowchart TD
A[Caller paths and identities] --> B[Identity admission]
B --> C[Exact filesystem observations]
C --> D[Directory and descriptor fences]
D --> E[Publication and mutation]
E --> F[Verification and guarded cleanup]
F --> G[Metadata or errors]
Technical reviewBest possible solution: Retain exact bigint authority internally, reject rounded caller expectations, and preserve numeric public metadata and documented compatibility fallbacks. Do we have a high-confidence way to reproduce the issue? Main's numeric expectation branch and comparator establish rounded-ID acceptance, and the added publication regression checks refusal without target creation; this review ran no target code. Is this the best way to solve the issue? The shared comparator and exact internal observations address the root cause while preserving safe Number inputs, numeric public results, strict cleanup ownership, and explicit FUSE compatibility. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e2f70f180afa. Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete introduced bypass or supply-chain regression was found; the changed authority boundaries remain subject to final-effect proof. EvidenceWhat I checked:
Likely related people:
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 11, 2026, 8:19 AM ET / 12:19 UTC (Revision 5). |
090e69a to
2f66b1f
Compare
Fix a Windows correctness/hardening bug where distinct NTFS file IDs round to the same JavaScript Number and an expected-source identity fence accepts the wrong file. The deterministic regression uses
2^54and2^54 + 1; on main the injected publication call incorrectly resolves withmethod: "hardlink".Unsafe Number components now cannot match. Publication snapshots and validates caller expectations, rejects unsafe Numbers with
FsSafeError("path-mismatch")and bigint-stat guidance, and compares accepted expectations with exact bigint descriptor stats. Safe integer Number inputs remain supported. The existing Windows zero-component fallback is preserved; cleanup keeps its stricter unknown-value policy.Internal staged writes, trash fences and legacy native Windows admission retain exact identities. Numeric directory metadata keeps an exact private snapshot when its IDs cannot be represented safely. Public metadata shapes stay unchanged. Copy and staged-file docs explain bigint caller identities and unsafe-Number rejection.
Validation
Final head
aca02707: all 56 checks green (51 passed, 5 skipped), including CI and coverage. Labeledcampaign-readyfor the batch lander.git diff --checkpass.pnpm checkafter rebasing: 17,926 tests passed, 766 platform skips, plus build, docs, boundary/file-size lint, archive allocator and package/declaration checks. The fresh image needed the repository-pinned .NET SDK before the package check could pass.Identity-fence audit
file-identity.ts: sameFileIdentitypublish-file.ts: expectedSourceIdentitypublish-file.ts: openNativeParentpublish-file.ts: assertPinnedSourceCurrentpublish-file.ts: assertPublishedTargetCurrentpublish-file.ts: copyPinnedSourcepublish-file.ts: cleanuppublish-file.ts: finishPublicationdirectory-guard.ts: capture/assertguarded-mutation.ts: rename/rmsibling-temp.ts/ default nearest-existing move guardpinned-write-staged.ts: post-write temp fencepinned-write-staged.ts: post-rename target fencepinned-write-staged.ts: returned identitypinned-write.ts: exclusive fallback resulttrash.ts: admission/revalidationnative-parent-admission.ts: legacy Windows rootnative-parent-admission.ts: legacy parentnative-pinned-write-windows.ts: returned identityopened-realpath.ts: fd path, IO path, parent candidatesroot-impl,root-write-verification, and handle resolver already supply bigint; numeric internal overload now fails closed if given unsafe inputscopy-path-admission.ts: parent comparison/cacheBigIntconversionssidecar-lock-reclaim.ts: async/sync snapshotsroot-write-verification.ts: published fd/pathroot-impl.ts: replacement admission/prepublicationcopy-root-file-sync.tsdirectory-receipt.ts/directory-durability.tsstaged-directory.ts/ staged file & symlink lifecycleexactIdentityMatchesstrict-file-identity.ts/stat-observation.tspinned-open.ts,local-file-descriptor.ts,secure-file.ts,regular-file.ts,atomic-io.tsroot-*removal/list/stat/context, file-store directory/write/cleanup, copy-source/transfer, archive staging/merge, retained-directory and private producer pathsChangelog
Windows identity checks no longer accept rounded file IDs as a match; pass bigint stats for caller-supplied identities.