Skip to content

Flaky: Fish can lose keys typed right after a handed-over read returns #356

Open

Description

@raiseCatError

Known pre-existing race (reproduced on release/v0.18.0): under parallel load, keys typed within about a second after Fish returns from a handed-over read to its prompt can be lost. Live tests pause before the next command; see docs/development/fish-typeahead.md. Tracked so it is not mistaken for a regression in queue or input-awareness work.

Activity

  1. raiseCatError commented on Oct 11, 2026

    @raiseCatError
    OwnerAuthor

    Confirmed Linux/Fish findings and stabilization work:

    • Published queue head 7fb6b5ac23aeecc21e7a0d7ba5b824af95f505aa reproduces both read-handover and typing-after-read failures on Ubuntu 24.04 arm64, Fish 3.7.0, Node 26.10.0. Original amd64 CI evidence: run 38071796100; descendant evidence: run 38071808042.
    • Fish 3.7 deliberately does not enable bracketed paste in builtin read. The frontend previously depended on input-mode output for terminal handover. Answers stayed in the composer/queue while the native reader waited. answersByDefault is not the cause and was not weakened.
    • The fix uses Fish's real fish_read event to emit an authenticated private reader marker before its prompt. Terminal ownership survives detach/reattach and ends at the shell prompt. Wrong-token markers stay ordinary output; hidden answers are neither drawn nor recorded as commands.
    • Separate Fish 3.7 failure: multiline composer/queue submissions now use begin/end. POSIX shells retain brace groups. Composer, dispatcher and paste parse checks must use the actual shell ID.
    • Separate fixture errors: the Ctrl+C survivor waits for its installed trap and uses Bash's supported timed read, with a release file instead of a fixed sleep; typing-after-read waits for a unique runtime-built prompt rather than a historical redraw.

    Commits on fix/workflow-fish-routing: f0db588 reader fix; dfb242f native grouping and fixtures; eaeb281 non-destructive merge of the upstream #348 checkpoint (684a3fb on fix/workflow-input-checkpoint). These are local candidates pending canonical verification of the propagated heads and GitHub CI.

    Verification completed:

    • npm run typecheck.
    • Canonical npm run verify on the queue candidate (explicit TERM=xterm-256color COLORTERM=truecolor, inherited NO_COLOR unset): passed, including full suite, cleanup and diff check. Explicit NO_COLOR tests remain enabled.
    • Three new zsh/Bash/Fish multiline queue PTY tests: passed on macOS.
    • Ubuntu fixed snapshot: all tests in inputAwarenessLive.test.ts, typingAfterRead.test.ts, queryOrder.test.ts, commandQueueLive.test.ts passed, including the new multiline cases, hidden-reader detach/reattach, interrupts, failure pauses and narrow/NO_COLOR/Safe presentation.
    • The first full local run was invalidated by inherited color-disable/dumb-terminal settings and ENOSPC. It is retained as a failed run, not counted as success.

    No physical terminal QA has occurred. Published PR heads are not yet updated; there is no shared-file freeze or permission to merge to master/release. Exact final heads and Actions results will follow in #359.

  2. raiseCatError commented on Oct 11, 2026

    @raiseCatError
    OwnerAuthor

    Stabilization follow-up; final publication/CI remains pending.

    The authenticated Fish reader handover is retained. No change weakens answersByDefault. Subsequent regressions cover hidden function readers, an interrupted foreground job, native Fish multiline grouping, and detach/reattach during a hidden read. The attach privacy correction protects raw input before probing/journal I/O and excludes running/startup input from optional key diagnostics.

    The macOS canonical suite passed at input candidate 9465eb5. Portable fixture-only follow-up 86fb4e4 passed focused mise/provider checks; a fresh exact-head canonical run is underway.

    The latest full Ubuntu 24.04 arm64 / Fish 3.7.0 / Node 26.10 run at workflow 5756f7c failed:

    • Report assertion expected the old unquoted Markdown status. ee5483e updates that assertion without weakening literal formatting or review.
    • Pager and detach fixtures invoked less/vim, absent in our minimal disposable VM. Both prerequisites are now installed there.
    • Immediate same-size mise edits retained identical mtime/ctime even at nanosecond precision. 86fb4e4 makes its stat-based invalidation test change the timestamp explicitly and documents the unchanged-metadata refresh limitation.
    • The provider test assumed host Homebrew; 86fb4e4 supplies its own executable availability fixture. No installer is executed.
    • The existing history timing threshold failed at p95 62.1ms; it passed an isolated rerun with the same threshold. Final canonical verification remains required.

    A new full Ubuntu run uses exact workflow 5e45e87. These are local additive candidates, not yet advertised as green published heads. Physical terminal QA is still outstanding. Main/release and the independent native/workspace branches remain untouched.

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:shellShell backend and integrationtype:bugBug or defect

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions