Skip to content

test(terminal): skip reattach mouse-leak e2e when PTY shell can't exec - #7895

Merged
AmethystLiang merged 1 commit into
mainfrom
terminal-mouse-mode-leak-e2e-test
Jul 9, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
terminal-mouse-mode-leak-e2e-test

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Context

The warm-reattach mouse-mode-leak e2e (terminal-reattach-mouse-mode-leak.spec.ts, added in #7893) arms the leak by running a POSIX printf in a real PTY, gated on a readiness check (echo ORCA_MOUSE_READY_$((21+21)) → ORCA_MOUSE_READY_42). The gate awaited that marker unconditionally.

Problem

Some sandboxed CI/dev runners spawn a PTY that echoes typed input but never execs a real shell (the same environment condition under which the pre-existing terminal-restart-persistence cursor test can't settle on a prompt). There, the readiness marker never appears and the test hard-fails — a false red that has nothing to do with the reset logic under test.

Fix

Wrap the readiness gate in a skip guard that mirrors the existing hasPaneManager guard a few lines above: if the shell doesn't execute the probe within the timeout, test.skip() instead of failing. Where the shell does execute, the full end-to-end assertions run unchanged (mode disarmed after reattach, real pointer motion produces zero reports, positive control confirms the probe isn't vacuous).

Verification

Ran the spec locally with --repeat-each=3: 1 passed, 2 skipped — the iteration whose PTY executed ran the full flow and passed; the shell-less iterations skipped cleanly instead of failing.

Made with Orca 🐋

The warm-reattach mouse-leak e2e (added in #7893) awaited the readiness
marker unconditionally, so it hard-failed on sandboxed runners whose PTY
echoes input but never execs a shell. Wrap the gate in a skip guard that
mirrors the existing pane-manager guard: run the assertions where the
shell executes, and skip gracefully otherwise instead of a false red.

Co-authored-by: Orca <[email protected]>
@AmethystLiang
AmethystLiang merged commit 478ef07 into main Jul 9, 2026
2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f324080d-6ab0-4306-8e38-2a1ac6440278

📥 Commits

Reviewing files that changed from the base of the PR and between 25ea2bb and 4048215.

📒 Files selected for processing (1)
  • tests/e2e/terminal-reattach-mouse-mode-leak.spec.ts

📝 Walkthrough

Walkthrough

This change modifies an e2e regression test for terminal reattach mouse mode leak detection. Before arming mouse tracking, the test now executes a shell command with arithmetic expansion and waits for expected output to verify the PTY shell actually executes commands. If the output is not observed, the test is skipped with a descriptive message instead of proceeding with mouse tracking assertions.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
stablyai#7895)

The warm-reattach mouse-leak e2e (added in stablyai#7893) awaited the readiness
marker unconditionally, so it hard-failed on sandboxed runners whose PTY
echoes input but never execs a shell. Wrap the gate in a skip guard that
mirrors the existing pane-manager guard: run the assertions where the
shell executes, and skip gracefully otherwise instead of a false red.

Co-authored-by: Orca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant