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

Function emit_import_synthesis

atomic-cli/src/commands/git/parallel.rs:141–159  ·  view source on GitHub ↗

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>,
)

Source from the content-addressed store, hash-verified

139/// landed (partial-failure accounting): the aggregate is never bypassed
140/// by a partial failure.
141pub(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
161impl Default for ImportStats {
162 fn default() -> Self {

Callers 1

import_prevalidatedMethod · 0.70

Calls 2

emit_lossyMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected