Skip to content

ci: refit shard weights within existing runner caps - #135585

Merged
steipete merged 4 commits into
mainfrom
codex/ci-refit-timings-20260901
Sep 2, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/ci-refit-timings-20260901

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Related: #135440

What Problem This Solves

Broad CI runs use stale shard weights, leaving uneven Node and Control UI work. Agent support also falls back to an obsolete estimate when its file inventory changes: adding one test invalidated the old 240-file generation and collapsed four hybrid parts into two. In run 33561910652, one resulting 121-file part took 273 seconds despite a 94-second prediction.

Why This Change Was Made

The existing refitter recomputes 261 weights from successful canonical main-push runs 33537556582, 33537739443, and 33543106647. It retains the two-run minimum, outlier rejection, exact membership identities, and runner-profile separation. No new release Gateway samples were available, so the Gateway map is unchanged.

The hosted large/small packing budgets move from 90/107 to 94/114 predicted seconds so the refreshed measurements fit the unchanged 96-row hybrid and 112-row GitHub caps. The PR-only performance lifecycle fallback becomes 136 seconds, rounded up from two successful Blacksmith wrapper spans; canonical main pushes omit that tooling family.

Agent support now retains a 479-second native fallback, rounded up from complete successful outer shard spans of 478.253, 450.212, and 418.125 seconds in the same three main runs. This is a conservative estimate for inventory changes, not a claimed measurement of the new 241-file generation. Hybrid retains that observed native budget without the older whole-suite scale; the existing 253-second hosted fallback is unchanged. Twelve relative file weights use median case-body sums to separate the slowest support owners. The current hybrid inventory splits into four complete, non-overlapping parts. Direct parent measurements still replace the fallback, and matching child or complete-generation samples can raise the parent-derived floor.

The documentation describes serial compact execution and the actual manual-dispatch exception: seven check rows can use Blacksmith under the unset/Blacksmith backend. Those manual admissions are outside the stated main/PR arrival estimate; routing is unchanged.

User Impact

Maintainers get shard allocation based on newer successful CI observations, including a fallback that survives support-file growth. Coverage, worker limits, process isolation, retries, and runner caps are unchanged. There is no product runtime change. Queue delay and remaining build/test tails still need direct measurement before claiming a sub-five-minute workflow.

Evidence

  • Independently replayed the refitter from retained run records and pinned base data: deep equality with the committed timing file passed, with 261 changes, 144 compact membership keys, and 342 UI file keys. Every selected log member was complete and checked by CRC, size, and EOF.
  • Lifecycle evidence: run 33532741896, job 99939880775 recorded 127.287927 seconds; run 33545657559, job 99982596921 recorded 135.807554 seconds. Both passed all 105 cases on the existing 4-vCPU Blacksmith class.
  • Before/after planner reproduction confirms the support collapse and repair: two parts of 121/120 files become four parts covering all 241 files exactly once. All twelve measured/unmeasured, push/PR, and backend plans pass. Measured push/PR rows are Blacksmith 41/59, hybrid 77/96, and GitHub 81/109. Unmeasured plans also fit the existing caps.
  • The full local owner run passed 133 of 134 cases and exposed one fixture combining synthetic 400/100-second samples with unrelated live weights, exceeding the correctly enforced cap. That fixture now isolates its synthetic samples; all three affected backend cases pass with every original partition and runtime-prerequisite assertion retained. Two other precedence fixtures explicitly supply their historical 165/253-second parent inputs instead of depending on the tuned fallback. Existing inventory, cap, and execution-policy checks passed in the full run.
  • node scripts/check-changed.mjs --base 9a70559beb29001b16b446fe312719790f0a4c53 passed on Node 24.19.0 and pnpm 12.1.0, including script/test types, lint, formatting, and repository guards. git diff --check passed.
  • Fresh full-diff Codex review is clean at the configured P0 threshold (confidence 0.98). Independent source and provenance review caught the nested-versus-outer wrapper distinction; the final 479-second fallback uses the canonical outer spans. No remaining P1/P2 issue was identified in that scoped review.
  • The preceding refit head passed native CI 33564080075: 132 successful jobs and 16 intentional skips. The support-fallback head failed run 33567977603 in a sidebar fixture after main added a catalog-heading marquee. Its global query selected the unchanged heading instead of the renamed session row. Scoping the query to the catalog session and asserting both label values repairs the fixture while retaining the DOM-replacement, class, and style assertions. The old fixture fails on main 9c0ef3b41844ed836625060981e47a1880f38d25; all 323 sidebar cases pass with the repair. Preceding head d851c0e2a4abdb99ea715851a052ff6d144ee5c9 passed native CI 33569988479 on its first attempt: 153 successful jobs and thirteen intentional skips, including the repaired sidebar case. Full workflow time was 7m17s; no sub-five-minute result is claimed.

Local owner commands:

node scripts/run-vitest.mjs test/scripts/ci-test-timings.test.ts test/scripts/ci-node-test-plan.test.ts
node scripts/run-vitest.mjs test/scripts/ci-node-test-plan.test.ts -t 'child groups by the slower'

The conservative arrival estimate remains 4 * (96 + 87) + 19 * (112 + 78 + 87) = 5,995 registrations against the 6,000 operating target and the observed 10,000-registration bucket. Independent audits agree on 87 other potential rows and 78 plugin fallback rows. This has only five registrations of headroom under those assumptions; it is not an organization-wide admission cap or evidence of physical runner availability.

Judged LOC: product runtime +0/-0; CI tooling +28/-7; timing data +252/-215; documentation +11/-9; tests +10/-9; test support +5/-2. The tooling growth records measured fallback provenance and relative placement weights; no new scheduler or test execution path is added.

The related wording-only PR #135469 changes the automated publisher's description of sample sources; this PR leaves that publisher unchanged.

Review disposition

The 23:43 UTC ClawSweeper review covers final head d90babd7048cdf1d5bc291a0c95f06f12a473cc4, finds no actionable code/security defect, and asks only for the incomplete matrix to finish. Exact-head CI 33571672257 is now fully green on its first attempt: 133 successful jobs and sixteen intentional skips, 8m27s workflow time. Preflight and all twelve local planner combinations retain the enforced 96/112 caps. This satisfies the review's matrix and Rank-up request. The stored-data-model heuristic refers to static CI placement metadata; no persisted runtime data, schema, or migration changes.

Main #135597 independently landed the same sidebar repair. The final head adopts its canonical session-label selector without changing assertions or planner behavior; a conflict-free merge was verified against main 759e127777b54426c922e8ab4c228523ddac04e9. Fresh native baseline 50f7f06d8ba3d97c4650e0bcc1d66ed9332e2752 has no overlapping planner, data, or runner change. Formatting and fresh full-diff Codex review at P0 pass, confidence 0.98. The five-minute objective remains open.

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

clawsweeper Bot commented Sep 1, 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 Sep 1, 2026
@steipete
steipete marked this pull request as ready for review September 1, 2026 22:00
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Sep 1, 2026
@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. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 7:43 PM ET / 23:43 UTC.

ClawSweeper review

What this changes

The PR refreshes CI timing metadata and compact-shard packing limits, adds a conservative fallback for changing agent-support test inventories, updates planner tests, and aligns a Control UI test selector.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This maintainer-authored PR still carries a distinct CI timing refit; its sidebar selector is already aligned with current main, but the exact-head shard matrix remains incomplete before merge.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The source-level planner and test changes are coherent, with exact-head CI completion remaining the material merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored CI-planning change is appropriately evidenced through planner invariants and the exact-head workflow matrix; no external-contributor proof action is required.
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 CI-planning change is appropriately evidenced through planner invariants and the exact-head workflow matrix; no external-contributor proof action is required.
Evidence reviewed 5 items Planner owner and cap enforcement: The planner uses the updated hosted packing caps and rejects plans exceeding the established GitHub or hybrid job caps.
Support-inventory fallback: The changed fallback preserves a 479-second parent estimate when agent-support membership no longer matches a measured split generation, while split keys retain exact membership identity.
Planner invariant coverage: Existing planner coverage checks that each split owner has no duplicate files and that its complete include-pattern inventory is retained across Blacksmith, GitHub, and hybrid compact plans.
Findings None None.
Security None None.

How this fits together

CI timing metadata feeds the Node and Control UI shard planners, which turn test inventories and historical durations into runner-limited job partitions. Those partitions drive GitHub Actions execution rather than OpenClaw product runtime behavior.

flowchart LR
  A[Successful CI runs] --> B[Timing metadata]
  C[Test inventory] --> D[Shard planner]
  B --> D
  D --> E[Runner-cap checks]
  E --> F[GitHub Actions jobs]
Loading

Decision needed

Question Recommendation
After the exact-head compact-shard matrix finishes, should this maintainer-authored CI refit be landed? Land after green matrix: Merge when the exact-head CI matrix completes successfully and GitHub remains mergeable.

Why: The protected maintainer label requires explicit maintainer handling, and the remaining decision depends on the unfinished workflow result.

Before merge

  • Resolve merge risk (P1) - The changed automation inputs have not yet completed their exact-head compact-shard workflow matrix; an incorrect estimate could still produce an unsuitable CI partition.
  • Complete next step (P2) - The remaining action is exact-head CI completion and maintainer merge judgment, not a bounded automated repair.
Agent review details

Security

None.

PR surface

Tests +4, Docs +2, Other +58. Total +64 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 15 11 +4
Docs 1 11 9 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 3 280 222 +58
Total 6 306 242 +64

Review metrics

Metric Value Why it matters
Production versus test LOC delta Product runtime +0/-0; CI tooling +28/-7; timing metadata +252/-215; tests +10/-9; test support +5/-2; docs +11/-9 The production change is confined to CI planning and static measurements, with no application-runtime behavior added.

Stored data model

Persistent data-model change detected: unknown-data-model-change: scripts/lib/vitest-shard-metadata.mts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete exact-head validation (recommended)
    Wait for the in-progress compact-shard matrix before merging the changed runner-allocation inputs.

Technical review

Best possible solution:

Retain the refreshed estimates after the exact-head workflow confirms every generated partition remains inside the existing runner caps and preserves complete test ownership.

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

Not applicable: this is CI-planning maintenance, so the relevant reproduction is the planner and exact-head workflow matrix rather than a user-facing defect flow.

Is this the best way to solve the issue?

Yes, provisionally: refreshing the established timing inputs while retaining the existing cap and inventory invariants is the narrowest maintainable approach; the remaining matrix must confirm it.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is CI-planning maintenance with no direct product-runtime behavior change.
  • merge-risk: 🚨 automation: Modified timing inputs and packing limits can alter CI job allocation and workflow completion behavior.
  • 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 CI-planning change is appropriately evidenced through planner invariants and the exact-head workflow matrix; no external-contributor proof action is required.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • qingminlong: 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.

  • Let the in-progress exact-head compact-shard matrix complete successfully.

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 (4 earlier review cycles)
  • reviewed 2026-09-01T22:08:59.310Z sha 8b9af20 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T22:56:41.254Z sha 69a8d6f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T23:20:16.111Z sha d851c0e :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T23:32:16.999Z sha d851c0e :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 1, 2026
Scope the lifecycle fixture to the session row after catalog headings gained their own marquee. Assert both label values while retaining DOM replacement, class, and style checks. Reproduced on main before the fix; all 323 sidebar tests pass afterward.
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Sep 1, 2026
@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 1, 2026
Use the canonical session-label selector landed in #135597. Keep both label-value checks and all marquee reset assertions while removing the duplicate conflict.
@steipete
steipete merged commit d650e7a into main Sep 2, 2026
194 checks passed
@steipete
steipete deleted the codex/ci-refit-timings-20260901 branch September 2, 2026 00:01
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
* ci: refit shard weights within existing runner caps

* ci: retain support shard costs across inventory changes

* test: select the catalog session label for marquee resets

Scope the lifecycle fixture to the session row after catalog headings gained their own marquee. Assert both label values while retaining DOM replacement, class, and style checks. Reproduced on main before the fix; all 323 sidebar tests pass afterward.

* test: align catalog label selector with main

Use the canonical session-label selector landed in openclaw#135597. Keep both label-value checks and all marquee reset assertions while removing the duplicate conflict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui 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: L 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