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 maintainer review before merge. Reviewed October 1, 2026, 9:18 AM ET / 13:18 UTC. ClawSweeper reviewWhat this changesThe PR consolidates filesystem boundary, race, Windows diagnostic, and sync/async tests into shared helpers and scenario tables, removing redundant smoke tests. Merge readiness✅ Ready for maintainer review This remains a useful, bounded test consolidation that is absent from the pinned main revision. No actionable patch defect was found, and the member-authored PR must remain open for normal review. Priority: P3 Review scores
Verification
How this fits togetherfs-safe gives Node.js applications guarded filesystem operations for untrusted paths. These tests exercise confinement, file identity, and permission checks and verify that rejected operations do not read protected contents. flowchart TD
A[Untrusted paths and race scenarios] --> B[Shared test fixtures]
B --> C[Sync and async filesystem APIs]
C --> D[Boundary and identity checks]
D --> E[Permitted reads or handle handoff]
D --> F[Rejected operation]
F --> G[Assert error and closure without reading]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep one shared harness per security scenario while preserving operation-specific hooks, rejection codes, and assertions that forbidden reads never occur. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates existing tests and reports no production bug; tests were not executed during this read-only review. Is this the best way to solve the issue? Yes: shared fixtures and named scenario rows preserve the inspected contracts, and the deleted smoke cases have retained counterparts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 167673bc7724. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
) Collapse sync/async twin scenarios into rows, share the Root-read observer and Windows hostile-diagnostic harnesses, table the read-bypass rejections while keeping exact error codes, and delete five smoke tests strictly covered by stronger tests. Tests only; 250 to 246 expanded tests, net -363 lines.
) Collapse sync/async twin scenarios into rows, share the Root-read observer and Windows hostile-diagnostic harnesses, table the read-bypass rejections while keeping exact error codes, and delete five smoke tests strictly covered by stronger tests. Tests only; 250 to 246 expanded tests, net -363 lines.
What Problem This Solves
Root, boundary, and primitive suites duplicated scenarios: sync/async twins in
new-primitivesandpath-input-snapshot, two copies of the opened-handle observer for Root-read races, 16 hand-repeated Root rejection assertions in the read-bypass suite, near-identical Windows hostile-diagnostic harnesses, and five smoke tests already covered by stronger tests elsewhere.User Impact
No user-visible change; tests only (
src/byte-identical).Why This Change Was Made
test/helpers/root-read-observer.tsandtest/helpers/windows-owner-diagnostics.tshold the shared harnesses; race and alias scenarios become tables crossed with the existing operations, keeping each hook and policy.FsSafeErrorcodes.nonblocking-write-admission; symlink append and directory stat →regular-file-failure; default rename move →coverage-gaps).Net -363 lines.
Evidence
Expanded tests 250 → 246: exactly the five named deletions plus one pinned-open scenario split into its own test; every race, alias, and rejection case remains.
Focused run: 246 passed, 5 platform skips.
tsc,lint:file-size,lint:fs-boundary: pass. Codex autoreview (P0-P2): one finding examined and rejected (the sync swap spy is present); otherwise clean.Tests added or updated when behavior changed
Security and compatibility impact considered
CHANGELOG.mdupdated when release-relevantNo credentials, private paths, private hosts, or sensitive contents included