Repository navigation
[CI] Fix unsafe test fixtures and the Bun version pin - #26051
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe changes add tests for Electron import-graph coverage, POSIX provider teardown, and transcript watcher replay. They add a shared script that validates process ancestry before signaling, then use it in generated drain-interruption shims. Contributor instructions, CI workflows, and the Vitest startup error now reference Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable issue is identified in the reviewed change; it is mergeable after normal checks. 🚥 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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8dab7580-0b1a-4330-9bcc-007b63a01afc
📒 Files selected for processing (16)
.github/CONTRIBUTING.md.github/scripts/unit-runner-diagnostics.py.github/scripts/unit-runner-diagnostics.test.py.github/workflows/pr.yml.github/workflows/unit-tests.ymlconfig/.bun-versionconfig/scripts/check-runtime-electron-ratchet-graph.test.mjsconfig/scripts/ci-unit-timing-reporter.mjsconfig/scripts/ci-unit-timing-reporter.test.mjsconfig/scripts/pr-preflight-gates.test.mjsconfig/scripts/run-vitest.mjssrc/main/codex-accounts/legacy-wsl-runtime-auth-drain-interruption-source.test.tssrc/main/codex-accounts/legacy-wsl-runtime-auth-drain-interruption-source.tssrc/main/codex-accounts/legacy-wsl-runtime-auth-drain-script-harness.tssrc/main/codex-accounts/legacy-wsl-runtime-auth-drain-script-interference-shims.tssrc/main/provider-process/provider-process-teardown.test.ts
💤 Files with no reviewable changes (1)
- config/.bun-version
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/CONTRIBUTING.md
- config/scripts/run-vitest.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
@coderabbitai review |
|
ELI5
The runner memory fix is already on main in #26049. This follow-up prevents test fixtures from signalling unrelated processes, makes CI honor its Bun version pin, verifies that the optimized import check retains the original dependency records, and makes a transcript fixture apply full replacement snapshots correctly.
The import-check implementation, its existing tests, and the structured-session host match main exactly.
What Changed
config/.bun-version, a filename the pinned setup-bun action recognizes. Update both workflows and contributor guidance.require.resolve, native addons and injected imports. Main already supplies the shared-output bound test.Before/after measurements
newmessage, zeronewappend deliveriesA controlled metadata replay also reproduced the old transcript assertion under both Bun and Node: two valid full replacement snapshots containing the same ID were accumulated as two appends. The corrected fixture replaces its current window and checks append deliveries separately. This reproduces a valid interleaving, not proof of the precise CI interleaving or a Bun defect.
These measure fixture safety and version selection. This follow-up claims no additional suite-speed improvement; #26049 owns the landed memory optimization and its before/after measurements.
Why
We verified eight runner shutdowns across four PRs, 250.877–355.201 seconds after test-step start, without a preceding logged assertion failure. Failed and completed attempts used the same Node and Bun versions.
Temporary instrumentation captured an esbuild process reaching 12.75 GiB RSS before a kernel-generated kill signal and systemd termination of the runner. A corrected qualification run completed all five shards, with maximum sampled esbuild RSS 327 MiB and over 10.9 GiB sampled available memory. See the captured failure and corrected qualification. These runs preceded this branch adopting the equivalent optimization now on main; they are investigation evidence, not a new performance claim for this PR. Five-second samples can miss peaks, and the initiating OOM or hosting policy was not recorded.
The unsafe fixtures are separate hazards. Both were outside shard 2 in the PR 25430, 25624 and 26034 snapshots; an older PR 26006 assignment included the provider fixture on shard 2. They cannot explain the repeated pattern by themselves. The fixture checks reject unsafe targets without changing production teardown. The graph regression protects the CommonJS coverage retained by #26049; ESM splitting was rejected because it dropped
require.resolvemetadata.The investigation recorder is removed from this PR. Review found that cancellation of its direct Node child could leave Bun descendants running. Since it has already supplied the incident evidence, shipping a new process-tree cleanup feature would add unnecessary scope. Ordinary CI continues to use its existing test command directly.
The first reduced-scope CI run completed all 11,365 selected files exactly once: 11,229 passed, 135 skipped, one failed, and zero unhandled errors. Four shards and every non-unit check passed. The sole failure was the unchanged transcript fixture described above; the final run after correcting it passed, as recorded below.
Linked Issue
Slack incident report. Related fix: #26049.
Visual Proof
N/A — test fixtures and CI version selection have no rendered UI change.
Testing
04baqualification: the corrected full selection retained all previous 11,352 files plus the new graph file, reported each exactly once, and passed all five shards with zero unhandled errors. Windows boundary checks also passed. This is historical evidence, not final-head CI clearance.975d226automated review: CodeRabbit explicitly reviewed this commit, found no actionable comments, and all threads are resolved.9fd0ec2: all five unit shards passed. All 11,368 selected files were reported exactly once: 11,233 passed, 135 existing skips, zero failures and zero unhandled errors. Every previous 11,365 file remains, plus three new main tests. The corrected watcher passed all four cases; both graph regression modules passed.Review
Fixture signal ownership, replacement-snapshot semantics and import-record coverage passed independent reviews. The optional recorder and all reporting/workflow instrumentation have been removed to address its cancellation finding. Main's landed implementation is preserved. No production teardown or remote-execution behavior changes.
Agent skill upstream boundary
Notes
The new interruption checks run inside the existing guest-shell fixture and signal only its verified owned process. The version-file rename preserves Bun 1.4.2. Linux, macOS, Windows and SSH production behavior remain unchanged.
Checklist
76d480f8081e0ef5f6529db1506bc989f42e6cefafter matching qualified head975d226on 2026-10-07 at 04:42 UTC.