pam ▸ docs/generated/ralph_loop_2026-03-16_unmatched_candidate_state_categories.md
updated 2026-03-28
Ralph Loop: Unmatched Candidate State Categories
Why
The live candidate-review packet already exposed unmatched semantic blockers and a global unmatched category tally, but it still hid whether uncovered inventory was clogging review_candidate or only the broader research_candidate queue.
Change
Added state-split unmatched semantic category diagnostics:
top_unmatched_review_candidate_categoriestop_unmatched_research_candidate_categories
These now flow through:
research/candidate_review.pyresearch/continuous_loop.pyresearch/status.pyresearch/discord_status.pyresearch/README.md
Validation
Focused tests:
pytest -q tests/test_candidate_review.py tests/test_continuous_loop.py tests/test_research_status.py
Result:
32 passed in 0.23s
Live smoke:
python3 - <<'PY'
from research.candidate_review import build_live_candidate_review
from research.continuous_loop import _resolve_db_path
import json
review = build_live_candidate_review(_resolve_db_path({}), recent_runs=6, max_per_state=3, deployment_gate_ready=False, deployment_gate_reasons=[])
print(json.dumps({
'counts_by_state': review.get('counts_by_state'),
'unmatched_semantic_sleeve_count': review.get('unmatched_semantic_sleeve_count'),
'top_unmatched_semantic_categories': review.get('top_unmatched_semantic_categories'),
'top_unmatched_review_candidate_categories': review.get('top_unmatched_review_candidate_categories'),
'top_unmatched_research_candidate_categories': review.get('top_unmatched_research_candidate_categories'),
}, indent=2))
PY
Observed current state:
counts_by_state = {"research_candidate": 18}unmatched_semantic_sleeve_count = 15top_unmatched_review_candidate_categories = []top_unmatched_research_candidate_categoriesis dominated byScience and Technology=4,World=3,Companies=3,Economics=3,Politics=2
Outcome
Ralph can now distinguish “uncovered categories are blocking live review” from “uncovered categories only exist in the broader research queue,” which is a tighter candidate-review quality diagnostic than the previous global unmatched tally alone.