pam ▸ docs/generated/ralph_loop_2026-03-16_latest_state_replay_profile_refresh.md
updated 2026-03-28
Ralph Loop 2026-03-16: latest-state replay profile refresh
Why
research-status and research-discord-status were recomputing current replay
source coverage correctly, but research/latest_state.json could keep older
replay_source_profile / replay_input_profile values because hydration
preferred the stored fields over the fresh current_* snapshots.
That weakened raw handoff quality for PRD-004 operators and any consumer reading
research/latest_state.json directly.
Change
- Updated research/status.py so hydrated latest-state persistence prefers current replay profiles over stored ones.
- Marked
replay_input_profileandreplay_source_profileas refreshable during status hydration. - Added regression coverage in tests/test_research_status.py.
- Documented the new behavior in research/README.md.
Validation
pytest -q tests/test_research_status.py-14 passed in 0.13spython3 -m py_compile research/status.pypython3 main.py research-status- refreshedresearch/latest_state.jsonnow stores: -source_pairable_rows=1786-source_pairable_tickers=76-recent_source_pairable_rows=22-recent_source_pairable_tickers=13
Result
Raw latest-state consumers now see the same replay-quality diagnostics that the status commands compute, instead of staying stuck on obsolete source-pairability numbers.