Emit the fork-derivation triple: child session `prov:wasDerivedFrom` parent session, with the fork boundary in edge metadata. Public because the fork boundary is decided at the repository layer (`Repository::fork_session`); the turn/session emission stays internal to the index paths.
(
&mut self,
child_session_id: &str,
parent_session_id: &str,
fork_turn: u32,
parent_manifest: &Hash,
)
| 446 | /// (`Repository::fork_session`); the turn/session emission stays internal |
| 447 | /// to the index paths. |
| 448 | pub fn emit_session_fork_kg( |
| 449 | &mut self, |
| 450 | child_session_id: &str, |
| 451 | parent_session_id: &str, |
| 452 | fork_turn: u32, |
| 453 | parent_manifest: &Hash, |
| 454 | ) -> PristineResult<()> { |
| 455 | self.upsert_kg_edge( |
| 456 | &KgEdge::new( |
| 457 | session_node_id(child_session_id), |
| 458 | session_node_id(parent_session_id), |
| 459 | predicate::WAS_DERIVED_FROM, |
| 460 | ) |
| 461 | .with_metadata(serde_json::json!({ |
| 462 | "fork_turn": fork_turn, |
| 463 | "parent_manifest": parent_manifest.to_base32(), |
| 464 | })), |
| 465 | ) |
| 466 | } |
| 467 | } |
no test coverage detected