Japanese version: IContextSnapshot (インターフェース仕様)
IContextSnapshot (Interface Specification)
1. Responsibility Boundary
IContextSnapshot is the boundary interface that fixes a point-in-time IContextCollection with integrity metadata for auditability and deterministic replay.
- Role:
- Non-role:
Expose snapshot identity, lineage, timestamp, integrity hash, and frozen context payload.
Storage backend and serialization format are out of scope.
2. Contract Signature
namespace AIKernel.Abstractions.Context;\n\npublic interface IContextSnapshot\n{\n string SnapshotId { get; }\n string? ParentSnapshotId { get; }\n DateTimeOffset CreatedAtUtc { get; }\n string ContextHash { get; }\n IContextCollection Context { get; }\n}
3. Related Use Cases
UC-20Deterministic replay and audit trail:UC-09Execution state persistence and restore:
Reconstructs historical execution conditions from a fixed snapshot baseline.
Provides a consistent anchor for suspend/resume workflows.
4. Governance & Determinism
- Immutability:
- Integrity:
- Fail-Closed:
Snapshot content is expected to remain immutable once finalized.
ContextHash must remain consistent with the referenced Context payload.
Reject restore/replay when hash mismatch, mandatory-field loss, or prerequisite divergence is detected.
5. Implementation Notes
- Lineage tracking:
- Time normalization:
Use ParentSnapshotId to preserve traceable delta lineage.
Keep CreatedAtUtc in UTC to remove audit timeline ambiguity.
Changelog
- v0.0.0 / v0.0.0.0: Initial draft
- v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
architecture/interfaces/context/IContextSnapshot.md