(
repo: &Repository,
session_id: &str,
goal: &str,
change_seed: u8,
previous: Option<Hash>,
)
| 60 | } |
| 61 | |
| 62 | fn save_turn_graph( |
| 63 | repo: &Repository, |
| 64 | session_id: &str, |
| 65 | goal: &str, |
| 66 | change_seed: u8, |
| 67 | previous: Option<Hash>, |
| 68 | ) -> Hash { |
| 69 | let builder = ProvenanceGraph::builder(session_id, "opencode") |
| 70 | .add_node(goal_node(&format!("{}-goal", session_id), goal)) |
| 71 | .add_change_explained(Hash::of(&[change_seed])); |
| 72 | let builder = match previous { |
| 73 | Some(prev) => builder.previous(prev), |
| 74 | None => builder, |
| 75 | }; |
| 76 | repo.save_provenance_graph(&builder.build()) |
| 77 | .expect("save provenance graph") |
| 78 | } |
| 79 | |
| 80 | #[test] |
| 81 | fn session_manifest_is_content_addressed_and_ingestible() { |
no test coverage detected