pub struct ContextCheckpointV2 {
pub schema_version: u32,
pub identity: ContextCheckpointIdentityV1,
pub lineage: ContextCheckpointLineageV2,
pub live_state: ContextCheckpointLiveStateV1,
pub carrier: Option<ContextCheckpointCarrierBindingV1>,
pub engine_version: SemanticVersion,
pub created_at: UtcTimestamp,
pub updated_at: UtcTimestamp,
pub encryption_metadata: Option<ContextCheckpointEncryptionMetadataV1>,
}Expand description
Canonical checkpoint contract carrying authoritative artifact lineage.
V2 is intentionally a separate type and schema. V1 readers therefore reject V2 bytes instead of silently discarding the artifact references that make a checkpoint auditable.
Fields§
§schema_version: u32§identity: ContextCheckpointIdentityV1§lineage: ContextCheckpointLineageV2§live_state: ContextCheckpointLiveStateV1§carrier: Option<ContextCheckpointCarrierBindingV1>§engine_version: SemanticVersion§created_at: UtcTimestamp§updated_at: UtcTimestamp§encryption_metadata: Option<ContextCheckpointEncryptionMetadataV1>Implementations§
Source§impl ContextCheckpointV2
impl ContextCheckpointV2
Sourcepub const SCHEMA_VERSION: u32 = 2
pub const SCHEMA_VERSION: u32 = 2
Schema version represented by this type.
Sourcepub const SCHEMA_ID: &'static str = CONTEXT_CHECKPOINT_V2_SCHEMA_ID
pub const SCHEMA_ID: &'static str = CONTEXT_CHECKPOINT_V2_SCHEMA_ID
Schema identity represented by this type.
Sourcepub fn from_v1_unverified(
checkpoint: ContextCheckpointV1,
artifact_lineage: ContextCheckpointArtifactLineageV1,
) -> Result<Self, ValidationError>
pub fn from_v1_unverified( checkpoint: ContextCheckpointV1, artifact_lineage: ContextCheckpointArtifactLineageV1, ) -> Result<Self, ValidationError>
Attach structurally validated but unverified artifact refs to a V1 checkpoint.
This wire-level operation does not prove that the supplied digests belong
to authoritative task, plan, or receipt documents and therefore does not
expose a signing payload. Production callers must use the core
build_checkpoint_v2 boundary, which verifies those owners first.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate every V2 invariant, including all V1 live-state bindings.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
Return canonical compact JSON bytes with lexicographically sorted keys.
Sourcepub fn canonical_json(&self) -> Result<String, ValidationError>
pub fn canonical_json(&self) -> Result<String, ValidationError>
Return canonical JSON text.
Sourcepub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, ValidationError>
pub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, ValidationError>
Decode exactly canonical V2 JSON and validate every invariant.
Sourcepub fn digest(&self) -> Result<Sha256Digest, ValidationError>
pub fn digest(&self) -> Result<Sha256Digest, ValidationError>
Domain-separated content identity of the complete V2 checkpoint.
Sourcepub fn digest_inputs(
&self,
) -> Result<ContextCheckpointDigestInputsV1, ValidationError>
pub fn digest_inputs( &self, ) -> Result<ContextCheckpointDigestInputsV1, ValidationError>
Domain-separated digest inputs, including the V2 artifact lineage.