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

Ralph Loop 2026-03-16: Candidate Review Packet

Change

Added a bounded live candidate-review packet for PRD 003 so the loop now explains current near-miss and deployable rows instead of only reporting aggregate replay/search scores.

Files: - research/candidate_review.py - research/continuous_loop.py - research/status.py - research/discord_status.py - research/README.md

Why

research/latest_state.json and the status commands were still weak at answering:

  1. Which current rows are closest to a trade?
  2. Which sleeve would own them?
  3. Why are near misses blocked?

That made “no trade” opaque even when the current scan already contained sleeve-qualified rows.

Result

The new packet:

  1. loads the latest scan rows from the last 6 runs
  2. classifies each row as research_candidate, review_candidate, or deployable_trade
  3. records the closest sleeve family plus explicit invalidation reasons
  4. exposes top blockers and top candidates in status output

Focused smoke output on current data:

Validation

Commands run:

python3 -m py_compile research/candidate_review.py research/continuous_loop.py research/status.py research/discord_status.py research/strategy.py research/search.py
python3 research/candidate_review.py --db data/unicorn.db --recent-runs 6 --max-per-state 3
python3 research/status.py
python3 research/discord_status.py

Observed behavior:

  1. All updated modules compiled.
  2. The candidate-review helper produced structured deployable, review, and research packets.
  3. Human and Discord summaries now surface the candidate-review counts and top invalidation reasons.

Next bottleneck

The packet showed that the current live scan has deployable politics-midprice rows while the stored loop snapshot still reports zero actions. The next bounded change should tighten freshness/handoff semantics so latest_state.json cannot mask currently deployable rows behind stale replay state.