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

Ralph Loop Note: Search/Replay Parity

Date: 2026-03-16 Focus: replay evaluation quality

Bottleneck

Pam’s bounded search path in research/search.py had its own decision logic copy. That makes search scores vulnerable to drifting away from the actual replay path in research/strategy.py as sleeves evolve.

Change

  1. Added resolve_params() to research/strategy.py so replay and search can share the same parameter merge behavior.
  2. Changed research/search.py to delegate candidate decisions to research.strategy.decide(..., params=...) instead of maintaining a separate rule copy.
  3. Added focused tests to lock search/strategy parity, including the test_trade path.
  4. Documented the rule in research/README.md.

Validation

Command:

PYTHONPATH=. pytest -q tests/test_research_search.py

Result:

4 passed in 0.01s

Additional smoke check confirmed identical actions from search and replay strategy for the same observation and params override.

Why This Matters

This does not create more trades by itself. It improves the trustworthiness of replay search results so future sleeve work is evaluated on the exact same decision surface used by the replay gate.