Skip to content

fix(ci): parallelize auto-reply files within worker budget - #154306

Merged
steipete merged 2 commits into
mainfrom
ci-burden/s-auto-reply-parallel
Sep 21, 2026
Merged

steipete merged 2 commits into
mainfrom
ci-burden/s-auto-reply-parallel

Conversation

@steipete

@steipete steipete commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Auto-reply reply tests serialize 249 files even when their CI groups have multiple workers available, adding avoidable time to Node validation.

User Impact

No product behavior or configuration changes. CI can run independent reply test files concurrently within the existing worker and matrix budgets.

Why This Change Was Made

Remove the historical config-wide serial override and use two workers per compact group. Parallel groups get separate timing identities so serial observations are normalized only as fallback estimates, while measured parallel walls, matching complete legacy generations, and singleton costs retain their meaning.

Eight-worker qualification also exposed a test that polled for ACP runtime startup with a fixed deadline before it ever sent the abort signal. Its fixture now signals startup and proves that dispatch settles while runtime cleanup is still held open, preserving abort propagation, owner lifetime, and delivery-suppression assertions.

No new serial exceptions were needed. Existing database-worker exclusions remain intact. The audit identified 123 files using mocked runtime graphs, 102 with session/goal references (59 with real store calls), and 30 using fake timers; these categories overlap. No direct or helper-mediated listen/chdir use was found in the resolved inventory.

Evidence

Rebased onto main 1ccccb02788a6bbc8eb9448faa96f4842720ebe6; the rebased head is d682ff60156a2f1883432f5d589d2c79da881436. Conflict resolution preserves the landed agents-core worker sizing and exact-sample precedence, infra/Codex policies, B1 appended-row reservation, and Gateway mixed native-serial/parallel pricing alongside auto-reply’s two-worker policy. Both CI documentation additions and both sets of planner regressions are retained; the ACP fixture is unchanged.

Rebase validation passed on Linux (Blacksmith Testbox run): the full changed-file gate, both planner files, workflow/project/config guards, the repaired release-check file, and 10/10 standalone ACP fixture runs at worker cap eight. Case and no-output retries were disabled. The matrix replay, formatting, diff check, type-aware lint canary, and fresh P2 Codex review passed. The rebase Testbox command exited zero; all ten ACP reports were validated and hashed before the lease was stopped. A portal-sync deadline was reported after command success. Per the requested rebase scope, the full-cohort results below are retained as prior-head evidence rather than presented as new-head repetitions.

Prior full-cohort qualification is bound to head 05c3948cd7bc97995015dbc497111e66e672a32b, integrating main 894fb140a22246bc1574d5b29fe61e10f77036de. Linux proof uses the repository Crabbox wrapper with Blacksmith Testbox, Node 24.19.0, four available CPUs, and 15.42 GiB RAM. Runtime qualification was refreshed after the integration because main changed shared SQLite teardown. Earlier qualification remains historical.

The serial control passed in 828.15 s. Three complete two-worker rounds passed in 521.43 / 521.14 / 477.70 s (521.14 s median, 37.1% lower). Three complete eight-worker rounds passed in 528.87 / 537.85 / 503.03 s (528.87 s median). Every round covers exactly 249 files with 6,044 passed tests and 1 unchanged skip. These are summed group walls through node --import tsx scripts/ci-run-node-test-shard.mts, with Vitest case retries disabled (--retry=0); no watchdog retry occurred. These are separate from end-to-end CI latency. The serial control and two-worker rounds use the same lease and repaired fixture; the control forces serial files with the previous group plan.

The repaired ACP file passed 20/20 standalone runs at eight workers. Both changed tooling test files passed 10/10 standalone runs at eight workers. The changed-plan, workflow, and test-project guards passed. The full changed-file gate, type-aware lint with its failing canary, formatting, docs sanity, and diff checks passed. One-worker samples through the repository test wrapper were 66.18 s for the planner, 16.48 s for scoped configuration, and 15.28 s for ACP abort. The five new bounded planner cases used 23 ms of test-case execution in that sample.

Both prior-qualification Testbox command exits were zero. Downloaded reports were validated and hashed before both leases were stopped: 96 JSON files, including two receipt manifests. Lease records: control/two-worker and eight-worker. Both wrappers reported a portal-sync deadline after their successful commands; the downloaded result sets independently verify completion. Earlier qualification exposed the ACP startup poll failure; proof transport size and expired-lease interruptions were diagnosed before fresh qualification. No timeout increase, rerun-to-green, or serial exception was used.

For that prior head, local and committed-branch P2 Codex reviews were both scoped-clean with no actionable findings. The prior integrated planner passed all 119 tests, preserving both auto-reply and Gateway timing contracts.

Measured group walls
Parent Files Serial control s Two-worker median s Eight-worker median s
agent-runner 48 237.6 113.8 109.4
commands-1 15 62.2 44.5 53.0
commands-2 14 42.7 29.4 38.2
commands-3 18 48.8 36.4 40.0
dispatch 68 164.1 93.4 86.6
dispatch-core 1 30.4 27.6 26.5
dispatch-delivery 1 40.7 39.0 37.5
dispatch-lifecycle 1 35.2 33.0 31.7
session 12 76.7 44.8 53.1
state-routing 71 89.7 53.4 47.2

The overall median is computed from each complete round’s summed group walls.

Current replay of the #153435 changed set and broad fallback, using B1’s appended-plugin reservation, produces identical rows for both changed sets:

Profile Compact PR rows Final PR Node rows Push Node rows
Hybrid 66 112 42
GitHub 77 123 51
Blacksmith 65 111 46

All profiles fit the 90 compact / 130 PR / 70 push caps.

Previous CI failure

The previous CI run 35557278746 failed on the sparse release-check fixture after all three changed test files passed. That history remains evidence for the previous head, not a result for this rebase.

This rebase includes #154567, which inspects the prepared tarball and guards against invoking npm pack for its inventory. The full release-check test file passed in the rebase validation. The new push receives normal GitHub CI; no CI rerun or manual merge was requested by this rebase work.

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: M maintainer Maintainer-authored PR labels Sep 21, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 9:27 AM ET / 13:27 UTC (Revision 4).

ClawSweeper review

What this changes

The PR enables parallel auto-reply test files within existing CI worker budgets, updates scheduling estimates and guards, and replaces polling in an abort test with explicit synchronization.

Merge readiness

✅ Ready for maintainer review

The optimization remains useful: current main and the latest release still serialize this cohort. The introduced changes preserve worker limits and timing provenance, and no actionable correctness or security finding remains.

Priority: P2
Reviewed head: d682ff60156a2f1883432f5d589d2c79da881436

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported scheduling improvement with meaningful boundary coverage and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied Linux measurements exercise the actual CI shard runner and complete auto-reply cohort with serial, two-worker, and eight-worker schedules; separate current-head validation covers the rebased planner and unchanged ACP fixture. Full-cohort timings remain explicitly prior-head evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied Linux measurements exercise the actual CI shard runner and complete auto-reply cohort with serial, two-worker, and eight-worker schedules; separate current-head validation covers the rebased planner and unchanged ACP fixture. Full-cohort timings remain explicitly prior-head evidence.
Evidence reviewed 9 items Introduced scope and merge ownership: Reviewed the pinned merge-base-to-head patch. The test merge has the recorded base followed by the exact PR head as parents; its delta contains only the six intended files.
Still necessary on main: The fetched main version retains fileParallelism: false. Separate inspection of v2026.9.5 found the same serial override, so neither inspected version implements this optimization.
Timing and execution contracts: Auto-reply groups receive a two-worker cap and separate parallel timing identities. Exact measurements precede fallback estimates; legacy split samples require matching complete inventories, and singleton projections retain their full cost. The shard executor intersects group caps with the admitted job ceiling.
Findings None None.
Security None None.

How this fits together

OpenClaw’s CI planner groups test files using historical timings and worker limits. The shard runner executes those groups and records results that inform subsequent scheduling.

flowchart LR
  A[Test file inventory] --> C[CI scheduling planner]
  B[Historical timings] --> C
  C --> D[Worker and job budgets]
  D --> E[Parallel test execution]
  E --> F[Test results and timings]
  F --> B
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +163, Docs +2, Other +71. Total +236 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 183 20 +163
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 1 86 15 +71
Total 6 271 35 +236

Review metrics

Metric Value Why it matters
Measured cohort improvement 828.15 s serial → 521.14 s two-worker median; 37.1% lower Prior-head real-runner evidence supports the scheduling benefit without claiming equivalent end-to-end CI savings.
Code growth allocation Production tooling +71 net lines; tests and test configuration +163 Tooling growth preserves timing provenance and worker-aware estimates; added coverage checks those scheduling contracts.

Technical review

Best possible solution:

Retain the existing scheduling owner, bounded file parallelism, and separate timing identities so later measurements can replace estimates without double-discounting costs.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a product bug reproduction: source confirms the serial override, and the supplied controlled shard runs quantify its scheduling cost.

Is this the best way to solve the issue?

Yes. The patch extends the existing planner and shared test configuration while preserving coverage, budget enforcement, and historical timing distinctions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 904b41e9e99f.

Labels

Label justifications:

  • P2: This is a bounded CI performance improvement with measured savings and no product behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied Linux measurements exercise the actual CI shard runner and complete auto-reply cohort with serial, two-worker, and eight-worker schedules; separate current-head validation covers the rebased planner and unchanged ACP fixture. Full-cohort timings remain explicitly prior-head evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied Linux measurements exercise the actual CI shard runner and complete auto-reply cohort with serial, two-worker, and eight-worker schedules; separate current-head validation covers the rebased planner and unchanged ACP fixture. Full-cohort timings remain explicitly prior-head evidence.

Evidence

What I checked:

  • Introduced scope and merge ownership: Reviewed the pinned merge-base-to-head patch. The test merge has the recorded base followed by the exact PR head as parents; its delta contains only the six intended files. (d682ff60156a)
  • Still necessary on main: The fetched main version retains fileParallelism: false. Separate inspection of v2026.9.5 found the same serial override, so neither inspected version implements this optimization. (test/vitest/vitest.auto-reply-reply.config.ts:11, 904b41e9e99f)
  • Timing and execution contracts: Auto-reply groups receive a two-worker cap and separate parallel timing identities. Exact measurements precede fallback estimates; legacy split samples require matching complete inventories, and singleton projections retain their full cost. The shard executor intersects group caps with the admitted job ceiling. (scripts/lib/ci-node-test-plan.mts:780, d682ff60156a)
  • Meaningful regression coverage: The added planner cases cover three runner profiles, measured-versus-fallback precedence, incomplete or mismatched legacy generations, complete file coverage, and singleton split costs. The abort fixture waits for runtime startup and verifies dispatch settlement before releasing cleanup, retaining cancellation and delivery-suppression assertions. (test/scripts/ci-node-test-plan.test.ts:865, d682ff60156a)
  • Recorded execution evidence: The supplied body records real Linux shard-runner execution on prior head 05c3948: serial control 828.15 seconds, two-worker median 521.14 seconds, and three passing rounds each at two and eight workers, covering 249 files per round. It separately records current-head planner/config validation and ten ACP fixture repetitions. These are cohort wall measurements, not end-to-end CI latency. The linked Testbox provisioning workflow is cancelled, so its status alone is not a passing test receipt; the body explicitly records successful command completion before lease teardown. (d682ff60156a)
  • Re-review continuity: The previous completed review retained no findings or rank-up moves. GitHub’s prior-head content API and the current Git object both identify the ACP fixture as blob 45349ebe176b40d62fcc109db19cf877ed49d083, confirming that fixture is unchanged across the rebase. The local earlier-head comparison was unavailable; the content API supplied this narrower verification. (src/auto-reply/reply/dispatch-from-config.acp-abort.test.ts:230, d682ff60156a)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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 (3 earlier review cycles)
  • reviewed 2026-09-21T02:41:56.206Z sha 94c9e4e :: needs changes before merge. :: none
  • reviewed 2026-09-21T03:30:34.888Z sha 05c3948 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T04:56:45.680Z sha 05c3948 :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review September 21, 2026 03:22
@steipete
steipete enabled auto-merge (squash) September 21, 2026 04:53
@steipete
steipete force-pushed the ci-burden/s-auto-reply-parallel branch from 05c3948 to d682ff6 Compare September 21, 2026 13:00
@steipete
steipete merged commit a9b3c3a into main Sep 21, 2026
156 checks passed
@steipete
steipete deleted the ci-burden/s-auto-reply-parallel branch September 21, 2026 13:31
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
…154306)

* test(auto-reply): synchronize ACP abort with runtime startup

* fix(ci): parallelize auto-reply files within worker budget
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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