[Atlas] Squad findings bubble-up driver (driver #20)

← All Specs

[Atlas] Squad findings bubble-up driver (driver #20)

Task

  • ID: ecf128f4-495b-4a89-8909-3f3ba5d00aff
  • Type: recurring
  • Frequency: every-6h
  • Layer: Atlas

Goal

Wire the outputs of research squads into the global reward and credit-backprop
pipelines. Without bubble-up, squad work is a sealed pond: members do real
research but the token/credit system never sees it. This driver is the bridge
from squad_findings to agent_contributions, so v1 emit_rewards and v2
backprop_credit can pay each squad member proportionally on their next cycle.

What it does

  • Walks squad_findings rows with bubble_up_status = 'reviewed' (i.e.,
vetted by the squad's internal review).
  • For each reviewed finding:
- Inserts a row in agent_contributions per squad member, tagged
contribution_type = 'squad_finding', weighted by the member's
declared contribution share.
- Marks the squad_findings row bubble_up_status = 'merged' with a
timestamp.
  • Idempotent: a finding already in status merged is skipped.
  • Uses the squads CLI: python3 -m economics_drivers.squads.cli bubble.
  • Release as a no-op when no reviewed findings remain.

Success criteria

  • Every reviewed finding is bubbled up within one cycle (6h) of review.
  • Contribution shares sum to 1.0 per finding (no over- or under-credit).
  • On the subsequent v1 emit_rewards + v2 backprop_credit cycles, each squad
member receives tokens + dividends proportional to their share (verified
via a round-trip test).
  • Idempotency guard prevents double-merge (measurable:
COUNT(*) FROM squad_findings WHERE bubble_up_status='merged' AND merged_count>1 == 0).
  • Run log: findings scanned, findings merged, contributions written,
retries.

Quality requirements

  • No stubs: contribution weights must come from the squad's real member
records, not a uniform fallback — link to meta-quest
quest_quality_standards_spec.md.
  • When bubbling up ≥10 findings per cycle, use 3–5 parallel agents (one per
finding batch) to avoid serialising the agent_contributions writes.
  • Log total items processed + retries so we can detect busywork (re-bubbling
the same finding → idempotency bug, fix it).
  • Driver must not modify squad_findings.content; only the bubble_up_status
and merged_at fields.

File: ecf128f4-495b-4a89-8909-3f3ba5d00aff_squad_findings_bubble_up_spec.md
Modified: 2026-05-01 20:13
Size: 2.5 KB