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

  1. Updated research/status.py so hydrated latest-state persistence prefers current replay profiles over stored ones.
  2. Marked replay_input_profile and replay_source_profile as refreshable during status hydration.
  3. Added regression coverage in tests/test_research_status.py.
  4. Documented the new behavior in research/README.md.

Validation

  1. pytest -q tests/test_research_status.py - 14 passed in 0.13s
  2. python3 -m py_compile research/status.py
  3. python3 main.py research-status - refreshed research/latest_state.json now 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.