Skip to content

fix(tooling): split root test types into serial graphs - #160098

Merged
vincentkoc merged 2 commits into
mainfrom
fix/root-test-type-graphs
Sep 28, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/root-test-type-graphs

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Root test typechecking loaded one large Program. During this repair it was killed under a 7462 MiB process-tree cap. This PR divides execution into four serial graphs while keeping the canonical root inventory and CI planning identity.

  • Preserve every root exactly once, shared Vitest augmentations, effective compiler options, existing core stripes, and separate build caches.
  • Expand both the package alias and canonical CI selection; root partitions stay serial even with --concurrency 4. Preserve diagnostic draining for unrelated graphs in mixed CI batches.
  • Route edits to all five root configs through the root typecheck and coverage tests.

Part of #160010. This slice reduces graph size; hard memory containment is activated separately.

Validation at 3dc5c28a4f942c910b04930819029f43bbf88bc1 on Blacksmith Testbox:

  • 2,073 distinct focused tests passed: 2,069 in the initial three-file run, then the four lint fixtures after giving their synthetic project its own empty ambient-file list. The full partition test still verifies the shared real augmentations.
  • Cold four-graph typecheck passed under a 7 GiB kernel process-tree cap; peak 7,035,318,272 bytes (6.55 GiB), zero max/oom/oom_kill events. Graph times: 34.6s, 39.7s, 37.5s, 45.3s. The repaired-fixture-plus-cold-check command exited 0 in 4m21.888s.
  • Script typecheck, targeted typed lint for scripts/tests, formatting, and whitespace passed in 2m54.673s. Both proof commands verified the 3,682-input SHA256 manifest 5c8ea5ce7850d9696379db6c1a63a4834ea21e171ae0b46dcaf02303050caf93.
  • Independent P0–P2 review is clean. The dependency-free local checkout's commit hook could not load its formatter; the same installed formatter was run separately before committing.

Tooling +43/-7 lines, test/config +286/-1, changelog +2. Positive tooling growth owns canonical-to-execution graph expansion and config routing. No runtime or dependency changes.

Review cost follow-up: exact-head test/scripts/tsgo-core-test-shards.test.ts passed all 35 cases with --maxWorkers=1 on the same Testbox. File test time 10.404s; Vitest wall 22.56s including a 10.637s cold worker-bundle preparation; complete focused command 23.96 CI wall seconds. The full source-sync/setup/test invocation took 27.076s. This addresses the test-cost finding and Rank-up move without changing source or requesting an unchanged-head review.

@vincentkoc vincentkoc self-assigned this Sep 28, 2026
@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
@vincentkoc
vincentkoc marked this pull request as ready for review September 28, 2026 04:39
@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
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 12:58 AM ET / 04:58 UTC (Revision 2).

ClawSweeper review

What this changes

The branch divides root-test TypeScript checking into four serial projects and updates the package command, CI execution, change routing, and tests to use them.

Merge readiness

✅ Ready for maintainer review

Current main still runs one root-test compiler project, so this focused PR remains useful. The updated PR body supplies the one-worker test-cost measurement requested in the earlier review; no remaining patch defect is evident.

Priority: P2
Reviewed head: 3dc5c28a4f942c910b04930819029f43bbf88bc1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused patch has strong coverage and reported direct compiler proof, with no remaining actionable finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This MEMBER-authored tooling PR is exempt from contributor proof. Its body reports the changed production compiler path completing four cold serial projects under a 7 GiB Testbox cap; the linked run remained in progress when inspected. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored tooling PR is exempt from contributor proof. Its body reports the changed production compiler path completing four cold serial projects under a 7 GiB Testbox cap; the linked run remained in progress when inspected. No stored-data contract changes.
Evidence reviewed 8 items Current main still uses one root project: The current-main package command invokes TypeScript with the single root-test config; the requested split is not already present.
Introduced execution graphs: The pinned introduced diff adds four root-test projects while retaining one canonical root graph for CI selection.
Serial execution: Selecting any root partition forces one compiler child at a time, including mixed CI batches that request higher concurrency.
Findings None None.
Security None None.

How this fits together

OpenClaw's developer checks select TypeScript projects from test files and CI plans. The compiler runner executes those projects and returns diagnostics and completion evidence to local checks and CI.

flowchart LR
A[Root test files] --> B[Canonical test inventory]
B --> C[CI graph selection]
C --> D[Four root projects]
D --> E[Serial compiler runs]
E --> F[Diagnostics and completion evidence]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +289, Docs +2, Config 0, Other +32. Total +323 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 9 290 1 +289
Docs 1 2 0 +2
Config 1 1 1 0
Generated 0 0 0 0
Other 3 38 6 +32
Total 14 331 8 +323

Review metrics

Metric Value Why it matters
Root compiler projects 1 → 4 serial projects; 1 canonical CI graph The execution split reduces each compiler graph without changing CI's selection identity.

Root-cause cluster

Relationship: partial_overlap
Canonical: #160010
Summary: This PR supplies the root-typecheck graph-reduction slice of a broader memory-containment repair.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep graph expansion in the existing compiler runner with complete input coverage and separate caches, while the linked repair tracker handles hard process-tree limits.

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

No independently observed current-main memory failure was established in this read-only review. Source confirms the single-project entrypoint, and the PR reports a cap-triggered failure during the repair.

Is this the best way to solve the issue?

Yes. The branch uses the existing compiler runner and preserves canonical CI selection; its coverage test checks that the partitioned projects retain the root inputs.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 54a0ea673bb1.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The PR addresses developer and CI typecheck memory with limited direct user-runtime impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored tooling PR is exempt from contributor proof. Its body reports the changed production compiler path completing four cold serial projects under a 7 GiB Testbox cap; the linked run remained in progress when inspected. No stored-data contract changes.

Evidence

What I checked:

  • Current main still uses one root project: The current-main package command invokes TypeScript with the single root-test config; the requested split is not already present. (package.json:2207, 54a0ea673bb1)
  • Introduced execution graphs: The pinned introduced diff adds four root-test projects while retaining one canonical root graph for CI selection. (scripts/lib/tsgo-core-test-shards.mts:114, 3dc5c28a4f94)
  • Serial execution: Selecting any root partition forces one compiler child at a time, including mixed CI batches that request higher concurrency. (scripts/run-tsgo-core-test-shards.mts:62, 3dc5c28a4f94)
  • Coverage guard: The added test compares partition inputs with the canonical inventory and checks shared ambient files, effective compiler options, and distinct caches. (test/scripts/tsgo-core-test-shards.test.ts:99, 3dc5c28a4f94)
  • Earlier review item addressed: The earlier ClawSweeper review requested a one-worker cost for the changed test file. The updated PR body reports 10.404 seconds of test time and 23.96 CI wall seconds for the exact head.
  • Reported Testbox proof: The PR body reports a cold four-project typecheck below a 7 GiB process-tree cap. The linked workflow was still in progress when inspected, so its terminal result was not independently confirmed from the run.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jesse Merhi: 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-28T04:45:58.112Z sha 3dc5c28 :: needs changes before merge. :: [P3] Report the changed test file's one-worker cost

@vincentkoc
vincentkoc merged commit d024aa1 into main Sep 28, 2026
314 checks passed
@vincentkoc
vincentkoc deleted the fix/root-test-type-graphs branch September 28, 2026 05:46
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
Split root-test checking into four serial projects while preserving the canonical CI inventory, complete source coverage, ambient declarations, and separate incremental caches.

Validated with four cold compiler runs under a 7 GiB kernel cap, focused tests, exact-head required CI, and independent review.

Related: openclaw#160010
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.

1 participant