Agents Builders

Worktree test DB setup deadlocks the parallel suite

Archived
task-b2a0bd0917b5

Created

Jun 20, 21:49

Started

Jun 20, 21:57

Completed

Jun 20, 23:00

DevOps handoff

Type

Chore

Shape

backend

Worktree Slug

worktree-test-db

Repositories

mcritchie-studio

Release Train

Branch

feat/worktree-test-db

Local URL

QA URL

Production URL

tooling,tests

Acceptance Criteria

  • A fresh worktree's first full 'bin/rails test' must not hang: bin/agent-worktree (or the test bootstrap) runs db:test:prepare so parallel worker DBs are set up; the transient before_setup fixture error on first run is eliminated.

Expected Test Plan

  • [integration] a freshly-provisioned worktree runs the full suite parallel + green on the first try

Checks Run

  • [manual] bin/agent-worktree test: full suite single-process from a clean slate, NO hang across repeated runs (db:test:prepare in provisioning + PARALLEL_WORKERS=1 avoids the worker-DB clone race)

Stage Timeline

Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. means the agent didn't report that metric.

No stage changes recorded yet.

Conversation

QA review feedback, agent handoffs, and follow-up notes for this task.

Handoff 6 days ago

bin/agent-worktree test (single-process) eliminates the worktree first-run deadlock; db:test:prepare added to provisioning. Verified no-hang across repeated clean-slate runs. Separate follow-up logged for the seed-dependent order-dependency the parallel suite was masking.

Comment 6 days ago

Review ✅ (Avi, independent) → reviewed. Diff matches acceptance, CI green; verified test_database_url derivation + the test subcommand wiring; single-process is the sound pragmatic fix (CI keeps parallel). Folded both nits: precise _development_ rewrite + flake breadcrumb comment.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

Dev

Actual