Repository navigation
[CI] ci: restore five unit runners and prune source-only tests - #26437
Conversation
📝 WalkthroughWalkthroughThe full-unit shard default in the PR workflow changes from ten to five. Comments describe the five-shard default and note that a repository variable can request ten shards. The preflight test now expects a fallback value of five. The preview driver now rejects a missing or detached loaded frame and passes the loaded frame to the action. Two test files are removed: one for Pi prefill source behavior and one for renderer useRef initializer patterns. Priority: ➖ Normal Merge Risk: 🔵 Low · up to The current behavior is protected in the implementation, but the change removes the test that would catch a Pi prefill regression on reload. This is a narrow risk suitable for follow-up. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
009406f to
aedbf3b
Compare
aedbf3b to
5e4ba04
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/pi/prefill-extension-source.ts (1)
28-31: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd behavioral coverage for the Pi startup-only prefill guard.
The deleted assertion was the only test targeting this guard. A focused test should invoke the Pi handler with
{ reason: 'reload' }and assert that the prefill remains set andsetEditorTextis not called.Suggested fix
+++ b/src/main/pi/agent-status-extension-pi-prefill.test.ts +import { expect, it, vi } from 'vitest' +import { createAgentStatusExtensionHarness } from './agent-status-extension-test-harness' + +it('preserves a Pi prefill on a non-startup session_start', async () => { + const h = createAgentStatusExtensionHarness({ + kind: 'pi', + env: { ORCA_PI_PREFILL: 'Draft' } + }) + const setEditorText = vi.fn() + + await h.callHook('session_start', { reason: 'reload' }, { ui: { setEditorText } }) + + expect(setEditorText).not.toHaveBeenCalled() + expect(h.processEnv.ORCA_PI_PREFILL).toBe('Draft') +})
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8bc9562d-f410-44f7-92c8-2c28d08d552d
📒 Files selected for processing (3)
config/scripts/mobile-web-app-preview-arm-driver.mjssrc/main/pi/prefill-extension-source.test.tssrc/renderer/src/lazy-use-ref-ratchet.test.ts
💤 Files with no reviewable changes (2)
- src/renderer/src/lazy-use-ref-ratchet.test.ts
- src/main/pi/prefill-extension-source.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
ELI5
Use five runners for the full unit suite by default, leaving more room for other pull requests. Preserve the complete behavioral test suite while removing three source-string checks. The browser fixture acts on the frame it has actually loaded and refuses a missing or detached frame.
What Changed
The existing PR shard setting defaults to five instead of ten; its repository override still accepts either. Update the existing contract expectation and explanatory comment. Test selection, four workers per runner, isolation, six setup files, deadlines and protected Node routing stay unchanged.
The HTML-preview fixture passes its already-loaded frame to the original action instead of looking it up again. A missing or detached frame fails before the action. This changes no product code, security assertions, browser inputs or navigation deadlines, and adds no click listeners, CDP sessions or request observers.
Six files change on base
89ba968230d7e704b5754a43ef64fa7b91c6c84e; shipping head is5e4ba04586948c30f23504cbfb73d4cb7265f32d. All 507 current protected Node patterns and the three newer Windows hook cases are retained.Remove
lazy-use-ref-ratchet.test.ts(one case) andprefill-extension-source.test.ts(two cases). The first uses a private source scanner rather than rendering React; the other two call the real generator but only inspect its output strings. This intentionally drops the global eager-useReftext rule and the Pi/OMP literal-source checks. The retained OMP VM test executes the generated handler and checks draft delivery; titlebar VM, installation, security and behavioral tests remain. Those companions do not establish equivalent standalone Pi startup-filter coverage. No replacement skips, no-ops or production changes are added.Why
The goal is lower occupied runner time under the shared concurrency cap. Five shards reuse an existing supported mode and avoid five repeated setups. Keeping ten shards but limiting their overlap would retain ten setups. Historical five-shard feedback took longer, so occupancy and required-check latency must both be measured on the current head. This does not establish the 2× capacity goal.
Before / after evidence
The ten-shard run and five-shard run used equivalent named source definitions and the same 11,678-file workload. Every file enrolled once and reported module counts, statuses and runtime routes matched. They used separate hosts with different cache and queue states; individual case-title equality was not recorded.
Three earlier same-source Bun command rounds also retained all first samples:
Those commands have overlapping workers and different warm-up/queue histories. Their sums omit job setup and are not whole-workflow occupancy or a loaded-fleet throughput measurement. Five-shard longest commands were roughly 1.83–1.92× longer with ample runners.
The original pre-Bun baseline already used five unit jobs: 3,018 unit runner-seconds and 4,470 across four attached validation workflows, with six cleanup seconds recorded separately. Restoring five addresses the doubled unit-job demand; neither that historical baseline nor newer, different workloads proves a current capacity gain.
Current full-CI before / after
Before: ten runners tested a tree identical to this PR's base. After: five runners tested the exact shipping tree. All four attached workflows passed. Every retained module has the same case count, status, skips and runtime route; the only removed inventory is the two approved modules / three text checks. Reports cover 11,867 files and 115,273 cases: 114,201 passed, three expected failures and 1,069 skips, with zero unhandled errors. Actual routes remain 10,708 Bun, 1,158 protected Node and one measurement file. Ordinary reports do not contain full individual case-title maps or worker-process samples.
These are changed-source observations on separate hosts, caches and queue conditions, not a controlled sharding-only or loaded-fleet gain. The six-file change includes the three retired text checks and the fixture boundary. The earlier separate Mobile workflow (346 seconds) is absent; the Pi test deletion instead triggers three existing native owner-verification jobs (224 seconds). Main's unchanged WebKit installation took 48 → 345 seconds, overlapping other setup; its render checks took 133 → 175 seconds. These steps do not receive the unit shard count, and their timing differences are retained rather than attributed to sharding. Unit creation-to-start delay fell 98 → 12 seconds, but that queue observation is not a demonstrated scheduling improvement.
This validation used 25 allocations / 33 declared jobs, one attempt each: main 5,302 seconds, Node detector 24, LoC eight and Pi verification 224. Runner pools: ARM Ubuntu 3,843; latest Ubuntu 1,169; Windows2022 317; WindowsLatest 104; macOSLatest 79; slim Ubuntu 46. Post-merge/main-push and cleanup work is outside this validation ledger. The matched earlier trial and current observation consistently favor lower unit occupancy, with longer isolated feedback. The 2× capacity goal remains unproven.
Fixture qualification and retained validation costs
Full browser qualification passed all 30 original cases in both before and candidate arms: 15 Chromium and 15 WebKit cases, exact duplicate-preserving title/ancestor/status maps, no filtered cases. The driver before/after bytes remain exact on the current base. The measured browser setup pinned Chromium 154.0.8037.57 and WebKit 26.6. Source teardown closes browsers; this is not independent proof of complete process-tree absence.
The earlier failure was not reproduced, so this establishes fixture compatibility and a source-proven missing-frame boundary, not the failure's cause, a flake fix or a speed gain. The current full CI passed; the original cause remains unproven.
These differing workloads are validation costs, not a before/after fleet ratio. Queue time is separate, failed attempts remain counted, and this PR does not erase their conclusions. The current replacement combines the reviewed shard setting, the distinct qualified frame boundary and the explicit text-test removals; it is not an unchanged retry. The removed modules previously reported 140 ms and 45 ms including collection. Those descriptive values are not measured runner savings; no extra benchmark is added for them.
Linked Issue
N/A — maintainer-requested CI capacity correction; follows #26295 and incorporates the separately merged writer fix #26444.
Visual Proof
N/A — CI scheduling and browser-test fixture hardening; no product UI changes.
Testing
Actual five-job enrollment, full reports, main browser checks, Linux/Windows packages and all selected platform/security checks passed. Real IME, WSL, separate headless platform lanes and changed-spec E2E were correctly unselected; no execution claim for them. Root checked that both shard-count and selection-mode repository variables were absent; CI enrolled all files in shadow/full fallback across five jobs. No new job, benchmark framework or cache warmer was added. The workflow edit intentionally selected the existing full policy checks once.
Review
Independent source review checked the four exact patch outputs and two whole-file deletions, all 53 scheduling/fixture guards and 15 deletion guards, current 507-pattern Node inventory, complete source recovery and preservation of upstream Windows cases. The only exact deleted-filename references found were historical timing weights; no required selector or reliability manifest referenced them. Existing raw browser and ordinary-run reviews are retained. CodeRabbit reviewed the shipping head with zero inline threads and one advisory to add a Pi prefill test. Its sample uses the status-extension harness, which loads prefill only for OMP (handler source); Pi's standalone prefill is installed separately (service). That sample could pass even if the standalone Pi guard broke, so it is declined as a wrong-owner negative control. The explicit loss of the old literal tripwire remains disclosed; equivalent standalone Pi behavioral coverage is not claimed. No replacement test or unchanged retry was added.
Agent skill upstream boundary
Notes
macOS, Linux, Windows, SSH and folder-workspace contracts retain their existing routing and deadlines. This changes the hosted unit matrix default, a test fixture and three textual test policies; runtime and wire behavior are unchanged.
Checklist