Agents Builders

bin/pr-status mergeability helper

Archived
pr-status-mergeable

Created

Jun 25, 14:52

Started

Jun 25, 16:05

Completed

Jun 25, 19:24

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

pr-status-mergeable

Repositories

mcritchie-studio

Release Train

Branch

feat/pr-status-mergeable

Local URL

QA URL

Production URL

tooling devops-gate

Acceptance Criteria

  • bin/pr-status prints mergeable, CI, draft one line
  • Surfaces CONFLICTING as why CI did not run
  • Takes a PR number; joins gh pr and runs
  • Fast read-only diagnostic for the feature agent

Expected Test Plan

  • [unit] command test stubs gh output; asserts the one-line summary

Checks Run

  • [unit] bin/pr-status formats the mergeable/CI/draft summary line
  • [integration] bin/pr-status across the gh boundary (stubbed): DIRTY → CONFLICTING hint

Agent Context

From the 2026-06-24/25 gem-ship session retro. Biggest self-inflicted time sink: mcritchie#157's CI 'never triggered' — ~6-8 tool calls polling gh run list, pushing an empty commit, force-pushing, chasing GitHub LAG — before discovering the PR was CONFLICTING/DIRTY (release drifted 20 commits during a long session) and GitHub SKIPS CI on unmergeable PRs. A one-line 'bin/pr-status <pr#>' that prints mergeable . mergeStateStatus . CI conclusion . draft makes 'CI isn't running -> because it's conflicting' the FIRST thing seen, not the last. Impl: gh pr view --json mergeable,mergeStateStatus,isDraft,statusCheckRollup [+ --repo] formatted to one line; add a hint when mergeStateStatus=DIRTY ('merge origin/release to unblock CI'). Pairs with a habit (separate, not this task): branch worktrees off fresh release + merge release before submit on long sessions. Tests: a command test (test/commands or test/lib) stubbing gh JSON output and asserting the summary + the CONFLICTING hint.

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
    A Abra
    Abra
    Model
    Duration
    Tokens
    Cost
    Completed Jun 25, 14:52 · 2 days ago
    api
  2. Designed Building
    A Abra
    Abra
    Model
    claude-opus-4-8
    Duration
    about 1 hour
    Tokens
    Cost
    Started Jun 25, 14:52
    Completed Jun 25, 16:05 · 1 day ago
    cli
  3. Building Submitted
    A Abra
    Abra
    Model
    claude-opus-4-8
    Duration
    4 minutes
    Tokens
    9,738,921
    Cost
    ~$5.62
    Started Jun 25, 16:05
    Completed Jun 25, 16:09 · 1 day ago
    cli
  4. Submitted Reviewed
    C Carl
    Carl primary
    S Shannon
    Shannon light
    Model
    claude-opus-4-8
    Duration
    about 2 hours
    Tokens
    Cost
    Started Jun 25, 16:09
    Completed Jun 25, 18:27 · 1 day ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    Duration
    31 minutes
    Tokens
    Cost
    Started Jun 25, 18:27
    Completed Jun 25, 18:57 · 1 day ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    Duration
    26 minutes
    Tokens
    Cost
    Started Jun 25, 18:57
    Completed Jun 25, 19:24 · 1 day ago
  7. Shipped Archived
    8
    81fad33e-98b5-4075-8ed6-d0efe6cb5804
    Model
    claude-opus-4-8
    Duration
    about 2 hours
    Tokens
    89,823,999
    Cost
    ~$64.60
    Started Jun 25, 19:24
    Completed Jun 25, 21:16 · 1 day ago
    cli

Conversation

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

Comment 1 day ago

Review pair APPROVED: carl (heavy) + shannon (light). All 4 acceptance bullets met — one-line mergeable/mergeState/ci/draft summary; DIRTY branch prints the CONFLICTING fix hint; takes a PR# and shells gh pr view --json (read-only); verified live on #199. Test green (2 runs/22 assertions), CI green (lint/scan_js/scan_ruby/test). Non-blocking nits for a future touch: PENDING legacy status-context -> ci=mixed (modern check-runs fine); positional --repo after PR#; no shellescape on interpolated args (trusted-local CLI). Held from release merge until Rails 8.1 RC ships.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

Dev

Actual