Skip to content

ci: shorten Windows jobs by sharing project setup - #154107

Merged
steipete merged 2 commits into
mainfrom
ci-burden/w1-windows
Sep 20, 2026
Merged

steipete merged 2 commits into
mainfrom
ci-burden/w1-windows

Conversation

@steipete

@steipete steipete commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Windows CI spends 10–14 minutes executing its explicit test selection, with part 2 consistently trailing part 1. This is the maintainer-requested W1 lane of the CI runtime campaign.

User Impact

Keep all 133 Windows test targets and their native assertions while removing eight repeated project processes and shifting work into the shorter job. There is no product behavior change. The two-job concurrency cap, single-worker/serial-project execution, runner class, and deadlines remain unchanged.

Why This Change Was Made

Windows already runs a focused selection, not the broad Linux suite. Checkout, Node/pnpm setup, and dependency installation are a small share of elapsed time. The test body dominates: compiler/artifact fixtures, native process proofs, and project preparation. Group the small projects into one Windows part each so they reuse project setup; keep the heavy tooling fixtures split across both parts and retain the extension runner's plugin process boundaries.

The sorted target inventory is byte-identical before/after (133 unique files; no test moved off Windows). Windows still proves path casing/aliases and file URLs, PATH/shim resolution, native spawning/signals and descendant cleanup, scheduled-task service behavior, SQLite and file-lock/publication behavior, plus shared CLI/package/runtime-import smoke. No assertions, retries, budgets, or timeouts changed. The native 60-second spawnSync timeout remains: it exercises Node/libuv's Windows process-tree ownership and cannot be advanced by a JS clock.

Read O1's #154095 for coordination only; it changes Linux worker-cache overhead. This PR changes Windows selection placement only, with no shared toolchain/cache or planner-cap changes. No extra runner registration is introduced.

Evidence

Baseline

The three newest green main runs when queried (35537332923, 35537254547, 35532705327) skipped Windows. The table therefore uses the three newest successful main runs that actually executed Windows, plus a successful PR run. Raw REST step timestamps have one-second resolution. The runtime-preparation column is inside the test body, measured from log timestamps; it is not additional time.

Run Part Job wall s Checkout Node pnpm Dependencies Test body Runtime preparation inside body
35526569333 main 1 688 20 1 2 34 617 63.00
same 2 881 18 0 3 29 818 64.42
35518915535 main 1 676 21 1 2 29 606 60.87
same 2 797 19 1 2 27 733 55.87
35512907828 main 1 660 20 0 3 26 596 59.19
same 2 966 20 1 2 35 894 61.93
35538213398 PR 1 782 47 0 3 30 685 71.39
same 2 923 34 1 2 30 839 74.97

Remaining job time is Defender setup, version/path probes, runner startup/completion, and API timestamp gaps. Main medians are 676/881 seconds wall and 606/818 seconds body. The runners report two available CPUs and about 7 GiB RAM despite their 8-vCPU label. Dependency installation is 26–35 seconds; the shared setup deliberately does not restore a Windows pnpm store cache, and cache churn is not the bottleneck addressed here.

Successful ✓ … <ms>ms log records ranked by file (median over these four runs): verbose test-case milliseconds are summed within a file; an available file summary takes precedence. These are cumulative test-body seconds, not file wall time, and concurrent cases can overlap.

File Median test seconds
test/scripts/vitest-worker-artifacts.test.ts 203.89
src/process/exec.windows.integration.test.ts 91.23
test/scripts/tsdown-declaration-resolution.test.ts 78.95
test/scripts/write-plugin-sdk-entry-dts.test.ts 77.33
test/scripts/write-unified-entry-dts.test.ts 65.91
test/scripts/check-openclaw-package-tarball.test.ts 47.91
test/scripts/ci-platform-checkout.test.ts 41.11
src/commands/doctor-lint.state-isolation.test.ts 35.50
test/helpers/openclaw-test-instance.test.ts 25.20
src/infra/update-candidate-state.cleanup.test.ts 20.13

Candidate proof

The new executable partition guard fails on the previous split (eight extra repeated project owners) and passes after regrouping: 555ms test time, 3.15s wrapper wall on one worker. It also rejects duplicate, unmatched, or non-test target selections. Precommit and rebased committed-branch P2 autoreviews are scoped-clean with no actionable findings. Type-aware Oxlint passed for the changed test, with a failing no-floating-promises canary proving type-aware execution; formatting, docs inventory, 14,232 internal links, touched-page anchors, and git diff --check passed. The broader optional anchor audit reports 56 existing fragment errors outside the two touched pages; external ClawHub fragments are unverified without its source.

Linux inventory proof passed on Testbox tbx_01m30c9q17qe9avh163bz9wqay (provisioning run), Node 24.19.0, four available CPUs and 15.4 GiB RAM: part 1, 16 project processes, 409.37s wall / 6.02 GiB peak RSS; part 2, 15 processes, 337.61s / 5.15 GiB. These are Linux execution measurements; platform-conditional skips make them distinct from native Windows proof. The lease is stopped. The four required guard/planner files passed together: 2,149 tests, 302.68s wrapper wall. check-changed then correctly rejected four possibly-undefined reads in the new guard; explicit assertions now narrow those inputs. On the corrected candidate, the full changed test-projects.test.ts file passed 1,181 tests in 52.66s wall (683 MiB peak RSS), followed by a complete successful node scripts/check-changed.mjs run. This includes root test TypeScript checks, dead-export scans, and type-aware lint. The new guard’s focused cost is under one second; the existing file covers the broad test planner and runtime-selection contracts. Both validation leases were stopped. The corrected precommit and final committed-branch P2 reviews are scoped-clean. Corrected candidate head: 7b080ae5a85a91169349226f481684f43913ae8d.

Follow-ups: compiler-fixture runtime remains the largest cost; native runner allocation differs from the advertised class. Both need separate measured owner work rather than more Windows jobs or weaker native proofs.

Native before/after

The corrected head’s CI run 35541378209 is successful, with both Windows jobs green. Logs confirm 16 and 15 project processes on the same two-CPU / 7 GiB allocation. The complete final step comparison follows.

Step Main part 1 median s Final part 1 s Main part 2 median s Final part 2 s
Job wall 676 759 881 810
Set up job 0 0 0 0
Set up runner 3 2 2 2
Checkout 20 23 19 24
Try to exclude workspace from Windows Defender (best-effort) 1 1 1 1
Setup Node.js 1 1 1 1
Setup pnpm 2 2 2 3
Runtime versions 1 1 0 0
Capture node path 0 0 0 0
Install dependencies 29 31 29 24
Test body 606 688 818 743
Complete runner 1 1 0 0
Complete job 0 0 0 1

The slower job is 810s (13m30s) versus the recent-main median of 881s (14m41s): 71s / 8.1% less wall time. The test-body tail is 743s versus 818s, down 75s / 9.2%. Part 1 absorbs work and rises from 676s to 759s, leaving 51s between the final jobs. Combined job wall is 1,569s, matching the baseline median of the combined jobs: the gain is tail latency, with roughly unchanged total execution time.

The first candidate run 35540375501 also passed both Windows jobs, in 761/790s (16/15 project processes), corroborating the direction. These are observed, unpaired comparisons: baseline part-2 walls ranged from 797s to 966s, so the entire difference cannot be assigned causally to this change. No setup/cache speedup is claimed. Part 2’s runtime build now occurs inside its first native CLI fixture rather than before the project processes; the complete test-step measurements include that work.

The first run failed check-test-types on the four diagnosed guard reads; explicit assertions fixed them, and the corrected head’s check is green. It also failed checks-ui-e2e (7/13) at session-owner-assignment.e2e.test.ts:484: the renamed teammate row existed but did not remain focused after ArrowDown. The picker/test/dependency patch are unchanged since their introduction in #153798. A dropdown animation may steal focus, but the log lacks focus-event history and the cause is not yet proven. The UI shard passed on the necessary corrected-head run; that does not resolve the earlier failure. No owning fix was located, so it remains a follow-up requiring reproduction in the original shard order. No unchanged failed job was rerun.

@clawsweeper

clawsweeper Bot commented Sep 20, 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: XS maintainer Maintainer-authored PR labels Sep 20, 2026
@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 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 20, 2026, 6:49 PM ET / 22:49 UTC (Revision 3).

ClawSweeper review

What this changes

Regroups Windows tests across two existing CI jobs to share project setup, adds a partition guard, and updates CI documentation.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this remains a distinct, measured CI improvement absent from current main. No introduced correctness defect was found.

Priority: P2
Reviewed head: 7b080ae5a85a91169349226f481684f43913ae8d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, coverage-preserving patch with convincing native CI evidence and no actionable introduced defect.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed package-script selections ran through the actual Windows CI jobs on the reviewed head, both passing in 759/810 seconds; this proves the changed automation path, with the reported performance comparison appropriately qualified as unpaired.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed package-script selections ran through the actual Windows CI jobs on the reviewed head, both passing in 759/810 seconds; this proves the changed automation path, with the reported performance comparison appropriately qualified as unpaired.
Evidence reviewed 9 items Introduced scope: The pinned introduction changes only the two Windows package scripts, their new partition guard, and two documentation pages. Dependencies, workflow permissions, runner classes, deadlines, and worker limits are unchanged.
Coverage preserved; improvement still necessary: Read-only JSON comparison of the merge-base, head, and fetched main package scripts found 133 unique targets with no additions, removals, or duplicates. Distribution changes from 50/83 to 75/58; fetched main retains the exact original partitions.
Existing execution owner and regression guard: The workflow still invokes both package scripts with serial project execution and one Vitest worker. The added guard uses the real planner to reject invalid or duplicate targets and repeated small-project setup; tooling and extension process boundaries remain allowed.
Findings None None.
Security None None.

How this fits together

Windows CI reads explicit test selections from package scripts and groups them through OpenClaw’s existing test runner. The two jobs provide native platform coverage and feed the aggregate CI result.

flowchart LR
  A[Windows test inventory] --> B[Two package scripts]
  B --> C[Existing project planner]
  C --> D[Serial Windows job one]
  C --> E[Serial Windows job two]
  D --> F[Aggregate CI result]
  E --> F
  G[Partition guard] --> B
Loading

Before merge

  • Complete next step (P2) - Diagnose the reported teammate-picker focus failure in checks-ui-e2e (7/13), starting with the original shard order, and cite its owning fix before landing; the later green run does not resolve it.
Agent review details

Security

None.

PR surface

Tests +31, Docs +2, Config 0. Total +33 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 31 0 +31
Docs 2 3 1 +2
Config 1 2 2 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 36 3 +33

Review metrics

Metric Value Why it matters
Windows coverage 133 unique targets preserved; 50/83 becomes 75/58 The shorter tail does not come from removing native test coverage.
Observed Windows tail 881-second baseline median to 810 seconds; 8.1% lower Native observations support a latency benefit, with unchanged combined job wall time and no claim of causal benchmark precision.

Technical review

Best possible solution:

Retain complete Windows coverage through the existing two-job runner while consolidating project setup and measuring total job latency.

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

Not applicable as a product bug: the CI imbalance is documented by native job timings, and source comparison confirms the repeated project placement.

Is this the best way to solve the issue?

Yes. Regrouping the existing explicit targets uses the current execution owner, preserves coverage and concurrency, and has native Windows validation.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded CI runtime improvement with measured native results and no product behavior change.
  • 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 (linked_artifact): The changed package-script selections ran through the actual Windows CI jobs on the reviewed head, both passing in 759/810 seconds; this proves the changed automation path, with the reported performance comparison appropriately qualified as unpaired.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed package-script selections ran through the actual Windows CI jobs on the reviewed head, both passing in 759/810 seconds; this proves the changed automation path, with the reported performance comparison appropriately qualified as unpaired.

Evidence

What I checked:

  • Introduced scope: The pinned introduction changes only the two Windows package scripts, their new partition guard, and two documentation pages. Dependencies, workflow permissions, runner classes, deadlines, and worker limits are unchanged. (package.json:2145, 7b080ae5a85a)
  • Coverage preserved; improvement still necessary: Read-only JSON comparison of the merge-base, head, and fetched main package scripts found 133 unique targets with no additions, removals, or duplicates. Distribution changes from 50/83 to 75/58; fetched main retains the exact original partitions. (package.json:2145, 356b0f186b78)
  • Existing execution owner and regression guard: The workflow still invokes both package scripts with serial project execution and one Vitest worker. The added guard uses the real planner to reject invalid or duplicate targets and repeated small-project setup; tooling and extension process boundaries remain allowed. (test/scripts/test-projects.test.ts:51, 7b080ae5a85a)
  • Native execution on the reviewed head: GitHub confirms run 35541378209 succeeded on the reviewed head, attempt 1. Both Windows jobs succeeded: 759/810 seconds wall and 688/743 seconds in their test steps. This directly exercises the changed CI entrypoints. (7b080ae5a85a)
  • Measured benefit and limitations: The captured PR body reports 16/15 project processes and an 810-second slower job versus an 881-second recent-main median. Combined wall time remains 1,569 seconds. The author explicitly identifies these as unpaired observations, not a causal benchmark or setup-cache speedup. (7b080ae5a85a)
  • Prior failure remains unresolved: The captured body explicitly says the earlier teammate-picker focus failure remains undiagnosed and has no owning fix. GitHub confirms checks-ui-e2e (7/13) failed in run 35540375501. Root policy requires diagnosis and an owning fix before landing; the subsequent successful run does not satisfy that requirement. Direct log retrieval was blocked by the artifact-host allowlist, so the failure detail relies on the supplied body. (AGENTS.md, 7b080ae5a85a)

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-20T22:02:05.896Z sha cae1304239e77b3da5d992927dd1afdc6527f664 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T22:25:54.580Z sha 7b080ae :: needs changes before merge. :: none

@steipete
steipete force-pushed the ci-burden/w1-windows branch from cae1304 to 7b080ae Compare September 20, 2026 22:19
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Sep 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 7b080ae5a85a91169349226f481684f43913ae8d
  • Maintainer: @steipete
  • Repository role: admin

These dependency graph changes were made:

  • package.json

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 20, 2026
@steipete
steipete merged commit b73d0e4 into main Sep 20, 2026
220 of 221 checks passed
@steipete
steipete deleted the ci-burden/w1-windows branch September 20, 2026 23:38
@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 21, 2026
* ci: avoid repeated Windows test project setup

* test: narrow Windows partition guard inputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files 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: XS 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