feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI#2639
Draft
jucor wants to merge 1 commit into
Draft
feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI#2639jucor wants to merge 1 commit into
jucor wants to merge 1 commit into
Conversation
This was referenced Jul 18, 2026
jucor
marked this pull request as draft
July 18, 2026 13:35
This was referenced Jul 18, 2026
docs(delphi): R1-parity goal docs, journal (2026-07-18 → 07-22 s3), quirks + divergence ledger
#2626
Draft
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Delphi “replay harness” (Phase H-A) to deterministically replay exported vote streams on an explicit recompute schedule, persist per-step recordings under a local store, and compare recordings step-by-step using the existing regression comparer (with family-based reporting). This fits into the broader Delphi math-parity / schedule-inference work by providing a reproducible trace + comparison spine.
Changes:
- Introduce replay-harness core modules: dataset/types, schedule spec + slicer + presets, Python replay driver, recording store + provenance, and step comparer/reporting.
- Add a Click CLI (
scripts/replay_driver.py) to run replays and compare recordings end-to-end. - Add comprehensive unit + smoke tests covering schedule resolution/slicing, driver determinism and moderation seam guard, store layout/provenance, step comparison, and CLI behavior.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| delphi/polismath/replay/init.py | Exposes replay-harness public types and documents phase scope. |
| delphi/polismath/replay/types.py | Adds core replay dataset/event types + stable time-sort and revote marking. |
| delphi/polismath/replay/schedule.py | Implements schedule spec round-trip, cut-slot resolution, slicing, moderation interleave, and presets. |
| delphi/polismath/replay/driver.py | Implements deterministic fold over scheduled vote batches, producing per-step records. |
| delphi/polismath/replay/real_data.py | Adds loader for exported real-data vote CSVs into a ReplayDataset. |
| delphi/polismath/replay/store.py | Implements on-disk recording layout, provenance capture, and numpy-aware JSON writing/loading. |
| delphi/polismath/replay/stepcompare.py | Wraps existing regression comparer to diff step blobs and format reports. |
| delphi/scripts/replay_driver.py | Adds CLI to run replays, store recordings, and compare two recordings. |
| delphi/tests/replay_harness/init.py | Introduces replay_harness test package. |
| delphi/tests/replay_harness/test_schedule.py | Tests cut resolution, slicing invariants, presets, moderation interleave, and JSON round-trip. |
| delphi/tests/replay_harness/test_driver.py | Tests end-to-end replay on vw, determinism guard, blob/extras completeness, and moderation-clear seam guard. |
| delphi/tests/replay_harness/test_store.py | Tests store layout, traversal rejection, provenance completeness, numpy JSON round-trip, and stale step cleanup. |
| delphi/tests/replay_harness/test_stepcompare.py | Tests divergence classification and directory-vs-directory compare behavior. |
| delphi/tests/replay_harness/test_cli.py | CLI smoke tests for run/compare and preset dataset single-load behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jucor
force-pushed
the
spr/edge/970c79cf
branch
2 times, most recently
from
July 21, 2026 19:49
b4c926a to
9c8853a
Compare
…r, store, step comparer, CLI commit-id:2324207e
This was referenced Jul 22, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commit-id:2324207e
Stack: