Skip to content

perf(ci): recalibrate compact shard hints to 5-run measured means#109717

Merged
steipete merged 1 commit into
mainfrom
perf/ci-shard-rebalance
Jul 17, 2026
Merged

perf(ci): recalibrate compact shard hints to 5-run measured means#109717
steipete merged 1 commit into
mainfrom
perf/ci-shard-rebalance

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Compact node-test shard bins drifted from their duration hints: checks-node-compact-large-6 measured 317s mean (365s worst) while siblings ran 139–290s — a ~1.3min p90 tail on every test-running PR. Root cause: src/agents/cli-runner.reliability.test.ts costs 245s solo (import 274s, tests 1.6s) but its stripe-file hint said 7s, so the packer kept adding hitchhikers to its bin, and several other group hints were 2–8x off current reality.

Why This Change Was Made

Recalibrated every COMPACT_GROUP_SECONDS_HINTS and the relevant STRIPE_FILE_SECONDS_HINTS entry to 5-run means parsed from [shard:<group>] begin/end timestamps across five green runs (29557851276, 29558164241, 29558528472, 29558634980, 29558677406); added four missing group entries where the per-file default was materially wrong. LPT now isolates the 245s whale into its own stripe. No planner logic, shard-count constants, pinned-group regexes, or exclusive-bin invariants changed — hints and provenance comments only.

User Impact

None at runtime — CI-only. Test-running PRs: 26 → 23 shard jobs (−4 × ~60s fixed setup), max bin 317s → 305s (now exactly the one unsplittable file), sibling bins ≤280s with large-class max/mean 1.145.

Evidence

  • Before-plan reproduced the observed CI bins exactly when evaluated with measured walls; after-plan printed and evaluated the same way (bin compositions in the commit body).
  • node scripts/run-vitest.mjs test/scripts/ci-node-test-plan.test.ts test/scripts/ci-run-node-test-shard.test.ts test/scripts/ci-changed-node-test-plan.test.ts test/scripts/ci-workflow-guards.test.ts — 124 passed, 1 skipped.
  • oxfmt + git diff --check clean; autoreview (codex/gpt-5.6-sol) first-pass clean, 0 findings.
  • Follow-up chip filed: profile/trim the reliability file's 245s module import — the remaining hard floor.

Recalibrate COMPACT_GROUP_SECONDS_HINTS and the cli-runner stripe file
hints against mean [shard:*] begin->end wall clock from five green
Blacksmith compact PR runs (29557851276, 29558164241, 29558528472,
29558634980, 29558677406).

Measured before (job wall, 5-run mean): 26 jobs; tail compact-large-6 =
317s (cli-runner stripe with the whale file) vs siblings 139-290s;
compact-small-10 = 277s. Key drifts: cli-runner.reliability.test.ts
measures 245s solo (import-dominated; stripe hint said 7s, so LPT packed
it with extra groups), auto-reply commands stripes 26/9/12s vs 92s
hints, core-unit-fast 142s vs 190s, tui-pty 103s vs 200s.

Computed after (planner output, measured-mean walls): 23 jobs (-4 fixed
~60s setups); reliability stripe isolated as its own 305s bin (floor set
by that single file's 245s module import), every sibling bin <= 280s;
large-runner class max/mean = 1.145. Pinned-worker and exclusive-bin
invariants unchanged.
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Jul 17, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 2:29 AM ET / 06:29 UTC.

Summary
The PR replaces stale compact Node-test duration estimates with five-run measured means so the existing planner produces fewer, more evenly balanced CI shard jobs.

PR surface: Other +10. Total +10 across 1 file.

Reproducibility: not applicable. as a product bug; the CI imbalance is instead supported by five measured workflow runs and reproduced planner output.

Review metrics: 3 noteworthy metrics.

  • Timing sample: 5 green CI runs. Using several successful runs reduces the chance that one noisy execution dictates the shard estimates.
  • Planned fanout: 26 → 23 shard jobs. The reported reduction removes repeated setup overhead while retaining the existing planner invariants.
  • Predicted tail: 317s → 305s maximum. The remaining maximum is attributed to one unsplittable test file rather than avoidable packing imbalance.

Stored data model
Persistent data-model change detected: migration/backfill/repair: scripts/lib/ci-node-test-plan.mjs. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • [P2] No repair lane is needed; this clean implementation PR should proceed through ordinary exact-head checks and maintainer review.

Security
Cleared: The diff changes static CI timing estimates only and introduces no dependency, permission, secret, artifact-download, or third-party execution surface.

Review details

Best possible solution:

Keep the existing planner algorithm and land the measured hint recalibration once the exact-head CI run confirms the expected balanced matrix without shard failures.

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

Not applicable as a product bug; the CI imbalance is instead supported by five measured workflow runs and reproduced planner output.

Is this the best way to solve the issue?

Yes; updating the existing advisory cost model from repeated measurements is the narrowest maintainable fix because the planner algorithm and correctness invariants remain unchanged.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P3: This is a low-risk internal CI performance adjustment with no product-runtime or user-facing behavior change.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Five green live CI runs supply the baseline, and the PR provides after-change planner evaluation plus an exact-head shard matrix exercising the recalibrated plan.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Five green live CI runs supply the baseline, and the PR provides after-change planner evaluation plus an exact-head shard matrix exercising the recalibrated plan.

Label justifications:

  • P3: This is a low-risk internal CI performance adjustment with no product-runtime or user-facing behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Five green live CI runs supply the baseline, and the PR provides after-change planner evaluation plus an exact-head shard matrix exercising the recalibrated plan.
  • proof: sufficient: Contributor real behavior proof is sufficient. Five green live CI runs supply the baseline, and the PR provides after-change planner evaluation plus an exact-head shard matrix exercising the recalibrated plan.
Evidence reviewed

PR surface:

Other +10. Total +10 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 94 84 +10
Total 1 94 84 +10

What I checked:

Likely related people:

  • steipete: Current-main history attributes multiple shard rebalancing, artifact reuse, timeout, and planner-lane commits to this person, including 1bfef17 and ecc8fe5. (role: recent CI shard-balancing contributor; confidence: high; commits: 1bfef17, ecc8fe5, ca9d2f3; files: .github/workflows/ci.yml, scripts/lib/ci-node-test-plan.mjs)
  • Takhoffman: Commit ab37d88 introduced the planner-backed test runner, and 5b68e52 later consolidated the CI preflight manifest that consumes planner output. (role: planner architecture introducer; confidence: high; commits: ab37d8810dbe, 5b68e528940a; files: .github/workflows/ci.yml, scripts/test-planner/planner.mjs, test/scripts/test-planner.test.ts)
  • vincentkoc: Current-main workflow history includes shard-fanout and CI setup changes such as ac8a5a6 and 8a59b09, making this person a useful secondary reviewer for matrix-capacity effects. (role: adjacent CI fanout contributor; confidence: medium; commits: ac8a5a6, 8a59b09, 2feb83b; files: .github/workflows/ci.yml)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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
steipete merged commit f1fc40f into main Jul 17, 2026
152 of 161 checks passed
@steipete
steipete deleted the perf/ci-shard-rebalance branch July 17, 2026 07:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 18, 2026
…openclaw#109717)

Recalibrate COMPACT_GROUP_SECONDS_HINTS and the cli-runner stripe file
hints against mean [shard:*] begin->end wall clock from five green
Blacksmith compact PR runs (29557851276, 29558164241, 29558528472,
29558634980, 29558677406).

Measured before (job wall, 5-run mean): 26 jobs; tail compact-large-6 =
317s (cli-runner stripe with the whale file) vs siblings 139-290s;
compact-small-10 = 277s. Key drifts: cli-runner.reliability.test.ts
measures 245s solo (import-dominated; stripe hint said 7s, so LPT packed
it with extra groups), auto-reply commands stripes 26/9/12s vs 92s
hints, core-unit-fast 142s vs 190s, tui-pty 103s vs 200s.

Computed after (planner output, measured-mean walls): 23 jobs (-4 fixed
~60s setups); reliability stripe isolated as its own 305s bin (floor set
by that single file's 245s module import), every sibling bin <= 280s;
large-runner class max/mean = 1.145. Pinned-worker and exclusive-bin
invariants unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts 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