pam ▸ docs/generated/ralph_loop_2026-03-16_status_freshness.md
updated 2026-03-28

Ralph Loop 2026-03-16: Status Freshness Check

Change

Bounded PRD 004 / replay-evaluation quality fix:

  1. research/status.py now augments research/latest_state.json with a current persisted-baseline replay snapshot computed from research/replay_rows.jsonl
  2. research/discord_status.py shows the same current replay snapshot and a stale note when the saved loop state differs from current replay rows
  3. focused status tests pin the stale-state behavior

Why

The operator-facing status was reporting a stale zero-action loop snapshot even though the current persisted strategy replays to non-zero actions on the local replay rows. That made it too easy to optimize against old loop state instead of the current research surface.

Validation

Tests

Command:

pytest -q tests/test_research_search.py tests/test_research_status.py

Result:

11 passed in 0.50s

Status smoke

Command:

python3 main.py research-status

Result excerpt:

- current persisted replay: rows=1280 score=0.0193 hit_rate=0.0139 actions=72 tickers=3
- notes: latest_state_differs_from_current_replay_rows

Discord status smoke

Command:

python3 main.py research-discord-status

Result excerpt:

Current persisted replay: rows=1280 score=0.0193 hit_rate=0.0139 actions=72 tickers=3
Notes: latest_state_differs_from_current_replay_rows

Files

  1. research/status.py
  2. research/discord_status.py
  3. research/README.md
  4. tests/test_research_status.py