06. Replay Dump Spec
1. Purpose
Define the execution dump contract for deterministic replay and auditability. In AIKernel.NET, deterministic means not only input equivalence but also fully fixed model/runtime conditions and compute resource conditions.
2. Scope
DumpIdKernelVersionSeedInferenceParameters(for example Temperature)LockedProviderInfo(fixed execution-model information)ComputeShape(IComputeShapeAdvisordecision)PromptArtifactHashPipelineDefinitionHashMaterialSnapshotHashSetExecutionOutcomeHashTrustDecisionKeyId
3. Normative Requirements
RDS-001Mandatory fields MUST be present.RDS-002References MUST resolve via content hashes.RDS-003Timestamps MUST be serialized in UTC ISO-8601.RDS-004Canonical key ordering MUST be used.RDS-005Freezing Non-Determinism: RuntimeSeed, inference parameters (for exampleTemperature), and compute shape selected byIComputeShapeAdvisor(arity/tensor type) MUST be fully recorded.RDS-006Semantic Snapshot Capture:Orchestration,Material, andExpressionbuffers inContextCollectionMUST be captured in ROM format with semantic hashes.RDS-007Trust Chain Inclusion:TrustDecisionfromISignatureTrustStoreand signing key identifier (KeyId) MUST be persisted.
3.1 Deterministic Replay Lock Contract
RDS-LOCK-001Replay dump MUST includeReplayContext.LockedProviderInfoas a mandatory field.RDS-LOCK-002LockedProviderInfoMUST include at leastProviderId,ModelId,QuantizationProfile, andCapacitySnapshot.RDS-LOCK-003If replay-time environment diverges fromLockedProviderInfo(for example unavailable provider), the system MUST abort in fail-closed mode.
4. Fail-Closed
RDS-F001Replay is denied on hash-chain mismatch.RDS-F002Loading is denied when mandatory fields (especiallyLockedProviderInfo) are missing.RDS-F003Abort on critical version incompatibility.RDS-F004Environment Divergence: Block execution when replay environment critically diverges from recordedLockedProviderInfo.RDS-F005Broken Hash Chain: Abort replay whenExecutionOutcomeHashdoes not match expected value derived from Prompt/Pipeline/Material hashes.
5. Acceptance Criteria
- AC1: Identical dumps reproduce identical replay outcomes.
- AC2:
LockedProviderInfoforces historical model selection without dynamic routing. - AC3: Tampered dumps or dumps missing major parameters are always rejected.
- AC4: When environment divergence is detected (for example missing model), replay halts immediately without ambiguous fallback.
6. DTO Definition
Immutable data structure for strict replay context definition.
public sealed record ReplayContext(\n string DumpId,\n LockedProviderInfo LockedProviderInfo,\n string InputHash,\n string MaterialHash,\n string PolicyHash,\n DateTime CreatedAtUtc);
7. Dump Architecture (ROM-based Structure)
Replay dump is represented as a single ROM entity.
---\nid: "dump.exec.20260504.001"\ntype: "kernel.replay_dump"\nkernel_version: "0.0.7"\nseed: 42\n---\n# Frozen Execution Environment\n* [locked_provider]: [[provider.openai.gpt4o]]\n* [quantization]: "fp16"\n* [shape_advisor]: [[advisor.npu_v1]]\n\n# Hash Integrity Chain\n* [prompt_hash]: "sha256:7f8e9a..."\n* [material_hashes]: ["sha256:e3b0c4..."]\n* [outcome_hash]: "sha256:9d8c7b..."\n\n# Frozen Buffers\n* [orchestration]: [[ref.rom.prompt_artifact]]\n* [material]: [[ref.rom.material_snapshot]]\n* [expression]: [[ref.rom.result_expression]]
8. Replay Sequence
IKernelReplayer reconstructs execution in the following sequence.
- Integrity Check
- Environment Emulation
- State Unfreezing
- Shadow Execution
Validate complete hash chain and detect tampering.
Load LockedProviderInfo and apply Force Provider Mode.
Restore ContextCollection from ROM frozen buffers.
Re-execute under frozen conditions (Seed/Model/Param) and compare with ExecutionOutcomeHash.
Changelog
- v0.0.0 / v0.0.0.0: Initial draft
- v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
Source:
specs/06.REPLAY_DUMP_SPEC.md