Repository navigation
[CI] test: reduce replay oracle time by 20.93% with scratch cell reuse - #26162
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe grid serialization scans now obtain a reusable null cell from the active buffer. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The changes are limited to test-oracle scans, and available evidence establishes no actionable behavior difference or merge-blocking issue. 🚥 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 |
ELI5
The terminal replay tests inspect the same cells while creating fewer temporary objects. The application behaves the same.
What Changed
Two test-oracle scans reuse one existing xterm scratch cell per invocation. Every cell is read synchronously before that scratch cell is overwritten; no scratch object escapes or survives the scan. The scans keep their original bounds, blank-cell policy, clipping rules and background-row decisions.
Why
These scans previously allocated a new cell for each inspected coordinate. The oracle already uses xterm's supported scratch-cell API in its other comparisons, so this follows the existing implementation. It preserves fresh terminal instances and the full replay matrix instead of reducing transcripts, schedules, checkpoints or assertions.
Measurements use frozen source
6d90d51802ddacbbcddaf4af6eeee85972b23789, the same 112 cases, four workers, isolated Bun forks, all six setup files andfsModuleCache=false. Times cover the completepnpm testprocess through exit. All contended attempts remain recorded in the noise ledger and raw archives. Only samples that failed the external-coordinator guard were repeated; every qualified sample, including its timing, was retained. Retries delayed the planned order without changing either arm. The mean improvement is 1.265×. Final-head CI passed; this cohort does not establish the whole-suite 2× goal.Linked Issue
Maintainer-requested test performance follow-up.
Visual Proof
N/A — only test-oracle allocation changes; no application interaction or rendering change.
Testing
Both runtimes passed the same 127-case qualification: 125 passes and two existing optional old-addon skips, with shuffle seeds 104729 and 130363 respectively. This includes all 112 transcript cases, the original differential cases and 12 cell-descriptor policy cases.
Before timing, an identical temporary capture recorded every complete replay result before and after. All 1,792 runs (112 transcripts × four resize schedules × two ConPTY settings × two seeds), 9,838 checkpoints and 29,514 serialized strings matched byte-for-byte. The comparison retained every scope flag, grid/wrap mismatch, clipped-cell count and raw output string; it discarded or normalized no fields. The canonical captures share SHA-256
4b5c803a01fe3037dbbbf6f27110aab6bb8c2bed50b875c1d1c191b5ee64d67c. The temporary recorder is absent from the timed and shipping changes.After rebasing onto main
e6bcc5a6e0fd, all 227 frozen measured inputs remained byte-identical. The same 127-case qualification passed again under both Bun and stock Node withfsModuleCache=true, preserving every original case/status and all six setup files.pnpm tc:node, the changed-code quality gate, formatting and pre-commit lint passed. Final Linux CI run37599249608tested merge source47b41f6df7bfwith parents maine6bcc5a6e0fdand PR head8a40b66a22cd; its entire tree matches the PR head. All 11,413 physical unit files ran exactly once: 11,278 passed, 135 existing skips, zero failures or unhandled errors. Cases: 110,720 passed, one expected failing case, 1,035 existing skips. Original routes remained 10,334 Bun / 1,078 actual Node runtime / one Node measurement. All incoming-main files were retained. All 35 contexts finished successfully or skipped, and no review threads are unresolved. No bot review was recorded; independent source review and full CI are the review evidence.Review
The installed xterm implementation preserves undefined/out-of-range behavior and overwrites content, foreground, background, combined text and extended attributes on each scratch-cell load. Both helper changes were reconstructed from the frozen baseline and checked against the qualified candidate hashes. The existing provider transcripts, known variant failures, Hermes/DSB/freebuff diagnostic hashes and 600,000 ms per-case timeout are unchanged.
Passing assertions alone would not prove this oracle preserves which serializer defects it reports. Complete raw-result parity supplies that additional evidence; it does not fix existing serializer defects or establish native terminal latency.
Agent skill upstream boundary
Notes
No production serializer, native process signalling, agent-status state, SSH boundary, wire format, runtime routing or application packaging changes. Final Linux unit CI passed; local qualification was on macOS. No Windows replay qualification is claimed. The terminal-session-reliability manifest has no matching gate for these two exact oracle-helper paths; the complete transcript matrix above is the relevant qualification. No native provider or real-PTY behavior changes.
Checklist