Agents Builders

Block-mining insight lever

Archived
block-mining-insight-lever

Created

Jul 04, 02:56

Started

Jul 04, 05:48

Completed

Jul 04, 13:58

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

block-mining-insight-lever

Repositories

mcritchie-studio

Release Slug

Branch

feat/block-mining-insight-lever

Local URL

QA URL

Production URL

none

Acceptance Criteria

  • auto-seed a not-grade candidate from block-resolution pairs
  • tie the block feedback text as the insight lesson
  • surface seeded candidates in the pipeline awaiting grade

Expected Test Plan

  • [unit] block->candidate seeding; [integration] pipeline shows candidate

Checks Run

  • [unit] Insights::BlockMiner seeds not-candidate from resolved block; ties feedback as long_form
  • [unit] miner idempotent; skips unresolved + span-less blocks; never clobbers a graded span
  • [unit] Insights::BlockMiner skips soul-attributed reviewer spans and targets builder span
  • [unit] BlockInsightMiningJob mines + rescues to ErrorLog; resolving handoff enqueues it
  • [integration] pipeline surfaces block-mined candidate awaiting grade; banked one promotes to insights
  • [unit] bin/rails test test/services/insights/block_miner_test.rb test/jobs/block_insight_mining_job_test.rb test/integration/alex_pipeline_test.rb
  • [unit] bin/rubocop app/services/insights/block_miner.rb test/services/insights/block_miner_test.rb
  • [full-suite@6ff5e5c1cd78a6f5c7d7a0827f31956499dcc349] bin/rails test green
  • [rubocop@6ff5e5c1cd78a6f5c7d7a0827f31956499dcc349] bin/rubocop clean

Agent Context

Operator idea (memory project_blockers_as_insight_source): a QA block is a PRE-LABELED failure case. When a task goes blocked->resolved (a qa_feedback Activity then a resolves_feedback handoff), auto-create an ActionGrade candidate disposition:not tying the block feedback (as lesson/long_form) to the span(s) that caused the defect. Turns the block ledger into free labeled training data; today's #344/#347 back-and-forth is a ready first dataset. Extends the learning loop from grading spans to mining blocks.

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 LARGE Dev LARGE Actual XL ≠ forecast
  1. Created Designed
    A Arbok
    Arbok
    Model
    Duration
    Tokens
    Cost
    Completed Jul 04, 02:56 · 4 days ago
    api
  2. Designed Building
    A Arbok
    Arbok
    Model
    claude-opus-4-8
    Duration
    8 minutes
    Tokens
    9,910,660
    Cost
    ~$8.07
    Started Jul 04, 02:56
    Completed Jul 04, 03:05 · 4 days ago
    cli
  3. Building Submitted
    A Arbok
    Arbok
    Model
    claude-opus-4-8
    Duration
    16 minutes
    Tokens
    Cost
    Started Jul 04, 03:05
    Completed Jul 04, 03:21 · 4 days ago
    cli
  4. Submitted Blocked
    A Avi
    Avi
    Model
    claude-fable-5
    Duration
    31 minutes
    Tokens
    4,152,710
    Cost
    ~$9.48
    Started Jul 04, 03:21
    Completed Jul 04, 03:52 · 4 days ago
    cli
  5. Blocked Submitted
    A Arbok
    Arbok
    Model
    claude-opus-4-8
    Duration
    about 1 hour
    Tokens
    47,527,740
    Cost
    ~$35.12
    Started Jul 04, 03:52
    Completed Jul 04, 04:45 · 4 days ago
    cli
  6. Submitted Blocked
    A Avi
    Avi
    Model
    gpt-5.5
    Duration
    about 1 hour
    Tokens
    3,041,017
    Cost
    ~$2.13
    Started Jul 04, 04:45
    Completed Jul 04, 05:32 · 4 days ago
    cli
  7. Blocked Building
    R Rapidash
    Rapidash
    Model
    gpt-5.5
    Duration
    16 minutes
    Tokens
    3,969,715
    Cost
    ~$3.10
    Started Jul 04, 05:32
    Completed Jul 04, 05:48 · 4 days ago
    cli
  8. Building Submitted
    R Rapidash
    Rapidash
    Model
    gpt-5.5
    Duration
    20 minutes
    Tokens
    7,401,031
    Cost
    ~$5.16
    Started Jul 04, 05:48
    Completed Jul 04, 06:08 · 4 days ago
    cli
  9. Submitted Reviewed Review Activity
    A Alex
    Alex primary
    S Shannon
    Shannon light
    Model
    gpt-5.5
    Duration
    about 7 hours
    Tokens
    1,472,690
    Cost
    ~$0.96
    Started Jul 04, 06:08
    Completed Jul 04, 13:27 · 4 days ago
    cli
  10. Reviewed Assembled
    S Steffon
    Steffon
    Model
    gpt-5.5
    Duration
    20 minutes
    Tokens
    Cost
    Started Jul 04, 13:27
    Completed Jul 04, 13:47 · 4 days ago
  11. Assembled Shipped
    A Avi
    Avi
    Model
    gpt-5.5
    Duration
    11 minutes
    Tokens
    3,285,208
    Cost
    ~$2.02
    Started Jul 04, 13:47
    Completed Jul 04, 13:58 · 4 days ago
  12. Shipped Archived
    Model
    Duration
    about 7 hours
    Tokens
    Cost
    Started Jul 04, 13:58
    Completed Jul 04, 20:46 · 4 days ago

Conversation

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

QA Feedback avi 4 days ago

Content review PASSES (Alex primary + Shannon light both approve the code) — this block is purely mechanical: PR #356 is CONFLICTING against origin/release. Sibling PR #357 merged migration 20260704024843 (key_method/summary on atomics) mid-sweep, colliding with your db/schema.rb version-line bump to 20260704030600. git merge-tree confirms db/schema.rb is the ONLY conflicting file. Rework: (1) rebase feat/block-mining-insight-lever onto origin/release; (2) resolve db/schema.rb keeping BOTH migrations' hunks, version = 2026_07_04_030600; (3) re-cert — rebase invalidates the 441d4e8032b3 fingerprint, so re-run bin/full-suite-check AND bin/dor-check back-to-back from the worktree; (4) push, then move back to submitted WITH a bin/task note --resolves-feedback. Also recommended in the same pass: set devops post_deploy_cmd to backfill the existing block ledger (bin/rails runner 'BlockInsightMiningJob.perform_now') — agent-context names the pre-existing 344/347 blocks as the ready first dataset, but they resolved pre-deploy so the after_create_commit trigger will never mine them; backfills ride post_deploy_cmd, not manual steps. Non-blocking polish if touching the view anyway: .pl-cands .pl-row edge cells double-border 1px against the section border; :source_activity in the controller includes is dead preloading (view reads only the slug column).

Handoff 4 days ago

Mechanical rebase onto current release (ec7176b9); resolved the only conflict (db/schema.rb) keeping both #357's key_method/summary hunks AND this PR's source_activity_slug column, version 2026_07_04_030600. Re-cert at 1c4b09846e21. Code unchanged (content review already passed).

Comment shannon 4 days ago

Scout report: request-changes - Light review found green CI and clean merge mechanics, but block mining can attach a seeded NOT candidate to the QA reviewer span that posts the block instead of the builder span. Reporter: shannon Outcome: request-changes Findings: - Blocker: Insights::BlockMiner#target_span_for selects the newest ungraded AtomicEvent on the task opened before qa_feedback. In normal review, the reviewer opens a task-attributed Verify span before bin/task block creates qa_feedback, so the mined candidate can target the reviewer/blocking span rather than the span that caused the defect. Exclude reviewer/review-stage spans or bound selection to builder/pre-submission spans, and add regression coverage. Questions: - none Checks: - Read task metadata, PR body, diff, tests, CI, and merge safety. GitHub CI is green on head 284455b: scan_ruby, scan_js, lint, test. gh reports mergeable CLEAN; git diff --check is clean; merge-tree against origin/release is clean.

Comment alex 4 days ago

Scout report: merge-ready - Primary review found PR #356 merge-ready: block mining seeds idempotent Alex not candidates from resolved QA feedback/handoff pairs, preserves feedback as long_form, and surfaces pending candidates in the Alex pipeline. Reporter: alex Outcome: merge-ready Findings: - Blockers: none. - Non-blocker: the pipeline candidate link targets the existing span feedback partial; the page surfaces candidates as required, but a future polish pass could mount the drawer host if one-click grading from the pipeline is desired. Questions: - none Checks: - Read AGENTS.md, README, ECOSYSTEM, devops-cycle §1.4, heartbeats, and PR review SOP; Avi HEARTBEAT.md is absent in this checkout. - PR #356 targets release, is non-draft, mergeable, and GitHub CI passes scan_ruby, scan_js, lint, and test on head 284455b4. - bin/dor-check block-mining-insight-lever passes from the feature worktree with unit/integration tiers and certified full-suite/rubocop evidence at fingerprint 1c4b09846e21. - Focused local test passed under Ruby 3.3: bin/rails test test/services/insights/block_miner_test.rb test/jobs/block_insight_mining_job_test.rb test/integration/alex_pipeline_test.rb (20 runs, 67 assertions). - qa-intake reports PR #356 merge=CLEAN; open release PRs #361 and #363 do not overlap the changed implementation files.

QA Feedback avi 4 days ago

Avi Heartbeat blocked review: alex: merge-ready - Primary review found PR #356 merge-ready: block mining seeds idempotent Alex not candidates from resolved QA feedback/handoff pairs, preserves feedback as long_form, and surfaces pending candidates in the Alex pipeline.; shannon: request-changes - Light review found green CI and clean merge mechanics, but block mining can attach a seeded NOT candidate to the QA reviewer span that posts the block instead of the builder span.

Handoff 4 days ago

Resolved QA feedback: BlockMiner now targets only base-mascot builder spans (agent nil/blank), so a reviewer Verify span opened before qa_feedback is skipped. Added regression coverage for reviewer span vs builder span attribution; focused tests, rubocop, full-suite-check, and dor-check pass.

Comment shannon 4 days ago

Scout report: merge-ready - No blockers found after post-resolution review; PR #356 is ready for Avi to advance. Reporter: shannon Outcome: merge-ready Findings: - No blockers: the current diff seeds idempotent Alex NOT candidates from resolved qa_feedback/handoff pairs, preserves feedback as long_form, and surfaces pending block-mined candidates in the pipeline. - The earlier reviewer-span blocker is addressed: target selection now excludes soul-attributed reviewer spans and the focused suite covers the regression. - Merge safety is clean: PR targets release, is non-draft and mergeable; merge-tree against origin/release succeeds. Only open overlap is db/schema with draft/conflicting migration PRs, not implementation files. - Non-blocker metadata note: the task still shows requires_migration=false despite a schema migration; DoR passes because post_deploy_cmd=none is declared for a schema-only migration. Questions: - none Checks: - Read AGENTS.md, README, RUNBOOK, ECOSYSTEM, PR review SOP, parallel DevOps, task-board, testing, and exclusive-lanes docs. - Reviewed task metadata, PR body, prior scout reports, changed files, migration, service/job/model/controller/view code, tests, CI, and merge safety. - Local focused tests passed with Ruby 3.3 PATH: bin/rails test test/services/insights/block_miner_test.rb test/jobs/block_insight_mining_job_test.rb test/integration/alex_pipeline_test.rb (21 runs, 69 assertions). - bin/dor-check block-mining-insight-lever passed; gh pr checks 356 all pass; git diff --check clean; git merge-tree --write-tree origin/release HEAD succeeded.

Comment alex 4 days ago

Scout report: merge-ready - Primary review found no blockers; PR #356 meets the block-mining acceptance criteria and is ready for Avi to advance. Reporter: alex Outcome: merge-ready Findings: - Blockers: none. - Acceptance met: Insights::BlockMiner seeds idempotent Alex NOT candidates from resolved qa_feedback/handoff pairs, preserves the block feedback as long_form, and the pipeline lists pending block-mined candidates awaiting curation. - Prior reviewer-span blocker is fixed: target selection now excludes soul-attributed reviewer spans and the regression is covered by focused tests. - Non-blocker: open PR overlap is limited to db/schema.rb from independent migrations (#370/#371); this PR is currently clean against release and implementation files do not overlap. - Non-blocker: the pipeline candidate grade link points at the existing span feedback partial; surfacing is present, while one-click drawer mounting from the pipeline can be future polish. Questions: - none Checks: - Read AGENTS.md, README.md, RUNBOOK.md, ECOSYSTEM.md, Avi PR review SOP, modular PR review SOP, testing docs, and insight-bank docs. - Reviewed task metadata, PR body, changed files, migration, service/job/model/controller/view code, tests, CI, prior scout reports, and merge safety. - GitHub PR #356 targets release, is non-draft, mergeStateStatus=CLEAN, and scan_ruby, scan_js, lint, and test all pass on head 80f38086. - Feature worktree is clean at 80f38086; bin/dor-check block-mining-insight-lever passes with full-suite/rubocop evidence at tree fingerprint 6ff5e5c1cd78. - Focused local verification passed with Ruby 3.3 PATH: Rails tests 21 runs, 69 assertions, 0 failures; focused rubocop inspected 2 files with no offenses. - git diff --check is clean; git merge-tree --write-tree origin/release HEAD succeeds.

Handoff avi 4 days ago

Avi Heartbeat moved block-mining-insight-lever to reviewed after alex + shannon reported merge-ready. Left for Steffon QA. Reports: - alex: merge-ready - Primary review found no blockers; PR #356 meets the block-mining acceptance criteria and is ready for Avi to advance. - shannon: merge-ready - No blockers found after post-resolution review; PR #356 is ready for Avi to advance.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

LARGE

Dev

LARGE

Actual

XL