(
&self,
session_id: &str,
provenance_hash: &Hash,
boundary_start: &atomic_core::change::session::TurnBoundary,
boundary_end: &atomic_core::change::session::Tur
| 882 | /// have no ledger row by design). |
| 883 | #[allow(clippy::too_many_arguments)] |
| 884 | pub fn attach_turn_boundary( |
| 885 | &self, |
| 886 | session_id: &str, |
| 887 | provenance_hash: &Hash, |
| 888 | boundary_start: &atomic_core::change::session::TurnBoundary, |
| 889 | boundary_end: &atomic_core::change::session::TurnBoundary, |
| 890 | outcome: &atomic_core::change::session::ManagedTurnOutcome, |
| 891 | ) -> Result<Option<bool>, RepositoryError> { |
| 892 | self.ensure_project_identity(atomic_core::kg::project_id::MintReason::Upgrade)?; |
| 893 | let mut txn = self |
| 894 | .pristine |
| 895 | .write_txn() |
| 896 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 897 | let attached = txn |
| 898 | .attach_turn_boundary( |
| 899 | session_id, |
| 900 | provenance_hash, |
| 901 | boundary_start, |
| 902 | boundary_end, |
| 903 | outcome, |
| 904 | ) |
| 905 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 906 | txn.commit() |
| 907 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 908 | if attached { |
| 909 | self.refresh_session_kg()?; |
| 910 | } |
| 911 | Ok(Some(attached)) |
| 912 | } |
| 913 | |
| 914 | /// Create a forked session from a parent at a turn boundary. |
| 915 | /// |
nothing calls this directly
no test coverage detected