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

Method publish_session_manifest

atomic-repository/src/repository/changes.rs:340–349  ·  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

338 /// Build and persist the latest content-addressed manifest for a session,
339 /// preserving fork lineage from the current head.
340 pub fn publish_session_manifest(&self, session_id: &str) -> Result<Hash, RepositoryError> {
341 let (parent_session, fork_turn) = match self.get_session_head(session_id)? {
342 Some(head) => match self.get_session_manifest(&head)? {
343 Some(manifest) => (manifest.parent_session, manifest.fork_turn),
344 None => (None, None),
345 },
346 None => (None, None),
347 };
348 self.publish_session_manifest_with_fork(session_id, parent_session, fork_turn)
349 }
350
351 /// Load an immutable session manifest by content hash.
352 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