Expand description
The .replay failure artifact.
A failing run emits a self-contained, human-diffable JSON bundle — seed + full
schedule trace + embedded source + input transcript + failure coordinate — that
reproduces the execution byte-for-byte on any machine. Consumed by
largo replay --verify, largo debug, the DAP adapter, and the Studio; a
bundle committed under tests/replays/ is a permanent regression.
The bundle carries its OWN wire representation of scheduling choices
(TraceChoice) rather than the runtime’s ChoicePoint, so the artifact
format outlives internal enum shape.
Structs§
- Cursor
- The causal cursor (§0.4):
(epoch, task, seq). Wave 1 stampsepoch(the count of recorded scheduling decisions at failure) andtask; the per-task eventseqstarts moving when the observation channel lands (Wave 7). - Failure
- Why this artifact exists: the reproduced-or-it-didn’t-happen record.
- Failure
Span - The failing sentence’s source coordinates, when the failing tier carries spans.
- Replay
Bundle - The
.replaybundle (constitution §0.5). - Schedule
- The schedule: the seed alone regenerates the trace while the source is unchanged; the full trace makes drift detectable and carries explored schedules that no seed generates.
- Source
Section - The embedded program: content hash + entry name + every source file, so the bundle opens anywhere, forever.
- Stdin
Read - One recorded stdin read, cursor-stamped.
- Trace
Choice - One recorded scheduling decision (wire form of the runtime’s
ChoicePoint). - Transcript
- Everything that crossed the world boundary.
Enums§
- Failure
Kind - Why the artifact exists.
replay_lock.rsholds a no-wildcard corpus over every variant — adding a kind without a corpus entry fails the build there. - Verify
- The verdict of re-executing a bundle.
Constants§
- REPLAY_
FORMAT - Bundle format version. Bumping it requires a decision-record amendment in the
constitution and a new golden in
replay_lock.rs.
Functions§
- capture_
failure - Run
source(entry file namedentry) underseedwithargs; if the run fails, capture the complete artifact.Nonewhen the program succeeds — recording costs nothing until the moment of failure (D0.4). - verify
- Re-execute the bundle from its embedded source under its recorded seed and check the failure reproduces byte-identically. Drift is DETECTED and named, never silently misreplayed.