Build a unique activity id for a turn's graph. All turns of one session share `session_id`, so keying the activity purely on `session_id` would collide across turns. We disambiguate with the explained change's base32 so each turn-activity is uniquely addressable (and `turnParent` resolution stays consistent with this scheme). The id is keyed on the GRAPH itself — ` #<first-explained-c
(graph: &ProvenanceGraph)
| 24 | /// of which of its explained changes was traced, so a child turn's `turnParent` |
| 25 | /// reference to it always matches. |
| 26 | pub fn activity_id_for(graph: &ProvenanceGraph) -> String { |
| 27 | match graph.changes_explained.first() { |
| 28 | Some(h) => format!("{}#{}", graph.session_id, h.to_base32()), |
| 29 | None => graph.session_id.clone(), |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /// Map a loaded `ProvenanceGraph` into the plain projector input. |
| 34 | /// |
no test coverage detected