Skip to content

An extra setup Escape can close Home in the tagged TUI test #1481

Description

@AbirAbbas

Seen on dev@debffabf6. Surfaced while verifying #1389; not introduced by it.

What happened

TestHomeRestoredNavigationNoModel/180 failed once under load when skipSetup sent another Escape after setup had already disappeared. That Escape landed on Home and closed it. The helper checks the screen after each press but waits 900 ms before checking; a transition within that interval can put the next key on a different page. This is one observed flake, not a measured failure rate.

Replication

Deterministic (no model). In the tagged e2e rig, script setup to disappear immediately after an Escape while the next captured frame still contains setup text briefly. Call skipSetup; its loop can issue another Escape, which Home interprets as close. Assert the final page is Home. The real subtest is go test -tags e2e -run 'TestHomeRestoredNavigationNoModel/180' ./internal/e2e/.

Where

internal/e2e/tmux_test.go:247 at dev@debffabf6, skipSetup, sends up to six Escapes separated by a fixed sleep; its screen predicate is setupIsUp at :273.

The fix

Wait for a confirmed transition to the target page after each setup action, and stop sending Escape once that transition is observed.

Acceptance

  • e2e: the 180-column tagged subtest repeatedly ends on Home under a delayed setup transition.
  • Unit: a scripted transition test proves the helper sends no Escape after Home appears.
  • Record the former timing assumption in the test change entry's invalidates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:testsThe suite itself — flakes, harnesses, laws, CI redsbugSomething the code does that it should nothygieneTests, laws, dead code, duplication — no person-facing changesev:papercutA wording, a hint, a small wrongness that costs a moment

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions