Agents Builders

Conductor CLI refactor guard

Archived
conductor-cli-refactor-guard

Created

Jun 22, 16:59

Started

Jun 22, 16:59

Completed

Jun 22, 18:07

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

conductor-cli-refactor-guard

Repositories

mcritchie-studio

Release Train

Branch

feat/conductor-cli-refactor-guard

Local URL

QA URL

Production URL

devops release-conductor

Acceptance Criteria

  • record_qa_shas skips blank SHAs to avoid clobber
  • Extract bin/release CLI helpers without changing behavior
  • Full suite and dry-run plan stay green

Expected Test Plan

  • unit
  • integration

Checks Run

  • [unit] Release::Cli take_flag/opt_value/opt_values: consume, absent, repeat, dangling
  • [unit] record_qa_shas non-clobber: blank ignored, non-blank updates, new key added
  • [integration] partial re-prepare blank can't wipe frozen gem SHA (Conductor+ShipSequence boundary)
  • [integration] bin/release flags parsed via Release::Cli across CLI boundary (standalone load)
  • [suite] bin/rails test 1008 runs 0 failures 0 errors; ruby -c bin/release clean; zeitwerk:check ok
  • [parity] prepare+ship --dry-run --local byte-identical before/after (seeded RC)

Agent Context

Two combined refactors (operator's R2 + R3), both in bin/release/conductor so they share one PR. R2 (gem-SHA clobber guard): Release::Conductor.record_qa_shas (conductor.rb:147-152) replaces metadata['qa_shas'] WHOLESALE; the prepare gem branch (bin/release) now records qa_shas[gem]='' when the gem sibling isn't checked out, so a re-run from a gem-less box clobbers a previously-frozen good SHA → ship falls back to live HEAD. Fix: skip recording BLANK SHAs — either prepare doesn't add empty entries, OR record_qa_shas merges into existing metadata['qa_shas'] and ignores blank values (prefer merge+ignore-blank so a partial prepare can't wipe prior freezes). Add [unit] test: record_qa_shas with a blank value does NOT clobber an existing non-blank SHA; non-blank still updates. R3 (bin/release decomposition): BEHAVIOR-PRESERVING ONLY. Identify concrete dedup/extraction that REDUCES bin/release without changing what it does — e.g. extract a small Release::Cli (or similar) support module for ARGV parsing (opt_value/opt_values/flags) and/or shared output helpers, and dedupe the repeated per-repo loop scaffolding shared by prepare/ship. DO NOT alter the git/gh/heroku/qa-server orchestration semantics, the test_cmd gate, the confirm gates, or the dry-run planning. The conductor just shipped 3 releases cleanly — a regression here is expensive. Hard requirements: full suite green (bin/rails test), ruby -c bin/release clean, and bin/release prepare --dry-run --local AND bin/release ship --dry-run --local still print the SAME plan as before (capture before/after). If any extraction can't be done without behavior risk or has poor ROI, SKIP it and say so — partial R3 is fine. [unit]+[integration] tests for the extracted pure helpers + the guard.

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.

No task feedback has been recorded yet.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

Dev

Actual