Repository navigation
test(e2e): harden terminal restart regressions on Windows - #9064
brennanb2025 merged 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between fa37926ee53bcf1637f0bc9b211835dd8844cc66 and f098294. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Windows CI coverage for terminal restart regressions, including Electron build setup, targeted Playwright execution, and failure trace uploads. Introduces platform-specific settled shell input probes and marker-based restored-pane readiness polling. Updates restart E2E tests with daemon termination, stricter Windows gating, seeded repository handling, restored-input checks, and PowerShell prompt setup. Adds unit tests for probe sequences and readiness behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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.
🧹 Nitpick comments (1)
tests/e2e/restored-terminal-input-readiness.unit.test.ts (1)
42-145: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winCover the
page.evaluaterejection recovery path.Add a test where the first evaluation rejects during document replacement, then a replacement pane accepts a new marker. Assert stale attempts are discarded and the retry succeeds.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 022b9c0a-524e-439d-9109-07231e342083
📥 Commits
Reviewing files that changed from the base of the PR and between b892565 and 47209a0852cc7d2dd768e5d141684f4522d9a194.
📒 Files selected for processing (9)
.github/workflows/windows-terminal-restart-e2e.ymltests/e2e/helpers/restored-terminal-input-readiness.tstests/e2e/helpers/terminal-input-probes.tstests/e2e/helpers/terminal.tstests/e2e/restart-restore-terminal-input.spec.tstests/e2e/restored-terminal-input-readiness.unit.test.tstests/e2e/terminal-probe-input-sequence.tstests/e2e/terminal-probe-input-sequence.unit.test.tstests/e2e/terminal-restart-persistence.spec.ts
|
Addressed CodeRabbit's document-replacement recovery review in The new regression proves the catch path clears real stale state:
The assertions require pending counts Validation after the fix:
The walkthrough's docstring-percentage item is a generic warning rather than a repository gate. I did not add restatement-only docstrings to internal E2E helpers because the project requires concise comments for non-obvious reasons; the full repository lint, max-lines, and localization gates pass. There were no inline review threads to resolve. |
|
Thanks for the thorough companion coverage here. Reviewed against latest
One small hardening pushed on top ( Local checks green: the two new unit suites (9/9), |
fa37926 to
f098294
Compare
) * test(e2e): harden Windows terminal restart regressions * test(e2e): cover renderer replacement rejection * test(e2e): tolerate ESRCH when force-killing the daemon on POSIX * fix(ci): preserve Windows restart test selection --------- Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
Summary
taskkill.exetermination.Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm test— the full Windows suite was attempted: 30,274 passed, 342 skipped, and 100 failed with 2 suite errors. The failures are existing broad Windows incompatibilities such as/bin/sh ENOENT, POSIX paths/signals, and line-ending assumptions; none touch this patch.pnpm build— the full production/native build was not run;pnpm exec electron-vite build --mode e2epassed on the rebased commit.Focused validation on commit
2ef995ea34a0af8682f9315533d21a87e85f1325:pnpm exec vitest run tests/e2e/restored-terminal-input-readiness.unit.test.ts tests/e2e/terminal-probe-input-sequence.unit.test.ts— 2 files / 9 tests passed.git diff --checkpassed.The original driver was red on Windows because a fresh PowerShell probe was prefixed with POSIX Ctrl+U/startup control bytes. During adversarial review, a real clean-restart run exposed a second red case: readiness kept only the latest 100 ms marker while valid ConPTY echoes arrived later. The terminal tail contained the markers, but the helper never observed the immediately previous one. The final helper retains all outstanding markers for the same concrete pane instance and has dedicated delayed-echo and pane-replacement regressions.
AI Review Report
Three parallel audits checked Windows runtime behavior, replay/readiness semantics, CI non-skippability and security, cross-platform compatibility, and code minimality.
Findings corrected during review:
Cross-platform review covered macOS, Linux, Windows/ConPTY, WSL, and SSH. POSIX shells retain Ctrl+C + Ctrl+U behavior; Windows receives Ctrl+C as a separate payload and never receives Ctrl+U. No shortcut, provider, path-separator, or local-only product behavior changed.
Final verdict from all three audits: ship, with no blockers.
Security Audit
This PR changes tests and CI only; it adds no product dependency, auth, secret, network, filesystem API, or IPC surface. Windows termination targets only the daemon PID parsed from the test's isolated user-data directory, passes arguments through
execFileSyncwithout a shell, is bounded by a 10-second timeout, and verifies the PID is gone.The workflow uses
pull_requestrather thanpull_request_target, grants read-only contents permission, does not persist checkout credentials, runs serially with a 30-minute job timeout, and uploads only failure traces.Notes
Refs #8751semantics and does not claim to close the production issue.main, then synchronize or mark fix(terminal): replay cold restores at recovered grid #9043 ready for review. Every product file in fix(terminal): replay cold restores at recovered grid #9043 matches this workflow's trigger paths.