Skip to main content

recorded_time_survives_a_reopen

Function recorded_time_survives_a_reopen 

pub async fn recorded_time_survives_a_reopen<F: Fixture>(
    open: impl AsyncFn() -> F,
) -> RuleOutcome
Expand description

VT-9 — a reopen does not restamp an event’s recorded time.

The durability half of VT-9, and the half that catches the adapter VT-4’s Rejects: line describes: one that makes the value up rather than persisting it “passes every rule that reads back what it just wrote inside one process and fails the first reopen”.

It asserts only that the same event’s value is unchanged. It may not assert anything else: comparing it against another event’s, against a position, or against the harness’s own clock are all forbidden — see append_stamps_a_recorded_time for which prohibition forbids which.

LosingFixture in tests/mutation_coverage/mutants.rs is the registered mutant, and it fails at the survival anchor rather than at the closing comparison: nothing was written to a durable medium, so the reopen finds an empty one. Nothing in this workspace can yet fail the closing comparison alone — that needs a durable medium that keeps an event and loses its stamp, which is a real store rather than a fixture, and phase 8 is where the first one arrives.

§An instrument obligation this rule carries

A REOPEN fixture passes it only if its reopen restores the event’s stamps and not merely its payload. DurableFixture in tests/fixture_instruments.rs must carry SequencedEvent values on its durable side for that to be true; a durable side of Event cannot, and the replay restamps.