Milestone 7 of 8

Replay the complete pipeline

Rebuild the run from source files and saved evidence and report exact agreement within the recorded compatibility boundary.

Replay tests whether the saved boundary describes a run or only resembles one. Start from the source and saved configuration, not from an old in-memory list.

Goal

Reconstruct the split and batches from the source plus saved evidence, then require exact agreement for the recorded generator implementation and a compatible runtime.

Inputs

Reload the read-only valid records, the dataset manifest, the saved configuration, the split and batch manifests, and the recorded generator and runtime information. Create a fresh generator from the recorded seed and use the same generator implementation declared by the project.

The replay must rebuild the ordered permutation, checking and working indexes, aligned groups, batches, and omitted IDs. It must not read the old generated CSV rows as its only source of truth.

Deliverables

Implement a replay function that returns structured evidence for:

  • source and schema identity;
  • exact index agreement;
  • exact group and batch agreement;
  • omitted-ID agreement;
  • the generator and runtime compatibility decision.

Record a clean replay result in the evidence report. If a file is missing, malformed, or was produced by an incompatible runtime, return a clear non-pass result rather than quietly accepting a partial replay.

Checks

Run replay twice from the same source and saved configuration. For the same recorded generator implementation and compatible runtime, all ordered indexes, IDs, batches, and omitted IDs must agree.

Use temporary copies to change the seed, one index, the batch order, and a manifest count. Each mismatch must be reported at the relevant evidence layer. Verify that replay does not mutate the source arrays or the saved files.

Do not promise byte-for-byte random results across an unrecorded or incompatible NumPy version. Report the compatibility boundary explicitly.

Workspace

Place replay orchestration in src/main.py and keep the split and batch rules in their own modules. Reuse the same source and configuration interfaces as the earlier milestones.

Hints

HintFresh input matters
If replay begins with the prior in-memory permutation, it has not tested the saved boundary.
HintSeparate mismatch locations
A source mismatch, index mismatch, batch mismatch, and runtime incompatibility are different findings. Preserve that distinction.

Review

Explain what the replay establishes: the same recorded procedure produced the same movement evidence. It does not establish that the split is suitable for a future model or that the source represents a wider population.

How to check your work

The supplied fixture replays from disk and reports the compatibility boundary before comparing ordered values. Compare its evidence structure and failure cases.