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

Function emit_change_source_fallback

atomic-cli/src/commands/git/shim.rs:863–877  ·  view source on GitHub ↗

Record one change-source degradation from an explicit shim command boundary (review R1: status returns its metrics without writing; only an authorized boundary decides to record them). Consent-gated (`for_repository`) and lossy.

(
    repo: &Repository,
    source: atomic_repository::change_source::ChangeSourceKind,
    fallback_source: Option<atomic_repository::change_source::ChangeSourceKind>,
    fallback_reason: Option<&a

Source from the content-addressed store, hash-verified

861/// an authorized boundary decides to record them). Consent-gated
862/// (`for_repository`) and lossy.
863fn emit_change_source_fallback(
864 repo: &Repository,
865 source: atomic_repository::change_source::ChangeSourceKind,
866 fallback_source: Option<atomic_repository::change_source::ChangeSourceKind>,
867 fallback_reason: Option<&atomic_repository::change_source::ChangeSourceFallbackReason>,
868) {
869 use atomic_repository::repository::observability::{
870 BridgeEventJournal, BridgeEventKind, FallbackReasonCode, TierCode,
871 };
872 BridgeEventJournal::for_repository(repo).emit_lossy(BridgeEventKind::ChangeSourceFallback {
873 source: TierCode::from_kind(source),
874 fallback_source: fallback_source.map(TierCode::from_kind),
875 reason: fallback_reason.map(FallbackReasonCode::from_reason),
876 });
877}
878
879/// CB-13D notice kinds the metadata-only watch path surfaces to active
880/// managed sessions (RFC §11.2 rule 6: surface, don't act, when unsafe).

Callers 1

verify_atFunction · 0.85

Calls 1

emit_lossyMethod · 0.80

Tested by

no test coverage detected