Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Dec 8, 2025

Problem

The TestAgent_SessionTTYShell test was flaking on macOS CI runners with:

match deadline exceeded: context deadline exceeded (wanted 1 bytes; got 0: "")

The test uses WaitShort (10s) for the context timeout when waiting for shell prompt output via Peek(ctx, 1). On slow macOS CI runners, the shell startup can exceed this timeout due to resource contention.

This is evidenced in the failure logs, the SSH session was not reported by the agent until the 10s timeout is nearly up - it took a while to connect.

Solution

Increase the timeout from WaitShort (10s) to WaitMedium (30s). This matches the timeout used by ExpectMatch internally and gives the shell more time to initialize on slow CI machines.


This PR was entirely generated by mux but reviewed by a human.

Closes coder/internal#1177

The test was using WaitShort (10s) for the context timeout when waiting
for the shell prompt via Peek(ctx, 1). On slow macOS CI runners, the
shell startup can exceed this timeout due to resource contention.

Increase to WaitMedium (30s) to match the timeout used by ExpectMatch
internally, giving the shell more time to initialize.
@ethanndickson ethanndickson changed the title test: fix TestAgent_SessionTTYShell flake on macOS CI test: bump TestAgent_SessionTTYShell timeout Dec 8, 2025
@ethanndickson ethanndickson merged commit 04d5ff8 into main Dec 8, 2025
38 checks passed
@ethanndickson ethanndickson deleted the fix-session-tty-shell-flake branch December 8, 2025 13:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake: TestAgent_SessionTTYShell

3 participants