Skip to content

Interactive midturn commit e2e test#773

Draft
Soph wants to merge 2 commits intomainfrom
soph/add-interactive-mid-turn-e2e
Draft

Interactive midturn commit e2e test#773
Soph wants to merge 2 commits intomainfrom
soph/add-interactive-mid-turn-e2e

Conversation

@Soph
Copy link
Collaborator

@Soph Soph commented Mar 25, 2026

Entire-Checkpoint: d6fc700cce4c


Note

Low Risk
Low risk: adds a new e2e regression test and minor test-only skip logic, with no production code changes.

Overview
Adds a new TestInteractiveMidTurnCommit e2e regression test to verify that an interactive (TUI) session correctly detects turn end after the agent commits within a single turn, ensuring checkpoint/transcript export and commit linkage occur without relying on process exit.

The test skips external agents to avoid known interactive settle issues, then asserts file creation, exactly one new commit, checkpoint creation, HEAD linkage, and no shadow branches.

Written by Cursor Bugbot for commit 3ffe823. Configure here.

Entire-Checkpoint: d6fc700cce4c
Copilot AI review requested due to automatic review settings March 25, 2026 16:16
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

Adds an end-to-end regression test to ensure interactive (TUI) sessions correctly detect turn-end via idle events when an agent creates and commits changes within a single turn, preventing missing transcript/condensation failures.

Changes:

  • Introduces TestInteractiveMidTurnCommit covering “commit within one interactive turn” behavior.
  • Skips external agents for this scenario due to known interactive settling differences.

Comment on lines +44 to +48
s.Send(t, session, "create a markdown file at docs/red.md with a paragraph about the colour red, then commit it. Do not ask for confirmation, just make the change.")
s.WaitFor(t, session, prompt, 90*time.Second)

testutil.AssertFileExists(t, s.Dir, "docs/*.md")
testutil.AssertNewCommits(t, s, 1)
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

AssertFileExists(t, s.Dir, "docs/*.md") is both too loose (it doesn't confirm the agent created the requested docs/red.md) and potentially flaky in interactive mode. This repo already has a WaitForFileExists helper specifically to handle the race where the prompt appears before file writes land on disk; use that (ideally targeting docs/red.md) before asserting/continuing.

Copilot uses AI. Check for mistakes.
Entire-Checkpoint: a5d85be30f10
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.

2 participants