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

Method publish_session_manifest

atomic-repository/src/repository/changes.rs:360–369  ·  view source on GitHub ↗

Build and persist the latest content-addressed manifest for a session, preserving fork lineage from the current head.

(&self, session_id: &str)

Source from the content-addressed store, hash-verified

358 /// Build and persist the latest content-addressed manifest for a session,
359 /// preserving fork lineage from the current head.
360 pub fn publish_session_manifest(&self, session_id: &str) -> Result<Hash, RepositoryError> {
361 let (parent_session, fork_turn) = match self.get_session_head(session_id)? {
362 Some(head) => match self.get_session_manifest(&head)? {
363 Some(manifest) => (manifest.parent_session, manifest.fork_turn),
364 None => (None, None),
365 },
366 None => (None, None),
367 };
368 self.publish_session_manifest_with_fork(session_id, parent_session, fork_turn)
369 }
370
371 /// Load an immutable session manifest by content hash.
372 pub fn get_session_manifest(

Callers 3

rebuild_session_indexMethod · 0.80
fork_sessionMethod · 0.80
save_provenance_graphMethod · 0.80

Calls 3

get_session_headMethod · 0.45
get_session_manifestMethod · 0.45

Tested by

no test coverage detected