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)
| 5217 | /// `activity_id_for` semantics: `<session_id>#<first-explained-change>` |
| 5218 | /// (or just the session id when none are explained), so turnParent joins. |
| 5219 | fn provenance_activity_id(graph: &atomic_core::change::ProvenanceGraph) -> String { |
| 5220 | use atomic_core::types::Base32; |
| 5221 | match graph.changes_explained.first() { |
| 5222 | Some(hash) => format!("{}#{}", graph.session_id, hash.to_base32()), |
| 5223 | None => graph.session_id.clone(), |
| 5224 | } |
| 5225 | } |
| 5226 | |
| 5227 | /// Map a loaded graph into the plain projector input — the CLI's |
| 5228 | /// `map_graph_to_input` semantics (the turn parent loads the previous |
no test coverage detected