Summary
src/__tests__/resume.test.ts:109 test case resume > manual resume: suspended agent with sessionId is resumed passes reliably in isolation (10/10 runs, 3.6s) but fails consistently when invoked via full bun run check (3/3 attempts on 2026-04-21 at 10:40-11:05 UTC on dev HEAD 39bf0290).
Classic cross-test PG state pollution — not a load-dependent oscillating flake like the baseline-flake family (listen-bomb, spill-journal, SpawnTargetPicker).
Repro
cd /home/genie/workspace/agents/genie-configure/repos/genie
git checkout origin/dev # 39bf0290 (v4.260421.12)
# Isolated — PASSES
bun test src/__tests__/resume.test.ts
# → 10 pass / 0 fail in 3.6s
# Full suite — FAILS consistently
bun run check
# → 3415 pass / 1 fail in ~128s
# → fail: "(fail) resume > manual resume: suspended agent with sessionId is resumed"
# → underlying error: postgres handler at node_modules/postgres/src/index.js:331
Impact
Root cause hypotheses
- Shared pgserve port 20900 not reset between test files —
src/__tests__/ and scripts/reconcile-orphans.test.ts both use pgserve --ram on port 20900. State bleed.
- FK cascade from sibling test — another test inserts an agent row that interferes with resume.test's suspended-agent fixture on cleanup.
- Test runner ordering — isolated run picks different order; full run exposes dependency on a prior test's rollback.
Related
Suggested next step
bun test src/__tests__/resume.test.ts --preload=<setup-that-forces-fresh-pgserve> to isolate. If isolates, fix is test harness-level (per-file pgserve reset, or serialize PG-touching test files).
Reported by the bugless-genie orchestrator during autonomous overnight work, 2026-04-21.
Summary
src/__tests__/resume.test.ts:109test caseresume > manual resume: suspended agent with sessionId is resumedpasses reliably in isolation (10/10 runs, 3.6s) but fails consistently when invoked via fullbun run check(3/3 attempts on 2026-04-21 at 10:40-11:05 UTC on dev HEAD39bf0290).Classic cross-test PG state pollution — not a load-dependent oscillating flake like the baseline-flake family (listen-bomb, spill-journal, SpawnTargetPicker).
Repro
Impact
.husky/pre-push(fullbun run check).genie brain <subcommand>exits 0 when brain is not installed — silent data loss for write subcommands #1151 fix (branchfix/1151-brain-subcommand-exit-nonzero, unrelated 3-line edit inbrain.ts).prependEnvVarsimport fails under concurrent test runs, blocking all local pushes #1223 (prependEnvVars) was before — now a 4th flake family in the pre-push-blocker bestiary.Root cause hypotheses
src/__tests__/andscripts/reconcile-orphans.test.tsboth usepgserve --ram on port 20900. State bleed.Related
brain/memory/reference_baseline_flakes_2026_04_20.md— the existing 3-flake familybrain/memory/reference_baseline_flakes_blocker_2026_04_21.md— my own blocker doc during this session (but this is a DIFFERENT flake than listen-bomb/spill-drain)prependEnvVarsimport fails under concurrent test runs, blocking all local pushes #1223 (prependEnvVars) — closed 2026-04-21, same "full-suite-only" fail signatureSuggested next step
bun test src/__tests__/resume.test.ts --preload=<setup-that-forces-fresh-pgserve>to isolate. If isolates, fix is test harness-level (per-file pgserve reset, or serialize PG-touching test files).Reported by the bugless-genie orchestrator during autonomous overnight work, 2026-04-21.