Ralph Loop Note: Confidence Hydration Refresh
Context
research/latest_state.json is Ralph’s first handoff surface, but legacy files can
carry an older confidence schema that lacks the newer replay-quality fields:
pair_eventful_metadata_sharelarge_move_pair_eventful_metadata_sharerecent_replay_rowsrecent_replay_sharerecent_pair_eventful_metadata_rowsrecent_pair_eventful_metadata_sharerecent_large_move_pair_eventful_metadata_rowsrecent_large_move_pair_eventful_metadata_share
That forced operators to infer replay-quality context from status output instead of the persisted handoff file.
Change
Updated research/status.py so status hydration also refreshes the persisted
confidence block when the stored handoff is missing those newer replay-coverage
fields. The refreshed block is built from the current replay snapshot plus the
current research-loop confidence policy.
Also documented the behavior in research/README.md.
Validation
Ran:
python3 research/status.py --json >/tmp/pam_status.json
python3 -m py_compile research/status.py research/continuous_loop.py research/candidate_review.py research/prepare_replay.py
Observed in the hydrated status payload:
confidence.pair_eventful_metadata_share = 0.0363confidence.recent_replay_rows = 0confidence.recent_replay_share = 0.0confidence.recent_pair_eventful_metadata_share = 0.0confidence.reasonsnow includespair_eventful_metadata_share<0.05
Observed after persisting the refreshed handoff:
research/latest_state.jsonnow contains the newerconfidencereplay-coverage fields instead of only the older minimal block.
Operator Impact
Ralph can now read low replay-quality causes directly from latest_state.json
without waiting for a fresh loop cycle or reconstructing the confidence gate from
status output.