Skip to content

Isolate c8 temp dirs per coverage run - #142

Merged
w4ffl35 merged 1 commit into
masterfrom
fix/coverage-nested-wipe
Oct 13, 2026
Merged

w4ffl35 merged 1 commit into
masterfrom
fix/coverage-nested-wipe

Conversation

@w4ffl35

@w4ffl35 w4ffl35 commented Oct 13, 2026

Copy link
Copy Markdown
Member

Full-suite coverage reported 4.55% on host and sandbox while filtered runs reported 23%: scripts/coverage.test.mjs spawns nested coverage runs, and nested c8 (default --clean) wiped the outer run's shared .headlesscode/coverage/tmp/, deleting every profile collected before the extras phase. Only post-wipe profiles (nested claims run + last two extras) survived into the merge.

Fix: PID-unique --temp-directory per run plus best-effort cleanup on every exit path (profiles are tens of MB; the old shared tmp/ also broke concurrent runs). Regression test asserts no shared tmp/ returns, no non-pid tmp dirs, and no leftovers from finished nested runs.

@w4ffl35
w4ffl35 merged commit 40962bb into master Oct 13, 2026
2 checks 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.

1 participant