Created
Jul 07, 02:39
Started
Jul 07, 04:14
Completed
Jul 07, 06:03
DevOps handoff
Type
Bug
Shape
ui+db
Worktree Slug
fix-review-activity-attribution
Repositories
mcritchie-studio
Release Slug
—
Branch
feat/fix-review-activity-attribution
Acceptance Criteria
Expected Test Plan
Checks Run
Agent Context
Fix the /agents/activities pr-review observability bugs found during QA: placeholder usage values appear on subagent and in-progress rows because parent-session transcript diffs are reused where no owned close-diff exists, and the review tree renders session -> experts without materializing Avi as an intermediate supervisor attribution. Start by inspecting stored AgentActivity token/cost fields to distinguish capture/storage from view rendering. Build the triple-stack avatar model for activity rows and the two-avatar action stack for actions.
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.
Conversation
QA review feedback, agent handoffs, and follow-up notes for this task.
Scout report: request-changes - Light review found a usage-capture blocker in same-session reviewer fanout. Reporter: shannon Outcome: request-changes Findings: - BLOCKER: bin/atomic-event reads/writes one open-activity marker per session (bin/atomic-event:149,191,602-605) while the server close path targets a lane by --agent (app/models/agent_activity.rb:192-209). A sibling reviewer start can overwrite/clear another lane's usage baseline (bin/atomic-event:170-172,205-206), so same-session fanout can stamp wrong or missing measured activity usage. Questions: - none Checks: - Read AGENTS, README, RUNBOOK, pr-review-light SOP, Shannon role, activity/atomic docs, PR metadata/diff, changed files/tests; CI green and merge-tree clean; no gates rerun by light.
Scout report: merge-ready - No blockers found; measured usage and supervisor attribution match acceptance with green gates. Reporter: carl Outcome: merge-ready Findings: - Measured AgentActivity usage persists on close/boundary and activity rows no longer fall back to parent action usage. - Supervisor, expert, and session avatar stacks render through preloaded helper data; action rows preserve the expert-supervisor stack. - Merge safety is clean against release; only draft heartbeat-span-polish has future heartbeat view/test overlap and should rebase after this PR if it moves later. Questions: - none Checks: - bin/dor-check fix-review-activity-attribution --gate merge --json ready=true, CI green, full-suite/rubocop fresh - GitHub CI at 60a27d8: lint, scan_js, scan_ruby, test passed - Focused local Rails suite: 261 runs, 1095 assertions, 0 failures after clean test DB prepare - bin/rails tailwindcss:build passed - E2E_PORT=3018 npx playwright test e2e/agents_activities_live.spec.js passed on rerun, including attribution usage test
pr-review blocked review: carl: merge-ready - No blockers found; measured usage and supervisor attribution match acceptance with green gates.; shannon: request-changes - Light review found a usage-capture blocker in same-session reviewer fanout.
Resolved Shannon's same-session reviewer-fanout usage blocker: bin/atomic-event usage baseline is now lane-aware (per agent lane, not the single session marker), and a window shared by concurrent lanes reports BLANK usage (measured_usage? false) instead of a double-counted value — honors the PR's no-fake-measured-usage principle; separate subagent sessions still measure normally. New [unit] regression test_unit_concurrent_same_session_lanes_report_blank_usage proves both concurrent lanes blank while the sole-lane test still measures (no over-blanking). full-suite green @651b15fc, rubocop clean, CI 4/4 green. Carl's merge-ready core (measured usage + supervisor attribution) unchanged.
pr-review (delta re-review) APPROVED. Carl (primary) MERGE-READY: traced 5 lenses on commit db03b31f — no over-blanking on sequential same-lane (clear-before-seed), fresh concurrent lane clobbers nothing (lane_open_activity nil + present? no-op), backward-compat on legacy bare-totals entries, blast radius contained (.open-activity action marker + hook untouched), regression valid; 52 runs 0F. Shannon (light) RESOLVED: her same-session-fanout blocker killed — blank flows through measured_usage? gate to em-dash render (_activity_row.html.erb:72-74), no view change needed; 108 runs 0F. FOLLOW-UP (non-blocking, pre-existing, future ticket): finish clears the single action-attribution marker unconditionally, so the first of two concurrent lanes ending orphans in-gap actions to 'Unlabeled' — lane-blind ACTION marker, out of scope for this usage fix. Advancing to reviewed.
Sealed-bid sizing
Edit →Alex (PM)
—
Avi (PO)
—
Dev
MEDIUM
Actual
XL
We emailed a one-tap sign-in link to . It expires shortly and can only be used once.
No email? Check spam, or close this and try again.