src/lib/evidence/replay-fidelity.ts adds a provider-neutral, additive runtime manifest. It does not modify or replace TurnRecord v1.
Manifest boundary
Anengram.replay-runtime v2 manifest can record:
- The complete ordered model input plus separate system and developer instruction evidence.
- Model provider, deployment/model name, parameters, seed evidence, and an explicit determinism attestation.
- Tool definitions, call inputs, call outputs, ledger completeness, and whether replay executes tools or uses recorded outputs.
- Retrieval configuration, corpus version or hash, original outputs, and whether replay reruns retrieval or uses recorded outputs.
- Code version, runtime version, dependency lock hash, configuration fingerprint, and optional container identity.
- Network, filesystem, external-service, and overall side-effect isolation.
- Source trace/span identity, capture method, and provenance.
value: Engram has reconstructable JSON content.hash: Engram can verify content supplied elsewhere but cannot reconstruct it.absent: the runtime explicitly attests that the field did not exist or was not applicable.unavailable: the evidence was not captured.
Fidelity levels
analyzeReplayFidelity is deterministic and conservative:
The report contains every known gap in
missingEvidence, labeled by impact:
blocks_replayreduces_controlprevents_exactness
Replay modes
Tool and retrieval boundaries declare a replay mode instead of leaving behavior implicit:not_used: the boundary did not participate.recorded_outputs: replay injects captured outputs and does not repeat external work.execute/rerun: replay performs the operation again under the captured configuration.unknown: instrumentation did not establish the boundary behavior.