Skip to content

fix(cli): fix flaky TestExpAgentsE2E/ExistingChatHistory#24661

Merged
johnstcn merged 1 commit intomainfrom
fix/exp-agents-e2e-flake
Apr 23, 2026
Merged

fix(cli): fix flaky TestExpAgentsE2E/ExistingChatHistory#24661
johnstcn merged 1 commit intomainfrom
fix/exp-agents-e2e-flake

Conversation

@johnstcn
Copy link
Copy Markdown
Member

  • Remove racy sequential expect("esc") after expect("direct open seed")
  • Both strings appear in the same initial PTY render; their byte-stream order depends on async title generation timing
  • The seed text alone proves we are in the chat view; pressing esc + expecting enter: open confirms list navigation

🤖

The test expected "esc" (from the status bar) after matching
"direct open seed" (the chat content). Both strings appear in
the same initial PTY render but their relative byte order
depends on whether async title generation completes before the
first frame: sometimes the seed text is in the title bar
(before the status bar) and sometimes it is in the content area
(after). ExpectMatchContext consumes all output up to its match,
so the second expect could never see text that appeared earlier
in the stream.

Remove the separate "esc" expect. The seed text alone proves we
are in the chat view, and pressing esc + expecting "enter: open"
confirms navigation back to the list.
@johnstcn johnstcn marked this pull request as ready for review April 23, 2026 08:44
@johnstcn johnstcn requested a review from ibetitsmike April 23, 2026 08:45
@johnstcn johnstcn merged commit be011b2 into main Apr 23, 2026
33 checks passed
@johnstcn johnstcn deleted the fix/exp-agents-e2e-flake branch April 23, 2026 10:25
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
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.

2 participants