pam ▸ docs/generated/ralph_loop_2026-03-16_search_handoff_quality.md
updated 2026-03-28
Ralph Loop 2026-03-16: Search Handoff Quality
Problem
Recent loop snapshots exposed best_search_result even when the top search candidate was worse than the persisted baseline. That made degraded search output look like progress in research/latest_state.json, research-status, and the Discord summary.
Change
- Kept raw search ranking intact inside
research/search.py. - Limited handoff-grade
best_search_resultto promotable candidates only. - Added
raw_best_search_resultplussearch_promotion_reasonso rejected search leaders remain visible for diagnostics without polluting the main handoff. - Updated status surfaces and README to reflect the distinction.
Validation
pytest -q tests/test_research_search.pypytest -q tests/test_research_status.pypython3 main.py research-status
Result
Pam now reports search output more honestly: research can still inspect the raw leader, but Ralph and human review no longer treat a baseline-worse candidate as the current best search result.