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

Method refresh_consent

atomic-repository/src/repository/observability.rs:940–954  ·  view source on GitHub ↗

CB-13C F2 live consent invalidation: when the config file's mtime moved since the last observation, re-read the consent. In-flight policy: an emission already past this check when disable completes may write its single advisory record; every subsequent emission observes the withdrawal.

(&self)

Source from the content-addressed store, hash-verified

938 /// may write its single advisory record; every subsequent emission
939 /// observes the withdrawal.
940 fn refresh_consent(&self) {
941 if !self.live_consent {
942 return;
943 }
944 let observed = config_mtime_nanos(&self.dot_dir);
945 let cached = self.config_mtime.load(std::sync::atomic::Ordering::Relaxed);
946 if observed != cached {
947 self.config_mtime
948 .store(observed, std::sync::atomic::Ordering::Relaxed);
949 self.consented.store(
950 shim_opted_in(&self.dot_dir),
951 std::sync::atomic::Ordering::Relaxed,
952 );
953 }
954 }
955}
956
957/// Copy an event into the process log. It runs after the consent gate, so an

Callers 1

emitMethod · 0.80

Calls 4

config_mtime_nanosFunction · 0.85
shim_opted_inFunction · 0.85
loadMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected