Build a unique activity id for a turn's graph — the CLI's `activity_id_for` semantics: ` # ` (or just the session id when none are explained), so turnParent joins.
(graph: &atomic_core::change::ProvenanceGraph)
| 5165 | /// `activity_id_for` semantics: `<session_id>#<first-explained-change>` |
| 5166 | /// (or just the session id when none are explained), so turnParent joins. |
| 5167 | fn provenance_activity_id(graph: &atomic_core::change::ProvenanceGraph) -> String { |
| 5168 | use atomic_core::types::Base32; |
| 5169 | match graph.changes_explained.first() { |
| 5170 | Some(hash) => format!("{}#{}", graph.session_id, hash.to_base32()), |
| 5171 | None => graph.session_id.clone(), |
| 5172 | } |
| 5173 | } |
| 5174 | |
| 5175 | /// Map a loaded graph into the plain projector input — the CLI's |
| 5176 | /// `map_graph_to_input` semantics (the turn parent loads the previous |
no test coverage detected