Skip to content

fix(ci): balance slow runtime tests in complete PR checks - #146916

Merged
steipete merged 1 commit into
mainfrom
codex/ci-pr-runtime-placement
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-pr-runtime-placement

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Complete PR checks can pack several slow runtime suites into one job because they ignore the whole-suite timings already used by main.

User Impact

The existing balancing pass now distributes complete PR runtime suites across existing jobs. The reduced main plan and precise changed-file plans retain their current output. Job counts, runner allocations, worker limits, build counts, test inventory and deadlines remain unchanged.

Both affected test commands are now below eight minutes in exact-head CI. Total assigned-job time still exceeds eight minutes because checkout, setup and build add roughly two minutes; this is an incremental improvement, not completion of the overall CI target.

Why This Change Was Made

CI 34748471920 estimated 133 seconds for a job whose six complete runtime suites actually spent 625 seconds testing. The estimate included a 100-second build allowance. Whole-group measurements were available, but their existing balancing pass only ran for main pushes.

The public complete-plan entry now carries its normalized mode into that pass. Precise plans still build their original templates before selecting individual files. This fixes measurement consumption without adding another scheduler, changing timing weights or feeding whole-suite costs into file splitting.

Evidence

The extended existing regression passed for main and failed for PRs on the original code. All 209 planner/timing owner tests pass with the fix, along with required changed-file checks and independent P2 review.

Exact plan comparisons preserve 48 ordinary plus 2 dist jobs, every job's runner and concurrency, and the complete group/config/env/include inventory. The corpus moves intact between two existing runtime jobs; modeled costs become 436 and 421 seconds, including the existing build allowance. Main-push and precise single-file outputs are deeply identical to their original plans, and legacy complete-plan calls match explicit PR mode. Existing no-fit and runner-anchor safeguards remain covered.

Exact-head CI34750499328 passed. Preflight exercised the candidate planner in the tested merge and both job logs confirm the intact corpus transfer. Test commands took382.34s and447.43s; assigned times were8m31s and9m32s with the same start, versus the prior affected tail of12m02s. Both runners reported2CPUs and8.22GB; neither used a hosted fallback. Checkout alone took62s per job. These cross-run observations are not a controlled benchmark.

Maintainer decision on the review's performance risk: accept the bounded improvement with unchanged jobs/resources and retain the remaining total-job gap explicitly. Continue monitoring complete PR timings under the existing optimization work; revise or revert this balancing change if those observations demonstrate a regression. No new timing weights or eight-minute guarantee.

Product runtime LOC: 0. CI tooling adds 6 net lines to carry the existing complete-plan identity. The existing test is extended, and the owning CI capacity documentation is updated. Changelog remains release-owned.

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

clawsweeper Bot commented Sep 13, 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: S maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 09:54
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 13, 2026, 6:04 AM ET / 10:04 UTC.

ClawSweeper review

What this changes

Extends existing runtime-test balancing to complete pull-request checks while preserving precise changed-file plans, with regression coverage and CI capacity documentation.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful, bounded CI repair: current main still excludes complete PR plans from runtime balancing. No introduced correctness or security defect was found, and the maintainer-protected PR should remain open.

Priority: P2
Reviewed head: 0c054824df58c7f4da67dca71a4a5a82b0a129f2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with useful regression coverage and clearly bounded performance claims.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. Planner comparisons and reported regression results support placement correctness; the linked baseline run does not prove after-fix latency.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. Planner comparisons and reported regression results support placement correctness; the linked baseline run does not prove after-fix latency.
Evidence reviewed 7 items Introduced change and complete-plan boundary: The pinned merge-base-to-head patch changes only the CI skill, capacity documentation, planner, and timing tests. The public complete-plan entry forwards its normalized compact mode; precise selection calls the internal planner with runnerBackend only.
Current main still needs the repair: The fetched main planner still gates runtime placement on compactMode === "push". Its planner difference from the reviewed head matches the two introduced planner hunks.
Existing safety and execution boundaries: CI preflight supplies an explicit mode to complete plans. Runtime balancing admits only serial, non-exclusive runtime jobs; transfers require explicit worker pins, an equal-or-stronger donor anchor, and successful admission of both replacement bins. No-fit plans retain their inventory.
Findings None None.
Security None None.

How this fits together

CI preflight turns test inventories and recorded timings into jobs with fixed runner and worker limits. This change lets complete PR plans redistribute whole runtime-test groups through the existing balancing owner.

flowchart TD
  A[Test inventory and timings] --> B[CI plan selection]
  B --> C[Complete PR or push plan]
  B --> D[Precise changed-file plan]
  C --> E[Balance compatible runtime groups]
  D --> F[Preserve original placement template]
  E --> G[Runner jobs with retained coverage]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - Modeled placement costs do not establish elapsed CI improvement; the PR explicitly acknowledges that the resulting runtime tail may still exceed eight minutes.
Agent review details

Security

None.

PR surface

Tests +28, Docs +3, Other +6. Total +37 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 87 59 +28
Docs 2 6 3 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 1 8 2 +6
Total 4 101 64 +37

Review metrics

Metric Value Why it matters
Implementation versus regression coverage Product runtime +0; CI tooling net +6; tests net +28 lines The small tooling increase carries complete-plan identity into an existing owner, while the existing regression gains PR-mode and precise-plan checks.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Use the existing balancing owner for complete PR plans, preserve precise-plan capacity, and judge performance from native CI timings without changing coverage or deadlines.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Use the existing balancing owner for complete PR plans, preserve precise-plan capacity, and judge performance from native CI timings without changing coverage or deadlines.

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

Yes, from source: complete hybrid PR plans bypass the push-only balancing guard on current main. The linked job confirms a 625-second test step, although this review did not execute the planner or tests.

Is this the best way to solve the issue?

Yes. Forwarding normalized complete-plan identity reuses the existing scheduling and admission rules while leaving precise selection outside whole-suite placement.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: Repairs a source-proven CI scheduling gap with limited operational scope and no demonstrated urgent product regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. Planner comparisons and reported regression results support placement correctness; the linked baseline run does not prove after-fix latency.

Label justifications:

  • P2: Repairs a source-proven CI scheduling gap with limited operational scope and no demonstrated urgent product regression.
  • 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: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. Planner comparisons and reported regression results support placement correctness; the linked baseline run does not prove after-fix latency.

Evidence

What I checked:

  • Introduced change and complete-plan boundary: The pinned merge-base-to-head patch changes only the CI skill, capacity documentation, planner, and timing tests. The public complete-plan entry forwards its normalized compact mode; precise selection calls the internal planner with runnerBackend only. (scripts/lib/ci-node-test-plan.mts:2329, 0c054824df58)
  • Current main still needs the repair: The fetched main planner still gates runtime placement on compactMode === "push". Its planner difference from the reviewed head matches the two introduced planner hunks. (scripts/lib/ci-node-test-plan.mts:3365, b938f093b1e4)
  • Existing safety and execution boundaries: CI preflight supplies an explicit mode to complete plans. Runtime balancing admits only serial, non-exclusive runtime jobs; transfers require explicit worker pins, an equal-or-stronger donor anchor, and successful admission of both replacement bins. No-fit plans retain their inventory. (scripts/lib/ci-runtime-test-placement.mts:26, 0c054824df58)
  • Meaningful regression coverage: The existing test now covers push and PR modes, legacy complete-plan calls, precise-selection stability, group inventory, runner/concurrency/build preservation, and no-fit fallback. The captured PR body reports 209 passing owner tests and a pre-fix failure for PR mode; this read-only review did not execute tests. The introduced diff passes git diff --check. (test/scripts/ci-test-timings.test.ts:173, 0c054824df58)
  • Merged predecessor and routing context: GitHub verifies fix(ci): balance slow runtime test jobs across existing runners #145956 as merged at this SHA and authored by steipete. Its body explicitly says placement was inactive for the PR profile and accepts an incremental improvement without claiming eight-minute CI. Main history also associates the runtime-placement owner with this commit. Exact source-line introduction was not established because historical blobs needed by blame were unavailable. (scripts/lib/ci-runtime-test-placement.mts, 2ea6c54476b3)
  • Observed CI bottleneck: The linked baseline job's GitHub timestamps show its Node test step ran from 08:51:25 to 09:01:50 UTC, or 625 seconds. This corroborates the operational problem but is not after-fix speedup evidence.

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.

@steipete
steipete merged commit 2908c7e into main Sep 13, 2026
186 of 189 checks passed
@steipete
steipete deleted the codex/ci-pr-runtime-placement branch September 13, 2026 10:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146883: (159 commits)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146833: (43 commits)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-146802: (51 commits)
  improve: reduce worktree filesystem stalls and archive syncs (#146906)
  fix(ui): avoid extra chat rail work while replies stream (#146883)
  improve(ui): speed up populated Usage timelines (#146947)
  test(gateway): retain auth recovery failure diagnostics (#146925)
  fix(tests): create private temporary home directories (#146931)
  fix(backup): preserve discovery under concurrent state writes (#146912)
  fix: keep queued deliveries in their original state directory (#146917)
  fix(discord): settle voice waveform work before releasing input (#146885)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
…ssion-list-roster-batch-20260913

* commit 'f513c0f345f7f2514c49ccfbc00adc3f78b9a755': (46 commits)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  fix: share Doctor lifecycle coordination with SQLite workers (#146714)
  fix: retain native session model provenance (#146801)
  fix: settle embedded transcript repairs before session cleanup (#146842)
  feat(macos): improve agent navigation and chat layout (#146531)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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