Agents Builders

Add Session Preflight

Archived
add-session-preflight

Created

Jun 26, 17:46

Started

Jun 26, 20:05

Completed

Jun 26, 21:21

DevOps handoff

Type

Chore

Shape

backend

Worktree Slug

add-session-preflight

Repositories

mcritchie-studio

Release Train

Branch

feat/add-session-preflight

QA URL

Production URL

devops docs

Acceptance Criteria

  • Preflight reports latest task blocker feedback
  • Branch drift is shown against origin release
  • PR merge state and checks are summarized
  • Open PR file overlaps are listed
  • Docs drift and stale terms are flagged
  • Required test tiers print from feature shapes

Expected Test Plan

  • [unit] session-preflight task feedback and shape parsing
  • [unit] branch drift and stale scan reporters
  • [integration] PR overlap and installed-docs command wiring
  • [static] git diff --check
  • [dor] bin/dor-check add-session-preflight

Checks Run

  • [unit] PATH=/opt/homebrew/opt/ruby@3.3/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin ruby -Itest test/commands/session_preflight_test.rb
  • [unit] PATH=/opt/homebrew/opt/ruby@3.3/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin bin/rails test test/controllers/api/v1/tasks_controller_test.rb
  • [integration] PATH=/opt/homebrew/opt/ruby@3.3/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin bin/rails test test/commands/session_preflight_test.rb test/controllers/api/v1/tasks_controller_test.rb test/commands/install_agent_skills_test.rb test/lib/dor_check_test.rb
  • [static] bin/session-preflight add-session-preflight
  • [static] bin/install-agent-docs check
  • [static] git diff --check
  • [rubocop] PATH=/opt/homebrew/opt/ruby@3.3/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin bin/rubocop bin/session-preflight test/commands/session_preflight_test.rb app/controllers/api/v1/tasks_controller.rb test/controllers/api/v1/tasks_controller_test.rb
  • [full-suite@734a7105c516c18c3347bf238847b5ef80af85d6] bin/rails test green
  • [rubocop@734a7105c516c18c3347bf238847b5ef80af85d6] bin/rubocop clean
  • [dor] bin/dor-check add-session-preflight

Agent Context

Add bin/session-preflight <task> as the beginning-of-session counterpart to bin/dor-check. It should summarize latest task feedback, branch drift against origin/release, PR merge/check status, same-file overlap with open/recent PRs, installed docs/skills drift, stale terminology findings, and required test tiers from config/feature_shapes.yml. Prefer deterministic local checks and graceful degradation when gh or network is unavailable.

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 Dev MEDIUM Actual LARGE
  1. Created Designed
    P Pidgeotto
    Pidgeotto
    Model
    Duration
    Tokens
    Cost
    Completed Jun 26, 17:46 · about 16 hours ago
    api
  2. Designed Building
    P Pidgeotto
    Pidgeotto
    Model
    Duration
    under a minute
    Tokens
    Cost
    Started Jun 26, 17:46
    Completed Jun 26, 17:46 · about 16 hours ago
    cli
  3. Building Submitted
    P Pidgeotto
    Pidgeotto
    Model
    Duration
    18 minutes
    Tokens
    Cost
    Started Jun 26, 17:46
    Completed Jun 26, 18:05 · about 16 hours ago
    cli
  4. Submitted Blocked
    Model
    Duration
    about 1 hour
    Tokens
    Cost
    Started Jun 26, 18:05
    Completed Jun 26, 18:55 · about 15 hours ago
    api
  5. Blocked Building
    P Pidgeotto
    Pidgeotto
    Model
    Duration
    6 minutes
    Tokens
    Cost
    Started Jun 26, 18:55
    Completed Jun 26, 19:01 · about 15 hours ago
    cli
  6. Building Submitted
    P Pidgeotto
    Pidgeotto
    Model
    Duration
    37 minutes
    Tokens
    Cost
    Started Jun 26, 19:01
    Completed Jun 26, 19:38 · about 14 hours ago
    cli
  7. Submitted Blocked
    Model
    Duration
    4 minutes
    Tokens
    Cost
    Started Jun 26, 19:38
    Completed Jun 26, 19:41 · about 14 hours ago
    api
  8. Blocked Building
    P Pidgeotto
    Pidgeotto
    Model
    Duration
    24 minutes
    Tokens
    Cost
    Started Jun 26, 19:41
    Completed Jun 26, 20:05 · about 14 hours ago
    cli
  9. Building Submitted
    P Pidgeotto
    Pidgeotto
    Model
    gpt-5.5
    Duration
    22 minutes
    Tokens
    Cost
    Started Jun 26, 20:05
    Completed Jun 26, 20:27 · about 13 hours ago
    cli
  10. Submitted Reviewed
    S Steffon
    Steffon primary
    C Carl
    Carl light
    Model
    claude-opus-4-8
    Duration
    34 minutes
    Tokens
    469,164
    Cost
    ~$0.63
    Started Jun 26, 20:27
    Completed Jun 26, 21:02 · about 13 hours ago
    cli
  11. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    7 minutes
    Tokens
    3,285,354
    Cost
    ~$3.64
    Started Jun 26, 21:02
    Completed Jun 26, 21:08 · about 13 hours ago
  12. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    13 minutes
    Tokens
    3,202,332
    Cost
    ~$3.03
    Started Jun 26, 21:08
    Completed Jun 26, 21:21 · about 12 hours ago
  13. Shipped Archived
    Model
    Duration
    about 2 hours
    Tokens
    Cost
    Started Jun 26, 21:21
    Completed Jun 26, 23:28 · about 10 hours ago

Conversation

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

QA Feedback about 15 hours ago

HEAVY review (Jasper) — acceptance #1 'reports latest task blocker feedback' is non-functional against the live board. bin/session-preflight shells to 'bin/task show <slug> --json', which serializes @task.as_json — Task has no custom as_json and latest_activity is NOT a column (it is derived; deployments_broadcaster uses activities.recent.first). So the real task JSON has no latest_activity key and latest_feedback(task) always returns nil → 'Latest feedback: none' for every real task. The suite masks it: every test feeds a fabricated --file fixture with latest_activity hand-injected, so no test exercises the real --json contract. FIX: make the feedback source real — either (a) extend the task API serializer so /api/v1/tasks/:slug data includes latest_activity (mirror what bin/devops-cycle computes — most-recent activity / qa_feedback/block note), or (b) have session-preflight fetch the task's activities directly rather than reading task['latest_activity']. Then add a test exercising the REAL bin/task show --json → latest_feedback path and fix the --file fixture to match the live API contract so a green test can't mask empty feedback. Other checks (branch drift, PR/overlap, docs/stale, tiers) are sound — only the feedback data contract needs to become real.

QA Feedback about 14 hours ago

See PR #244 review comment (durable). HEAVY block: bin/session-preflight latest-feedback path is inert against the live board — bin/task show --json serializes @task.as_json which has no latest_activity key (it's derived, not a column); only the --file test fixture made it green. Make the feedback source real + add a test against the real --json contract.

Comment alex about 13 hours ago

Senior review → APPROVED (2/2). Reviewers: Steffon (devops/tooling) + Carl (rails/tests), both high confidence. Tests green: command suite (7 tests/92 assertions) + controller show/latest (4/16) + 30 focused all pass. Acceptance: all 6 met — latest-feedback now sourced from real latest_activity serializer with /api/v1/activities fallback (prior HEAVY block resolved); branch-drift, PR/checks, overlap, docs-drift, stale-terms, test-tiers all covered by deterministic command tests. Non-blocking follow-ups (do NOT gate ship): (1) overlap_report issues one gh-pr-view per candidate across up to 30 PRs serially — cap merged depth or drop merged sweep; (2) latest_activity_json orders by created_at only — add id tiebreaker for guaranteed determinism; (3) dead task.dig('devops','task_url') falls through harmlessly.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

Dev

MEDIUM

Actual

LARGE