pam ▸ docs/generated/ralph_loop_2026-03-16_top_matched_research_candidate.md
updated 2026-03-28
Ralph Loop 2026-03-16: Top Matched Research Candidate
Why
PRD-003 candidate review already split matched-research blocker counts from unmatched research inventory, but the operator surfaces still only exposed a single generic top research candidate. That meant semantically valid sleeves could still be hidden whenever unmatched rows sorted above them in the research lane.
Change
- Updated
research/candidate_review.pyto persisttop_matched_research_candidatealongside the existing matched-research blocker diagnostics. - Updated
research/continuous_loop.pysocandidate_review_doneevents also carrytop_matched_research_ticker. - Updated
research/status.pyandresearch/discord_status.pyso operator summaries show a dedicated matched-research candidate line instead of forcing operators to infer it from blocker counts alone. - Added regression coverage in
tests/test_candidate_review.py,tests/test_continuous_loop.py, andtests/test_research_status.py.
Validation
pytest -q tests/test_candidate_review.py tests/test_continuous_loop.py tests/test_research_status.py-34 passed in 0.16spython3 -m py_compile research/candidate_review.py research/continuous_loop.py research/status.py research/discord_status.py- passedpython3 research/candidate_review.py --db data/unicorn.db --recent-runs 6 --max-per-state 5 | python3 -c 'import json,sys; payload=json.load(sys.stdin); print("matched_research_candidate_count=", payload.get("matched_research_candidate_count")); print("top_matched_research_candidate=", (payload.get("top_matched_research_candidate") or {}).get("ticker")); print("top_research_candidate=", ((payload.get("research_candidates") or [None])[0] or {}).get("ticker"))'-matched_research_candidate_count= 3-top_matched_research_candidate= KXBRUVSEAT-35-top_research_candidate= KXBRUVSEAT-35python3 research/status.pyandpython3 research/discord_status.py- blocked in this environment becauseruntime_config.pyimportsyamlandPyYAMLis not installed. Status/Discord formatting is covered by the focused tests above.
Outcome
Operator-facing handoffs now identify the best semantically matched research row directly, which is a cleaner PRD-003 signal when the broader research queue contains unmatched inventory noise.