Repository navigation
[CI] Reduce repeated terminal scans and unused Qoder test imports - #25425
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📥 CommitsReviewing files that changed from the base of the PR and between 813b13471ce269040c912503f7c0affcbda77247 and c4a2877. 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe terminal row scan now collects undimmed text and first-visible-glyph style information in one pass. New tests cover blank rows, dim glyphs, style selection, unwritten cells, and cell-read bounds. Two Runtime test files import the unused-default-RPC-methods fixture, and the efficiency report documents the scan and import guard. The hook-confirmation helper and its two call sites now use the name Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The changes have focused coverage for terminal row behavior and the Runtime import guards, while the helper rename is behavior-preserving. No actionable merge-blocking risk is evident; merge after required CI passes. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 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 |
b0974c4 to
1788a33
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fused the per-row terminal scans.
readTerminalCursorLineContextnow collects undimmed text and the first visible glyph's style in one cell pass via a newreadUndimmedTextAndFirstVisibleStyle, replacing the separateundimmedText/firstVisibleCellIsBold/firstVisibleCellHasCustomForegroundloops.undimmedTextremains only for the cursor suffix (afterCursor). - Added six cursor-reader regressions. New cases pin the blank-row cell-read bound (
<= cols × (rows + 1)= 72 vs the old 132), reusable-cell reuse vs allocation, dimmed first-glyph styling with text excluded, first-visible-glyph selection skipping blank/later-styled cells, and unwritten cells rendering as spaces. - Reused the unused-default-RPC guard in two Qoder tests. Both files now import
./rpc/unused-default-rpc-methods.test-fixturefirst; test bodies are unchanged. - Made localization tests catalog-aware. The discard-copy test keeps an exact English copy assertion, then checks the five non-English locales against the live catalog value with an English fallback. The supported-agents fallback test switches to a synthetic empty locale bundle.
- Documented the CI benchmarks in
docs/reference/ci-runner-efficiency.md.
I verified the refactor's behavior equivalence against the removed loops: dim cells are still excluded from text but still eligible for the first-visible style, width-0 cells are still skipped, and empty cells still contribute a space. All five affected test files pass (47 tests) and check:code-quality:changed reports 0 new findings across the 6 changed files.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
1788a33 to
813b134
Compare
Name the local hook confirmation function to avoid misclassifying internal selectors as dialog text.
813b134 to
c4a2877
Compare

ELI5
CI does less repeated work while checking the same terminal and Qoder behavior.
What Changed
Terminal composer detection now reads each full row once to collect its text and first visible glyph's style. It keeps a separate cursor-suffix scan and reads the current grid on every call. Six regression cases cover blank rows, optional reusable cells, dimmed glyphs, first-glyph styles and empty cells.
The worktree hook helper now calls its local function
confirmHook. This prevents the localization audit from mistaking internalsetupandvmRecipeselectors for dialog text; confirmation, trust and cancellation behavior stay the same. The audit and its exclusions are unchanged.Two direct Qoder Runtime tests use the existing guard for unused default RPC methods, avoiding the full method graph. Their bodies are unchanged; the three real RPC catalogs still run without that guard.
Why
Repeated cell reads and unrelated test imports keep CI runners busy. A single row pass avoids maintaining a potentially stale terminal cache. Reusing the existing throwing RPC fixture prevents accidental method use from becoming silently untested.
Linked Issue
Internal CI efficiency follow-up; no separate issue.
Visual Proof
N/A — terminal output and interactions stay the same; this changes the reader's work and test imports.
Testing
Two hosted three-pair comparisons used fixed source, separate empty caches and unchanged test cases. The cursor workload saved a median paired 5.819 seconds / 8.7%, with all 294 timed outcomes passing (run). The five-file Qoder/catalog workload saved 1.113 seconds / 6.4%, with all 510 timed outcomes passing (run). These are focused process gains; full-shard, PR percentile and queue savings are unmeasured.
Cursor qualification compared complete outputs on 98 recordings and logical per-frame outputs across 192 Runtime census cases. The raw timer-driven polling trace differed and is excluded from equality claims. Nine scanner faults fail their intended assertions. Qoder recipe, command and registration faults also retain their intended failures; generated IDs and shifted stack lines differ in raw failure messages.
Local macOS verification passed node/web typechecks, the changed-file quality gate, 89 IME/composer cases and the final combined 98-case cursor/Qoder/catalog slice. Hosted comparisons ran on Linux ARM, Node 24.21.0 and pnpm 12.8.1. The localization gate, all four existing worktree-hook cases, web typechecking and changed-file quality checks also passed after the identifier rename. Normal PR CI passed on
c4a287766ff7: all five full-unit shards, relay integration, both package checks and Verify (run). Companion mobile, headless and native workflows also passed.Review
Independently reviewed the cursor behavior, Qoder fault results, frozen comparison inputs, raw case ledgers, paired arithmetic, source restoration and terminal GitHub run/job outcomes. Measurement details are in
docs/reference/ci-runner-efficiency.md.Agent skill upstream boundary
Notes
The shared reader remains independent of platform, local/daemon/SSH/WSL transport and buffer ownership. It retains no grid state, changes no wire fields and adds no process lifecycle work. The import guards change test setup only. Real desktop timing, raw polling-count equality and an increase in concurrency allowance are unmeasured.
Checklist