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

Ralph Loop 2026-03-16: Candidate Review Packet Blocker Labels

Change

Bounded PRD 003 candidate-review quality fix:

  1. Updated research/candidate_review.py so per-candidate invalidation_reasons now store disabled sleeve blockers as sleeve_disabled:<sleeve_family> instead of the lossy generic sleeve_disabled.
  2. Preserved disabled-sleeve aggregate diagnostics by teaching blocker detection to treat the namespaced form as a disabled-sleeve hit.
  3. Documented the raw-packet behavior in research/README.md.
  4. Added regression coverage in tests/test_candidate_review.py.

Why

research/latest_state.json still carried generic sleeve_disabled labels inside individual review candidates even though the aggregate blocker tallies had already become sleeve-specific. That forced downstream consumers to rehydrate sleeve names with custom formatting and made the raw packet less trustworthy as a source of truth.

Validation

  1. pytest -q tests/test_candidate_review.py - 9 passed
  2. python3 -m py_compile research/candidate_review.py
  3. python3 research/candidate_review.py --db data/unicorn.db --recent-runs 6 --max-per-state 3 | rg -n 'sleeve_disabled|top_review_candidate_invalidation_reasons|review_candidates|disabled_sleeve_candidate_count' -n -C 1 - Review candidate now shows invalidation_reasons: ["sleeve_disabled:politics_midprice_reversal"] - Aggregate blocker summaries still show sleeve_disabled:politics_midprice_reversal