Skip to content

Flaky: Fish adapter lifecycle test teardown races fish_update_completions #403

Closed

Description

@raiseCatError

Seen once in dispatch CI 39083774326 attempt 1 (Node 22 job, release commit efcaa9d0); attempt 2 passed.

tests/shellAdapters.test.ts → "fish: real lifecycle …" failed in stopShell with ENOTEMPTY: directory not empty, rmdir '…/nmsh-adapter-fish-*/.local/share/fish/generated_completions'.

Likely cause: on a fresh home, Fish starts fish_update_completions as a detached child that keeps writing generated completions after the shell exits, so rmSync(…, {maxRetries: 5, retryDelay: 100}) can race it. Test fixture only; no product behavior involved.

Possible fixes: pre-create ~/.local/share/fish/generated_completions (Fish then skips the first-run generation), or set fish_complete_path/disable the generator in the sandbox, rather than adding retries.

Activity

  1. raiseCatError commented on Oct 18, 2026

    @raiseCatError
    OwnerAuthor

    v0.21: fixed in #412 (test fixture, not a product leak). Cause confirmed: an interactive Fish on a fresh home starts fish_update_completions detached (Fish 4 checks $__fish_cache_dir/generated_completions, Fish 3 $__fish_user_data_dir/...); the orphaned Python process writes ~1,400 files into the home after the shell exits, racing rmSync. Test homes now mark that generation as done in both places, and the runner no longer passes ambient XDG data/cache/state to tests. No retries were added. A regression asserts no generator starts; with the marker removed it fails. Not merged yet.

  2. added a commit that references this issue on Oct 18, 2026
  3. raiseCatError commented on Oct 18, 2026

    @raiseCatError
    OwnerAuthor

    Verified on merged dev 433af8fd (v0.21.0 release audit). The fix is #412 (merged as 3282ad40): Fish test homes are marked as generated, and the runner no longer passes ambient XDG data, cache or state to tests. No retries were added.

    • Local full suite (macOS arm64, Node 26.10, Fish 4.9.3, T7 scratch): fish: real lifecycle … and fish: a test home marked as generated starts no detached man-page completion generator (#403) both pass.
    • CI push run 39135227830 on 433af8fd: every job green, including Ubuntu and macOS shards, Node 22 compatibility and Fedora.

    This was a test fixture race, not product behavior, so no physical-terminal check applies.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions