Repository navigation
fix(identity): return exact identities in publication and copy receipts - #962
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 adds exact bigint identity companions to filesystem receipts and accepts them in subsequent guarded operations. Example: Publish a file with inode 18014398509481985, then republish it using its receipt.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep this PR open: it repairs a current receipt round-trip failure, but the previously reported listing timestamp regression remains. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe shared identity layer connects caller receipts and descriptor observations to guarded publication, copying, reads, and directory synchronization. flowchart TD
A[Caller paths and receipts] --> B[Identity snapshot]
B --> C[Descriptor and pathname admission]
C --> D[Guarded filesystem operation]
D --> E[Final identity verification]
E --> F[Numeric metadata and exact companion]
Technical reviewBest possible solution: Keep exact companions and existing identity fences while preserving Node's numeric timestamp arithmetic in directory metadata projections. Do we have a high-confidence way to reproduce the issue? Main and v0.26.1 return numeric publication identities that unsafe-number admission rejects; the added regression models inode 18014398509481985, but no target code was executed during this read-only review. Is this the best way to solve the issue? Exact companions repair lost identity precision without weakening admission, provided directory projections preserve the existing numeric metadata contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3fd5d89b3126. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Exact companions cross the caller-to-filesystem authority boundary; no concrete new bypass or supply-chain defect was found. EvidenceWhat I checked:
Likely related people:
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 (2 earlier review cycles)
Reviewed October 11, 2026, 4:35 PM ET / 20:35 UTC (Revision 3). |
d964fe5 to
a6cdc64
Compare
Problem
After #949, Windows file IDs outside Number's safe-integer range correctly fail identity checks, but fs-safe still returned some of those IDs as Numbers. A caller could publish a file successfully and then fail to reopen or republish that same file using fs-safe's own receipt.
Change
Add immutable exact identity companions to publication success/failure receipts, directory and temp-workspace receipts, public open/read/stat results, and clone metadata. Preserve existing field types and derive both views from the same admitted observation. Publication, comparison, and synchronous-copy inputs accept explicit exact-companion receipts. Existing staged, copy-publication, retained, and atomic/move receipts already carry exact identities.
Keep unsafe Numbers fail-closed. Preserve numeric Stats metadata, including Node's Date rounding and unsigned legacy scalar representation, and preserve Root stat/list/entry JSON through a non-enumerable companion. Document the round-trip rule and refresh declaration compatibility proof.
Validation
The new hardlink and forced-copy regression both fail on the base with
path-mismatchfor a simulated inode of2^54 + 1, and pass with exact receipts. Property tests cover the full 64-bit range, signed Node representations, fractional timestamps, descriptor observations, and adjacent-ID rejection.AWS Linux: full
pnpm checkpassed (14,086 tests passed, 4,266 platform skips), including installed-package/declaration proof. AWS Windows: 170 focused tests passed, 82 platform skips. The final hash-verified NTFS run published 512 files (256 hardlinks and 256 cross-volume copies) and round-tripped every receipt with zero false matches or false rejections; 35 legacy IDs were outside Number precision. The disposable NTFS volume was detached and removed, and both AWS leases were released. Independent Codex review is clean at P0–P2; final exact-head CI is required before merge.No release or version bump.