test(ci): shard cross-platform CLI suite - #12051
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Since the last review, the branch picked up the The two pre-existing open findings on Files Reviewed (1 file changed since last review)
Previous Review Summaries (6 snapshots, latest commit 6c96179)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 6c96179)Status: No Issues Found | Recommendation: Merge Since the last review, the branch picked up the The pre-existing open finding on macOS test-profile scope ( Files Reviewed (2 files changed since last review)
Previous review (commit b0623a6)Status: No Issues Found | Recommendation: Merge Since the last review, the branch picked up the The pre-existing open finding on macOS test-profile scope (line 143) is unrelated to this commit and remains tracked in its existing inline comment. Files Reviewed (1 file changed since last review)
Previous review (commit c340790)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Since the last review, the branch picked up the Files Reviewed (5 files changed since last review)
Fix these issues in Kilo Cloud Previous review (commit 736850e)Status: No Issues Found | Recommendation: Merge The previously flagged duplication of the Zig/bwrap sandbox-helper setup between the Files Reviewed (3 files)
Previous review (commit 6339835)Status: No Issues Found | Recommendation: Merge The previously flagged duplication of the Zig/bwrap sandbox-helper setup between the Files Reviewed (2 files)
Previous review (commit 443d510)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (7 files)
The sharding matrix, Reviewed by claude-sonnet-5-20260630 · Input: 38 · Output: 9.9K · Cached: 904K Review guidance: REVIEW.md from base branch |
|
Final observed pipeline timing Compared the original reference workflow with the final green profile-trim workflow using the GitHub workflow
Reference: https://github.com/Kilo-Org/kilocode/actions/runs/28947466351 Final run: https://github.com/Kilo-Org/kilocode/actions/runs/29082265682 Linux and Windows still run the complete eligible CLI suite. macOS runs the curated native-sensitive profile and retains all 11 sandbox test files. The 6m50s figure is the latest observed end-to-end workflow time, not labeled as a controlled cold-cache measurement because cache state may differ between workflow runs. |
test(ci): shard cross-platform CLI suite
The CLI unit suite starts each test file in a separate Bun process to isolate PID-scoped databases, environment state, child processes, and teardown. The full-platform workflow was dominated by process startup and long process-heavy tails, while the Linux HttpApi gate ran only after the unit queue.
This preserves process-per-file isolation, retries, JUnit reporting, and complete eligible coverage on Linux and Windows. Files are ordered largest-first and assigned exactly once through deterministic greedy balancing across two Linux shards and four Windows shards. macOS runs one curated 106-file Darwin-native profile covering every sandbox test plus process, terminal, PTY, watcher, filesystem, permission, Git, worktree, and native-runtime behavior. Platform-neutral coverage remains backed by complete Linux and Windows runs. Non-CLI package tests still run once per OS, and the full HttpApi exerciser runs independently so it overlaps unit jobs.
Windows fixture cleanup forces GC only after a locked-directory failure instead of before every deletion. Persistent-process tests wait for child exit and persisted output before deleting fixtures or simulating reload. Turbo cache lookup excludes installed package manifests, includes shard identity, and shared Linux sandbox setup lives in one composite action. Stable aggregate checks preserve the existing
unit (linux)andtest (linux)required contexts while shard jobs provide detailed failures.Measured impact
Cold reference: https://github.com/Kilo-Org/kilocode/actions/runs/28947466351
Cold sharded run: https://github.com/Kilo-Org/kilocode/actions/runs/29031811351
Final profile-trim run: https://github.com/Kilo-Org/kilocode/actions/runs/29082265682
The macOS profile comparison is measured on consecutive revisions of this branch. The original full-suite macOS reference was 13m20s, but that comparison is not coverage-equivalent because platform-neutral tests are now intentionally covered by the complete Linux and Windows runs.