Repository navigation
fix: make update test fixtures faster and independent of umask - #154235
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 20, 2026, 9:16 PM ET / September 21, 2026, 01:16 UTC. ClawSweeper reviewWhat this changesThe PR reuses compiled update-test imports to reduce child-process startup time and creates private test directories under group-writable host umasks. Merge readiness✅ Ready for maintainer review Keep open: this is a focused fixture repair that remains useful on current main. No introduced correctness defect was found, and the maintainer-authored, protected PR is not eligible for cleanup closure. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s update tests launch real child processes to verify configuration writes and refusal behavior. Shared fixture declarations select compiled modules, while temporary-directory helpers provide isolated filesystem state and cleanup. flowchart TD
A[Update test scenarios] --> B[Shared fixture declarations]
B --> C[Compiled child processes]
D[Private test directories] --> C
C --> E[Configuration write or refusal]
E --> F[Assertions and cleanup]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +7. Total +7 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep fixture compilation centralized and make test-owned directories private at creation while retaining the existing real-process assertions and cleanup. Do we have a high-confidence way to reproduce the issue? Yes for the directory-permission mechanism: current main omits mkdir mode, allowing 0775 case directories under umask 0002. The PR reports an isolated failing artifact test and successful correction; this review did not execute it or reproduce the original CI timeout. Is this the best way to solve the issue? Yes. The patch repairs fixture creation and reuses the existing compiled-worker owner without weakening assertions, extending deadlines, or changing production safeguards. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a4e3a5d5f88f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Update tests repeatedly compile source imports inside fresh children, and their temporary-directory helper can fail before the intended assertion when the host uses a group-writable umask.
User Impact
No product behavior changes. Delegated update tests start faster with the same real child processes, assertions, and 30-second deadline. Shared test directories remain private under either a restrictive or group-writable host umask.
Why This Change Was Made
Reuse the existing compiled update-fixture declaration owner for the executor, channel-config writer, and config reader. The imports share one compiled graph, preserving the real filesystem interception. Remove the test-local source-URL factory.
The broader CLI proof exposed a separate defect in its fixture producer: with umask
0002,withTestDircreated a0775case directory beneath its private prefix. The filesystem library correctly rejected that writable ancestor before the cleanup-error test reached its intended path. Request0700when creating case and nested directories in the async, sync, and suite helpers. Existing directories, the host umask, runtime permission checks, and cleanup ownership remain unchanged.Production behavior delta is zero; test and test-support delta is +21/-14 across three files.
Evidence
On the same isolated Linux worker (four CPUs, 16.46 GB RAM, Node 24.19.0, pnpm 12.4.0), the complete delegated-include file passed 3/3 before and after with one Vitest worker:
Existing child output verified compiled JavaScript URLs, distinct child PIDs, parent binding, and the original successful/refused effects.
The first full CLI proof retained 8,730 passes, one artifact-cleanup failure, and 91 platform/tool availability skips. The unchanged artifact file reproduced the same failure (3 passed, 1 failed) under umask
0002. After the helper correction, all four artifact cases and all three helper tests passed; the previously failing case took 6.4ms. Async, sync, nested, and suite-created directories measured0700, and all probe paths were cleaned. Formatting and independent review through P2 passed.The original CI delegated-include case recorded 30.498s with empty stdout and no readiness message. Its assertion did not retain the underlying command outcome; the standalone source baseline passed. This is a measured startup improvement, without claiming the exact CI failure was reproduced in isolation. An earlier remote attempt ran zero tests because checkout/dependencies exhausted the temporary-filesystem quota; relocating that owned workspace to the intended worker disk resolved the environment failure.
The corrected complete CLI replay passed: 382 files passed, two skipped; 8,731 cases passed and 91 skipped, in 765.44s of Vitest time (769.634s command wall). It used the captured CI descriptor, two effective workers, unchanged umask
0002, and unchanged deadlines. Exact-head CI run 35550040324 passed. Its three delegated cases took 1.775s, 1.352s, and 1.354s (4.481s summed case time) in the CLI job; these are CI observations, separate from the paired benchmark. This does not establish an eight-minute whole-CLI result. The remote full CLI inventory is one case behind the later main sample, which added a restart-health address case; its 40 additional PowerShell skips reflect tool availability, not removed tests.