SafeDisk AI

Vitest Storybook Browser Mode CI Disk Space Failures

Random `Failed to fetch dynamically imported module`, iframe disconnects, or browser connection closes can be real test bugs, but they can also be a disk-pressure symptom when Chromium, Vite, or the CI runner fills temporary storage mid-run.

CI evidence first

Capture runner disk, temp, Chromium, Vite, and artifact pressure before changing test config.

Use the read-only CI scan around the failing Storybook/Vitest step, then turn one real log into a team cleanup and sharding policy.

curl -fsSL https://site-xi-orcin-50.vercel.app/ci-macos-storage-scan.sh -o ci-macos-storage-scan.sh
Download CI scan View team sample Start $99 team pilot

Useful symptoms

Capture evidence before changing config

Add this around the browser-mode test step so each failure has disk, temp, and deleted-open-file evidence.

echo "== before =="
df -h
du -sh /tmp "$RUNNER_TEMP" "$GITHUB_WORKSPACE" 2>/dev/null || true

pnpm test:sb
status=$?

echo "== after =="
df -h
du -sh /tmp "$RUNNER_TEMP" "$GITHUB_WORKSPACE" 2>/dev/null || true

echo "== deleted open Chromium temp files =="
for fd in /proc/[0-9]*/fd/*; do
  target=$(readlink "$fd" 2>/dev/null) || continue
  case "$target" in
    *"(deleted)"*)
      size=$(stat -Lc '%s' "$fd" 2>/dev/null || echo 0)
      pid=${fd#/proc/}; pid=${pid%%/*}
      cmd=$(tr '\0' ' ' < "/proc/$pid/cmdline" 2>/dev/null)
      printf '%12s  pid=%-7s  %s  -> %s\n' "$size" "$pid" "$cmd" "$target"
      ;;
  esac
done | grep -Ei 'chrome|chromium|playwright|vite|vitest' | sort -nr | head -80 || true

exit "$status"

Separate three failure classes

  1. Vite dependency optimization reload: look for `optimized dependencies changed. reloading` and add the named packages to `optimizeDeps.include`.
  2. Chromium temp pressure: look for many deleted-open `/tmp/.org.chromium.*` files and test Playwright launch flags, sharding, or lower browser concurrency.
  3. Runner storage exhaustion: check if workspace, artifacts, pnpm cache, Playwright browsers, or generated reports consume the limited runner disk.

Safer fixes to try first

Turn this into a team CI storage policy

The $99 Team Storage Pilot reviews one failing CI log or representative runner scan and returns a safe cleanup/sharding policy for Storybook, Vitest, Playwright, Vite caches, and runner artifacts.