Repository navigation
Avoid repeated runtime imports and recovery fixture seeding in CI - #25155
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughRuntime tests now import terminal helpers directly and cover wait-state scans, blocked-prompt timestamps, and tail trimming. Recovery tests use copied seeded fixtures and check copy isolation, artifact contents, and missing-WAL failure. The CI report records test changes, hosted timing comparisons, and cache experiments. No production-code changes are described. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change only adjusts test setup and coverage, plus a CI report. Production behavior is unchanged, and no concrete merge-blocking issue was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 unsupported.)
✨ 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
- Docs log entry — appends an "October 4 runtime imports and recovery fixtures" section to
docs/reference/ci-runner-efficiency.md; pure append. - Replaced simulated memoization tests —
orca-runtime-tail-wait-memo.test.tsdrops the copied-loop simulations that modeled the runtime instead of exercising it, and keeps the twocomputeTerminalTailWaitStatehelper checks, importing the helper fromterminal-wait-tail-state. - New real-runtime prune/wait test —
pty-transcript-prune-wait-cache.test.tsdrivesonPtyDatawith a leaf-only history so the leaf scan path runs, spiescomputeTerminalTailWaitState, and asserts exact scan counts pluswaitBlockedAtstamping across split, settled, and evicted prompts. - Direct helper imports — the redraw-window equivalence and terminal-projection tests now import from
terminal-tail-buffer,terminal-tail-redraw-buffer, andorca-runtime-terminal-projectionrather than pulling in the wholeorca-runtime(all are re-exported fromorca-runtime.ts, so the bindings are unchanged). - Seeded recovery fixtures —
profile-state-recovery-crash-boundaries.test.tsnow seeds each of the three fixture variants once and clones the settled root per test, with byte-exactBuffer.equalschecks, a copy-isolation/WAL family control block, an incomplete-WAL control, and anafterAllguard that the seed bytes are unchanged.
I verified locally that all five changed test files pass (50 recovery + 7 runtime tests), check:code-quality:changed is clean, and the new runtime test is genuinely sensitive: forcing the previous wait state to always recompute fails it at the memoization scan-count assertion. I also confirmed killRecoveryAt awaits the child close before the seed is copied, and that Node's cpSync into an existing directory copies contents (not a nested basename), so the clone path remap is correct. No production behavior is touched, and no actionable findings.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

ELI5
CI spends less time loading the runtime for helper tests and recreating identical recovery databases. Three hosted pairs reduced the final runtime cohort from 22.1 to 13.6 seconds and the recovery crash suite from 24.1 to 8.1 seconds.
What Changed
Import existing terminal helpers directly. Replace ten test-local simulations with a case that exercises actual runtime cache reuse and blocked-prompt timestamps, retaining the genuine helper and prune checks. Seed each recovery fixture variant once after its child closes, copy its complete database/WAL family into isolated roots, and compare every file byte with Buffer.equals.
Why
The removed simulations passed when production caching, timestamping or prune invalidation was broken; the real runtime checks fail each fault. Copying settled seeds avoids redundant setup while retaining all 46 crash boundaries and retries. Four additional controls check isolation and complete WAL copies. A cache shortcut was deferred after stale-transform controls failed; a separate layout optimization was restored after complete-file timing showed no gain.
Linked Issue
N/A — internal CI optimization.
Visual Proof
N/A — tests and test fixtures only.
Testing
Review
Each recovery child and crash boundary still runs against its own directory. Seeds are copied after process closure, paths are remapped with platform path functions, and original seed bytes are checked after all crashes. Runtime production behavior is unchanged.
Agent skill upstream boundary
Checklist