CB-13C F4: the shared import aggregate emitter. `failed_after_landed` is `Some(n)` when the import failed after `n` commits had already landed (partial-failure accounting): the aggregate is never bypassed by a partial failure.
(
repo: &Repository,
stats: &ImportStats,
failed_after_landed: Option<usize>,
)
| 139 | /// landed (partial-failure accounting): the aggregate is never bypassed |
| 140 | /// by a partial failure. |
| 141 | pub(crate) fn emit_import_synthesis( |
| 142 | repo: &Repository, |
| 143 | stats: &ImportStats, |
| 144 | failed_after_landed: Option<usize>, |
| 145 | ) { |
| 146 | use atomic_repository::repository::observability::{BridgeEventJournal, BridgeEventKind}; |
| 147 | BridgeEventJournal::for_repository(repo).emit_lossy(BridgeEventKind::ImportSynthesis { |
| 148 | commits_found: stats.commits_found, |
| 149 | commits_parsed: stats.commits_parsed, |
| 150 | written: stats.changes_written, |
| 151 | empty: stats.empty_commits, |
| 152 | merges: stats.merge_commits, |
| 153 | self_push_skipped: stats.self_push_skipped, |
| 154 | squash_inserted: stats.squash_inserted, |
| 155 | resurrected_exact: stats.resurrected_exact, |
| 156 | correlation_id: stats.correlation_id.clone(), |
| 157 | failed_after_landed, |
| 158 | }); |
| 159 | } |
| 160 | |
| 161 | impl Default for ImportStats { |
| 162 | fn default() -> Self { |
no test coverage detected