Skip to content

feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI#2639

Draft
jucor wants to merge 1 commit into
spr/edge/970c79cffrom
spr/edge/2324207e
Draft

feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI#2639
jucor wants to merge 1 commit into
spr/edge/970c79cffrom
spr/edge/2324207e

Conversation

@jucor

@jucor jucor commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

commit-id:2324207e


Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

@jucor
jucor marked this pull request as draft July 18, 2026 13:35
@jucor
jucor requested a review from Copilot July 21, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread delphi/polismath/replay/store.py
Comment thread delphi/polismath/replay/stepcompare.py
Comment thread delphi/scripts/replay_driver.py
@jucor
jucor force-pushed the spr/edge/2324207e branch from 68467f1 to 03e584f Compare July 21, 2026 11:11
@jucor
jucor force-pushed the spr/edge/970c79cf branch 2 times, most recently from b4c926a to 9c8853a Compare July 21, 2026 19:49
@jucor
jucor force-pushed the spr/edge/2324207e branch from 03e584f to 52cb1d3 Compare July 21, 2026 19:49
…r, store, step comparer, CLI

commit-id:2324207e
@jucor
jucor force-pushed the spr/edge/2324207e branch from 52cb1d3 to acaddd8 Compare July 21, 2026 20:08
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/970c79cf to edge July 22, 2026 00:51
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/970c79cf to edge July 22, 2026 03:54
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/970c79cf July 22, 2026 03:54
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/970c79cf to edge July 22, 2026 06:16
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/970c79cf July 22, 2026 06:16
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/970c79cf to edge July 22, 2026 06:50
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/970c79cf July 22, 2026 06:50
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/970c79cf to edge July 22, 2026 08:11
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/970c79cf July 22, 2026 08:11
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/970c79cf to edge July 22, 2026 09:58
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/970c79cf July 22, 2026 09:58
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/970c79cf to edge July 22, 2026 11:21
@jucor jucor changed the title feat(delphi): replay harness H-A — schedule spec+slicer, Python drive… feat(delphi): replay harness H-A — schedule spec+slicer, Python driver, store, step comparer, CLI Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/970c79cf July 22, 2026 11:21
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