Skip to content

fix(test): stop viewer resources before temp-dir cleanup - #135

Merged
weiesky merged 1 commit into
weiesky:mainfrom
souloss:fix/ci-flakes-brotli-rmsync
Jul 28, 2026
Merged

fix(test): stop viewer resources before temp-dir cleanup#135
weiesky merged 1 commit into
weiesky:mainfrom
souloss:fix/ci-flakes-brotli-rmsync

Conversation

@souloss

@souloss souloss commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Rebased onto the latest main. The deterministic Brotli fixes are already present on main via 42207f7, so this PR now focuses only on the remaining CLI-test cleanup race.

  • Stop server.js resources before removing the isolated CCV_LOG_DIR.
  • Reset pending turn-end test state before the final branch-server teardown.
  • Replace the custom sync retry loop with fs.promises.rm and its native maxRetries / retryDelay support, including transient EBUSY, ENOTEMPTY, and EPERM failures.
  • Keep final temp-dir cleanup best-effort because every suite uses a unique directory under os.tmpdir().

Verification

  • npm run build — passes.
  • Brotli/SSE tests — 20/20 pass.
  • CLI lifecycle and ports-busy tests — 58/58 pass.
  • Full npm run test:cli — 8,658 pass, 1 fail, 13 skipped. The sole ripgrep .gitignore failure reproduces unchanged on a clean latest-main worktree in this environment.

souloss added a commit to souloss/cc-viewer that referenced this pull request Jul 20, 2026
…s now fixed in PR weiesky#135)

This branch's own changes (cc-switch SQLITE_BUSY import fix) were verified locally
and never the cause of CI red — every CI run on this branch failed only on the
pre-existing brotli/SSE-compression/portsBusy timing flake that affects main itself.
PR weiesky#135 (fix/ci-flakes-brotli-rmsync, now CI-green) eliminates that flake, so this
empty commit retriggers CI to confirm this branch is green with the flake gone.
@weiesky
weiesky force-pushed the fix/ci-flakes-brotli-rmsync branch from 4efaa57 to c768e8b Compare July 28, 2026 15:23
@weiesky weiesky changed the title fix(test): wall-clock-bounded brotli decode + best-effort rmSync to stop CI flakes fix(test): stop viewer resources before temp-dir cleanup Jul 28, 2026
@weiesky
weiesky merged commit 0f3c16d into weiesky:main Jul 28, 2026
1 check passed
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.

2 participants