Agents Builders

Gate code-producing chores

Archived
gate-code-producing-chores

Created

Jun 22, 17:47

Started

Jun 22, 17:47

Completed

Jun 22, 18:07

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

gate-code-producing-chores

Repositories

mcritchie-studio

Release Train

Branch

feat/gate-code-producing-chores

Local URL

QA URL

Production URL

devops dor-check

Acceptance Criteria

  • dor-check gates chores that ship a code diff
  • Detects working-tree changes not just committed diff
  • Doc-only chores remain exempt with n/a note

Expected Test Plan

  • unit
  • integration

Checks Run

  • [unit] ruby -Itest test/lib/dor_check_test.rb — real-git changed_files detects staged/unstaged/untracked code pre-commit; doc-only yields empty code set; DOR_CHECK_CHANGED_FILES override preserved
  • [integration] ruby -Itest test/lib/dor_check_test.rb — bin/dor-check e2e over a temp git repo: code-producing chore FAILS merge gate, doc-only chore PASSES with n/a note

Agent Context

Fix the dor-check chore gate that lets code-producing chores skip the test-tier gate (we hit this twice this session — carl had to manually flip kind chore->feature on #96). dor-check ALREADY has the gate (bin/dor-check: EXEMPT_KINDS=%w[chore cleanup docs], CODE_PATH_PREFIXES=%w[app/ lib/ bin/ config/ db/], changed_files/code_changed_files at L163-190, gate decision L207-237: if kind exempt AND code_changed_files empty -> 'non-code task; DoR n/a' PASS, else fall through to full shape/tier gate). ROOT CAUSE: changed_files diffs the COMMITTED branch state (git diff base...HEAD, base=DOR_CHECK_DIFF_BASE default origin/main) — but the SOP runs dor-check BEFORE commit (CLAUDE.md step: run dor-check, fix, THEN commit/push). Pre-commit, HEAD has no feature commit, so base...HEAD is empty -> code_changed_files empty -> chore wrongly exempted. FIRST: reproduce it (a kind=chore task with an uncommitted code edit under app/, run dor-check --gate merge -> observe the wrong 'non-code task' pass). FIX: make changed_files detect the FULL working-tree code diff so the gate fires whether run before OR after commit — union of committed (base...HEAD) + staged (git diff --cached --name-only) + unstaged (git diff --name-only) + untracked (git ls-files --others --exclude-standard). Preserve: the DOR_CHECK_CHANGED_FILES test-injection escape hatch (keep it authoritative when set); the principle that a git error defaults to exempt WITH a warning (don't false-block on unknown) — but a positively-detected working-tree code change is NOT a guess, so gate it. Also fix the secondary hole: base default origin/main is wrong for worktrees off release — fall back gracefully (try the configured base; on failure don't just exempt silently). Keep doc-only chores (only *.md/docs/ changed) exempt with the n/a note. Tests [unit]: changed_files/code_changed_files detects staged+unstaged+untracked code files (not only committed); doc-only stays empty; DOR_CHECK_CHANGED_FILES still overrides. [integration]: a kind=chore task with an uncommitted app/ code change FAILS the merge gate (needs shape+tiers) while a doc-only chore PASSES n/a — drive bin/dor-check end-to-end with --file fixture + a temp git state or DOR_CHECK_CHANGED_FILES. Note: dor-check itself is bin/ (code) so this task is correctly kind=feature/backend.

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