Repository navigation
fix(ci): bound startup corpus launches for frozen targets - #151124
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 22, 2026, 3:25 AM ET / 07:25 UTC (Revision 6). ClawSweeper reviewWhat this changesLimit concurrent startup-validation processes for historical CI targets according to available CPUs, with scheduling regression tests and updated documentation. Merge readiness✅ Ready for maintainer review This remains a useful, bounded CI repair: current main still launches all five historical corpus processes together. No introduced correctness or security defect was found, and the changed files match the previous reviewed head. Priority: P2 Review scores
Verification
How this fits togetherThe startup corpus checks that historical configurations and state can pass Doctor and Gateway startup. CI selects either the current single-process test layout or the historical five-process layout, then reports aggregate success or failure. flowchart TD
A[CI target revision] --> B[Prepare test runtime]
B --> C{Current corpus inventory present?}
C -->|Yes| D[One process with bounded workers]
C -->|No, historical target| E[CPU-bounded process batches]
E --> F[Config corpus and four state shards]
D --> G[Aggregate validation result]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +128, Docs +2, Config +17. Total +147 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep historical corpus execution CPU-bounded within the existing workflow owner while preserving complete coverage and the current-target execution path. Do we have a high-confidence way to reproduce the issue? Yes, from source: a frozen target without the corpus inventory starts five launchers regardless of available CPUs. The reported baseline regression supports this; actual small-runner compilation stalls were not reproduced in this review. Is this the best way to solve the issue? Yes. The patch changes admission at the existing workflow owner, retains every shard and failure result, and leaves the newer execution model intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b068eab40767. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Route shared built/source fixtures through the existing CLI child diagnostic owner and await all callers. Preserve deadlines, runtime flags, command order, and output limits while reporting active resources and native timeout reports. Instrument the unreproduced occurrence from #151124, run 35271931496, job 105373599081. This is test instrumentation, not a production exit-path fix.
a85466e to
73c591e
Compare
Doctor process tests could time out without diagnostics, then release fixtures before child cleanup completed. Route built/source fixtures through the shared CLI diagnostic harness, join direct-child exit and natural output EOF, and retain reports, input/state fixtures, and resource claims when cleanup is unverified. Preserve the original failure, command deadlines, command order, flags, output limits, and successful launcher handoff. Use getCliProcessTestTimeout to reserve enclosing diagnostic and cleanup time without extending child execution deadlines. This changes tests and test support only; the intermittent production exit hang remains unreproduced. Signal delivery to the CLI respawn wrapper rather than the command grandchild remains a report-only follow-up. Related: #151124, #150831. Thanks to @jalehman for additional matching-main timeout evidence. Validation: exact-head CI run 35293520168 is green; approved committed-branch review is scoped-clean through P1; exact-head ClawSweeper review has no actionable findings or remaining Rank-up moves. The integration owner also reported 28 focused cases and the selected sixteen-file gate passing on byte-identical changed files.
73c591e to
493269f
Compare
Doctor process tests could time out without diagnostics, then release fixtures before child cleanup completed. Route built/source fixtures through the shared CLI diagnostic harness, join direct-child exit and natural output EOF, and retain reports, input/state fixtures, and resource claims when cleanup is unverified. Preserve the original failure, command deadlines, command order, flags, output limits, and successful launcher handoff. Use getCliProcessTestTimeout to reserve enclosing diagnostic and cleanup time without extending child execution deadlines. This changes tests and test support only; the intermittent production exit hang remains unreproduced. Signal delivery to the CLI respawn wrapper rather than the command grandchild remains a report-only follow-up. Related: openclaw#151124, openclaw#150831. Thanks to @jalehman for additional matching-main timeout evidence. Validation: exact-head CI run 35293520168 is green; approved committed-branch review is scoped-clean through P1; exact-head ClawSweeper review has no actionable findings or remaining Rank-up moves. The integration owner also reported 28 focused cases and the selected sixteen-file gate passing on byte-identical changed files.
Reuse the CPU-bounded startup corpus fallback from #151124 at 493269f. Preserve all five invocations, reports, failure aggregation and the 120-second watchdog. Keep recent maintenance fixtures fresh across real Worker passes so the explicit victim backdate, not incidental active-row expiry, controls the exact-one completion predicate. Retain the deadline and assertions and check that active stays unarchived. No product source changes. Co-authored-by: Peter Steinberger <[email protected]>
493269f to
e95a4f6
Compare
…51124) * fix(ci): prevent startup corpus watchdog failures on small runners * test(ci): type frozen corpus workflow fixtures
What Problem This Solves
Frozen CI targets from before the startup-corpus file split still launch the config corpus and four state shards together. On a small runner those independent Vitest launchers compete for compilation resources.
User Impact
No application behavior changes. Historical startup validation preserves every corpus check while small runners avoid competing Vitest launchers. Serial admission can lengthen the step; existing watchdog and job deadlines remain unchanged.
Why This Change Was Made
Bound only the retained historical fallback to one slot per four available CPUs, with a minimum of one and a maximum of five. Every shard still runs, and any failure makes the step fail after the remaining shards finish.
Current targets already use a better execution model: #153532 (
d98c42737902) moved the complete corpus into one Vitest process, and #153745 (2e9e7430449) capped its workers by actual available parallelism. This revision preserves that path and the preparation-progress watchdog repair from #151131. The retained frozen-target contract is documented indocs/ci/pipeline.mdand selected explicitly when the historical target lackstest/vitest/vitest.startup-corpus-paths.mjs.The rebase onto
9455d642e8f38149285e98cecb7945a23f107985moves the regressions into the current workflow-planning test owner and replaces their polling sleep with a FIFO admission barrier. No runtime product code, job count, runner registrations, deadlines, dependencies, or options change. Base-relative scope: workflow +31/-14; tests and test support +128/-0; docs +4/-2.Evidence
node scripts/check-changed.mjs --base 9455d642e8f38149285e98cecb7945a23f107985passes in 274.77 seconds, including root test types, all three dead-export scans, scripts lint, and changed root-test lint.git diff --checkpasses.pnpm test test/scripts/ci-workflow-planning.test.ts --maxWorkers=1(with default/JSON reporters) passes all 351 tests in 61.40 seconds wall, 60.25 seconds Vitest duration. The six added cases total 77.94 ms; the longest test in the file is 17.18 seconds.WorkflowStep[]contract. The next gate exposed three baseline QA export errors, already repaired on main by54c312971a4; the final rebase incorporates that repair without adding unrelated PR changes.tbx_01m33nz6jg40wc39nv2n1xhczs, run 35687032570. Final gate/cost proof used fresh leasetbx_01m33q1srd9f0ds3brthtgc81c, run 35688230142. The wrapper verified final sourcee95a4f65819e81a1becd16a6654bc1a4701e6858and treecc1869baf2e5d95e8fa55c989b0679d7dfe3ce9ebefore execution. Both leases were stopped after proof.The earlier ClawSweeper rank-up request for an actual hosted small-runner fallback timing remains unclaimed: these executable shell fixtures prove admission, complete arguments, preparation ordering, and failure propagation, not historical corpus compilation latency. The original hosted run skipped the fallback. This revision changes no watchdog or job deadline.