You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pack:verify: await the --web child's exit before removing its work dir #1826
Follow-up to #1801 (fixed in #1814). Same shape, lower risk — filed so it isn't rediscovered from scratch if it ever does bite.
Context
#1801 was smoke:tui failing intermittently with ENOTEMPTY: done() sent SIGTERM and then synchronously rmSync'd the work dir, without waiting for the child to exit. scripts/pack-and-verify.mjs has the same kill-then-remove pattern in two places.
The two sites
scripts/pack-and-verify.mjs:330 (success path) — the closer analogue. verifyWeb()'s finally { stop() } sends SIGTERM (line 377-380), control returns to the main flow, and rmSync(work, …) runs immediately with nothing awaiting the child's exit.
scripts/pack-and-verify.mjs:74-78 (fail()) — kills webChild and rmSyncs workDir back to back.
Why this is low priority, not a live flake
Unlike smoke-tui, the --web child's HOME is not redirected into the work dir — work is only its cwd and the location of the installed package it reads. In smoke:tui intermittently fails with ENOTEMPTY cleaning its temp dir #1801 the work dir wasHOME, so the Ink app was actively writing config/storage into the directory being deleted, which is what made the race fire. Nothing here writes into work on shutdown, and on macOS a live cwd doesn't block removal.
fail() runs only when the verify has already failed and is exiting 1, so an ENOTEMPTY there cannot manufacture a spurious red — worst case it masks the real failure message with an rmSync stack and skips the "tarball retained at …" hint.
Apply the #1814 treatment to stop(): make it await the child's exit event (escalating SIGTERM → SIGKILL after a grace period, then proceeding anyway with a warning) before the caller removes work, and wrap the rmSync calls so a leftover temp dir warns instead of throwing over the real failure message. See scripts/smoke-tui.mjs after #1814 for the pattern.
Scored 6/16 with the priority rubric added to AGENTS.md in #1891. This card is already approved and sitting in Todo — only Priority was set here, its Status is unchanged.
Axis
Score
Reasoning
Severity / impact
2/5
A kill-then-remove race in pack:verify that can produce an intermittent ENOTEMPTY. It affects a local/release-only script, not shipped behaviour, and the issue itself was filed defensively rather than in response to a failure.
Urgency / staleness
3/5
v2.1.0 milestone, and pack:verify is the pre-publish gate for the release in #1876 — so if it does bite, it bites at the worst moment.
Closed by #1895, squash-merged into v2/main. (Auto-close doesn't fire here — Closes #N only closes on PRs targeting the default branch, and v2 PRs target v2/main.)
Activity
cliffhall commentedon Aug 1, 2026
Triage: Priority = Medium
Scored 6/16 with the priority rubric added to
AGENTS.mdin #1891. This card is already approved and sitting in Todo — only Priority was set here, its Status is unchanged.pack:verifythat can produce an intermittentENOTEMPTY. It affects a local/release-only script, not shipped behaviour, and the issue itself was filed defensively rather than in response to a failure.pack:verifyis the pre-publish gate for the release in #1876 — so if it does bite, it bites at the worst moment.Related issues. One connected issue:
Scores are a starting point, not a verdict — the rubric is meant to be overruled when it's plainly wrong, provided the reason is written down.
docs: drop the /15 denominator caveat now the recorded scores are res…
docs: add Incoming to both boards, adopt the v2 Priority field, and d…
cliffhall commentedon Aug 2, 2026
Closed by #1895, squash-merged into
v2/main. (Auto-close doesn't fire here —Closes #Nonly closes on PRs targeting the default branch, and v2 PRs targetv2/main.)