Skip to content

test(go): leave the noDebug fixture's temp dir to the OS when rmdir stays EBUSY (#866) - #873

Merged
debugmcpdev merged 2 commits into
mainfrom
fix/866-go-exit-code-cleanup-ebusy
Oct 7, 2026
Merged

debugmcpdev merged 2 commits into
mainfrom
fix/866-go-exit-code-cleanup-ebusy

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

What

tests/adapters/go/integration/go-exit-code.test.ts › "reports the exit code under noDebug" removed its temp directory in a finally with rmSync's 10 × 200 ms retry. On windows-latest that was twice not enough — run 37406647101 (PR #862) and, today, run 37653235241 (PR #868): Delve holds the exited debuggee's image until its own exit, which the session's close does not wait for, and the EBUSY failed a test whose debugging part had passed, taking the whole Windows job with it (#866, option 1).

How

The cleanup keeps the retry; an EBUSY/EPERM that survives it is logged ([go-exit-code] leaving <dir> to the OS: rmdir hit EBUSY (issue #866)) and the directory is left under the temp dir for the OS, the way tests/e2e/mcp-server-self-debug.test.ts already treats its inner dir. Any other error still throws. Test-only change.

Verified

Windows 11, Go + Delve on PATH: npx vitest run tests/adapters/go/integration/go-exit-code.test.ts → 3 passed (the noDebug case in 7.1 s). npm run typecheck:tests clean.

Fixes #866

🤖 Generated with Claude Code

…tays EBUSY (#866)

The "reports the exit code under noDebug" case removed its temp directory
in a finally with rmSync's 10 x 200 ms retry, and on windows-latest that
was twice not enough (run 37406647101 for PR #862, run 37653235241 for
PR #868): Delve holds the exited debuggee's image until its own exit,
which the session's close does not wait for, and the EBUSY failed a test
whose debugging part had passed — taking the Windows job with it.

A cleanup EBUSY/EPERM is now logged and the directory left under the temp
dir for the OS, the way mcp-server-self-debug.test.ts already treats its
inner dir; any other error still throws.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev
debugmcpdev merged commit d4f204a into main Oct 7, 2026
11 checks passed
@debugmcpdev
debugmcpdev deleted the fix/866-go-exit-code-cleanup-ebusy branch October 7, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flake: go-exit-code.test.ts cleanup rmSync hits EBUSY on windows-latest (debuggee image still locked after the session ends)

2 participants