Skip to content

Normalize probe markers in replay snapshot instruction rows#16

Merged
mfwolffe merged 1 commit into
trunkfrom
fix/replay-probe-markers
May 3, 2026
Merged

Normalize probe markers in replay snapshot instruction rows#16
mfwolffe merged 1 commit into
trunkfrom
fix/replay-probe-markers

Conversation

@espadonne
Copy link
Copy Markdown
Contributor

Summary

  • _snapshot_to_rows calls parse_instruction_body on replay snapshots, but never strips ### Q !probe headers — instruction sections that use probe markers (a documented feature in dlm.eval.probes) round-trip through replay as parse errors and silently drop their training rows
  • Wrap the snapshot body in _normalize_probe_markers before parsing, mirroring the pattern already in data.sections_to_rows._section_to_rows and preference.mine._extract_prompts
  • Adds a regression test in tests/unit/replay/test_store.py exercising a ### Q !probe snapshot through sample_rows

Test plan

  • pytest tests/unit/replay/test_store.py — 14 passed
  • mypy --strict src/dlm/replay/ — clean

@mfwolffe mfwolffe merged commit 55e4126 into trunk May 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants