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

Function sample_graph

atomic-core/src/change/provenance_graph/tests.rs:84–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82}
83
84fn sample_graph() -> ProvenanceGraph {
85 ProvenanceGraph::builder("sess-123", "claude-code")
86 .agent_display_name("Claude Code")
87 .agent_vendor("anthropic")
88 .timestamp(1735689600)
89 .add_node(make_goal("n-1", "Fix the auth bug"))
90 .add_node(make_exploration("n-2", "Read src/auth.rs"))
91 .add_node(make_exploration("n-3", "Read src/jwt.rs"))
92 .add_node(make_commitment("n-4", "Edit src/auth.rs"))
93 .add_node(make_verification("n-5", "cargo test --lib (passed)"))
94 .add_edge(make_edge("n-1", "n-2", ProvenanceEdgeKind::LedTo))
95 .add_edge(make_edge("n-1", "n-3", ProvenanceEdgeKind::LedTo))
96 .add_edge(make_edge("n-2", "n-4", ProvenanceEdgeKind::ExploredVia))
97 .add_edge(make_edge("n-3", "n-4", ProvenanceEdgeKind::ExploredVia))
98 .add_edge(make_edge("n-4", "n-5", ProvenanceEdgeKind::VerifiedBy))
99 .add_change_explained(Hash::of(b"change-a"))
100 .build()
101}
102
103// ---- Builder ----
104

Callers 15

test_builder_fullFunction · 0.85
test_find_nodeFunction · 0.85
test_nodes_of_kindFunction · 0.85
test_edges_fromFunction · 0.85
test_edges_toFunction · 0.85

Calls 12

make_goalFunction · 0.85
make_explorationFunction · 0.85
make_commitmentFunction · 0.85
make_verificationFunction · 0.85
add_change_explainedMethod · 0.80
add_edgeMethod · 0.80
add_nodeMethod · 0.80
agent_vendorMethod · 0.80
make_edgeFunction · 0.70
buildMethod · 0.45
timestampMethod · 0.45
agent_display_nameMethod · 0.45

Tested by

no test coverage detected