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

Method evictable

atomic-agent/src/turn/session.rs:117–127  ·  view source on GitHub ↗

Whether dropping this entry destroys no unattested evidence (review R7). ContentChanges evidence is the durable change itself (tracked in `recorded_change_hashes` and the change store); ObservationOnly claims nothing; RepositoryOperations entries are evictable only once every observed operation is covered by an attestation.

(&self, attested_operations: &[String])

Source from the content-addressed store, hash-verified

115 /// nothing; RepositoryOperations entries are evictable only once every
116 /// observed operation is covered by an attestation.
117 fn evictable(&self, attested_operations: &[String]) -> bool {
118 match &self.outcome {
119 ManagedTurnOutcome::ContentChanges { .. } | ManagedTurnOutcome::ObservationOnly => true,
120 ManagedTurnOutcome::RepositoryOperations { operations, .. } => {
121 operations.iter().all(|operation| {
122 let decorated = format!("turn {} {}", self.turn, operation);
123 attested_operations.contains(&decorated)
124 })
125 }
126 }
127 }
128}
129
130/// Maximum number of classified outcomes retained per session JSON.

Callers 1

record_turn_outcomeMethod · 0.80

Calls 3

allMethod · 0.45
iterMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected