pam ▸ docs/generated/ralph_loop_2026-03-16_recent_source_pairability.md
updated 2026-03-28

Ralph Loop Note

PRD focus: PRD 001 / PRD 004 data-quality observability.

Pam already exposed whether recent journal rows carried eventful metadata, but that still left a blind spot: low replay pair coverage could come from legacy rows, or from recent scans not revisiting the same tickers enough to form pairs.

This loop adds repeat-ticker pairability metrics to raw source summaries:

  1. source_pairable_tickers
  2. source_pairable_rows
  3. recent_source_pairable_tickers
  4. recent_source_pairable_rows

Those metrics now flow through:

  1. research.prepare_replay.summarize_source_rows
  2. replay_prepare_done event payloads
  3. status and Discord summaries

Validation:

  1. pytest tests/test_prepare_replay.py tests/test_continuous_loop.py tests/test_research_status.py
  2. python3 research/prepare_replay.py --db data/unicorn.db --out /tmp/pam_recent_source_pairability_replay_rows.jsonl

Why this matters:

  1. Ralph can now distinguish “recent source metadata exists but no repeat observations yet” from “metadata persistence is still broken”.
  2. That keeps future loop work aimed at the right bottleneck instead of over-attributing weak pair coverage to eventful scoring alone.