Skip to content

ci: run CLI tests with fewer jobs and builds - #138297

Merged
steipete merged 2 commits into
mainfrom
codex/consolidate-cli-runtime-bins
Sep 4, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/consolidate-cli-runtime-bins

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Related: #138325

What Problem This Solves

Ordinary CI allocates separate jobs to short CLI groups and repeats runtime preparation for compatible CLI consumers. This adds runner setup and queue pressure while the groups already run in separate processes.

Why This Change Was Made

Pack eligible non-build CLI groups into serial jobs with a 250-second estimated budget; each child must still fit its original 150-second limit. Runtime-consuming CLI siblings can share one preparation within the existing 150-second job budget. Recheck all sibling-sharing rules against the complete bin on every insertion so later unrelated work cannot invalidate an earlier exemption.

File selections, workers, process isolation, timing identities and fixed stripe separation are preserved. Other runner profiles and named/manual plans are unchanged. CI documentation describes both packing rules.

User Impact

Against main 26f87a37009b, the complete hybrid main plan uses 27 jobs instead of 30 and the broad PR fallback uses 50 instead of 52, including unchanged dist boundary rows. Main requires one fewer runtime-build job; broad PR build-job counts stay unchanged. No product behavior changes.

Evidence

Fresh planner/executor proof passes all 82 cases on the current head. The complete six-profile census preserves every child descriptor and its multiplicity, including upstream's new plugin UI tests. A regression first reproduced later unrelated work invalidating an existing sibling exemption and passes with the final-bin repair. The original 19 canonical changed checks passed before the patch-equivalent rebase; focused tests and full descriptor conservation were repeated for the new discovery owner and dependency state.

The previous native CI run completed in 7:31. All six affected bins passed in 3:03–6:24, with 2–8 seconds of ready queue; all 17 serial group invocations exited successfully. That run failed only the independent UI startup-size check and its aggregate gate. Upstream #138449 reconciled the measured main baseline, and this head includes that fix. This is successful packing evidence, not a claim of green current-head CI or eight-minute completion for every platform and scope.

Fresh native CI on this head passed all 78 selected jobs, with 16 scope skips and no failures. The six affected bins passed in 3:10–6:34, and every executed job finished within 6:58. All 17 actual child groups completed serially with zero exits. The full workflow took 30:45 because jobs waited up to 24:30 for runners; this is not an eight-minute end-to-end result. Available CPU/RAM and cleanup are recorded; the runner emitted no numeric peak-memory sample.

Independent managed review completed two fresh passes with no actionable P0–P2 findings.

@steipete steipete self-assigned this Sep 4, 2026
@clawsweeper

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

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 4, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 3:58 PM ET / 19:58 UTC.

ClawSweeper review

What this changes

This PR packs eligible non-build CLI test groups into fewer hybrid CI jobs and lets affordable runtime CLI split groups share one runtime preparation step.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open. The introduced planner logic preserves serial child execution and has focused invariant coverage, but this CI-capacity change still needs fresh exact-head native timing, memory, cleanup, and inventory evidence before landing.

Priority: P3
Reviewed head: 46c2f080f8707c75c9d03b27e13b634d43b97823

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The implementation and planner-boundary coverage are solid, with remaining native CI confirmation required for the operational rollout claim.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored internal CI-planning change is exempt from the external-contributor proof gate; repository policy still requires exact-head native CI evidence for its operational claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored internal CI-planning change is exempt from the external-contributor proof gate; repository policy still requires exact-head native CI evidence for its operational claim.
Evidence reviewed 6 items Introduced packing boundary: The new hybrid exemption requires a complete no-dist, no-build CLI-only bin, verifies each child against the existing 150-second limit, and applies the 250-second cap only to that narrow case.
Executor preserves process isolation: The workflow forwards packed groups and prebuild mode to the runner; the runner creates one child process per group and awaits all children. The new serial bins retain plan concurrency one.
Planner invariant coverage: Focused tests cover affordable runtime sibling sharing, separation when timing grows, the 250-second no-build CLI cap, oversized children, and a later incompatible group revoking an earlier exemption.
Findings None None.
Security None None.

How this fits together

The CI planner converts the full test inventory and timing data into isolated job descriptors for GitHub Actions. Its packing rules determine runner usage, runtime-build reuse, and which test groups execute together or separately.

flowchart LR
  A[Test inventory] --> B[CI test planner]
  C[Timing and runner limits] --> B
  B --> D[CLI packing rules]
  D --> E[Runtime preparation]
  D --> F[Isolated test processes]
  E --> G[CI job results]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - The final head does not yet have recorded native observations for the changed bins, so the estimated runner reduction and cleanup behavior remain unverified on the landing revision.
  • Complete next step (P2) - Complete fresh exact-head native CI and record elapsed-time, memory, cleanup, and child-inventory observations for the changed CLI bins.
Agent review details

Security

None.

PR surface

Tests +195, Docs +6, Other +34. Total +235 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 204 9 +195
Docs 2 11 5 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 1 45 11 +34
Total 4 260 25 +235

Review metrics

Metric Value Why it matters
Production versus test delta production +34, tests +195, docs/skills +6 net The production growth is a bounded CI-planning rule set accompanied by substantially larger invariant coverage.

Merge-risk options

Maintainer options:

  1. Confirm the exact-head compact plan (recommended)
    Complete a native run on the final revision and record the affected CLI bins’ elapsed time, memory, cleanup, and child inventory before merge.

Technical review

Best possible solution:

Retain the narrow, final-bin eligibility checks and land only after a fresh exact-head native run confirms elapsed time, memory, cleanup, and complete child-inventory preservation.

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

Not applicable: this is internal CI planning work, not a report of a user-facing runtime defect; focused planner tests define the relevant scenarios.

Is this the best way to solve the issue?

Yes, provisionally: the final-bin checks preserve the existing isolation and timing invariants while limiting packing to eligible CLI groups; native exact-head confirmation remains necessary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c76103acf46a.

Labels

Label justifications:

  • P3: This is internal CI capacity optimization with no claimed user-facing behavior change.
  • merge-risk: 🚨 automation: The new job-packing and build-sharing rules can change CI execution and coverage behavior after merge.
  • 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: This maintainer-authored internal CI-planning change is exempt from the external-contributor proof gate; repository policy still requires exact-head native CI evidence for its operational claim.

Evidence

What I checked:

  • Introduced packing boundary: The new hybrid exemption requires a complete no-dist, no-build CLI-only bin, verifies each child against the existing 150-second limit, and applies the 250-second cap only to that narrow case. (scripts/lib/ci-node-test-plan.mts:2705, 46c2f080f870)
  • Executor preserves process isolation: The workflow forwards packed groups and prebuild mode to the runner; the runner creates one child process per group and awaits all children. The new serial bins retain plan concurrency one. (scripts/ci-run-node-test-shard.mts:314, 46c2f080f870)
  • Planner invariant coverage: Focused tests cover affordable runtime sibling sharing, separation when timing grows, the 250-second no-build CLI cap, oversized children, and a later incompatible group revoking an earlier exemption. (test/scripts/ci-node-test-plan.test.ts:774, 46c2f080f870)
  • Current-main necessity check: The fetched main commit is descended from the PR base but not from this open PR head, and none of the four introduced paths changed from the PR base to fetched main; the work is not already implemented there. (c76103acf46a)
  • Area history: Recent merged CI packing and split-family work in this planner area is attributed to Peter Steinberger, including commits c4b88dd and 506490e. (scripts/lib/ci-node-test-plan.mts:2705, c4b88ddad2c2)
  • Native-proof gap: The PR body says fresh native CI is pending, while the supplied check projection is incomplete. The applicable CI policy requires hosted exact-head gates plus native elapsed-time, memory, cleanup, and inventory evidence for fewer-job tuning. (.agents/skills/openclaw-ci-limits/SKILL.md:257, 46c2f080f870)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record exact-head native elapsed-time, memory, cleanup, and child-inventory observations for the affected CLI bins.

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 (2 earlier review cycles)
  • reviewed 2026-09-04T13:48:05.313Z sha cf27476 :: blocked before merge. :: none
  • reviewed 2026-09-04T17:56:36.903Z sha 7c94136 :: blocked before merge. :: none

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reuse exception is appropriately narrow: only generated CLI runtime children with the same runtime prerequisite can cohabit, and the unchanged 150-second serial wall still splits them when measured costs rise. Keeping each group as its own process/config preserves isolation while avoiding duplicate compilation. I would treat the 146-second planner estimate as planning evidence only; native CI should confirm the actual combined wall time before calling this a throughput win.

@steipete
steipete force-pushed the codex/consolidate-cli-runtime-bins branch from cf27476 to 7c94136 Compare September 4, 2026 17:41
@steipete steipete changed the title ci: share runtime builds across serial CLI test groups ci: run CLI tests with fewer jobs and builds Sep 4, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 4, 2026
@steipete
steipete force-pushed the codex/consolidate-cli-runtime-bins branch from 7c94136 to 46c2f08 Compare September 4, 2026 19:18
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 4, 2026
@steipete
steipete merged commit 818f1c7 into main Sep 4, 2026
144 checks passed
@steipete
steipete deleted the codex/consolidate-cli-runtime-bins branch September 4, 2026 20:44
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
* ci: share runtime builds across serial CLI test groups

* ci: pack serial CLI tests into fewer jobs
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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

2 participants