Repository navigation
perf(root): retain native Darwin batch roots - #1095
agent03-miq wants to merge 1 commit into
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 reuses native root descriptors for strict, canonical Darwin file batches. Example: A Darwin caller opens /Users/alice/project/a.ts and /Users/alice/project/b.ts in one batch.
Review scores
ProductKind: Performance · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: current main lacks this optimization, and the PR contains useful work, but two compatibility defects need repair and the expanded platform contract needs owner agreement. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe advanced synchronous batch API accepts root-confined file paths, performs path and native admission, and returns independently owned file descriptors through the existing pinned-file checks. flowchart TD
A[Batch caller] --> B[Path eligibility]
B --> C[Ordinary one-shot admission]
B --> D[Retained root and strict path checks]
D --> E[Native beneath open]
E --> F[Pinned file and final identity checks]
C --> G[Caller owned descriptor]
F --> G
Technical reviewBest possible solution: Reuse the existing owners while preserving search-only directory access and resolver failure categories, then align the Darwin documentation with the approved contract. Do we have a high-confidence way to reproduce the issue? Current-main source conclusively routes Darwin batches through one-shot admission; the reported performance measurements were not independently executed. Is this the best way to solve the issue? Extending the existing retained-root owner is appropriately small, but its native permission requirements and resolver error handling must preserve ordinary Darwin read semantics. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2147295fc553. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 Reviewed November 18, 2026, 1:48 AM ET / 06:48 UTC. |
Darwin file batches currently use one-shot admission for every file. Retain the existing native root descriptor for canonical, strict inputs while continuing shared strict path resolution before each native open. POSIX
openBeneathpermits contained ancestor symlinks, so Darwin must retain that path-policy check.The Windows route, native-capability fallback, final identity/content checks, and originating native closer from #1071 remain intact. The changelog records the public behavior.
Validation against main
2147295fc553399964c151668a05c9edbce5aa7b:git diff --checkpass. Native tests used the published Darwin ARM64 0.28.1 helper; native sources are unchanged since that release.pnpm checkis incomplete: source compilation passes, then the archive WASM build stops because a wasm32-capable clang is unavailable. Allocator, docs, full-suite and package checks were not reached. The Windows helper toolchain is also unavailable locally; ordinary upstream CI can supply those existing checks.Measured JavaScript filesystem calls during the complete capture:
openSyncrealpathSync.nativelstatSyncreadSyncStrict path admission increases
lstatSyncwork. These are JavaScript call counts, not kernel syscall counts or a latency guarantee. No checks, timeouts, dependency versions, package exports or release settings are changed.