Skip to content

Fix cursor / gemini E2E harness issues#912

Merged
Soph merged 5 commits intomainfrom
soph/fix-flaky-e2e-tests-safe
Apr 10, 2026
Merged

Fix cursor / gemini E2E harness issues#912
Soph merged 5 commits intomainfrom
soph/fix-flaky-e2e-tests-safe

Conversation

@Soph
Copy link
Copy Markdown
Collaborator

@Soph Soph commented Apr 10, 2026

this is a slimmed down version of #908

It only keeps the E2E harness related fixes, the other fix regarding condension we should handle separate later


Note

Medium Risk
Moderate risk because it changes E2E session synchronization and writes a Gemini acknowledgments file in the user home directory, which could affect parallel runs or local environments if the format/paths differ.

Overview
Improves E2E reliability for Cursor and Gemini CLI agents by broadening prompt/startup dialog detection to handle newer UI copy and additional onboarding modals.

For Gemini E2E repos, SetupRepo now proactively records an acknowledgment for the generated entire-search agent by hashing the agent file and updating ~/.gemini/acknowledgments/agents.json under a mutex to avoid interactive “acknowledge and enable” blocks during tests.

Reviewed by Cursor Bugbot for commit 7aecd3f. Configure here.

Copilot AI review requested due to automatic review settings April 10, 2026 11:58
@Soph Soph requested a review from a team as a code owner April 10, 2026 11:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the E2E harness to better tolerate upstream TUI/UX changes in Cursor and Gemini CLIs, reducing startup-related flakes in CI while keeping the core product code unchanged.

Changes:

  • Pre-acknowledge the repo-managed Gemini entire-search agent during E2E repo setup by writing a hash entry into Gemini’s acknowledgments file.
  • Expand Gemini interactive startup dialog detection to include new “agent discovered” prompts.
  • Broaden Cursor CLI prompt readiness detection to match both legacy and current placeholder text.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
e2e/testutil/repo.go Adds Gemini acknowledgments seeding during repo setup to avoid discovery prompts blocking startup.
e2e/agents/gemini.go Expands startup prompt regex to recognize new Gemini dialogs.
e2e/agents/cursor_cli.go Updates prompt regex to handle multiple Cursor CLI placeholder variants.

Comment thread e2e/testutil/repo.go
Comment thread e2e/testutil/repo.go
Comment thread e2e/testutil/repo.go
@Soph
Copy link
Copy Markdown
Collaborator Author

Soph commented Apr 10, 2026

Addressing the comments in a follow up PR.

@Soph Soph enabled auto-merge April 10, 2026 12:24
@Soph Soph merged commit 654383b into main Apr 10, 2026
9 checks passed
@Soph Soph deleted the soph/fix-flaky-e2e-tests-safe branch April 10, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants