Repository navigation
test: restore delayed PTY writes in large-paste coverage - #24556
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 seconds. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 large-paste responsiveness test intended to simulate slow terminal writes, but its injected delay was always invalid. Restore that delay so the test exercises its claimed workload.
What Changed
Read the requested delay from the second argument of Electron's main-process evaluation callback. The first argument is the Electron context. Narrow the helper's app dependency to evaluation and add a unit regression using that callback contract, including resetting the delay.
Why
The old callback stored
NaNinstead of 35ms, bypassing the spy's slow-write branch. The regression fails before and passes after. Correcting the injection preserves the existing paste workflow and production code; increasing timing budgets would leave its missing workload untested.Linked Issue
N/A — maintainer test audit.
Visual Proof
N/A — test instrumentation only; no application change.
Testing
macOS: unit regression reproduced
NaNwith the old callback and passed with the corrected callback, including clearing the delay. Targeted lint, formatting, changed-code quality and diff checks passed. The separately run E2E typecheck no longer reports this helper's callback error. The real background Electron large-paste workflow passed three times with the intended 35ms write delay. Full-suite verification continues separately.Review
Self-reviewed callback argument order, delay reset, mock restoration and the narrower dependency type. No test windows were revealed.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No production, UI, remote-wire or mobile behavior changes. The callback contract is platform-independent.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)