Repository navigation
[CI] Reduce repeated CI setup and overlap mobile typechecks - #25359
Conversation
There was a problem hiding this comment.
ℹ️ No critical issues. All substantive edits are CI-layout / test-scoping; one stale baseline entry was left behind by the benchmark rename.
Reviewed changes
- Mobile typecheck overlap —
wait: production-typesmoved from before the foreground "Typecheck tests (ratchet)" step to after it and before "Test", so the background production compiler and the test-typecheck ratchet overlap.config/scripts/mobile-typecheck-workflow.test.mjswas updated to pinproduction < ratchet < wait < test, noifon the wait, andcontinue-on-errorfalse on both compilers. - RPC registry fixture — new
unused-default-rpc-methods.test-fixture.tsmocks./methodswith an array whoseSymbol.iteratorincrements a plain counter and throws, and anafterEachasserts the count stayed 0 (reset infinally, soclearAllMockscannot mask it). Imported as a first-line side-effect by 153 dispatcher test files; the real-catalog subjects do not import it. - Agent-status benchmark — renamed
.test.ts→.tsso it drops out of ordinary discovery, with a dedicatedconfig/vitest.agent-status-benchmark.config.ts; counter classes refactored and theas unknown ascasts removed. - Windows SSH checkout — sparse-checkout added to all four host lanes (
.github config native resources tests src/main src/shared src/relay src/types); the relay/orcad build entries all resolve within included trees. - Incumbent probe —
describe.skipIf(win32).concurrent(...)so the nine owned-socket cases overlap their real lsof deadlines. - Commentable-line test — throwing
NotesSendMenufacade plus anafterEachnever-called guard. - Docs — new
ci-runner-efficiency.mdsections recording scoped timings and their measurement limits.
ℹ️ Nitpicks
config/scripts/ci-shard-timings.json:11still listsconfig/scripts/agent-status-hot-path-benchmark.test.ts, which this PR renames to...benchmark.tsand removes from unit discovery. The key is dead (ignored bybalanceFiles's fallback) and will be dropped on the nextci-unit-timing-importrun, but it can be removed now.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The delta since the prior pullfrog review (452130a6b6) is a single commit, 50330e31cf, adding the lint-policy exemption the earlier commits needed.
- Anti-slop exemption for the RPC test fixture — added a file-scoped override in
config/oxlint-anti-slop.jsonthat turnsanti-slop/no-module-mockingoff forunused-default-rpc-methods.test-fixture.ts. The fixture is named*.test-fixture.ts, so it falls outside the existing**/*.test.{ts,tsx}override even though its whole body is onevi.mock. The override mirrors the existing**/mock-descendant-sweep.tsexemption and is narrowly scoped to the one file.
Verified the exemption is both necessary and effective: with it removed, oxlint --config config/oxlint-anti-slop.json reports exactly one anti-slop/no-module-mocking error on the fixture's vi.mock (line 14); with it in place the file lints clean. The glob matches the file path and the config parses correctly.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe mobile workflow now runs the ratchet typecheck before waiting for the production typecheck. The Windows SSH workflow adds sparse-checkout paths. The agent-status benchmark updates fixture setup, allocation counting, and output handling, and adds a dedicated Vitest configuration. A shared fixture checks for use of the default RPC method catalog, and many test modules import it. Other changes add CI-efficiency documentation, an SSH test concurrency setting, and a renderer assertion. Priority: ➖ Normal Merge Risk: 🔵 Low · up to The concurrent SSH tests have a narrow cleanup race that could terminate another process if a PID is reused. This is a bounded test-only risk; correct the cleanup before relying on the concurrent probes. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes preserve existing permissions and keep both mobile typechecks ahead of tests. No introduced security issue was established. Remaining uncertainty concerns background-process cleanup when the foreground check fails before the explicit join. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The delta since the prior pullfrog review (50330e31cf) is a single commit, 57c9cb47c1, correcting one mobile-barrier contract test.
- Mobile barrier contract realigned —
config/scripts/ci-background-step-barriers.test.mjsrenamed the case tojoins independent mobile typechecks before allocating test workersand flippedexpect(ratchet).toBeGreaterThan(join)totoBeLessThan(join). That resolves a contradiction with the siblingmobile-typecheck-workflow.test.mjs(ratchetIndex < waitIndex): the previous assertion placed the ratchet after the join, which cannot hold againstmobile.yml(production background step at 118, ratchet at 127,wait: production-typesat 130, Test at 149). Test-only; no product behavior change. Both contract files pass locally (12 tests, ~280ms).
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Clean up through the case-owned process group. · ssh-relay-incumbent-process.test.ts:68-69
src/main/ssh/ssh-relay-incumbent-process.test.ts:68-69
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winClean up through the case-owned process group.
The fixture PID can exit during
runProcesscleanup. If the PID is reused beforefinallyruns, the currentprocess.kill(pid, 'SIGKILL')can kill another concurrent case. Record the detached process group ID and signal that group instead.Suggested fix
const socket = join(dir, 'socket with spaces.sock') const server = createServer((s) => s.end()) const pidFile = join(dir, 'probe.pid') + const groupFile = join(dir, 'probe.pgid') ... - env: { ...process.env, PATH: `${dir}:${process.env.PATH}`, FIXTURE_PID: pidFile }, + env: { + ...process.env, + PATH: `${dir}:${process.env.PATH}`, + FIXTURE_PID: pidFile, + FIXTURE_PGID: groupFile + }, ... - const pid = Number(readFileSync(pidFile, 'utf8')) - if (Number.isInteger(pid) && pid > 0) { - process.kill(pid, 'SIGKILL') + const pgid = Number(readFileSync(groupFile, 'utf8')) + if (Number.isInteger(pgid) && pgid > 0) { + process.kill(-pgid, 'SIGKILL') } ... - const p = await probe('echo $$ > "$FIXTURE_PID"\nexec sleep 60\n', true) + const p = await probe( + 'echo $$ > "$FIXTURE_PID"\nps -o pgid= -p $$ > "$FIXTURE_PGID"\nexec sleep 60\n', + true + ) ... - const p = await probe('sleep 60 &\necho $! > "$FIXTURE_PID"\nwait\n', true) + const p = await probe( + 'sleep 60 &\necho $! > "$FIXTURE_PID"\nps -o pgid= -p $! > "$FIXTURE_PGID"\nwait\n', + true + )
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
255e0bef-0e40-4f4a-afc6-10b76a20fda8
📒 Files selected for processing (1)
config/scripts/ci-background-step-barriers.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
… e2e build Main's #25359 narrowed this workflow's checkout to the server and test trees. Phase 3's orcad-convert cell builds the full e2e app with electron-vite, which also needs src/preload and src/renderer, so the x64 inbox cell failed with UNRESOLVED_ENTRY.

ELI5
CI runners spend time loading unused code and waiting for checks that can run together. This change removes that work while keeping the actual failure checks.
What Changed
Why
These changes reduce occupied runner time without skipping product failure checks or relying on persisted transform caches. Alternating hosted comparisons and actual injected faults provide evidence for each change. The report in
docs/reference/ci-runner-efficiency.mdrecords timings, source versions and measurement limits. Scoped timings cannot be added together or treated as a measured improvement to PR percentiles.Linked Issue
N/A — internal CI efficiency work.
Visual Proof
N/A — workflow and test setup changes only; no application UI changes.
Testing
Hosted comparison runs:
Local qualification includes original case ledgers, actual handler/catalog/lifecycle faults, source restoration, owned-process cleanup, Node typecheck, all 20 existing workflow assertions, the full anti-slop scan, max-lines ratchet and changed-code quality gate. The reusable test guard has the same narrow test-only lint exception as the existing process-sweep fixture. Normal CI passed: PR Checks and Verify, Mobile Checks, and all four Windows SSH lanes. The five unit artifacts account for all 10,916 ordinary unit files with zero unhandled errors. All 12 Windows cell receipts passed, including both pinned-shell routes and the opt-out; the four provider receipts also qualified private service, owned SSH process, account and key cleanup. All 12 profiles remain loaded; profile/global bootstrap cleanup relies on disposable VM destruction.
Review
Independent native Codex agents audited source equivalence, fault sensitivity, hosted receipts and measurement boundaries. The final source is rebased on current main. Temporary trial workflows, archives and helpers are absent from the final diff.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Production RPC behavior and SSH execution boundaries are unchanged. Windows retains separate inbox/preview and x64/ARM jobs. Mobile uses installed no-emit compilers; its sampled combined peak was 5.137 GiB on the 16 GiB runner. Its test-typecheck ratchet now also runs when the concurrent production compiler later fails.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (covered by normal CI)