Skip to content

fix(ci): bound startup corpus launches for frozen targets - #151124

Merged
steipete merged 3 commits into
mainfrom
upd/ci-corpus-step-watchdog
Sep 22, 2026
Merged

steipete merged 3 commits into
mainfrom
upd/ci-corpus-step-watchdog

Conversation

@steipete

@steipete steipete commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

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 in docs/ci/pipeline.md and selected explicitly when the historical target lacks test/vitest/vitest.startup-corpus-paths.mjs.

The rebase onto 9455d642e8f38149285e98cecb7945a23f107985 moves 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

  • The new executable regression fails against the pinned-main workflow: five failures observe five active jobs where the 1/2/4-CPU fixtures allow one and the 8-CPU fixture allows two. The 32-CPU case retains five slots. Baseline wall time: 2.48 seconds.
  • Five workflow suites pass in the same supplied order, N=3: 698 tests per run; wall times 74.66, 66.48, and 66.47 seconds. This proof precedes the type-only annotation and final mechanical rebase; the workflow behavior and test assertions are unchanged. These cover the three current workflow owners plus direct security and Swift workflow consumers. No production TypeScript module changes, so there are no additional production-module import siblings.
  • Workflow validation passes in 22.80 seconds. Final node scripts/check-changed.mjs --base 9455d642e8f38149285e98cecb7945a23f107985 passes in 274.77 seconds, including root test types, all three dead-export scans, scripts lint, and changed root-test lint. git diff --check passes.
  • Final 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.
  • The first changed gate caught an implicit-any callback in the new fixture; the fixture now uses the existing WorkflowStep[] contract. The next gate exposed three baseline QA export errors, already repaired on main by 54c312971a4; the final rebase incorporates that repair without adding unrelated PR changes.
  • Independent Codex autoreview at P1 is scoped-clean for the complete patch and the subsequent type-only fixture correction; no accepted/actionable findings. The final rebase leaves every changed file byte-identical.
  • Blacksmith Testbox: N=3 proof used lease tbx_01m33nz6jg40wc39nv2n1xhczs, run 35687032570. Final gate/cost proof used fresh lease tbx_01m33q1srd9f0ds3brthtgc81c, run 35688230142. The wrapper verified final source e95a4f65819e81a1becd16a6654bc1a4701e6858 and tree cc1869baf2e5d95e8fa55c989b0679d7dfe3ce9e before 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.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 17, 2026 20:37
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M maintainer Maintainer-authored PR labels Sep 17, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 3:25 AM ET / 07:25 UTC (Revision 6).

ClawSweeper review

What this changes

Limit 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
Reviewed head: c6b1a352cbcbf151e6c4f2ee742d8a8f699da624

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable scheduling repair with meaningful regression coverage and accurately bounded performance claims.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Extracted workflow-shell fixtures cover admission and aggregate failure handling with substitute commands; actual historical corpus latency remains unclaimed. No persisted-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Extracted workflow-shell fixtures cover admission and aggregate failure handling with substitute commands; actual historical corpus latency remains unclaimed. No persisted-data contract changes.
Evidence reviewed 7 items Introduced scheduling change: The pinned introduction diff changes only historical process admission. It clamps batches to 1–5 processes, retains every corpus invocation, waits for each admitted child, and preserves failure status while running subsequent batches. Action references, permissions, dependencies, job routing, and deadlines are unchanged.
Current main still needs the historical-path repair: Fetched main contains the current inventory-based single-process path and CPU-capped workers, but its historical fallback still starts the config corpus and all four state shards before waiting. Those improvements therefore do not supersede this change.
Latest-release comparison: The workflow at the supplied latest release, v2026.9.5, also launches all five corpus processes before waiting; the proposed admission limit is not present there. The unavailable local release blob was inspected through GitHub's read-only contents API.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +128, Docs +2, Config +17. Total +147 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 128 0 +128
Docs 2 4 2 +2
Config 1 31 14 +17
Generated 0 0 0 0
Other 0 0 0 0
Total 5 163 16 +147

Review metrics

Metric Value Why it matters
Historical process admission 5 concurrent launches → 1 on 1–4 CPUs; 2 on 8 CPUs; maximum 5 The limit reduces competing launchers without removing any corpus shard.
Added regression cost 6 cases: 77.94 ms reported; complete planning file: 61.40 s wall The added scheduling checks contribute little measured test-body time to the existing workflow suite.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a focused reliability improvement for historical CI validation with no application behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Extracted workflow-shell fixtures cover admission and aggregate failure handling with substitute commands; actual historical corpus latency remains unclaimed. No persisted-data contract changes.

Evidence

What I checked:

  • Introduced scheduling change: The pinned introduction diff changes only historical process admission. It clamps batches to 1–5 processes, retains every corpus invocation, waits for each admitted child, and preserves failure status while running subsequent batches. Action references, permissions, dependencies, job routing, and deadlines are unchanged. (.github/workflows/ci.yml:3398, c6b1a352cbcb)
  • Current main still needs the historical-path repair: Fetched main contains the current inventory-based single-process path and CPU-capped workers, but its historical fallback still starts the config corpus and all four state shards before waiting. Those improvements therefore do not supersede this change. (.github/workflows/ci.yml:3397, b068eab40767)
  • Latest-release comparison: The workflow at the supplied latest release, v2026.9.5, also launches all five corpus processes before waiting; the proposed admission limit is not present there. The unavailable local release blob was inspected through GitHub's read-only contents API. (.github/workflows/ci.yml, ec9c1a13db89)
  • Review continuity: All five changed files are byte-identical to the preceding reviewed head e95a4f6. The supplied completed review has no findings. The test-merge raw parents also match the pinned base followed by the exact PR head. (c6b1a352cbcb)
  • Scheduling regression coverage and proof boundary: Six added cases execute the extracted workflow shell with controlled CPU counts and substitute commands, covering admission, preparation ordering, complete arguments, and failure propagation. The captured body reports a failing baseline, 351 passing planning tests, 61.40 seconds complete-file wall time, and 77.94 ms across the added cases. These support scheduling behavior, not actual historical corpus compilation latency. No tests were executed during this read-only review. (test/scripts/ci-workflow-planning.test.ts:4532, c6b1a352cbcb)
  • Historical compatibility and timing scope: The documented historical-target contract retains the config process and four state processes. The maintainer-authored proposal explicitly allows longer serial execution while preserving deadlines and makes no hosted latency claim; the earlier timing suggestion does not establish a defect in this narrowed scheduling change. Prepared screenshots belong to the related chat-rendering repair and provide no CI scheduling evidence. Public docs: docs/ci/pipeline.md. (docs/ci/pipeline.md:258, c6b1a352cbcb)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-17T20:44:46.834Z sha a85466e :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T21:06:43.239Z sha a85466e :: blocked before merge. :: none
  • reviewed 2026-09-18T01:34:24.457Z sha 73c591e8139d6d02747de04d613f649802d17667 :: blocked before merge. :: none
  • reviewed 2026-09-18T02:00:08.391Z sha 493269f :: blocked before merge. :: none
  • reviewed 2026-09-22T05:07:18.534Z sha e95a4f6 :: needs maintainer review before merge. :: none

steipete added a commit that referenced this pull request Sep 18, 2026
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.
@steipete
steipete force-pushed the upd/ci-corpus-step-watchdog branch from a85466e to 73c591e Compare September 18, 2026 01:26
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 18, 2026
steipete added a commit that referenced this pull request Sep 18, 2026
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.
@steipete
steipete force-pushed the upd/ci-corpus-step-watchdog branch from 73c591e to 493269f Compare September 18, 2026 01:53
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
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.
fuller-stack-dev added a commit that referenced this pull request Sep 20, 2026
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]>
@steipete
steipete force-pushed the upd/ci-corpus-step-watchdog branch from 493269f to e95a4f6 Compare September 22, 2026 04:59
@steipete steipete changed the title fix(ci): prevent startup corpus watchdog failures on small runners fix(ci): bound startup corpus launches for frozen targets Sep 22, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 22, 2026
@steipete
steipete enabled auto-merge (squash) September 22, 2026 06:52
@steipete
steipete merged commit ea0d3c0 into main Sep 22, 2026
162 checks passed
@steipete
steipete deleted the upd/ci-corpus-step-watchdog branch September 22, 2026 07:39
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 23, 2026
…51124)

* fix(ci): prevent startup corpus watchdog failures on small runners

* test(ci): type frozen corpus workflow fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant