Repository navigation
refactor: reuse synchronous absolute directory guards - #765
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 maintainer review before merge. Reviewed September 30, 2026, 8:49 PM ET / October 1, 2026, 00:49 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch reuses synchronous directory guards inside the asynchronous absolute-directory helper and adds tests for filesystem swaps and classified failures. Merge readiness✅ Ready for maintainer review Keep open: current main does not contain this refactor. The later coordinator comment lifts the performance hold, and GitHub records identical changed-file blobs for the measured and current heads. No actionable defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe absolute-directory helper receives a configured absolute path, checks existing segments, and creates missing directories. It returns the completed path or a classified failure; durable-directory creation also calls it. flowchart LR
A[Absolute path and options] --> B[Inspect existing segments]
B --> C[Capture directory guard]
C --> D[Check directory identity]
D --> E[Create missing segments]
E --> F[Final guard check]
F --> G[Completed path or failure]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the shared native guard path with the public asynchronous Result contract and fail-closed checks around directory creation. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes an internal refactor rather than reporting a bug. Its tests specify concrete filesystem-swap scenarios, but this read-only review did not execute them. Is this the best way to solve the issue? Yes: calling the existing native guard bodies through one Result adapter is a narrow cleanup, and the added tests cover the scheduling and failure contracts affected by removing Promise layers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f1659dba775c. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
The coordinator has reviewed this diff and lifted the performance hold. |
d3a15d6 to
fea4b9e
Compare
HOLD: performance qualification is inconclusive. All seven source-comparison gates passed, but the early-policy candidate control exceeded the predeclared 1.10 upper-ratio limit. This draft stays unmerged, with its measured head and complete dataset frozen. The proposed 21-line reduction receives no credit on main.
ensureAbsoluteDirectoryuses separate capture/assert Result adapters and an error-reinspection helper around directory guards whose filesystem work is already synchronous. This proposal shares that Result handling and calls the existing guard implementations in native path mode. It removes 21 production code lines, counting all new imports, types and callers, while retaining every filesystem observation and the public async method.Native guard bodies and the existing async/sync wrappers are unchanged. Forward prefix inspection, parent and child identities, the EEXIST loop, getter order and asynchronous mkdir remain. The new internal exports stay outside the supported package export map. Removing private Promise layers changes scheduling; concurrent reinspection must still refuse according to the filesystem state actually observed. Stable error identity, classification and getter behavior remain covered.
Functional qualification passed at candidate
d3a15d6ff74a44dc4c66d454ad4591742e0774f6against baselinee8cc7e3dcfe96e39d187168aa7ae84918ef65300:ENOTFOUND, and the failed-job retry completed coverage successfully on attempt 2. CodeQL remains skipped while this PR is a draft.The fixed performance study completed all 96 scheduled processes on AWS Linux x64, Node 24.21.0, with 16 CPUs available and measured children pinned to CPU 0. It retained all 67,200 timed durations and 3,360 sample means across 24 balanced four-arm blocks. Baseline and candidate each used two separate installations of their respective tarball. No samples were excluded or added, no thresholds or order changed, and no acceptance rerun is planned.
The protocol requires all seven one-sided source bounds and all 14 bidirectional control bounds to be at most 1.10. Each block uses the median of five 20-call means for each arm; the bounds use the fixed denominator-23 sample standard deviation and t critical value 1.7138715277470473. These are per-workload method-latency bounds, not request-tail or simultaneous-family confidence claims.
The sole failing control compares two copies of the same candidate tarball: C1/C0 point ratio 1.054013, upper ratio 1.129630. It prevents acceptance under the fixed protocol and does not establish a slowdown caused by the refactor. All source bounds passed; 13 of 14 controls passed. Process exit 0 establishes completion of the study, not acceptance.
Both test leases are released, all evidence is retained, and no changelog entry or speedup claim is proposed. The unchanged production counter remains 57,029 on main; 57,008 is the unmerged candidate count.