Agents Builders

Provision worktree test DB

Archived
provision-worktree-test-db

Created

Jun 23, 20:01

Started

Jun 23, 20:37

Completed

Jun 23, 21:51

DevOps handoff

Type

Chore

Shape

backend

Worktree Slug

provision-worktree-test-db

Repositories

mcritchie-studio

Release Train

Branch

feat/provision-worktree-test-db

Local URL

QA URL

Production URL

tooling devops

Acceptance Criteria

  • bin/agent-worktree new provisions a ready isolated test DB
  • rails test runs without manual db:test:prepare
  • DATABASE_URL not pointed at the seeded dev DB

Expected Test Plan

  • integration

Checks Run

  • [unit] test_database_url derives isolated test DB from dev DATABASE_URL (agent_worktree_test.rb)
  • [unit] write_test_env_local pins TEST_DATABASE_URL to isolated test DB
  • [unit] database.yml test env reads TEST_DATABASE_URL with shared-DB fallback
  • [integration] test env resolves to TEST_DATABASE_URL over dev DATABASE_URL (real bin/rails runner)
  • [integration] plain bin/rails test slice green in fresh worktree with DATABASE_URL sourced to dev DB

Agent Context

All 3 build agents this session (fix-qa-intake, post-deploy, doctor, retro) had to manually create/prepare the isolated test DB and run tests with DATABASE_URL unset, because bin/agent-worktree new provisions the dev DB but not a ready test DB, and .env.agent-stack points DATABASE_URL at the seeded dev DB so 'fixtures :all' loads into dev and FK-fails. Make 'new' set up the isolated test DB (mcritchie_studio_test_<slug>) and ensure the test env resolves to it without manual steps. Relates to memory feedback_worktree_seed_db_env.

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.

  1. Created Designed
    C Charmeleon
    Charmeleon
    Model
    Duration
    Tokens
    Cost
    Completed Jun 23, 20:01 · 4 days ago
    api
  2. Designed Building
    C Charmeleon
    Charmeleon
    Model
    claude-opus-4-8
    Duration
    35 minutes
    Tokens
    Cost
    Started Jun 23, 20:01
    Completed Jun 23, 20:37 · 4 days ago
    cli
  3. Building Submitted
    C Charmeleon
    Charmeleon
    Model
    claude-opus-4-8
    Duration
    16 minutes
    Tokens
    3,779,410
    Cost
    ~$2.80
    Started Jun 23, 20:37
    Completed Jun 23, 20:53 · 4 days ago
    cli
  4. Submitted Reviewed
    C Carl
    Carl primary
    J Jasper
    Jasper light
    Model
    claude-opus-4-8
    Duration
    8 minutes
    Tokens
    Cost
    Started Jun 23, 20:53
    Completed Jun 23, 21:00 · 4 days ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    Duration
    under a minute
    Tokens
    Cost
    Started Jun 23, 21:00
    Completed Jun 23, 21:01 · 4 days ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    Duration
    about 1 hour
    Tokens
    Cost
    Started Jun 23, 21:01
    Completed Jun 23, 21:51 · 3 days ago
  7. Shipped Archived
    Model
    Duration
    about 6 hours
    Tokens
    Cost
    Started Jun 23, 21:51
    Completed Jun 24, 03:44 · 3 days ago

Conversation

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

QA Feedback avi 4 days ago

2-senior PASS: carl (HEAVY) approve — verified the database.yml test.url change against Rails 7.2.3 source (keys on 'if url' truthiness; unset var renders YAML nil, not a crashing empty string); all 3 resolution scenarios verified (CI/local/worktree), CI test job green, only test: block touched (no prod-boot risk); bin/agent-worktree idempotent + allow_fail. jasper (LIGHT) approve — .env.test.local gitignored, friction solved. DEFERRED non-blocking: add an [integration] probe for the unset-TEST_DATABASE_URL path (CI already exercises it); two cosmetic redundancies (prepare_test_db runs twice on new --start; test_database_url computed 3x).

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

Dev

Actual