Skip to content

fix opencode e2e tests#520

Merged
squishykid merged 1 commit intomainfrom
rwr/fix-opencode-e2e
Feb 26, 2026
Merged

fix opencode e2e tests#520
squishykid merged 1 commit intomainfrom
rwr/fix-opencode-e2e

Conversation

@squishykid
Copy link
Member

Entire-Checkpoint: f2cf04c438d8
@squishykid squishykid requested a review from a team as a code owner February 26, 2026 10:23
Copilot AI review requested due to automatic review settings February 26, 2026 10:23
@cursor
Copy link

cursor bot commented Feb 26, 2026

PR Summary

Low Risk
Low risk: changes are confined to e2e test utilities and test timing, reducing flakiness without affecting production logic.

Overview
Fixes flakiness in TestInteractiveContentOverlapRevertNewFile by adding an explicit wait for the interactive session to transition ACTIVE → IDLE before the test overwrites and commits docs/red.md.

Introduces testutil.WaitForSessionIdle, which polls .git/entire-sessions/*.json for any session still in phase active, addressing a race where the prompt can render before the turn-end hook completes (notably with OpenCode).

Written by Cursor Bugbot for commit c54d1ea. Configure here.

Copy link
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

This PR addresses flakiness in OpenCode-driven e2e tests by adding a synchronization point that waits for interactive sessions to fully complete their turn-end hook work before proceeding with user-driven file edits/commits.

Changes:

  • Added a new e2e test helper that polls .git/entire-sessions/*.json until no session is in "active" phase (or times out).
  • Updated an interactive e2e test to call the new helper after the agent prompt completes, mitigating a TUI-prompt-vs-hook-execution race.

Reviewed changes

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

File Description
e2e/testutil/assertions.go Adds WaitForSessionIdle to poll session state files and block until sessions are no longer active.
e2e/tests/existing_files_test.go Uses WaitForSessionIdle to stabilize TestInteractiveContentOverlapRevertNewFile before overwriting and committing.

@squishykid squishykid merged commit 6a78acf into main Feb 26, 2026
10 of 11 checks passed
@squishykid squishykid deleted the rwr/fix-opencode-e2e branch February 26, 2026 10:39
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.

3 participants