Skip to content

Stabilize zsh fork app-server tests#13872

Merged
aibrahim-oai merged 3 commits intomainfrom
dev/flaky-zsh-fork-tests
Mar 9, 2026
Merged

Stabilize zsh fork app-server tests#13872
aibrahim-oai merged 3 commits intomainfrom
dev/flaky-zsh-fork-tests

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

@aibrahim-oai aibrahim-oai commented Mar 7, 2026

What changed

  • turn_start_shell_zsh_fork_executes_command_v2 now keeps the shell command alive with a file marker until the interrupt arrives instead of using a command that can finish too quickly.
  • turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2 now waits for turn/completed before sending a fallback interrupt and accepts the real terminal outcomes observed across platforms.

Why this fixes the flake

  • The original tests assumed a narrow ordering window: the child command would still be running when the interrupt happened, and completion would always arrive in one specific order.
  • In CI, especially across different shells and runner speeds, those assumptions break. Sometimes the child finishes before the interrupt; sometimes the protocol completes while the fallback path is still arming itself.
  • Holding the command open until the interrupt and waiting for the explicit protocol completion event makes the tests synchronize on the behavior under test instead of on wall-clock timing.

Scope

  • Test-only change.
@aibrahim-oai aibrahim-oai force-pushed the dev/flaky-zsh-fork-tests branch from 9cf75a7 to bd60d6c Compare March 8, 2026 04:08
@aibrahim-oai aibrahim-oai removed the request for review from owenlin0 March 8, 2026 21:11
@aibrahim-oai aibrahim-oai merged commit 615ed0e into main Mar 9, 2026
31 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/flaky-zsh-fork-tests branch March 9, 2026 16:38
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants