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 changes before merge. What this changesThis PR reduces native staged-publication overhead through synchronous descriptor ownership, bounded buffer writes, and combined identity observations. Example: Native Root.create("state.txt", "data", { durable: false }) without a mutation callback.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: the optimization remains distinct from main, its designated landing batch is open, and both previously reported repairs remain unresolved. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherRoot and secret-file writers pass admitted directories and payloads into retained-directory staging, which writes, publishes, verifies, and cleans up owned files. flowchart TD
A[Root or secret writer] --> B[Root and parent admission]
B --> C[Retained directory]
C --> D[Owned staged file]
D --> E[Buffered or streamed write]
E --> F[Atomic publication]
F --> G[Identity and permission checks]
Technical reviewBest possible solution: Retain the optimization, reuse encoded bytes on asynchronous fallthrough, and add the measured improvement under Unreleased before landing the shared batch. Do we have a high-confidence way to reproduce the issue? Source establishes duplicate encoding for a callback-free native staged write of "x".repeat(1048576); no target code was executed. Is this the best way to solve the issue? The optimization fits the existing staging owners and preserves the inspected safety contracts, but asynchronous fallthrough should reuse the first encoding. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e26eff537588. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
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 (7 earlier review cycles)
Reviewed October 11, 2026, 9:49 AM ET / 13:49 UTC (Revision 8). |
19ab088 to
0131dce
Compare
49d6361 to
14abdee
Compare
Native buffered create and replacement writes were paying for asynchronous Root descriptor ownership and repeatedly walking staging-directory paths after native parent admission. This change keeps descriptor-relative staging and atomic no-replace publication, while opening/closing the retained Root synchronously, validating canonical staging directories through their retained descriptors, and writing callback-free buffers up to 64 KiB through the shared synchronous write loop. Direct-publication buffers, streams, larger buffers, and mutation-assertion writes keep their existing asynchronous path.
Changelog: Performance: Reduce native buffered creation and replacement-write overhead while retaining descriptor-relative publication and exact identity checks.
stagedDirectoryMatcheslstat+realpathfence for a canonical spellingstagedDirectoryMatchesat that fencefstatfor nonprivate stagesstagedFileMetadataopenPublicationMetadataOpening/closing the Root and writing small buffers change scheduling only; they remove no identity, confinement, symlink, hardlink, policy, permission, durability, or post-publication check. The bounded write loop still handles partial writes and rejects zero progress. No native-capable operation is redirected to TypeScript publication. Existing and older bindings keep the guarded observation fallback.
Validation uses interleaved main/candidate A/B and main A/A controls on dedicated Linux and Windows AWS leases: 27 rotating/reversed blocks, 100 calls per arm. Main is
e26eff53; Linux fixtures are on verified ext4, Windows on NTFS with a source-built binding. Earlier/tmpmeasurements are excluded because that mount is tmpfs. macOS timing remains unmeasured because no requested remote lease provisioned.Non-durable publication is at parity or better within the observed A/A control variation, and durable replacement write is faster with native. Durable creation remains a measured exception: native preserves complete staged publication and content-before-rename durability ordering; default fallback creation writes its final name directly. No required flush or publication guarantee is removed. The remaining cost is recorded for follow-up and is not claimed as parity.
Native Linux create/write are pinned at 62/72 filesystem calls and 88/117 promises. Fallback counts are 40/50 calls and 102/143 promises after the current-main rebase. All eight native budget operations pass in normal and forced-openat modes, including the retained mkdir/ensureRoot/move worker pins. Windows tests pin the metadata reopen and verify descriptor ownership, mode access, and refusal of data reads.
A deterministic sibling-churn regression failed before correcting ordinary parent admission (APFS changes directory link counts for sibling files). Ordinary publication uses its identity/canonical contract; stricter native-directory and policy admission retain their existing checks. Fault-injection tests cover both legacy and new native entry points.
The full Linux check, workspace Rust tests, strict Linux clippy, Windows source build and focused tests, and P0–P2 independent review passed after rebasing. Exact-head CI is green for
14abdee0487e8af46f08a622bc038c7925d2bbdf. The earlier supplemental Windows Rust 1.99 clippy run exposed pre-existing Windows-only lint warnings; repository lint settings were not changed.