| 258 | } |
| 259 | |
| 260 | fn checkpoint_source_domain(source: &CheckpointSource) -> ProvenanceCheckpointSource { |
| 261 | ProvenanceCheckpointSource { |
| 262 | agent_name: source.agent_name.clone(), |
| 263 | agent_display_name: source.agent_display_name.clone(), |
| 264 | agent_vendor: source.agent_vendor.clone(), |
| 265 | change_hashes: source |
| 266 | .change_hashes |
| 267 | .iter() |
| 268 | .filter_map(|hash| hash.value.clone().try_into().ok()) |
| 269 | .map(Hash::from_bytes) |
| 270 | .collect(), |
| 271 | previous_provenance: source |
| 272 | .previous_provenance |
| 273 | .as_ref() |
| 274 | .and_then(|hash| hash.value.clone().try_into().ok().map(Hash::from_bytes)), |
| 275 | plan_id: source.plan_id.clone(), |
| 276 | ledger_turn_number: source.ledger_turn_number, |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | /// The wire SessionTurn carries only the identity pair; the domain bind |
| 281 | /// requires the full stored turn shape. Enrich from the prepared |