Skip to content

improve(ci): cut hybrid compact runner overhead - #124622

Merged
steipete merged 2 commits into
mainfrom
steipete/blacksmith-compact-ci-hints-8a85c8
Aug 16, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/blacksmith-compact-ci-hints-8a85c8

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves an operational CI efficiency problem where the hybrid compact Node planner used the GitHub-hosted timing profile even though attempt-1 jobs run on Blacksmith. That mismatch expanded normal push plans to 69 compact jobs and spent avoidable runner setup time without shortening the critical path.

Why This Change Was Made

Hybrid keeps the hosted-derived splitting topology and unchanged 150-second split ceiling so retries remain safe on GitHub-hosted runners, but now packs and rebalances native groups using Blacksmith timing ownership. The Blacksmith estimate uses a measured 0.87 scale, direct doctor and cron outlier hints, and a 140-second singleton floor for the historical gateway tail. Synthesized hosted stripes retain their divided parent weight; the GitHub-hosted profile remains unchanged.

This is an AI-assisted, bounded maintainer-requested CI performance repair.

User Impact

There is no product behavior change. Hybrid pushes shrink from 69 observed compact jobs to 46 nondist jobs (47 descriptors when the dist boundary is counted), saving an expected roughly 20 runner-minutes per run while keeping the predicted hybrid maximum at 140 seconds. Pull-request fallback plans shrink to 53 nondist jobs (55 descriptors); GitHub-hosted plans remain 70 push / 79 fallback descriptors.

Evidence

  • Complete hybrid main runs 31945998653 and 31949756966 each ran 69 successful compact jobs: 36 on blacksmith-4vcpu-ubuntu-2404 and 33 on blacksmith-8vcpu-ubuntu-2404. Their compact shard work totaled 3,742.046s and 3,756.674s versus a 4,723s unscaled Blacksmith hint sum (79.230% and 79.540%).
  • Historical run 31938297538 recorded the gateway tail at 218s wall / 140s in Run Node test shard, motivating the preserved 140-second singleton floor.
  • node scripts/run-vitest.mjs test/scripts/ci-node-test-plan.test.ts test/scripts/ci-workflow-guards.test.ts — 143 passed, 2 skipped.
  • Targeted oxfmt check and git diff --check are clean.
  • Replaying run 31949756966 against the new plan yields a 111.045s maximum shard-work bin and projects 159.0–162.4s wall, below the sampled build-artifacts pole.
  • Final autoreview completed clean with no accepted or actionable findings.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts labels Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 14:00
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at bb62284ee9d81ace2bb5505ccbdf1f7cc6d786f4.

Local proof:

node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-root.tsbuildinfo
PASS

node scripts/run-vitest.mjs test/scripts/ci-node-test-plan.test.ts test/scripts/ci-workflow-guards.test.ts
143 passed, 2 skipped

node_modules/.bin/oxfmt --check test/scripts/ci-workflow-guards.test.ts
All matched files use the correct format.

git diff --check
PASS

.agents/skills/autoreview/scripts/autoreview --mode local
clean; no accepted/actionable findings

Exact-head pull-request CI is green: run 31951744717, bound to the full SHA above. The first head's run 31951472771 found a fixture-only test-type error; the default backend case now passes undefined into the typed fixture and still asserts the emitted empty environment value. The corrected head passed the exact failing test-type command and the full focused suite.

The native landing artifacts validate with recommendation READY FOR /prepare-pr and issueValidation.status=valid. OPENCLAW_TESTBOX=1 scripts/pr prepare-run 124622 passed in hosted_exact_or_recent_parent mode by reusing the exact-head green run; no separate Testbox lease or Actions run was created.

Measured before/after planner evidence:

  • Complete hybrid main runs 31945998653 and 31949756966 each ran 69 successful compact jobs (36 on 4-vCPU Blacksmith and 33 on 8-vCPU Blacksmith).
  • The repaired hybrid push plan emits 47 descriptors / 46 nondist compact jobs; the fallback plan emits 55 descriptors / 53 nondist jobs. The GitHub-hosted 70/79 profiles are unchanged.
  • The 150-second hosted split ceiling remains intact, and the historical gateway tail from 31938297538 retains a 140-second singleton floor.
  • Replay of run 31949756966 maxes at 111.045 seconds of shard work, projecting 159.0-162.4 seconds wall below the sampled build-artifacts pole. Expected savings are roughly 20 runner-minutes per hybrid push.

Latest ClawSweeper state is the exact-head in-progress placeholder, with no published Rank-up moves: yet. There are therefore no scoped moves to apply; per repository policy the queued/late publisher is not a landing blocker after exact-head CI, autoreview, artifacts, and native gates are green.

Known gap: the fresh canonical post-merge main push is still pending by definition. I will measure its compact runner-minutes, shard-work distribution, slowest compact wall, and build-artifacts pole after merge.

@clawsweeper clawsweeper Bot added 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 16, 2026
@steipete
steipete merged commit 3e2edc7 into main Aug 16, 2026
147 checks passed
@steipete
steipete deleted the steipete/blacksmith-compact-ci-hints-8a85c8 branch August 16, 2026 14:12
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 10:11 AM ET / 14:11 UTC.

ClawSweeper review

What this changes

Updates the compact Node-test CI planner so hybrid runs pack attempt-one Blacksmith jobs from Blacksmith-calibrated estimates while retaining hosted split topology for retries.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer handling. Current main still gives hybrid the GitHub-hosted planner profile, while this fresh maintainer-labeled PR separates retry-safe hosted splitting from Blacksmith attempt-one packing; direct inspection of the PR head was blocked by an unavailable promisor object and network DNS failure.

Priority: P3
Reviewed head: bb62284ee9d81ace2bb5505ccbdf1f7cc6d786f4
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source-level premise is well supported, but local inspection could not retrieve the complete PR head for a higher-confidence patch rating.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-owned internal CI-planning change; its supplied historical-run evidence is useful operational context, while exact-head CI remains the merge gate.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-owned internal CI-planning change; its supplied historical-run evidence is useful operational context, while exact-head CI remains the merge gate.
Evidence reviewed 4 items Current main reproduces the planning mismatch: Hybrid is classified as a GitHub runner profile, so it uses hosted timing hints and the hosted fallback scale; the current regression test asserts hybrid output equals the GitHub-hosted plan.
Workflow caller and retry contract: Preflight passes OPENCLAW_CI_RUNNER_BACKEND to the planner; docs state hybrid uses Blacksmith on attempt one and GitHub-hosted runners after retries.
Feature provenance: Blame attributes the current hybrid/hosted profile decision and adjacent estimation logic to Peter Steinberger's commit 0c54697; the same commit introduced the checked planner and its profile tests.
Findings None None.
Security None None.

How this fits together

CI preflight passes the selected runner backend into the compact Node-test planner, which emits the matrix consumed by Node test jobs. Hybrid jobs run on Blacksmith for attempt one and on GitHub-hosted capacity after a retry.

flowchart LR
  A[CI event and runner backend] --> B[Preflight planner]
  B --> C[Hosted split topology]
  C --> D[Hybrid packing estimates]
  D --> E[Node test matrix]
  E --> F[Blacksmith attempt one]
  E --> G[GitHub-hosted retry]
Loading

Decision needed

Question Recommendation
Should this maintainer-owned planner refit proceed after exact-head CI and an initial hybrid timing observation confirm that denser attempt-one packing does not create a new critical-path tail? Verify then merge: Require exact-head green CI and one observed hybrid attempt-one plan/run within the stated wall-time expectation before merging.

Why: The intended profile separation follows the documented retry boundary, but sampled timing estimates are an operational tradeoff and the full local PR head was unavailable for independent verification.

Before merge

  • Resolve merge risk (P2) - Hybrid retries remain hosted while attempt one becomes more densely packed on Blacksmith; sampled timing factors and the singleton floor need exact-head CI plus an initial hybrid-run observation to rule out a slower tail or timeout.
  • Resolve merge risk (P1) - The PR head object and latest filtered ClawSweeper review text were unavailable locally, so this review cannot verify the complete patch or any rank-up moves.
Agent review details

Security

None.

PR surface

Tests +42, Docs +4, Other +32. Total +78 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 99 57 +42
Docs 1 6 2 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 1 61 29 +32
Total 4 166 88 +78

Review metrics

Metric Value Why it matters
Planner versus test delta production +32/-29; tests +99/-57; docs +6/-2 The production growth implements a separate hybrid timing policy, while focused planner and workflow-fixture coverage expands across backend profiles.

Stored data model

Persistent data-model change detected: serialized state: test/scripts/ci-workflow-guards.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Observe the hybrid plan before merge (recommended)
    Finish exact-head CI and inspect an initial hybrid run so the new estimates prove they reduce registrations without extending the critical path.
  2. Accept the sampled timing policy
    Merge with the historical-run basis and monitor the next hybrid main runs for tail regression.

Technical review

Best possible solution:

Keep one planner with hosted-derived splitting for retry safety and Blacksmith-specific hybrid packing, then confirm the exact head and the first hybrid run preserve bounded wall time.

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

Yes—source-reproducible on current main: hybrid is explicitly routed through the GitHub timing profile and the adjacent test asserts equality with the hosted plan. This read-only review did not execute the planner.

Is this the best way to solve the issue?

Unclear. Separating hosted retry topology from Blacksmith attempt-one packing matches the documented runner contract, but the complete PR-head implementation could not be read from the promisor checkout.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is bounded CI efficiency work with no reported product behavior change.
  • add merge-risk: 🚨 automation: The patch changes compact CI matrix sizing and packing for hybrid runner execution, which can affect CI capacity and job duration after merge.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-owned internal CI-planning change; its supplied historical-run evidence is useful operational context, while exact-head CI remains the merge gate.

Label justifications:

  • P3: This is bounded CI efficiency work with no reported product behavior change.
  • merge-risk: 🚨 automation: The patch changes compact CI matrix sizing and packing for hybrid runner execution, which can affect CI capacity and job duration after merge.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-owned internal CI-planning change; its supplied historical-run evidence is useful operational context, while exact-head CI remains the merge gate.

Evidence

What I checked:

  • Current main reproduces the planning mismatch: Hybrid is classified as a GitHub runner profile, so it uses hosted timing hints and the hosted fallback scale; the current regression test asserts hybrid output equals the GitHub-hosted plan. (scripts/lib/ci-node-test-plan.mts:634, 99bda3d8cda4)
  • Workflow caller and retry contract: Preflight passes OPENCLAW_CI_RUNNER_BACKEND to the planner; docs state hybrid uses Blacksmith on attempt one and GitHub-hosted runners after retries. (.github/workflows/ci.yml:754, 99bda3d8cda4)
  • Feature provenance: Blame attributes the current hybrid/hosted profile decision and adjacent estimation logic to Peter Steinberger's commit 0c54697; the same commit introduced the checked planner and its profile tests. (scripts/lib/ci-node-test-plan.mts:634, 0c546979b2ac)
  • Head-inspection limitation: The local promisor checkout lacks the PR head object; Git attempted a read-only fetch but DNS resolution for GitHub failed, so the complete head diff and latest filtered ClawSweeper comment could not be independently read. (bb62284ee9d8)

Likely related people:

  • steipete: Current-main blame assigns the hybrid profile and estimator lines to Peter Steinberger, and the same commit introduced the planner and adjacent profile tests. (role: current planner author and recent area contributor; confidence: high; commits: 0c546979b2ac; files: scripts/lib/ci-node-test-plan.mts, test/scripts/ci-node-test-plan.test.ts)

Rank-up moves

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

  • Complete exact-head CI.
  • Attach a redacted initial hybrid-run timing or plan artifact showing the denser matrix remains within the intended wall-time bound.

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete

Copy link
Copy Markdown
Contributor Author

Post-merge verification is complete on canonical main push CI run 31952038693 at 3e2edc7f229ea76d1dd3ddab8fb9b425541c34c8. The run and openclaw/ci-gate are green.

  • Plan shape: 46 nondist compact jobs (47 descriptors including the dist boundary). All 46 attempt-1 jobs used Blacksmith: 21 on 4-vCPU and 25 on 8-vCPU.
  • Compact runner time: 93.98 minutes total, versus 117.50 and 122.37 minutes in baseline runs 31945998653 and 31949756966. Realized savings: 23.52-28.38 runner-minutes per push.
  • Run Node test shard: 64.65 minutes total. Fixed job overhead was 29.33 minutes / 38.26 seconds per job, down from 54.93-59.55 minutes / 47.77-51.78 seconds per job in the baselines.
  • One-pass [shard:*] begin/end measurement: 123 complete child groups, 0 unmatched, 3,874.170 seconds total work. Group work min/median/max was 0.606 / 27.067 / 111.855 seconds; per-job summed work min/median/max was 46.505 / 87.352 / 121.582 seconds.
  • Compact job wall min/median/max was 84 / 126 / 161 seconds. The 161-second tail matches the predicted 159.0-162.4-second range and stays far below the historical 218-second gateway tail.
  • This unusually fast run's build-artifacts job completed in 130 seconds, versus 167/170 seconds in the two sampled baselines. Therefore compact did not stay below the build pole in this sample: the slowest compact job was 31 seconds later. That is a build-speed shift, not a compact regression; the compact tail was essentially flat versus the 156/160-second baseline tails while runner usage fell by 20%+.

This supplies the initial hybrid-run observation requested in ClawSweeper's optional rank-up moves. The live runner-registration bucket was not available on this host (ghx absent, personal REST quota exhausted), but the observed matrix registered only the intended 46 compact runners.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 17, 2026
* perf(ci): refit compact planner hints for Blacksmith

* test(ci): type default runner backend fixture
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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