Agents Builders

Avi Heartbeat Workflow

Archived codex
avi-heartbeat-workflow

Created

Jun 29, 06:27

Started

Jun 29, 12:39

Completed

Jun 29, 13:38

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

avi-heartbeat-workflow

Repositories

mcritchie-studio

Release Slug

Branch

feat/avi-heartbeat-workflow

QA URL

Production URL

devops ui

Acceptance Criteria

  • Heartbeat reviews newest submitted PRs first
  • Queue refreshes after each completed review
  • Workflow stops after ten reviewed PRs
  • Retrospective summarizes friction blockers and refactors
  • Deployments page exposes copyable command
  • Avi leaves approved tasks for Steffon

Expected Test Plan

  • [unit] command planner covers ordering cap and refresh
  • [integration] CLI dry-run exercises queue and retrospective
  • [component] deployments page renders copyable heartbeat command

Checks Run

  • [unit] ruby -Itest test/commands/avi_heartbeat_command_test.rb
  • [integration] mise x ruby@3.3.11 -- bin/rails test test/controllers/tasks_controller_test.rb
  • [component] mise x ruby@3.3.11 -- bin/rails test test/helpers/application_helper_test.rb
  • [static] mise x ruby@3.3.11 -- bin/rails test test/docs/review_lane_docs_test.rb
  • [build] mise x ruby@3.3.11 -- bin/rails tailwindcss:build
  • [lint] mise x ruby@3.3.11 -- bin/rubocop
  • [full-suite@104946670936895c2611cfc683d4c75dd83f0fa6] bin/rails test green
  • [rubocop@104946670936895c2611cfc683d4c75dd83f0fa6] bin/rubocop clean

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.

Sizing Avi · PO MEDIUM Dev MEDIUM Actual XL ≠ forecast
  1. Created Designed
    P Poliwrath
    Poliwrath
    Model
    Duration
    Tokens
    Cost
    Completed Jun 29, 06:27 · 9 days ago
    api
  2. Designed Building
    P Poliwrath
    Poliwrath
    Model
    gpt-5.5
    Duration
    under a minute
    Tokens
    209,302
    Cost
    ~$0.16
    Started Jun 29, 06:27
    Completed Jun 29, 06:27 · 9 days ago
    cli
  3. Building Submitted
    P Poliwrath
    Poliwrath
    Model
    gpt-5.5
    Duration
    32 minutes
    Tokens
    12,965,027
    Cost
    ~$9.52
    Started Jun 29, 06:27
    Completed Jun 29, 06:59 · 9 days ago
    cli
  4. Submitted Blocked
    0
    019f11fa-8eda-7080-8f2d-bb5efcb0abe7
    Model
    gpt-5.5
    Duration
    about 6 hours
    Tokens
    1,269,123
    Cost
    ~$1.02
    Started Jun 29, 06:59
    Completed Jun 29, 12:34 · 9 days ago
    cli
  5. Blocked Building
    P Poliwrath
    Poliwrath
    Model
    gpt-5.5
    Duration
    5 minutes
    Tokens
    1,395,136
    Cost
    ~$1.31
    Started Jun 29, 12:34
    Completed Jun 29, 12:39 · 9 days ago
    cli
  6. Building Submitted
    P Poliwrath
    Poliwrath
    Model
    gpt-5.5
    Duration
    7 minutes
    Tokens
    2,388,981
    Cost
    ~$1.51
    Started Jun 29, 12:39
    Completed Jun 29, 12:46 · 9 days ago
    cli
  7. Submitted Reviewed Review Activity
    S Shannon
    Shannon primary
    C Carl
    Carl light
    Model
    gpt-5.5
    Duration
    3 minutes
    Tokens
    3,447,072
    Cost
    ~$2.99
    Started Jun 29, 12:46
    Completed Jun 29, 12:49 · 9 days ago
    cli
  8. Reviewed Assembled
    S Steffon
    Steffon
    Model
    gpt-5.5
    Duration
    11 minutes
    Tokens
    3,384,322
    Cost
    ~$2.15
    Started Jun 29, 12:49
    Completed Jun 29, 13:01 · 9 days ago
  9. Assembled Shipped
    A Avi
    Avi
    Model
    gpt-5.5
    Duration
    38 minutes
    Tokens
    9,522,561
    Cost
    ~$6.06
    Started Jun 29, 13:01
    Completed Jun 29, 13:38 · 9 days ago
  10. Shipped Archived
    Model
    Duration
    5 days
    Tokens
    Cost
    Started Jun 29, 13:38
    Completed Jul 04, 03:23 · 4 days ago

Conversation

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

Handoff codex 9 days ago

PR #278 opened against release as a managed draft: https://github.com/amcritchie/mcritchie-studio/pull/278. Local review URL: http://localhost:3007/deployments. Local full suite and rubocop passed; GitHub CI is green; dor-check passed. QA intake status: avi-ready-draft, clean merge, local stack up.

QA Feedback 9 days ago

Avi Heartbeat Workflow needs rework before release: bin/avi-heartbeat claims newest submitted PRs first, but submitted_tasks sorts by created_at instead of the board's submitted_at. This breaks the core queue-ordering acceptance when an older task is submitted or resubmitted after newer-created work. Update the sorter to prefer submitted_at with a safe fallback, and add a regression test where an older-created task with a later submitted_at is selected first.

Handoff codex 9 days ago

Resolved Avi blocker: bin/avi-heartbeat now orders submitted PRs by submitted_at with created_at fallback. Added regression test for older-created work resubmitted later winning the queue. Rebased on origin/release and force-pushed PR #278 at 5d6025b. Local command test, full suite, rubocop, and dor-check passed.

Handoff codex 9 days ago

Final blocker closeout: PR #278 is rebased on current origin/release and force-pushed at 38997dae72b638895a95391486abc6a62d255099. GitHub CI is green, QA intake reports avi-ready/merge=CLEAN/local=up, and http://localhost:3007/up returns 200 after applying the release-duration migration.

Handoff 8 days ago

Resolved: submitted_sort_time prefers submitted_at with a created_at fallback (bin/avi-heartbeat:200-203), so the newest-SUBMITTED PR is claimed first. Regression: test_prefers_latest_submitted_at_over_task_creation_time selects an older-created/later-submitted task first. Green on main.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

MEDIUM

Dev

MEDIUM

Actual

XL