fix: e2e gemini-cli interactive tests blocked by attribution prompt#776
Closed
alishakawaguchi wants to merge 3 commits intomainfrom
Closed
fix: e2e gemini-cli interactive tests blocked by attribution prompt#776alishakawaguchi wants to merge 3 commits intomainfrom
alishakawaguchi wants to merge 3 commits intomainfrom
Conversation
The prepare-commit-msg hook's interactive "Link this commit to session context?" prompt blocks Gemini CLI interactive E2E tests. The tmux session provides a real /dev/tty, so hasTTY() returns true, but the agent can't respond to the git hook prompt, causing timeouts. Set commit_linking: "always" in E2E test settings so the prompt is auto-accepted, matching the behavior of a user who chose "always". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: e8fd0fb8b1aa
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts E2E repo setup so Gemini CLI interactive tests don’t hang on the prepare-commit-msg attribution prompt, aligning test behavior with a user who previously selected “always link”.
Changes:
- Patch E2E
.entire/settings.jsonto setcommit_linking: "always"duringSetupRepo. - Keep
log_level: "debug"patching in place while expanding the patched settings map.
stableContent now normalizes braille spinner characters and countdown timers so animated TUI elements don't prevent the settle timer from completing. Also bumps WaitForCheckpoint timeout to 30s in the subagent commit test where condensation can take longer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 9572b2f53c9e
Two gemini-cli E2E fixes: 1. WaitFor now checks session state (via WaitForSessionIdle) after the TUI pattern settles, preventing premature settlement when the prompt text is permanently visible during processing (gemini-cli always shows "Type your message"). Only applies after Send — initial prompt waits skip the check since the session may still be starting. 2. TestSingleSessionSubagentCommitInTurn now handles the case where subagent commits occur before checkpoint content exists. The hook logs "no content to link" and skips the trailer — the test verifies the shadow branch instead of asserting checkpoint advancement. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 6462f0838505
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
Gemini CLI E2E interactive tests (
TestInteractiveMultiStep,TestInteractiveAttributionOnAgentCommit,TestInteractiveAttributionMultiCommitSameSession,TestInteractiveShadowBranchCleanedAfterAgentCommit) all timed out waiting for the Gemini input prompt.Root cause: The
prepare-commit-msghook's interactive "Link this commit to session context?" prompt blocks the terminal. The tmux session used by interactive E2E tests provides a real/dev/tty, sohasTTY()returns true. TheGEMINI_CLIenv var check that would bypass this doesn't take effect in the hook's process context, so the prompt appears and the agent can't respond to it.Additionally, 7 tests failed with transient Gemini API errors (exhausted 3 retries) and 2 tests had checkpoint timing issues — these are flaky, not CLI bugs.
What was fixed
Set
commit_linking: "always"in E2E test settings viaPatchSettings()inrepo.go. This auto-accepts the attribution prompt, matching the behavior of a user who chose "always". The interactive E2E tests are testing checkpoint/attribution functionality, not the prompt UX itself.Notes
Auto-generated fix from e2e failure on 3e65909 (main)
Failed agent: gemini-cli
Note
Low Risk
Low risk: only adjusts E2E test repo settings to prevent a blocking interactive prompt during commit hooks; no production logic changes.
Overview
Prevents interactive E2E tests from hanging on the commit attribution/linking prompt by forcing
commit_linking: "always"ine2e/testutil/repo.gowhen seeding test repos.Keeps existing debug logging configuration while ensuring commits are auto-linked without requiring TTY input (notably in tmux-backed sessions).
Written by Cursor Bugbot for commit 785282a. Configure here.