MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / graph

Function graph

libatomic/examples/replication_acceptance/fixture.rs:191–219  ·  view source on GitHub ↗
(
    change: Option<Hash>,
    previous: Option<Hash>,
    session: &str,
    time: i64,
    intent: &str,
)

Source from the content-addressed store, hash-verified

189 })
190}
191fn graph(
192 change: Option<Hash>,
193 previous: Option<Hash>,
194 session: &str,
195 time: i64,
196 intent: &str,
197) -> ProvenanceGraph {
198 let mut graph = ProvenanceGraph::builder(session, "acceptance")
199 .timestamp(time)
200 .plan_id(intent)
201 .add_node(ProvenanceNode {
202 id: format!("goal-{time}"),
203 kind: ProvenanceNodeKind::Goal,
204 timestamp: time * 1000,
205 summary: "Recorded decision and evidence".into(),
206 detail: Some(json!({"fixture":"provenance-detail"}).to_string()),
207 change_hash: None,
208 tool_name: None,
209 tool_call_id: None,
210 duration_ms: None,
211 classified: false,
212 confidence: None,
213 consolidated_from: vec![],
214 })
215 .build();
216 graph.changes_explained = change.into_iter().collect();
217 graph.previous = previous;
218 graph
219}
220pub fn late(root: &Path, fixture: &Fixture) -> Result<(Hash, Hash)> {
221 let repo = Repository::open_existing(root)?;
222 let late = repo.save_provenance_graph(&graph(

Callers 3

createFunction · 0.70
lateFunction · 0.70

Calls 6

add_nodeMethod · 0.80
plan_idMethod · 0.80
buildMethod · 0.45
timestampMethod · 0.45
collectMethod · 0.45
into_iterMethod · 0.45