Skip to content

fix: avoid oversized PR CI jobs when smaller rows fit - #160254

Open
roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/fix-assignment-ci-packing-20260928
Open

roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/fix-assignment-ci-packing-20260928

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #154239

What Problem This Solves

Fixes: PR CI can fall back to larger pre-split test jobs unnecessarily when compatible budgeted rows would fit its 130-job limit.

User Impact

No product behavior changes. Maintainers can run the same selected coverage in fewer CI jobs. The 130-job limit, 150-second admission budget, ten-group limit, worker/concurrency settings, runner choice, exclusivity, timeouts and build requirements remain unchanged.

Why This Change Was Made

Consolidate only whole, already-bounded serial rows with identical execution policies, using the existing packing function and canonical policy key. Unknown-cost, concurrent, standalone, oversized and build-dependent rows retain their original execution boundaries.

The current main compactNodeJobCap fallback remains unchanged. Packing finishes at the bounded-row owner before the caller evaluates that fallback, so fitting 150-second rows are retained and genuinely over-cap plans keep the existing canonical fallback.

The existing Git-tooling concurrency comparison also now uses the backend under test rather than silently comparing GitHub/hybrid rows against default Blacksmith routing. Its assertions remain intact.

Evidence

  • Seventeen capacity and policy-boundary regression cases pass; the pre-fix control fails five assertions, including 131 jobs instead of 130.

  • Assignment-candidate replay preserves all 5,273 selected targets and the complete child-descriptor multisets: GitHub 147 → 127 jobs (279 groups), hybrid 144 → 124 (308 groups). Every merged row stays at or below 150 seconds and ten groups. This is local planning evidence, not an exact replay of the unavailable hosted synthetic merge.

  • The pinned main integration replay naturally selects 273 targets and plans 20 GitHub / 50 hybrid jobs with the workflow cap of 130; the new regression file is selected.

  • Scripts/root-test types, formatting, targeted lint, line-cap and source guards, export checks, and independent P0–P2 review passed for the packing repair. The aggregate changed-check command initially stopped on a test-mock export-analysis problem; typed named mocks fixed it and the exact export scan passed. No unrelated exports were removed.

  • 338 cases passed across the full changed-planner owner suite and the new regression file (489.09 s Vitest; 490.00 s wrapper). This includes the backend-fixture correction: two failures reproduced on pristine source, and now pass without weakening assertions. The existing planner suite is slow because it repeatedly exercises real repository owner/import selection; the 17 new synthetic cases took 25 ms in this run.

  • Conflict integration: 21 focused cases passed (4.76 s Vitest; 5.64 s wrapper), covering packing before the explicit cap, the inherited fallback/dist-budget behavior and all three backend comparisons. Without packing before the cap, both capped controls select 129 overlong canonical rows instead of 130 budgeted rows. Unchanged contracts reuse the full 338-case proof above.

  • The published linear fixup automatically merges with pinned main to the exact reviewed and tested integrated tree. GitHub verifies its signature; no signing or ancestry guard was overridden.

No workflow dispatch, cap increase, selection reduction or full repository test suite is used as proof.

Worked on by

Work sessions


View the OpenClaw team session

Pack compatible whole bounded serial rows with the existing canonical execution-policy key and packer. Preserve selected coverage, worker envelopes, build prerequisites, exclusivity, and admission caps. Compare hosted tooling concurrency against its actual backend in the existing regression helper.

Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 28, 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 scripts Repository scripts size: M labels Sep 28, 2026
@roboclaw-bot roboclaw-bot self-assigned this Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 4:02 AM ET / 08:02 UTC (Revision 2).

ClawSweeper review

What this changes

The branch packs compatible serial Node test rows within CI's time and group limits and corrects a test assertion to use the selected runner backend.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main prevents an oversized CI matrix by falling back to compact rows, but this PR offers the distinct improvement of retaining bounded rows when they fit. The prior cap-integration concern is addressed in the revised planner and reported focused proof.

Priority: P2
Reviewed head: 1efd776086745e08768062744e79a1b48d6ef847

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused patch, boundary coverage, and reported planner replay support normal merge readiness.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The provided bot/MEMBER classification exempts this PR from the external-contributor proof gate. Its body reports a production-planner replay and focused integrated cap checks; this read-only review did not execute the matrix. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The provided bot/MEMBER classification exempts this PR from the external-contributor proof gate. Its body reports a production-planner replay and focused integrated cap checks; this read-only review did not execute the matrix. No stored-data contract changes.
Evidence reviewed 7 items Introduced packing: The introduced pass admits only bounded serial rows with matching execution policy, at most ten groups, and at most 150 estimated test seconds.
Current-main boundary: Current main passes the matrix cap to the planner and retains its compact-row fallback; it does not contain this PR's compatible-row packing pass.
Cap fallback provenance: Commit a08479a added the main-branch fallback that returns selected compact rows when splitting exceeds the cap.
Findings None None.
Security None None.

How this fits together

OpenClaw's PR CI planner selects Node tests from changed files and turns them into jobs. The workflow checks the final job count before launching runners.

flowchart LR
A[Changed PR files] --> B[Selected Node tests]
B --> C[Split long rows]
C --> D[Pack compatible rows]
D --> E[Check job limit]
E --> F[CI test jobs]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +232, Other +81. Total +313 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 234 2 +232
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 95 14 +81
Total 4 329 16 +313

Review metrics

Metric Value Why it matters
Reported planning replay GitHub 147→127 jobs; hybrid 144→124 jobs; 5,273 targets retained The reported result exercises the intended capacity improvement without reducing selected coverage.
Production and test growth production +81 net lines; tests +230 net lines The production growth is scoped to planner packing and a shared policy key, with focused boundary cases.

Technical review

Best possible solution:

Retain packing in the changed-test planner ahead of main's cap fallback, preserving selected tests and their execution policies.

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

Yes. Current-main source shows the cap fallback without compatible-row packing, and the submitted 131-row control exercises the narrower case where bounded rows could fit.

Is this the best way to solve the issue?

Yes. Reusing the existing packer and execution-policy key in the changed-test planner is a focused way to retain bounded rows while leaving the cap guard in place.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded CI reliability improvement with no reported product-runtime change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 provided bot/MEMBER classification exempts this PR from the external-contributor proof gate. Its body reports a production-planner replay and focused integrated cap checks; this read-only review did not execute the matrix. No stored-data contract changes.

Label justifications:

  • P2: This is a bounded CI reliability improvement with no reported product-runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 provided bot/MEMBER classification exempts this PR from the external-contributor proof gate. Its body reports a production-planner replay and focused integrated cap checks; this read-only review did not execute the matrix. No stored-data contract changes.

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)
  • Vincent Koc: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-28T07:32:51.652Z sha 548fec8 :: blocked before merge. :: none

Retain the current main cap fallback verbatim and finish packing inside the bounded-row owner. This linear fixup preserves the original PR ancestry and supports verified GitHub publication. Keep explicit cap coverage without changing fallback or execution policies.

Co-authored-by: steipete <[email protected]>
@roboclaw-bot roboclaw-bot changed the title fix: PR CI exceeds its job limit after splitting tests fix: avoid oversized PR CI jobs when smaller rows fit Sep 28, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 28, 2026 07:55
@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 28, 2026
@VACInc

VACInc commented Sep 28, 2026

Copy link
Copy Markdown
Member

The selected-plugin CI routing repair merged in #160324 (commit 81a840a) does not implement this PR's packing of whole, already-bounded serial rows with identical execution policies. Please preserve this distinct row-packing work and its existing time, group-count, worker, preparation, and fallback boundaries. It complements rather than duplicates the canonical plugin-owner fix. Keep this PR open.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. 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