Skip to content

ci: give the agents-root and gateway-root tsgo test shards headroom below the 720-root cap - #145461

Merged
steipete merged 1 commit into
mainfrom
steipete/ci-tsgo-shard-cap
Sep 12, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/ci-tsgo-shard-cap

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Refs #145431

Additional instructions

Maintainers can edit this same-repository branch.

What Problem This Solves

Resolves a problem where adding a single agents-root or gateway-root test would make the shared test-type boundary fail across otherwise unrelated pull requests. Both shards already contain 720 test roots, exactly the runner's hard limit. This is a maintainer-requested preventive follow-up to #145431; agents-other and messaging also need room before reaching the same limit.

Why This Change Was Made

Move complete test families between existing graphs: shell/tool tests and nested sandbox tests into agents-tools, Gateway session tests into gateway-other, and media tests into infra. A compiler-config inventory regression requires exact single ownership and at most 700 roots per graph, while the runner retains its 720-root hard cap.

All 17 graph identities, build-cache paths, stripe assignments, compiler concurrency, and compiler-resolved changed-test selection remain unchanged. No test roots are removed from the canonical inventory.

User Impact

Developers can add tests in the previously full agents and Gateway root partitions without immediately blocking unrelated landings. The inventory test prompts rebalancing before the hard compiler budget is exhausted. There is no runtime behavior change.

Evidence

Compiler-resolved roots on base db26660:

Shard Before After
agents-root 720 644
agents-other 717 677
agents-tools 210 326
gateway-root 720 642
gateway-other 601 679
infra 641 685
state-logging 349 349
commands 661 661
plugins-platform 687 687
config-cli 579 579
messaging 709 665
services 692 692
other 663 663
ui-pages 556 556
ui-e2e 451 451
ui-other 528 528
packages 430 430

The new test was run before changing the tsconfigs:

node scripts/run-vitest.mjs test/scripts/tsgo-core-test-shards.test.ts -t 'covers the repository test roots'

agents-root: 720 test roots exceeds the 700 limit
agents-other: 717 test roots exceeds the 700 limit
gateway-root: 720 test roots exceeds the 700 limit
messaging: 709 test roots exceeds the 700 limit
Tests 1 failed | 23 skipped

After rebalancing, the complete owner suite passes all 24 tests, including stripe partitioning and real-compiler consumer selection. Native tsgo enumeration reports no ownership or 700-root budget violations. Fresh P1 autoreview returned scoped-clean with no accepted/actionable findings.

Passed locally:

node scripts/run-vitest.mjs test/scripts/tsgo-core-test-shards.test.ts
node scripts/run-tsgo-core-test-shards.mjs
node scripts/run-tsgo-core-test-shards.mjs --changed-paths-json '["src/agents/bash-tools.exec-workdir.test.ts","src/agents/sandbox/config.test.ts","src/gateway/session-create-preparation.test.ts","src/media/file-context.test.ts"]'
node scripts/run-oxlint.mjs --tsconfig test/tsconfig/tsconfig.test.root.json test/scripts/tsgo-core-test-shards.test.ts
node scripts/docs-list.js
git diff --check

The full runner compiled all 17 graphs. The changed-file runner selected exactly agents-tools, gateway-other, and infra for the representative moved tests.

pnpm lint:scripts also passed. node scripts/check-changed.mjs passed formatting, core graph ownership, test-root typechecking, and its early guards, then failed at the repository-wide dead-export scan on two unchanged UI exports: renderCloudConfiguration and renderConnectMachineMenuItem in ui/src/pages/new-session/cloud-target.ts. Both findings were independently reproduced with node --import tsx scripts/check-deadcode-exports.mts on clean main revision 34cdbaf; the affected UI file and scan configuration are unchanged in this candidate. The remaining script and focused test lint commands were run separately and passed.

Initial validation encountered unrelated UI dead exports; those baseline failures were resolved on main before final CI validation. Root counts bound individual compiler processes; this change makes no wall-time performance claim.

Exact-head CI for f60b476ded48737d61b29406c2f4d5c9a8a73713, run 34663116166, passed check-test-types, check-test-types-core-1, and check-test-types-core-2.

CI also reported three unrelated UI failures:

  • check-lint-core-2: ui/src/pages/new-session/where-chip.test.ts:1080 exceeds eslint(max-lines) at 1,020 lines. The file has the same Git blob in the base and candidate (4b82719a8a5cfe09a8b663ebb3d59b179b27751c).

  • check-dependencies: the same renderCloudConfiguration and renderConnectMachineMenuItem dead exports described above.

  • checks-node-compact-large-5: ui/src/styles/cursor-policy.node.test.ts:83 rejects the unconditional pointer on .new-session-page__touch-details in new-session.css. Both the test and CSS are byte-identical to the base revision. This job does not run the new shard inventory test.

The original bounded watch completed with all three test-type jobs successful; that original CI rollup failed on the unrelated baseline UI problems above.

Final validation: after the baseline fixes reached main, the PR was cycled once without changing its head. The refreshed merge ref contains the required main fixes. The exact-head watcher returned GREEN for run 34668005793 on f60b476ded48737d61b29406c2f4d5c9a8a73713, with zero pending checks; older failing checks were superseded.

ClawSweeper review

The completed review of f60b476ded48737d61b29406c2f4d5c9a8a73713 found no actionable defects and listed no Rank-up moves or before-merge requests. No items required a fixup or were skipped. No code changed during landing preparation.

@clawsweeper

clawsweeper Bot commented Sep 12, 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 size: S maintainer Maintainer-authored PR labels Sep 12, 2026
@steipete
steipete marked this pull request as ready for review September 12, 2026 00:53
@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 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 11:02 PM ET / September 12, 2026, 03:02 UTC (Revision 6).

ClawSweeper review

What this changes

Redistributes tests among existing compiler projects and adds an inventory check that reserves headroom below the runner’s test-file limit.

Merge readiness

✅ Ready for maintainer review

This remains useful preventive CI work, with no actionable defects found. The rebalancing is absent from current main, and GitHub confirms successful validation for the reviewed head.

Priority: P2
Reviewed head: f60b476ded48737d61b29406c2f4d5c9a8a73713

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable CI change with useful before/after compiler evidence and no actionable correctness findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The recorded native compiler runs exercise the changed project configurations through the real full and changed-file runners, showing successful compilation and correct moved-test selection; GitHub independently confirms successful typecheck jobs for the reviewed head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The recorded native compiler runs exercise the changed project configurations through the real full and changed-file runners, showing successful compilation and correct moved-test selection; GitHub independently confirms successful typecheck jobs for the reviewed head.
Evidence reviewed 7 items Introduced scope and complete reassignment: The pinned introduction changes matching include/exclude patterns for shell/tool, sandbox, Gateway session, and media tests. Shared compiler options, graph identities, build-cache paths, and execution concurrency remain unchanged.
Meaningful inventory regression: The added test parses actual repository compiler configurations and checks exact ownership with a 700-root ceiling. It reuses the existing validation owner, whose production boundary retains the 720-root ceiling; existing fixtures separately cover missing, duplicated, extra, and oversized roots.
Current main still needs the change: The comparison returned no changes between the PR merge base and fetched main for all seven affected compiler configurations and the inventory test. Main therefore retains the pre-rebalancing configuration and lacks the new headroom test.
Findings None None.
Security None None.

How this fits together

OpenClaw’s CI divides test typechecking among bounded compiler projects. Their configuration determines test ownership, while compiler-resolved dependencies determine which projects must run for changed tests.

flowchart TD
  A[Repository tests] --> B[Compiler project configuration]
  B --> C[Ownership and size checks]
  D[Changed test paths] --> E[Compiler consumer selection]
  B --> E
  C --> F[Bounded compiler processes]
  E --> F
  F --> G[CI typecheck result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +40, Docs 0. Total +40 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 8 54 14 +40
Docs 1 2 2 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 56 16 +40

Review metrics

Metric Value Why it matters
Compiler headroom agents-root: 76 spare roots; gateway-root: 78 The recorded after-fix inventory relieves both previously full projects without raising the 720-root limit.
Early rebalancing threshold 700-root inventory ceiling; 720-root execution ceiling The regression guard leaves a 20-root margin before the shared compiler boundary fails.

Technical review

Best possible solution:

Keep complete test-family ownership in the existing compiler projects, with an earlier inventory warning and unchanged compiler execution limits.

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

Not applicable as a runtime bug: this is preventive CI maintenance. The recorded before/after inventory demonstrates the capacity problem; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Yes. Rebalancing complete families through existing configurations preserves the established compiler owner and consumer-selection path, and the new guard catches exhaustion before the hard limit.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This bounded CI reliability improvement prevents routine test additions from exhausting shared typecheck partitions.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The recorded native compiler runs exercise the changed project configurations through the real full and changed-file runners, showing successful compilation and correct moved-test selection; GitHub independently confirms successful typecheck jobs for the reviewed head.
  • proof: sufficient: Contributor real behavior proof is sufficient. The recorded native compiler runs exercise the changed project configurations through the real full and changed-file runners, showing successful compilation and correct moved-test selection; GitHub independently confirms successful typecheck jobs for the reviewed head.

Evidence

What I checked:

  • Introduced scope and complete reassignment: The pinned introduction changes matching include/exclude patterns for shell/tool, sandbox, Gateway session, and media tests. Shared compiler options, graph identities, build-cache paths, and execution concurrency remain unchanged. (test/tsconfig/tsconfig.core.test.agents-tools.json:6, f60b476ded48)
  • Meaningful inventory regression: The added test parses actual repository compiler configurations and checks exact ownership with a 700-root ceiling. It reuses the existing validation owner, whose production boundary retains the 720-root ceiling; existing fixtures separately cover missing, duplicated, extra, and oversized roots. (test/scripts/tsgo-core-test-shards.test.ts:20, f60b476ded48)
  • Current main still needs the change: The comparison returned no changes between the PR merge base and fetched main for all seven affected compiler configurations and the inventory test. Main therefore retains the pre-rebalancing configuration and lacks the new headroom test. (test/tsconfig/tsconfig.core.test.agents-root.json:14, 884b0ee61eec)
  • Recorded compiler behavior: The supplied PR body records agents-root moving from 720 to 644 roots and gateway-root from 720 to 642, a failing inventory test before rebalancing, successful compilation of all 17 graphs afterward, and selection of agents-tools, gateway-other, and infra for representative moved tests. No wall-time improvement is claimed. (f60b476ded48)
  • Verified CI for the reviewed head: GitHub reports run 34668005793 completed successfully for the exact reviewed head. Its job records also show successful check-test-types, both core typecheck rows, additional boundaries, and the aggregate CI gate. Direct log retrieval was blocked by the artifact-host allowlist; no logs were claimed as inspected. (f60b476ded48)
  • Existing consumer-selection owner: Current source selects every compiler graph consuming a changed test. GitHub identifies steipete as the author of merged ci: typecheck graphs that consume changed tests #134107, and the commit patch contains this selection behavior. Local history inspection returned relevant commits, but deeper blame encountered unavailable historical objects; no unsupported introduction attribution is inferred. (scripts/lib/tsgo-core-test-shards.mts:189, 145d9ffafa55)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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 (5 earlier review cycles)
  • reviewed 2026-09-12T00:59:17.083Z sha f60b476 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-12T01:26:26.053Z sha f60b476 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-12T01:32:27.266Z sha f60b476 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-12T02:23:06.365Z sha f60b476 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-12T02:39:04.908Z sha f60b476 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 12, 2026
@steipete steipete closed this Sep 12, 2026
@steipete steipete reopened this Sep 12, 2026
@steipete steipete closed this Sep 12, 2026
@steipete steipete reopened this Sep 12, 2026
@steipete
steipete merged commit 6f694d3 into main Sep 12, 2026
422 of 427 checks passed
@steipete
steipete deleted the steipete/ci-tsgo-shard-cap branch September 12, 2026 03:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
Restore room for new tests in the existing compiler graphs by moving complete shell/tool, sandbox, Gateway session, and media test families. Preserve exact single ownership, all 17 graph identities, cache paths, stripe assignments, and compiler concurrency. Add an inventory regression that requires at most 700 roots per graph before the runner's unchanged 720-root cap is reached.

Compiler-resolved root counts on the original base:

| Shard | Before | After |
| --- | ---: | ---: |
| agents-root | 720 | 644 |
| agents-other | 717 | 677 |
| agents-tools | 210 | 326 |
| gateway-root | 720 | 642 |
| gateway-other | 601 | 679 |
| infra | 641 | 685 |
| state-logging | 349 | 349 |
| commands | 661 | 661 |
| plugins-platform | 687 | 687 |
| config-cli | 579 | 579 |
| messaging | 709 | 665 |
| services | 692 | 692 |
| other | 663 | 663 |
| ui-pages | 556 | 556 |
| ui-e2e | 451 | 451 |
| ui-other | 528 | 528 |
| packages | 430 | 430 |

The inventory regression fails before rebalancing and passes afterward. The 24-test owner suite, all 17 compiler graphs, and representative changed-file selection passed. This is developer CI maintenance with no runtime behavior change.

Refs openclaw#145431
steipete added a commit that referenced this pull request Sep 12, 2026
Restore Gateway test typecheck headroom by moving the complete nested server test subtree into the existing gateway-server compiler graph. Matching include/exclude patterns preserve exact root coverage, compiler concurrency, and the 700-root headroom guard and 720-root hard cap. Update the CI ownership documentation.

The existing inventory regression failed before at 701 gateway-other roots and passed all 24 tests afterward. Both affected compiler graphs and changed-file checks passed. Hosted CI run 34706250754 is green on ce1965c, reconfirmed by the exact-head watcher. No runtime behavior changes.

Refs #145602, #145461, #145431.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 13, 2026
Restore Gateway test typecheck headroom by moving the complete nested server test subtree into the existing gateway-server compiler graph. Matching include/exclude patterns preserve exact root coverage, compiler concurrency, and the 700-root headroom guard and 720-root hard cap. Update the CI ownership documentation.

The existing inventory regression failed before at 701 gateway-other roots and passed all 24 tests afterward. Both affected compiler graphs and changed-file checks passed. Hosted CI run 34706250754 is green on ce1965c, reconfirmed by the exact-head watcher. No runtime behavior changes.

Refs openclaw#145602, openclaw#145461, openclaw#145431.
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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