Repository navigation
test: overlap independent CLI build admission outcomes - #132091
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
The original UI budget blocker is repaired by #132124, merged as 5b605da. Its exact-head Linux build measured345,110B against the unchanged347,037B limit, and merged-main validation with a read-only copy of that original baseline measured345,136B. This repair did not change the baseline; concurrent unrelated #132020 did, and the original-limit proof is retained separately. This PR is now rebased without changing its patch to Fresh CI: https://github.com/openclaw/openclaw/actions/runs/33213456173. All jobs completed and exact-head CI is SUCCESS. Both the UI blocker and requested two-CPU proof are resolved; repository-native prepare/merge is proceeding without bypass. The old red run33209653401 is retained as historical blocker evidence, not waived or called passing. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 5:45 PM ET / 21:45 UTC. ClawSweeper reviewWhat this changesThe branch runs three independent CLI build-admission exit scenarios concurrently within each existing test row while preserving separate fixtures and joined cleanup. Merge readinessKeep open. The test-only change has no source-proven correctness defect, but its higher concurrent process envelope still needs confirmation on the smallest applicable CI runner; this is also a maintainer-owned, assigned PR. Priority: P3 Review scores
Verification
How this fits togetherThe CLI admission test invokes OpenClaw’s test-project and extension-batch scripts, which must finish build preparation before launching reader processes. The test checks successful, failing, and SIGTERM outcomes through real child-process boundaries. flowchart LR
A[CLI test row] --> B[Three outcome scenarios]
B --> C[Separate fixture roots]
C --> D[Build admission scripts]
D --> E[Reader child processes]
E --> F[Joined close and cleanup checks]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +31. Total +31 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the scoped concurrent scenario structure, complete exact-head CI, and prove the isolated tooling test fits the smallest applicable runner before merge. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR changes test scheduling rather than reporting a user-facing defect. Is this the best way to solve the issue? Yes, subject to runner-envelope proof: concurrency is limited to independent process trees while row-level shared hooks and module state remain serial. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5b605da38946. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Refreshed onto repaired main ClawSweeper's smallest-runner resource move is now measured on a fresh Testbox: Node24.19.0/pnpm11.22.0; host4 CPUs, harness and children restricted to CPUs0–1; nproc=2 and Node availableParallelism=2, normal two-worker cap. This is a real two-CPU execution restriction, not the prior unrestricted four-CPU proof. No memory cgroup cap was imposed; RSS below is measured, not a claim of identical hosted hardware.
The table saves 1.065s /12.54%, with6/8 favorable pairs; warmups excluded, no failed samples dropped. Full-lane before/after59.189/54.342s are one validation run each, not a new paired speed benchmark. Sampled full-lane descendants were checked to stay within CPUs0–1. Three exact final-form whole-file repeats passed 61/61 in52.718,51.150,49.445s. Instrumented two-CPU before/after runs retain 33 CLI +33 builder +12 reader processes,33 distinct roots, all33 outcomes, outer rows serial, inner scenario peak1→3. All25 monitored invocations (warmups, paired table, whole-file, structure and full lane) had zero failures, surviving descendants, fixture roots or temporary-namespace contents. Existing four-fault proof is retained; this refresh changes none of its owners. Final target/runtime/helper hashes match locally and remotely, and the Testbox is stopped. Raw113 artifacts are retained locally. Remote proof: https://github.com/openclaw/openclaw/actions/runs/33213447220 (Testbox lifecycle may show cancelled after explicit stop; command exits and retained results prove the runs). Fresh exact-head CI: https://github.com/openclaw/openclaw/actions/runs/33213456173. Its Linux build is green at 345,140B startup gzip, below even the original 347,037B limit. Full exact-head CI completed SUCCESS on this head. The latest21:45UTC ClawSweeper review requests only this CI and the compact-runner proof above; both are now satisfied. Proceeding through native prepare/merge without bypass. |
6d5f458 to
5d9e4d2
Compare
|
Merged via squash.
|
What Problem This Solves
The CLI build-admission tests spend time running three independent process scenarios serially inside each table row. This adds avoidable latency to the tooling-isolated test lane.
Why This Change Was Made
Overlap only exit 0, exit 7, and SIGTERM inside each of the eleven existing rows using
Promise.allSettled. Keep rows serial because their hooks share argv, environment, mocks, and module state. Every scenario retains its own fixture root, builder/preload, PID/readers facts, CLI pipes/output, and joined cleanup. Outcome-labelled assertions report failures after all three finalizers finish.This also joins the actual CLI close event and builder death after failed assertions before removing the scenario root. No production code, concurrency configuration, timeout deadline, module-reset behavior, or runtime contract changes. This is distinct from the previously rejected resetModules-only experiment.
User Impact
No user-facing behavior change. Developer test latency improves while retaining all 61 registrations and all 33 real outcome executions. Production LOC: +0/-0. Tests: +87/-56 (net +31), for scenario ownership, joined failure cleanup, and labelled diagnostics.
Evidence
AI-assisted implementation and isolated Codex review; no accepted/actionable P0 findings. Test-audit and deslop complete. Full changed gate passed. Local focused 61/61 and owner/sibling 406/406 passed, including shuffled seeds 17 and 91.
Balanced benchmark
One task-owned Blacksmith Testbox (4 visible CPUs, Node v24.19.0, pnpm 11.22.0), source base
a939d4bdd811013e2e9469501a95d1f682f134f3, one Vitest worker, distinct filesystem module cache for every invocation, import diagnostics enabled,/usr/bin/time -v, excluded A/B warmups. Eight pairs per scope in AB, BA, AB, BA, BA, AB, BA, AB order. No failed samples dropped. Run: https://github.com/openclaw/openclaw/actions/runs/33207023010. The Testbox lease was explicitly stopped after evidence collection; its workflow wrapper may show cancelled. Successful wrapper command exits and individual results, not that terminal workflow status, are the benchmark proof. Exact-head PR CI is separate.Within the whole-file measurements, the sum of the eleven CLI row bodies fell from4.154s to2.085s.
Whole-file paired 95% t interval for the saving: 0.770–4.500s; filtered: 1.236–2.005s. These are measurements on this runner, not a universal CI speed claim. The process tradeoff is explicit: sampled descendant peak 9 → 12; whole-file peak aggregate process-tree RSS 1,021,812 → 1,237,172 KiB. No broader concurrent test registration.
The timed candidate was frozen before refinements to fallback PID readiness, cleanup-finally ordering, and soft outcome reporting. The first two affect only failure cleanup; soft reporting adds 33 synchronous assertion-context wrappers on passing runs. Process work, successful await order, and overlap are unchanged. Exact final-form process/fault and repeated tests are recorded below; the paired numbers are not relabelled as measurements of those later diagnostic refinements.
Reproduction command (use a distinct cache path for each A/B invocation):
/usr/bin/time -v env OPENCLAW_VITEST_MAX_WORKERS=1 \ OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/tmp/admission-unique-cache \ OPENCLAW_VITEST_IMPORT_DURATIONS=1 OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1 \ node scripts/run-vitest.mjs test/scripts/test-projects-build-admission.test.ts \ --maxWorkers=1 --reporter=verbose # Filtered scope adds: -t 'CLI runtime admission.*blocks'Final-form structure and reversible faults
Temporary observation-only instrumentation verified before and after: 33 CLI + 33 builder + 12 reader processes, 33 distinct roots and distinct PIDs, all 33 outcomes verified, outer-row overlap absent, scenario peak 1 → 3. All mode/script/cwd/argument cases remain. No test registration or five-second readiness/close/death deadline was removed or shortened.
Reversible production faults were applied only on the task-owned runner, one at a time:
truevsfalse)Every injected-fault row joined its three finalizers, with no surviving CLI/builders/readers or fixture roots. Both production owners were byte-for-byte restored and hash-checked; the restored table passed all 33 outcomes. Instrumentation is not retained in the PR.
Final-form Linux: three whole-file repeats passed61/61; seven-file owner/sibling sets in normal order and shuffled seeds17/91 each passed406/406 (61 tooling-isolated +345 tooling). All49 monitored benchmark, structure/fault/restoration, repeat and sibling invocations had zero observed surviving descendants or fixture roots. The whole-file repeats took64.425s,48.722s,49.256s; these are validation timings, not additional paired samples. Raw per-case test bodies, import diagnostics, CPU/RSS, and lifecycle observations were retained as task evidence (217 artifacts). The Testbox sync commit differs from the source baseline only in this test; final test and all628 checked script/helper/config/dependency-manifest hashes match the local source.
Latest-main refresh to
02a162b8bf2: admission runtime/helpers/config/dependencies unchanged. The declaration-owner arrival expanded managed-process coverage; the refreshed admission + managed-process + run-tsgo set passed127/127 with seed91. Fresh isolated Codex review again reports no actionable P0 findings. The complete changed gate also passed after this refresh.Repaired-main refresh and two-CPU runner proof
Refreshed onto repaired main
5b605da389460fd035d9a2031064ed949303b14f; new head5d9e4d2f8cce39ac25045de57fda7808a323bf27. Rebase had no conflicts. Stable patch ID61419e2058853ab837e9e4fff10e97062d56d4ffand test SHA-2566d0987f4aa271e0d5e4b23daff33ca8310297eab1af2a1835357cc16dfcd1557are unchanged;git range-diffreports equality. No test, production behavior, or assertion changed. The prior clean isolated Codex reviews therefore remain applicable; no redundant review was run for this byte-identical refresh.ClawSweeper's smallest-runner resource move is now measured on a fresh Testbox: Node24.19.0/pnpm11.22.0; host4 CPUs, harness and children restricted to CPUs0–1; nproc=2 and Node availableParallelism=2, normal two-worker cap. This is a real two-CPU execution restriction, not the prior unrestricted four-CPU proof. No memory cgroup cap was imposed; RSS below is measured, not a claim of identical hosted hardware.
The table saves 1.065s /12.54%, with6/8 favorable pairs; warmups excluded, no failed samples dropped. Full-lane before/after59.189/54.342s are one validation run each, not a new paired speed benchmark. Sampled full-lane descendants were checked to stay within CPUs0–1. Three exact final-form whole-file repeats passed 61/61 in52.718,51.150,49.445s.
Instrumented two-CPU before/after runs retain 33 CLI +33 builder +12 reader processes,33 distinct roots, all33 outcomes, outer rows serial, inner scenario peak1→3. All25 monitored invocations (warmups, paired table, whole-file, structure and full lane) had zero failures, surviving descendants, fixture roots or temporary-namespace contents. Existing four-fault proof is retained; this refresh changes none of its owners. Final target/runtime/helper hashes match locally and remotely, and the Testbox is stopped. Raw113 artifacts are retained locally.
Remote proof: https://github.com/openclaw/openclaw/actions/runs/33213447220 (Testbox lifecycle may show cancelled after explicit stop; command exits and retained results prove the runs). Fresh exact-head CI: https://github.com/openclaw/openclaw/actions/runs/33213456173. Its Linux build is green at 345,140B startup gzip, below even the original 347,037B limit. Full exact-head CI completed SUCCESS on this head. The latest21:45UTC ClawSweeper review requests only this CI and the compact-runner proof above; both are now satisfied. Proceeding through native prepare/merge without bypass.