The durable refusal for a managed commit that is not recorded as-is.
(
options: &TurnRecordOptions<'_>,
transition: &RecordedGitTransition,
commit: &str,
reason: &str,
)
| 1143 | |
| 1144 | /// The durable refusal for a managed commit that is not recorded as-is. |
| 1145 | fn managed_commit_refusal( |
| 1146 | options: &TurnRecordOptions<'_>, |
| 1147 | transition: &RecordedGitTransition, |
| 1148 | commit: &str, |
| 1149 | reason: &str, |
| 1150 | ) -> InexactManagedCommit { |
| 1151 | log::warn!( |
| 1152 | "Managed commit {} of session {} turn {} is not exactly the turn's content ({}); \ |
| 1153 | nothing is recorded and the commit stays in Git", |
| 1154 | commit, |
| 1155 | options.session.session_id, |
| 1156 | options.turn_number, |
| 1157 | reason |
| 1158 | ); |
| 1159 | let incomplete = IncompleteSession::new( |
| 1160 | format!( |
| 1161 | "Managed commit captured and authenticated, but it is not exactly this turn's \ |
| 1162 | recorded content ({reason}); nothing was recorded. The commit stays in Git: run \ |
| 1163 | 'atomic git shim reconcile' to import it (RFC §19 Q2, allow-as-incomplete)" |
| 1164 | ), |
| 1165 | Vec::<String>::new(), |
| 1166 | String::new(), |
| 1167 | SessionIncompleteOrigin::ManagedCaptureAwaitingReassembly, |
| 1168 | ) |
| 1169 | .with_unbound_commits(vec![commit.to_string()]); |
| 1170 | InexactManagedCommit { |
| 1171 | operations: transition.operations.clone(), |
| 1172 | capture: transition.capture, |
| 1173 | incomplete, |
| 1174 | } |
| 1175 | } |
| 1176 | |
| 1177 | /// The Git commit a managed turn ended on, when that commit is exactly the |
| 1178 | /// turn's work (CB-12A follow-up AC-8, the exact separable case). |
no test coverage detected