Repository navigation
fix(test): preserve fixture cleanup custody and runtime ownership - #189948
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. What this changesThis PR preserves nested cleanup evidence and makes test fixtures explicitly own their runtime selection, process waits, and cancellation receipts. Example: A fixture callback throws an AggregateError containing processTreeState: "indeterminate".
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review The prior NODE_BIN finding is resolved, and no new actionable defects were found. This maintainer-authored PR provides useful fixture repairs; exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThese test fixtures launch tooling subprocesses, observe readiness and exit receipts, and decide when temporary inputs can safely be deleted. flowchart TD
A[Test scenario] --> B[Shared fixture owner]
B --> C[Managed commands]
C --> D[Tooling subprocesses]
D --> E[Exit and cleanup receipts]
E --> B
B --> F[Delete or retain fixture]
Technical reviewBest possible solution: Keep cleanup classification, process observation, and receipt ownership in the existing shared helpers while binding fixture Node and pnpm together. Do we have a high-confidence way to reproduce the issue? Current-main source shows nested cleanup markers bypassing retention, and the receiver/installer source explains the ambient-runtime bypass; no target code was executed during this review. Is this the best way to solve the issue? The changes repair the fixture owners directly, reuse existing lifecycle helpers, and retain the real dependency-install and cancellation assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d58d1938c6c6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +139. Total +139 across 4 files. Added test files: 0. View PR surface stats
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 HistoryReview history (1 earlier review cycle)
Reviewed October 31, 2026, 10:46 PM ET / November 1, 2026, 02:46 UTC (Revision 2). |
|
@clawsweeper re-review head ae668ba fixed the NODE_BIN finding at the test fixture owner: one physical Node copy is colocated with pinned pnpm under the suite-owned dependency root, and all five cases assert the installer's actual private Node path. the final whole Node owner passes 284 tests with 1 existing skip; all five CI-like ambient-runtime cases pass under Node and Bun. the previous head and a symlink mutation select ambient pnpm and fail. both test-type lanes, type-aware lint, format and diff checks pass. production receiver/installer policy is unchanged; the PR body now records the complete proof. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…enclaw#189948) * fix(test): preserve fixture cleanup custody and runtime ownership * fix(test): keep receiver Node and pnpm in the same private bin
Test fixtures could lose nested cleanup evidence or resolve an ambient runtime after isolating HOME. The lifecycle test also duplicated process-death policy and could consume an unsafe PID receipt.
Use the canonical reject-on-abort wait and validate PID >1 before group operations. The shared fixture owner recursively classifies cleanup custody after joining registered commands and preserves the containing error/cause identity. Crabbox fixtures resolve pinned pnpm before HOME isolation, then colocate a physical Node executable with its pnpm adapter under the existing suite-owned dependency root. This matters because the real receiver supplies NODE_BIN=dirname(process.execPath), which the selected installer prepends to PATH; a PATH-only adapter or Node symlink falls back to hosted Corepack. All five dependency scenarios now assert the actual private Node path emitted by that installer.
The repeated-pnpm cancellation case uses the existing receipt owner instead of a timing assumption. It preserves real implementation exit130, durable exit receipts and retained-shell launcher143 behavior. Release failures still force/join owned PIDs; receipt-channel close is awaited after fixture custody settles.
Validation:
Production/tooling LOC: 0. Test/support LOC: +139. Removed the local wait implementation and shallow cleanup predicate. Existing timeouts, real dependency installs, graph assertions and production receiver/installer/cancellation policy are preserved. No billed-minute saving is inferred.