Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 7:04 AM ET / 11:04 UTC. ClawSweeper reviewWhat this changesThe branch registers the Crabbox wrapper with Vitest’s shared compiler and runs its prepared-wrapper smoke test on Windows and POSIX. Merge readiness✅ Ready for maintainer review Current main still has the cold-start-prone Windows fixture. This PR offers a focused repair with reported real-wrapper Testbox results; the affected Windows CI check is still running. Priority: P2 Review scores
Verification
How this fits togetherVitest prepares script modules before running tooling tests. This test launches OpenClaw’s Crabbox wrapper against a fake local command, then checks its output, command order, and child-process cleanup. flowchart LR
A[Vitest startup] --> B[Shared module compiler]
B --> C[Prepared Crabbox module]
C --> D[Wrapper smoke test]
D --> E[Managed child]
E --> F[Fake Crabbox command]
F --> G[Output and process checks]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +8, Other +1. Total +9 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one compiler-owned prepared module and a cross-platform wrapper test that preserves the deadline while checking output, command order, and process cleanup. Do we have a high-confidence way to reproduce the issue? No deterministic current-main reproduction was established in this read-only review. A prior Windows CI job failed in the unchanged test path, and current main still runs that path without preparation. Is this the best way to solve the issue? Yes. Reusing the existing compiler moves cold module preparation ahead of the child deadline without weakening the wrapper’s output and lifecycle assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0878f643df2f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: #158073
What Problem This Solves
Fixes the checked-out Crabbox wrapper smoke test timing out on Windows while loading its TypeScript dependency graph inside a 10-second managed-child deadline.
User Impact
No product behavior changes. The tooling check retains its deadline, exact output and invocation assertions, native Windows Job lifecycle, process-exit checks, and download-blocking fixture. The same fixture now also runs on POSIX.
Why This Change Was Made
The failed Windows job recorded all four fake Crabbox invocations, successful native process identity queries, and the expected stdout. Its first version probe began roughly 8.7 seconds into the 10.514-second test; the four probes then took 1.168 seconds. The deadline came from the generic shim fixture, rather than a measured Crabbox startup budget. There was no failed Job admission, stdin wait, or download in the recorded path.
Register the wrapper with the existing invocation-owned module compiler and use the existing prepared-wrapper preload. This moves dependency compilation before the deadline while still executing the real checked-out
.mjswrapper and preserving its source URL and native child ownership. The existing content-hashed compiler generation owns invalidation and cleanup. Production code delta: zero; no new cache, timeout, or configuration.Evidence
blacksmith-testbox, leasetbx_01m3c2x82g7m7f9p2xz93dz420, Testbox run: comparison command (node --input-type=module -e, launchingnode scripts/crabbox-wrapper.mjs --versionwith source versuspreparedScriptWrapperEnvenvironments) passed in 24.398 seconds. The first two benchmark setup attempts found missing transport-checkout dependencies before wrapper loading;pnpm install --frozen-lockfilerepaired that prerequisite (31.373 seconds). Those setup failures are excluded from the measurements.pnpm test test/scripts/direct-run-entrypoints.test.ts --maxWorkers=1passed 48 tests, including the real wrapper case in 588 ms. Vitest duration 25.46 seconds; test-runner wall 27.54 seconds; remote command wall 29.028 seconds. Existing signal/timeout cleanup tests account for most of the file cost; this change adds no sleeps or retries.node scripts/check-changed.mjspassed in 369.046 seconds (script/test-root types, formatting, lint, boundary and dead-export checks).18ee3263b3ec. The wrapper case completed in 3.289 seconds inside the unchanged 10-second budget; the original job timed out at 10.514 seconds. Full file: 47 passed, 1 platform skip, 22.790 seconds. No CI rerun or timeout increase.git diff --check; all tests and compilation ran on Testbox.