Rerun triggered. Now the honest answer to your question.
Why this keeps happening
Three things, in order of how much I can control:
1. My workflow gap (the one I can fix). I ran tests only for packages I touched (routines, conversations, validator-routine, preset-k8s) plus pnpm build. I never ran pnpm test. If a downstream package fails deterministically on my changes, I miss it. I should run pnpm test before every push. No excuse — it's a 60-second cost to save a CI round-trip.
2. The repo has a chronically flaky test family (not my changes). Pattern:
- This PR's CI:
workspace-git/bundle-hooks.test.ts — null buffer in isomorphic-git's pack-index reader
- Recent main CI:
ipc-core/walk.test.ts — ENOTEMPTY: rmdir '/tmp/.../objects/pack'
- This PR's local full-suite run just now:
workspace-git-server/argv-injection.test.ts (len-64k variant)
All three are integration tests that spawn the real git binary against /tmp, and they race on pack-file / .idx writes under Linux's filesystem timing. None are caused by Phase B. Running pnpm test locally on macOS won't catch them because the race only fires on Linux CI.
3. The proper fix is repo-level, not PR-level. Either:
- CI should retry-on-failure for the known-flaky test files (mark them with
vitest --retry=2 or similar)
- Or someone fixes the underlying races (likely
fs.mkdtemp + cleanup ordering in workspace-git/ipc-core/workspace-git-server)
Until then, every PR has a non-trivial chance of catching one of these on first CI run. Rerunning usually passes them.
What I'll do differently
- Always run
pnpm test locally before pushing. Catches deterministic regressions even if it can't catch Linux-only flakes.
- When CI fails on a test I didn't touch, check the failing-test name against the known-flake family before assuming it's my bug. If it's a known flake, retry; if it's new, investigate.
- Surface the flake pattern in memory so future sessions don't re-derive this.
Want me to save the flaky-test-family pattern to project memory so I (and future agents) treat these as known flakes by default?