Repository navigation
test(walk): separate cancellation fixture setup from test timing - #406
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 15, 2026, 6:40 AM ET / 10:40 UTC. ClawSweeper reviewWhat this changesMove cancellation-test fixture preparation into the existing suite lifecycle helper and add an opt-in slow-filesystem validation harness. Merge readiness✅ Ready for maintainer review The change remains useful: both pinned main and v0.11.0 still prepare the fixture inside the cancellation test. No actionable correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherfs-safe provides root-confined filesystem operations for Node.js applications. This test prepares a real directory, exercises cancellation during a budgeted directory walk, and removes the fixture afterward. flowchart TD
A[256 fixture files] --> B[Suite setup deadline]
B --> C[Root capability]
C --> D[Budgeted directory walk]
E[Cancellation timer] --> D
D --> F[Cancellation assertions]
F --> G[Drain work and remove fixture]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep fixture preparation and cleanup under the established suite lifecycle while preserving the independent cancellation deadline and assertions. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that main charges all fixture writes to the test deadline; delaying those writes beyond five seconds provides a concrete trigger. The original Windows timeout's precise cause remains unconfirmed, and this review did not execute a reproduction. Is this the best way to solve the issue? Yes, reusing the existing suite helper isolates preparation without relaxing cancellation coverage, and draining all writes prevents cleanup from overtaking a rejected setup. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6cd6c47f16e1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: test(walk): separate cancellation fixture setup from test timing This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Remove three scripts nothing runs (watch-hint-benchmark.mjs from #774, slow-walk-fixture config and setup from #406) and two workflow_dispatch registration stubs (path-prefix-performance.yml from #445, sync-lock-root-performance-proof.yml from #450) whose runs on main always failed and last ran on 2026-09-17. No package script, workflow, test, or document references them; their proofs remain in the introducing PRs and git history.
The budgeted-walk cancellation test prepared 256 files inside the same five-second deadline used to check cancellation. A Windows Node 24 run timed out, although its log does not establish whether fixture setup or the scan consumed the deadline.
Move that fixture preparation and Root construction into the existing suite fixture helper, with its 30-second setup lifetime. The suite owns the temporary directory and waits for every write to settle before propagating setup errors or removing it. The cancellation test retains its original five-second timeout and unchanged assertions. An opt-in proof delays the real fixture writes for six seconds without changing normal CI timing.
Validation:
pnpm test test/root-walk-budget.test.ts test/suite-fixture.test.ts: 28 passed on Node 24.FS_SAFE_NATIVE=off pnpm test --config scripts/slow-walk-fixture.config.ts --disableConsoleIntercept: cancellation passed after 6.03 seconds of fixture setup; all 256 writes completed, one directory removal, no teardown race.git diff --check, passed.pnpm checkpassed on Node 24: 6,770 tests passed, 2,846 skipped, followed by package validation. The first attempt timed out in the unchanged ClawSweeper dispatch fixture; its four-test isolated run and the repeated full check passed without code changes.