Skip to content

test(mecatui): fix effort handoff source-close flake #1889

Closed

Description

@jbeda

Flake

TestEffortE2EForkPreservesTranscript intermittently fails under the full race suite:

closed = [], want [sess-test-0001]

After ForkSession signals the fork, the target is hydrated and an effortHandoffReadyMsg causes source closure as a separate asynchronous command. The test waits for phaseIdle, which can have been observed before that close command completes, then exits early.

Suggested repair

In cmd/mecatui/ui/effort_e2e_test.go, replace the post-fork stale phase-idle synchronization with the existing waitForClosedSession(..., "sess-test-0001", ...) helper. This tests the intended asynchronous source-retirement contract directly.

Evidence: focused race runs pass frequently, but constrained scheduling reproduces the failure. The behavior predates the resumable-session-status-metrics branch.

Activity

  1. self-assigned this
    on Sep 24, 2026
  2. added
    flake
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

flake

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions