Agents Builders

Task naming discipline

Archived
task-31e87e26cf2b

Created

Jun 22, 02:48

Started

Jun 22, 04:23

Completed

Jun 22, 13:55

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

task-naming-discipline

Repositories

mcritchie-studio

Release Train

Branch

feat/task-naming-discipline

Local URL

QA URL

Production URL

tooling

Acceptance Criteria

  • Title validates 3-5 words on create and change
  • Slug auto-derives from title; --slug optional override
  • Each acceptance bullet validates 5-12 words on change
  • New agent_context field holds verbose free-form detail

Expected Test Plan

  • unit
  • integration

Checks Run

  • [unit] rails test test/models — title/acceptance ranges create+change, grandfathering (both sides normalized), slug derive/suffix/hex, agent_context, gem-member branch nulling; green
  • [integration] rails test test/controllers test/integration — API+web create enforce ranges, update ignores slug, custom-slug trickle, producer-first + multi-repo conductor flow; green
  • [integration] db:seed loads clean — all 9 seeded task titles conform (RAILS_ENV=test runner, no RecordInvalid)
  • [unit] full suite green: 919 runs / 0 failures / 0 errors / 4 skips (Ruby 3.3.11); rubocop clean; rebased onto origin/main past #82 + #84

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.

QA Feedback 5 days ago

Built + green (845/0); stacked on #81 (readable slug). Blocked until the QA bot lands #81 on main — then rebase onto main, PR, submit. See agent_context for the rebase plan + the :naming-context design pivot.

QA Feedback 5 days ago

Avi: code correct + 866/0, but AC#1/#3 claim 'on create AND change' while :naming is opted into only by api/v1/tasks#create. Updates (API+web) and web-create are unguarded → 'title change'/'on change' unimplemented, and even 'on create' misses the web form. Reconcile scope: (a) correct ACs to API-create-only, (b) also enforce web-create + grandfather updates, or (c) fully airtight (create + updates gated on change). Nit: once shipped, re-set this task's own title/acceptance/agent_context to conform (deploy-gated).

Handoff 5 days ago

Resubmit after PR #83 block. Block root cause: the :naming validation context was only opted into by API create, so 'on create AND change' was false for web creates + all updates. Fix (commit 29650f3): both validations now always-on, gated on dirty-tracking (title_changed? / acceptance_changed?) — airtight across every path, grandfathering untouched tasks. Dropped :naming context; slug callbacks + API create reverted to on: :create / save!. ~30 test factories updated. Full suite 867 runs / 0 failures / 0 errors. Title + ACs reconciled to conform; agent_context is deploy-gated (prod model lacks the key until ship).

QA Feedback avi 5 days ago

Re-review (Avi): prior airtightness block RESOLVED — :naming context gone; always-on validations gated on title_changed?/acceptance_changed? cover all create+update paths, grandfathering verified, suite 867/0/4 green on 3.3.11. Blocking on 3 NEW items. (1) BLOCKER: db:seed crashes on a fresh DB — db/seeds/52_tasks.rb:10 title 'Fix cart persistence bug on mobile' is 6 words -> find_or_create_by! raises RecordInvalid (empirically confirmed). Test factories were updated but the seed was missed (fixtures, not seeds, run in the suite). Shorten to <=5 words. (2) BLOCKER: branch is stale + CONFLICTING vs main (gh mergeable:CONFLICTING). origin/main advanced past the base with #82 gems-first, which touches app/models/task.rb + test/models/task_test.rb + test/models/release/conductor_test.rb (the 3 files this PR also edits). Rebase onto origin/main, resolve the 3 conflicts, and re-run the FULL suite — the 867/0 green is against the pre-#82 base, and #82 predates this always-on validation, so any Task.create! it added with a >5-word title or out-of-range acceptance will now fail like the seed. (3) PR #83 body still described the blocked :naming-context design as shipped — I corrected it. After the seed fix + rebase, re-run db:seed and bin/dor-check, then move back to submitted.

Handoff 5 days ago

Re-resubmit after Avi's 2nd-pass block (he verified the core airtightness was correct; these were the 3 follow-ups). Fixed: (1) db/seeds/52_tasks.rb title 'Fix cart persistence bug on mobile' (6w) -> 'Fix mobile cart persistence bug' (5w) — db:seed now loads clean (verified RAILS_ENV=test runner, no RecordInvalid). (2) Rebased + squashed onto origin/main past #82 (Gems-first); resolved the task_test.rb conflict (kept both #82's release_repo tests and the naming tests) and fixed #82's now-failing short-title factories (reviewed_task already wrapped; gem_task/app_task now wrap their label; release_flow_test 'engine 0.8'->'engine 0.8 gem release'). The rebase exposed a latent bug in #82's member_plan (it returned a branch for gem members; my slug trickle-down now sets one) — fixed member_plan to null the gem branch per its own documented contract. (3) Applied Avi's optional symmetry nit: acceptance_changed? now normalizes BOTH sides. Full suite 888/0/0, rubocop clean, dor-check green. Branch force-pushed (d7fd3c8).

Handoff 5 days ago

3rd resubmit: Avi verified member_plan/seed/symmetry all correct; only blocker was #84 (Multi-repo conductor) landing after my last rebase. Rebased onto origin/main@004a8a6; resolved conductor_test.rb by combining #84's repo-metadata helpers + eligibility with my label-wrapping; fixed #84-only short titles (two 'mystery' -> 'mystery repo deploy task' keeping mystery-repo; two 'not reviewed' -> 'designed task not reviewed'). conductor.rb auto-merged (member_plan gem-branch null + #84 repo_plan coexist). Full suite 919/0/0, rubocop clean, db:seed clean, dor-check green. Force-pushed 60cd8df. Branch current as of origin/main@004a8a6.

Comment 5 days ago

Avi APPROVED (PR #83, 4th pass). Verified: branch is a clean fast-forward onto origin/main@004a8a6 (linear rebase, guaranteed conflict-free merge; main has not moved since); reviewed_task helper satisfies both eligibility + 3-5 word rule (4w all callers); the two 'mystery' eligibility tests genuinely exercise the unknown-repo path (create outside assert_raises, err pinned to mystery-repo); gem_task/app_task titles all <=5 words (ceiling 'studio change'->5). Independent full suite 919/0/0 (matches). Prior passes already approved the naming core, member_plan gem-branch null, seed fix, acceptance_changed? normalization. Avi's note: MERGE PROMPTLY — 3rd time main moved mid-review; the linear FF holds only until the next merge lands.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

Dev

Actual