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

Function workflow_snapshot

atomic-cli/src/commands/rpc.rs:7146–7157  ·  view source on GitHub ↗

Fetch the asserted graph through the same service for local and reactor modes. The CLI adapts this immutable snapshot to RDF without opening redb.

(
    root: &Path,
)

Source from the content-addressed store, hash-verified

7144/// Fetch the asserted graph through the same service for local and reactor
7145/// modes. The CLI adapts this immutable snapshot to RDF without opening redb.
7146pub(crate) fn workflow_snapshot(
7147 root: &Path,
7148) -> CliResult<atomic_repository::repository::WorkflowSnapshot> {
7149 let session = Service::open_root(root)?.ok_or_else(|| CliError::InvalidArgument {
7150 message: "workflow validation requires a local repository service".into(),
7151 })?;
7152 let response = session.get_workflow_snapshot(pb::GetWorkflowSnapshotRequest {
7153 repository: Some(session.reference.clone()),
7154 review_document: None,
7155 })?;
7156 decode_workflow_snapshot(response)
7157}
7158
7159fn decode_workflow_snapshot(
7160 response: pb::GetWorkflowSnapshotResponse,

Callers 1

runMethod · 0.85

Calls 3

decode_workflow_snapshotFunction · 0.85
get_workflow_snapshotMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected