Skip to content

perf(ci): remove repeated setup and balance complete test workloads - #134038

Merged
steipete merged 33 commits into
mainfrom
codex/ci-windows-runtime-20260831
Aug 31, 2026
Merged

steipete merged 33 commits into
mainfrom
codex/ci-windows-runtime-20260831

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

CI repeats checkout, fixture compilation and dependency work, while its planner packs long suites using estimates that omit their prerequisites. The earlier complete green integration run took 19m 22s; the final native run takes 17m 31s. This change removes repeated work and balances the complete workload; whole CI below five minutes remains the target.

Why This Change Was Made

The canonical planner charges each job's strongest runtime prerequisite once, uses measured file costs, separates expensive tooling work and partitions the complete plugin catch-all. Windows keeps two jobs and two project slots, admits expensive selections first, and moves the cron process-identity test to its actual runtime owner so it no longer triggers full-package E2E preparation. Compiled session workers and native Buffer comparison remove repeated compilation and per-byte JavaScript work without changing SQLite data or schemas.

Checkout reuses the authenticated candidate index when the harness SHA is identical, including preflight. Different pinned revisions retain Actions checkout and its retry contract. Historical acquisition, authentication and cancellation stay with their existing owner. Hybrid macOS Node uses its existing hosted macOS 15 route with the same 19 files, two workers and deadline; macOS 26 siblings are unchanged.

Dependency restores use the actual runner environment and include pnpm registry metadata. The protected warmer remains the sole shared publisher. Standalone UI consumes its transform seed through the existing executor, preserving root Node maxWorkers=3 and Chromium's separate pool policy. Go follows the selected docs-translation consumer, reducing hybrid admissions from 17 to two. Scoped discovery, shared CPU/RAM policy for lint children, cancellation, docs classification and Testbox base preparation remove other repeated work.

The wrapper merge retains main's complete trusted source inventory, adds the planner's shared metadata dependency, and exposes only the four existing third-party tooling packages through native directory links. The obsolete fixture copier is removed. Package timeout proof waits for child readiness before expiring its captured deadline, then joins command and readiness outcomes before cleanup; actual process termination remains real. No production timeout is increased.

User Impact

Existing test inventories, trust boundaries, cache authority and runner limits are preserved. There is no new runner capacity, paid service, configuration option, persistent-store design, schema or protocol. Fresh protected cache keys remain cold until their producer lands and warms them.

This incorporates #134096, #134192, #134196, #133994, #133931 and #134279; they remain open until integration merge proof. Main's Linux runtime-only pretest (#134294) and complete UI file reporter (#134283) are preserved. The Windows prerequisite repair is part of this PR, not a result attributed to #134294.

Evidence

  • Final CI33434384581 at 5dc05ad785c4b2324545f9dbe707c467816973e7 completes with 213 successful jobs and 8 intentional skips. ARM Testbox, Build Artifacts Testbox, Testbox and Workflow Sanity pass. Whole CI 17m 31s; preflight 37s, build 320s, UI 361s, Windows 408/409s, macOS 997s. These results remain above the five-minute target.

  • CI33424685880 succeeds at 0c99d1c with all three applicable Testboxes and Workflow Sanity green. Preflight 86s, build 284s, Windows 386/395s; all 16 UI jobs pass. UI unit passes 852 files/13,138 cases plus one skip. Windows preserves 80 files/1,166 passes/179 skips; macOS 19 files/1,036 cases pass in 967s. Total 19m 22s is observed, not a controlled hardware/cache comparison.

  • CI33427822924 at c25 fails only the Windows 1 pnpm.cmd readiness race and the resulting aggregate. Other selected jobs pass. The corrected existing 55-case timeout suite passes 52 portable cases with three Windows-only skips locally; controlled delayed-start and cleanup-order proofs retain real signals and process-tree teardown. Native Windows confirmation at 5dc passes the descendant-timeout case in 3.324s and the package suite with 52 passes/3 existing skips.

  • Current head 5dc05ad785c4b2324545f9dbe707c467816973e7 against main 6e436b4 resolves actual wrapper conflicts. Main's wider closure and trust checks, shared immutable test seed, OpenGrep fixtures and all six integration wrapper regressions are preserved. The first merged test run exposed the missing planner metadata and artifact-fixture auth response; both are repaired. The 13 affected extraction/alias/missing-toolchain/cleanup cases pass, alongside 49 initially passing wrapper/lock cases and 97 OpenGrep/hosted-gate cases. Changed-file format, script/root-test types, lint, erasability and ownership guards pass. Full-candidate Codex review is scoped-clean at the configured P0 threshold. Current-head CI and all applicable Testboxes now pass.

  • Retained owner proofs cover checkout authentication/cancellation, complete matrices, dependency publication, prerequisite admission, compiled workers and source discovery. Full standalone UI proof passes 848 files/13,071 cases plus one skip; the protected seed serves 2,617 reads unchanged and all 166 observed children exit. This is local proof, not a hosted timing claim or proof of a three-worker Chromium cap.

ClawSweeper follow-through: its latest review of 2b59364 has no actionable code findings and requests conflict resolution plus exact-head CI/Testbox proof. This head resolves the captured main conflict, preserves the wider source boundary and has completed the requested native acceptance. Review freshness and current findings are checked before landing. The stored-data heuristic refers to CI cache metadata, with no SQLite or user-data change.

Named follow-ups: ingest the newly located successful main UI timing samples before refitting weights; share staged SDK declarations between full and CI builds (#134414); reduce macOS elevation fixture cost; isolate the existing built singleton smoke that restages shared dist-runtime before increasing artifact-check concurrency.

Judged delta against captured main 6e436b4: product runtime +16/-35 (net -19); CI tooling +643/-534 (net +109); tests/support +2333/-754 (net +1579, including the moved cron case); docs +77/-47 (net +30). Tooling growth provides canonical prerequisite admission, complete partitioning, matching cache publication/consumption and authenticated preflight reuse; moved timing facts replace old copies. No product-runtime growth.

@clawsweeper

clawsweeper Bot commented Aug 31, 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 gateway Gateway runtime scripts Repository scripts size: L maintainer Maintainer-authored PR labels Aug 31, 2026
@clawsweeper clawsweeper Bot added 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 3:53 PM ET / 19:53 UTC.

ClawSweeper review

What this changes

This PR consolidates CI checkout, dependency caching, test planning, runner routing, and Testbox setup to remove repeated preparation while keeping complete test workloads.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer handling: the supplied live state marks the current head as conflicting, and no exact-head CI/Testbox result is available for the final commit.

Priority: P3
Reviewed head: 2b593646ba30b58e9c46967fcae9357eb3a89282

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch has focused owner and regression coverage, but the final head lacks confirmed merged-tree and exact-head hosted validation.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Repository State identifies a member-authored PR, so external-contributor proof is not required; the completed prior-head native evidence is supplemental, while exact-head CI and Testbox confirmation remain merge gates.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State identifies a member-authored PR, so external-contributor proof is not required; the completed prior-head native evidence is supplemental, while exact-head CI and Testbox confirmation remain merge gates.
Evidence reviewed 4 items Trusted-harness owner: The proposed checkout owner reuses the candidate index only when the checked-out candidate and workflow revisions match; otherwise it retains the sparse trusted-harness fetch path.
Testbox base coverage: The shared Testbox action resolves the merge first parent before ensuring that base is locally available, and its test exercises merge, linear, shallow, and manual checkout shapes.
Current-main drift: Current main contains later changes across overlapping CI and wrapper surfaces after the PR base; the supplied PR state reports the branch as dirty, while no pinned test merge is available.
Findings None None.
Security None None.

How this fits together

OpenClaw CI checks out a trusted workflow harness, restores dependencies, plans test shards, and dispatches them to runners. This PR changes those automation control points and the resulting validation workload.

flowchart LR
A[Pull request event] --> B[Preflight checkout]
B --> C[Trusted CI harness]
B --> D[Dependency cache]
D --> E[Test shard planner]
E --> F[Runner routing]
F --> G[CI and Testbox results]
Loading

Before merge

  • Resolve merge risk (P1) - The current branch is reported as conflicting with main; without a pinned test merge, the final merged automation behavior cannot be inferred from the branch alone.
  • Resolve merge risk (P2) - The final commit follows the previously completed native run, so its Testbox-base and timeout changes still need exact-head hosted validation.
  • Complete next step (P2) - A maintainer must resolve the current-main conflict and confirm exact-head automation results; no narrow code defect is established for automated repair.
Agent review details

Security

None.

PR surface

Source -1, Tests +1539, Docs +30, Config -9, Other +109. Total +1668 across 76 files.

View PR surface stats
Area Files Added Removed Net
Source 4 38 39 -1
Tests 40 2285 746 +1539
Docs 3 77 47 +30
Config 10 176 185 -9
Generated 0 0 0 0
Other 19 452 343 +109
Total 76 3028 1360 +1668

Review metrics

Metric Value Why it matters
Production versus test delta CI/runtime +637/-562 (net +75); tests/support +2314/-751 (net +1563); docs/skills +77/-47 (net +30) The automation growth is substantial but concentrated in shared planning, checkout, cache, and coverage owners rather than shipped product runtime.

Stored data model

Persistent data-model change detected: migration/backfill/repair: package.json, persistent cache schema: .github/actions/setup-node-env/action.yml, serialized state: scripts/ci-run-node-test-shard.mts, serialized state: scripts/lib/vitest-shard-metadata.mts, serialized state: scripts/lib/vitest-shard-timings.mts, unknown-data-model-change: scripts/ci-run-node-test-shard.mts, and 6 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Refresh the merge and CI proof (recommended)
    Resolve the current main conflict and require successful exact-head CI plus applicable Testbox validation before merging.

Technical review

Best possible solution:

Rebase the integration onto current main, preserve the current-main CI and wrapper changes, then obtain green exact-head CI and applicable Testbox evidence before merge.

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

Not applicable: this PR changes CI automation rather than reporting an end-user bug; the relevant validation is an exact-head workflow and Testbox run.

Is this the best way to solve the issue?

Unclear: the owner-boundary consolidation is coherent in source, but the dirty merge state and absent exact-head result prevent a final best-fix conclusion for the merged workflow.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 206fd47f4fa9.

Labels

Label justifications:

  • P3: This is internal CI performance and reliability work without a demonstrated end-user runtime regression.
  • merge-risk: 🚨 automation: The PR changes workflow checkout, cache publication, runner placement, and test dispatch behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository State identifies a member-authored PR, so external-contributor proof is not required; the completed prior-head native evidence is supplemental, while exact-head CI and Testbox confirmation remain merge gates.

Evidence

What I checked:

  • Trusted-harness owner: The proposed checkout owner reuses the candidate index only when the checked-out candidate and workflow revisions match; otherwise it retains the sparse trusted-harness fetch path. (.github/actions/git-owner/owner.py:364, 2b593646ba30)
  • Testbox base coverage: The shared Testbox action resolves the merge first parent before ensuring that base is locally available, and its test exercises merge, linear, shallow, and manual checkout shapes. (test/scripts/testbox-base.test.ts:98, 2b593646ba30)
  • Current-main drift: Current main contains later changes across overlapping CI and wrapper surfaces after the PR base; the supplied PR state reports the branch as dirty, while no pinned test merge is available. (.github/workflows/ci.yml:84, 206fd47f4fa9)
  • Diff hygiene and size: The introduced diff is whitespace-clean; its classified change is CI/runtime +637/-562, tests/support +2314/-751, and docs/skills +77/-47. (.github/workflows/ci.yml:80, 2b593646ba30)

Likely related people:

  • steipete: 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.

  • Resolve the main conflict and publish the resulting exact-head CI and applicable Testbox evidence.

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 (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-31T13:05:58.221Z sha bdd0b5bfaaa0f03d948f437cbd4369ce597d09d4 :: needs changes before merge. :: [P2] Remove the release-owned changelog entry
  • reviewed 2026-08-31T13:38:29.606Z sha 93582ed06d82332262f50571ab25cc7f8b55eb8b :: needs changes before merge. :: [P2] Remove the release-owned changelog entry
  • reviewed 2026-08-31T14:29:47.716Z sha 8cc1e0f :: found issues before merge. :: [P2] Remove the release-owned changelog entry
  • reviewed 2026-08-31T15:17:34.741Z sha d088cbd :: found issues before merge. :: [P2] Remove the release-owned changelog entry
  • reviewed 2026-08-31T16:08:17.068Z sha 4a79c12 :: needs changes before merge. :: [P2] Remove release-owned changelog entries
  • reviewed 2026-08-31T17:49:54.542Z sha acbf9f0 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T18:35:31.496Z sha 0c99d1c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T19:10:23.795Z sha c25eaf4 :: 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 Aug 31, 2026
@steipete
steipete force-pushed the codex/ci-windows-runtime-20260831 branch from d53c4bd to 735d282 Compare August 31, 2026 11:46
@steipete
steipete marked this pull request as ready for review August 31, 2026 11:50
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The Windows CI follow-up now repairs the cold Anthropic registration owner. Auth and usage execution load through existing async hooks while synchronous provider metadata, auth order and the canonical credential factory stay intact. The unchanged real provider probe falls from 69.973 to 17.515 seconds locally; the final regression fails on original production, 145 owner tests and the full build pass, and the parent integrated changed gate and scoped Codex review are green. Native Windows exact-head CI remains pending. The body records the complete owner boundary, production growth and proof limits.

The shared prompt fixture also uses the exact prepared-identity repair from #134094. No deadline, retry, coverage or concurrency change is added by these follow-ups.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the codex/ci-windows-runtime-20260831 branch from 934b95c to bdd0b5b Compare August 31, 2026 12:59
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 31, 2026
@steipete
steipete force-pushed the codex/ci-windows-runtime-20260831 branch from 767c47e to acbf9f0 Compare August 31, 2026 17:36
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Aug 31, 2026
@steipete steipete changed the title perf(ci): reduce startup work and control-job queue delays perf(ci): remove repeated setup and balance complete test workloads Aug 31, 2026
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@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 Aug 31, 2026
@steipete
steipete merged commit 4ee565c into main Aug 31, 2026
293 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the codex/ci-windows-runtime-20260831 branch August 31, 2026 20:32
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
…penclaw#134038)

* perf(ci): reduce Windows test setup and worker time

* perf(anthropic): defer auth loading until hook execution

* perf(test): narrow selected config startup work

* fix(ci): bound compiler memory on constrained lint runners

* test(ci): prepare media fixture input capabilities

* perf(test): scope selected unit configuration discovery

* fix(ci): release cancelled runs and route hybrid control jobs

* fix(ci): resolve merge bases before Testbox preparation

* fix(ci): align gateway recovery validation with runtime contracts

* perf(ci): avoid rename blob fetches during docs classification

* test(ci): consolidate Testbox base preparation coverage

* perf(ci): account for tooling work and shared build prerequisites

* fix(ci): declare serial plugin config worker ownership

* perf(ci): overlap independent performance Git lifecycle fixtures

* perf(ci): partition the complete plugin catch-all with native sharding

* perf(ci): reuse compiled session workers

* perf(test): compare complete SQLite snapshots natively

* test(ci): reuse race-safe process cleanup in report fixtures

* fix(ci): preserve the trusted PR helper closure

* test(ci): derive PR fixtures from the trusted helper closure

* perf(ci): reuse matching checkout for harness actions

* fix(ci): replace retained harness files during index export

* perf(ci): restore exact caches on hybrid runners

* fix(ci): include pnpm metadata in dependency archives

* test(ci): own direct compiler checkpoints in dist fixtures

* perf(ci): balance Windows projects by selected test costs

* perf(ci): seed UI transforms and scope tooling prerequisites

Keep package timeout observations joined across PID discovery, and test planner measurements against stable fixtures while preserving actual runtime-build singleton costs.

* docs(ci): drop the note for the already-landed Telegram type fix

* perf(ci): reuse preflight checkout and route hybrid macOS

* test(ci): wait for command readiness before timeout proof
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 extensions: anthropic gateway Gateway runtime 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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