Agents Builders

Release-aware dor-check base

Archived
release-aware-dor-check-base

Created

Jun 23, 03:48

Started

Jun 23, 03:48

Completed

Jun 23, 04:08

DevOps handoff

Type

Bug

Shape

backend

Worktree Slug

release-aware-dor-check-base

Repositories

mcritchie-studio

Release Train

Branch

feat/release-aware-dor-check-base

Local URL

QA URL

Production URL

devops dor-check ci

Acceptance Criteria

  • dor-check default base resolves origin/release when present
  • Falls back to origin/main when no release branch
  • Release-cut docs branch no longer false-flags code diff

Expected Test Plan

  • unit
  • integration

Checks Run

  • [unit] default_diff_base via --diff-base resolver: origin/release when present, origin/main when absent, DOR_CHECK_DIFF_BASE overrides (test/lib/dor_check_test.rb)
  • [integration] end-to-end bin/dor-check over release-ahead temp repo: release-cut docs branch -> DoR n/a; release-cut app/ change still gated, not charged for release's code (test/lib/dor_check_test.rb)

Agent Context

Fix dor-check false code-diff detection on release-cut branches. bin/dor-check changed_files (around line 174) hard-defaults base = ENV.fetch(DOR_CHECK_DIFF_BASE, origin/main). Under the persistent-release model branches are cut off release and PRs target release, but release runs AHEAD of main (merged-but-unshipped work) — so committed diff origin/main...HEAD drags in everyone else's already-merged-to-release changes and a docs/chore branch gets a FALSE code-diff flag (steffon hit this on the SOP-hardening PR; current workaround is setting DOR_CHECK_DIFF_BASE=origin/release by hand). FIX: make the DEFAULT base release-aware — resolve origin/release if it exists else origin/main — mirroring bin/agent-worktree base_ref_for at line 786 (returns origin/release when git rev-parse --verify origin/release succeeds, else origin/main). Keep the DOR_CHECK_DIFF_BASE env override authoritative when set (tests/edge cases). Keep R4 intact: changed_files still UNIONS staged+unstaged+untracked+committed; only the committed-diff base DEFAULT changes. Extract a small testable helper (e.g. default_diff_base) and honor DOR_CHECK_DIFF_ROOT so tests drive real git against a temp repo (R4 added that seam). Bug => write the failing regression FIRST: a temp repo where origin/release is AHEAD of origin/main, a branch cut off release with a DOCS-ONLY change, committed (clean tree) => with the old origin/main default code_changed_files is non-empty (false positive); with the fix (origin/release) it is empty (correctly exempt). Tests [unit]: default_diff_base returns origin/release when present, origin/main when not, DOR_CHECK_DIFF_BASE overrides both. [integration]: end-to-end bin/dor-check on the temp repo (release ahead of main, release-cut docs branch) => non-code task n/a, not false-gated; and a real code change on such a branch still gets gated. Confirm the existing test/lib/dor_check_test.rb R4 tests still pass.

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. Shipped Archived
    Model
    Duration
    Tokens
    Cost
    Completed Jun 23, 17:13 · 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)

Dev

Actual