Repository navigation
ci: shorten Windows jobs by sharing project setup - #154107
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 20, 2026, 6:49 PM ET / 22:49 UTC (Revision 3). ClawSweeper reviewWhat this changesRegroups 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 Review scores
Verification
How this fits togetherWindows 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
Before merge
Agent review detailsSecurityNone. PR surfaceTests +31, Docs +2, Config 0. Total +33 across 4 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
cae1304 to
7b080ae
Compare
|
|
Merged via squash.
|
* ci: avoid repeated Windows test project setup * test: narrow Windows partition guard inputs
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
spawnSynctimeout 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.
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>mslog 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.test/scripts/vitest-worker-artifacts.test.tssrc/process/exec.windows.integration.test.tstest/scripts/tsdown-declaration-resolution.test.tstest/scripts/write-plugin-sdk-entry-dts.test.tstest/scripts/write-unified-entry-dts.test.tstest/scripts/check-openclaw-package-tarball.test.tstest/scripts/ci-platform-checkout.test.tssrc/commands/doctor-lint.state-isolation.test.tstest/helpers/openclaw-test-instance.test.tssrc/infra/update-candidate-state.cleanup.test.tsCandidate 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 --checkpassed. 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-changedthen correctly rejected four possibly-undefined reads in the new guard; explicit assertions now narrow those inputs. On the corrected candidate, the full changedtest-projects.test.tsfile passed 1,181 tests in 52.66s wall (683 MiB peak RSS), followed by a complete successfulnode scripts/check-changed.mjsrun. 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.
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-typeson the four diagnosed guard reads; explicit assertions fixed them, and the corrected head’s check is green. It also failedchecks-ui-e2e (7/13)atsession-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.