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