Agents Builders

Fix boundary close broadcast

Archived
fix-boundary-close-broadcast

Created

Jul 06, 02:17

Started

Jul 06, 05:10

Completed

Jul 06, 07:27

DevOps handoff

Type

Bug

Shape

backend

Worktree Slug

fix-boundary-close-broadcast

Repositories

mcritchie-studio

Release Slug

Branch

feat/fix-boundary-close-broadcast

QA URL

Production URL

ui

Acceptance Criteria

  • Boundary close fires after_update_commit live broadcast
  • Closed activity row updates live without refresh

Expected Test Plan

  • [unit] open_activity! close path broadcasts prior row
  • [integration] activities page receives close update stream

Checks Run

  • [unit] bin/rails test test/models/atomic_event_test.rb
  • [integration] bin/rails test test/services/activities_broadcaster_test.rb
  • [full-suite@caae35751934d07e988e9be439add65800ed380d] bin/rails test green
  • [rubocop@caae35751934d07e988e9be439add65800ed380d] bin/rubocop clean

Agent Context

Carl's pr-review finding on live-activities-via-websockets (PR #412, operator-merged mid-review): bin/agent-activity next closes the prior activity via AgentActivity.open_activity! using update_all, which bypasses the new after_update_commit broadcaster — the previous row stays visually open on /agents/activities and never flashes live. Fix: close via a callback-firing write (update!/each save) or broadcast explicitly. Write the failing regression test FIRST at the lowest tier. Shannon's non-blocker for context, separate concern: the stream is global, so filtered/older pages receive inserts through shared aa-activities-head target; filter-strict live views would need their own follow-up.

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 SMALL Dev SMALL Actual LARGE ≠ forecast
  1. Created Designed
    S Swinub
    Swinub
    Model
    Duration
    Tokens
    Cost
    Completed Jul 06, 02:17 · 2 days ago
    api
  2. Designed Building
    S Swinub
    Swinub
    Model
    claude-opus-4-8
    Duration
    about 3 hours
    Tokens
    2,015,620
    Cost
    ~$1.93
    Started Jul 06, 02:17
    Completed Jul 06, 05:10 · 2 days ago
    cli
  3. Building Submitted
    S Swinub
    Swinub
    Model
    claude-opus-4-8
    Duration
    9 minutes
    Tokens
    4,606,162
    Cost
    ~$3.56
    Started Jul 06, 05:10
    Completed Jul 06, 05:19 · 2 days ago
    cli
  4. Submitted Reviewed Review Activity
    S Shannon
    Shannon primary
    C Carl
    Carl light
    Model
    claude-opus-4-8
    Duration
    35 minutes
    Tokens
    Cost
    Started Jul 06, 05:19
    Completed Jul 06, 05:54 · 2 days ago
    cli
  5. Evolve
    S Swinub
    Swinub
    P Piloswine
    Piloswine
    triggered by
    S Shannon
    Shannon
    Model
    Duration
    35 minutes
    Tokens
    Cost
    Started Jul 06, 05:19
    Completed Jul 06, 05:54 · 2 days ago
  6. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    about 1 hour
    Tokens
    Cost
    Started Jul 06, 05:54
    Completed Jul 06, 07:18 · 2 days ago
  7. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    10 minutes
    Tokens
    3,509,900
    Cost
    ~$1.87
    Started Jul 06, 07:18
    Completed Jul 06, 07:27 · 2 days ago
  8. Shipped Archived
    Model
    Duration
    about 8 hours
    Tokens
    Cost
    Started Jul 06, 07:27
    Completed Jul 06, 15:43 · 2 days ago

Conversation

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

Handoff avi 2 days ago

Avi review approved; ready for Steffon's qa-release sweep.

Handoff carl 2 days ago

Avi review APPROVED (Carl primary + Jasper light); PR #418 broadcast fix ready for Steffon's qa-release sweep. Fix is correct: closed_prior_ids captured via lane.pluck(:id) BEFORE update_all (still .open), re-broadcast post-commit via where(id:).find_each on fresh rows carrying stamped closed_at/outcome — a faithful after_update_commit mirror; safe_broadcast preserved and now outside the txn. Both acceptance items met; 3 regression tests lock the bug (boundary broadcast + stamped-close-state + no-spurious-bare-open). CI green on head e0565916. NOTE for QA: recorded checks_run full-suite@caae3575/rubocop@caae3575 cert SHAs are STALE (pre-fix tree, not in branch lineage) — CI-green-on-head covers the actual guarantee, but the local cert SHA bookkeeping is inaccurate.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual

LARGE