Agents Builders

Root merge gates at worktree

Archived
root-merge-gates-at-worktree

Created

Jul 03, 11:52

Started

Jul 03, 11:52

Completed

Jul 03, 21:53

DevOps handoff

Type

Bug

Shape

backend

Worktree Slug

root-merge-gates-at-worktree

Repositories

mcritchie-studio

Release Slug

Branch

feat/root-merge-gates-at-worktree

Local URL

QA URL

Production URL

tooling

Acceptance Criteria

  • Gates root code at the current worktree
  • Satellite tasks certify their own repo not hub
  • Shape config resolves from the gate script repo

Expected Test Plan

  • [unit] RepoRoot.code_root/git_toplevel precedence (override/cwd-git/non-git)
  • [integration] dor-check --suite-fingerprint follows cwd when override unset

Checks Run

  • [unit] RepoRoot resolver: git_toplevel + code_root precedence, override wins, cwd-default, non-git fallback (7 cases)
  • [integration] dor-check diff root defaults to the cwd worktree (fingerprint follows cwd, matches explicit override, differs per repo)
  • [full-suite@03ab3aa882bcabbb8c7db05f9eb8a4f15bdb8bdd] bin/rails test green
  • [rubocop@03ab3aa882bcabbb8c7db05f9eb8a4f15bdb8bdd] bin/rubocop clean

Agent Context

Audit 2026-07-02 high finding #2. bin/full-suite-check + bin/dor-check hardcode the code/diff/fingerprint root to the repo the SCRIPT lives in (ROOT = expand('..',__dir__)). Satellites ship no gate scripts, so a turf-monster/rolio task runs the HUB's gate, which runs bin/rails test + fingerprints the mcritchie-studio tree -> false-GREEN certification of a repo the task never touched (or STALE). Fix: a shared bin/lib/repo_root.rb resolver (RepoRoot.code_root(override, fallback) = ENV override || git rev-parse --show-toplevel of cwd || fallback). full-suite-check: root = code_root(FULL_SUITE_ROOT, ROOT). dor-check: both DOR_CHECK_DIFF_ROOT usages (diff line 244, fingerprint line 322) = code_root(DOR_CHECK_DIFF_ROOT, ROOT). CONFIG stays at hub: dor-check CONFIG_PATH=feature_shapes.yml + .env at ROOT; full-suite-check lib required from __dir__; both call TASK_BIN (hub) for the board. Studio-worktree behavior UNCHANGED (cwd git-toplevel == the worktree == ROOT). Also fixes the checkout-independent false-STALE (both gates now default to the SAME cwd root). Regression-test-first: RepoRoot unit (override/cwd-git/non-git) + a dor-check integration proving the cwd default. SESSION-PREFLIGHT is OUT OF SCOPE (separate follow-up): it resolves its TOOL scripts (bin/task at line 165, install-agent-docs at 326) from options[:root] too, so it entangles studio-tool-root with code-root and needs a deeper split; it's advisory (can't produce a false merge).

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.

Sizing Avi · PO SMALL Dev SMALL Actual XL ≠ forecast
  1. Created Designed
    A Arbok
    Arbok
    Model
    Duration
    Tokens
    Cost
    Completed Jul 03, 11:52 · 5 days ago
    api
  2. Designed Building
    A Arbok
    Arbok
    Model
    claude-opus-4-8
    Duration
    under a minute
    Tokens
    1,523,053
    Cost
    ~$1.05
    Started Jul 03, 11:52
    Completed Jul 03, 11:52 · 5 days ago
    cli
  3. Building Submitted
    A Arbok
    Arbok
    Model
    claude-opus-4-8
    Duration
    13 minutes
    Tokens
    31,851,909
    Cost
    ~$17.99
    Started Jul 03, 11:52
    Completed Jul 03, 12:06 · 5 days ago
    cli
  4. Submitted Reviewed Review Activity
    C Carl
    Carl primary
    J Jasper
    Jasper light
    Model
    claude-opus-4-8
    Duration
    about 2 hours
    Tokens
    2,804,326
    Cost
    ~$2.97
    Started Jul 03, 12:06
    Completed Jul 03, 13:50 · 5 days ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    11 minutes
    Tokens
    1,851,541
    Cost
    ~$1.67
    Started Jul 03, 13:50
    Completed Jul 03, 14:00 · 5 days ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    about 8 hours
    Tokens
    688,623,168
    Cost
    ~$420.76
    Started Jul 03, 14:00
    Completed Jul 03, 21:53 · 5 days ago
  7. Shipped Archived
    Model
    Duration
    about 10 hours
    Tokens
    Cost
    Started Jul 03, 21:53
    Completed Jul 04, 07:34 · 4 days ago

Conversation

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

No task feedback has been recorded yet.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual

XL