Skip to content

H4 fixture teardown race: ENOTEMPTY rmdir of the temp HOME breaks fast CI (from #814) #830

Description

@aarontrowbridge

Chore tier, CI-breaking. The session-API availability fixture (mode_block.test.ts, landed #814) fails fast on CI with ENOTEMPTY: directory not empty, rmdir <saf-home>/.config/opencode/node_modules/... — reproduced twice on the same run (different subdirs: zod/src/v3/tests, effect/dist/unstable), while director-local runs pass. Root cause: the vendored binary's background package-install into the temp HOME outlives the test's client shutdown, and the cleanup's recursive rmSync collides mid-write. Timing-dependent → CI hits it, warm local runs don't. It blocks every open PR's fast check (seen blocking #828). Fix: wait for the server process tree to fully exit before removing the temp HOME (the root cause), plus a retrying rmSync (maxRetries + retryDelay) for any residual — the teardown must never be the flake.

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

    afkImplementable without human interaction

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions