Skip to content

fix(coding-agent): clean up Windows update and test workers - #741

Open
bokjk wants to merge 1 commit into
code-yeongyu:mainfrom
bokjk:fix/temp-cleanup-v2
Open

fix(coding-agent): clean up Windows update and test workers#741
bokjk wants to merge 1 commit into
code-yeongyu:mainfrom
bokjk:fix/temp-cleanup-v2

Conversation

@bokjk

@bokjk bokjk commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • keep the detached OMO update worker's log handle alive until asynchronous close completes, and await worker startup before the foreground command returns
  • group per-worker SENPI_CODING_AGENT_DIR quarantines under a per-run Vitest root and remove that root during global teardown
  • retain standalone setup cleanup on natural process exit and add focused regressions for both lifecycle paths

This addresses the Windows UV_HANDLE_CLOSING teardown race and prevents normal repeated test runs from accumulating senpi-vitest-* directories.

Verification

  • npm test -- test/omo-local-update-worker.test.ts test/omo-local-update-dispatch.test.ts test/setup-cleanup.test.ts — 3 files, 8 tests passed after rebasing onto current upstream main
  • npm run check — passed after rebase
  • npm run build — passed
  • node .agents/skills/senpi-qa/scripts/lib/common.mjs --self-check — 9/9 passed
  • node .agents/skills/senpi-qa/scripts/cli-smoke.mjs --self-test — 8/8 passed
  • isolated-TEMP run left zero senpi-* entries after Vitest teardown

Full-suite note

packages/coding-agent full Vitest was also run after a workspace build. The changed tests passed, but the existing Windows suite remained non-green: 755 files passed / 68 failed / 9 skipped; 6,665 tests passed / 163 failed / 53 skipped, plus one unhandled error. Failures were in unrelated existing Windows-sensitive areas (for example POSIX permission assertions, install-method fixtures, external-editor shell quoting, and snapshot differences).


Summary by cubic

Fixes a Windows teardown race in the OMO update worker and stops vitest runs from leaving behind senpi-vitest-* temp directories.

  • Bug Fixes
    • Made defaultSpawnWorker async and kept the detached worker’s log handle open until the asynchronous close completes; the dispatcher now awaits spawnWorker.
    • Grouped per-worker SENPI_CODING_AGENT_DIR under a per-run SENPI_VITEST_QUARANTINE_ROOT created via globalSetup and removed on global teardown; kept a process-exit cleanup fallback for standalone setup.
    • Added regression tests for log-handle ordering and quarantine cleanup.

Written for commit 08cd3b7. Summary will update on new commits.

Review in cubic

@bokjk

bokjk commented Aug 6, 2026

Copy link
Copy Markdown
Author
image

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.

1 participant