Repository navigation
[CI] test: speed terminal comparisons and retry-policy checks - #26396
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; 5 remain after this review. 📝 WalkthroughWalkthroughThe grid serializer adds an Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The changes are limited to the grid helper and retry tests, with no identified behavior regression. Normal final-head checks remain appropriate. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description is detailed and covers the required change, rationale, testing, scope, and checklist items. However, the required Linked Issue section explicitly states that no existing issue is linked.
✨ 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
Two terminal test helpers do avoidable work: a replay comparison formats every trailing blank cell, and a pure retry-policy test sleeps between mocked attempts. Direct blank-cell checks reduce the four-file replay command from 36.35 to 23.55 seconds; scoped virtual timers reduce the retry test command from 4.80 to 2.39 seconds. Each keeps its original coverage.
What Changed
The existing terminal comparison helper now recognizes the frozen default blank descriptor through its public cell fields. It keeps the original descriptor formatter for diagnostics and other comparisons. Terminal parsing, serialization, replay input, checkpoints, assertions and runtime routing remain unchanged.
The separate retry-policy unit test advances only its owned timeout timers through the existing retry delays. Its seven original expanded cases, evaluator calls and assertions remain intact, and real timers are restored after each test. The production retry helper, attempt limit and delays are unchanged; this file exercises injected evaluators, with no Electron application or native lifecycle.
Why
Profiling pointed to repeated blank-cell formatting. This removes those temporary strings while preserving the existing blank-cell policy, including backgrounds, inverse attributes, clipped widths and decorated spaces. It extends the existing comparison helper rather than adding a second terminal implementation or reducing replay coverage. The retry tests check policy using controlled timers, which avoids waiting on their injected delays while retaining every retry and failure assertion. Real socket, PTY and shutdown timing contracts retain their configured Node routes.
Linked Issue
Part of the authorized test-suite speed work; no existing issue.
Visual Proof
N/A — test comparison helper only; no rendered product changes.
Testing
The original and changed helper ran under Node and Bun with two shuffle seeds each: 130 original cases, 128 passed and two existing skipped fuzz cases, in every command. An additional comparison of the existing replay output retained all 1,792 runs and 9,838 complete checkpoints, with all 29,514 resulting strings byte-for-byte identical.
A separate uninstrumented benchmark used the shipping filesystem cache, four workers, isolation and all six setup files on one held ARM runner. All six whole
pnpm testcommands count, including the first; there were no warmups, retries or discarded samples.This is a 1.5431× speedup for these four files, not a whole-suite or fleet claim. Counted commands can warm shared Bun and operating-system caches; the arms are not independently cold.
Correctness: 37708535460. Timing: 37711326761. Original raw reports, failures and every measured sample are retained and independently checked.
The separate retry file also passed all eight original/candidate Node/Bun commands at the same two shuffle seeds: seven original cases passed in every command. Its own shipping-cache held benchmark retained all six whole commands, with no warmup, retry or discarded sample:
This is a 2.0069× speedup for that one file. Its benchmark has the same first-command, shared-cache and single-host limits stated above. Correctness: 37711634618. Timing: 37714488664. Both scopes were measured separately; these gains are not multiplied or presented as a combined/full-suite result. A fresh full CI run checks their integration together.
fb42f75c59a13ef2e5d8692a0b203f96b9683af3: all ten full unit shards, actual Node relay contracts, static/type checks, required verify and applicable platform checks.Review
Missing cells, ordinary blank cells and undecorated spaces keep exactly the original default-blank classification. The existing scratch cell remains local to the comparison; no mutable buffer cache is introduced.
Agent skill upstream boundary
Notes
Test helper only; no production serializer, remote protocol, native runtime boundary, platform behavior or fixture corpus changes. The branch starts from repaired main
b0fbcfd6a7e919743856dcd96198897baa92593e. Both changed files exactly match the separately qualified before/after bytes. All 21 replay source guards, all four original consumers and both fixture trees (231 and 12 entries) match the measured source. All 41 reported check contexts succeeded or were appropriately skipped. CodeRabbit covered this exact head and reported no actionable comments; zero unresolved threads. Current-main integration preserves both qualified payloads, all 21 measured source guards and both fixture trees exactly. The two individually measured gains remain scoped to their original commands, without a combined or whole-CI claim.Checklist