pub struct TaintLlmWriteGate { /* private fields */ }Expand description
The taint/posture gate: llm_writes = "quarantined" forces every
first-pass LLM-authored write (Agent, Distiller, and the steward’s own
consolidate/harvest/rank output) into quarantine regardless of taint;
agent-authored writes quarantine when the author’s session is tainted;
and ANY LLM-authored write (Steward and Distiller included) quarantines
when its evidence cites a tainted session or a reset boundary
(§8.4/§10.1 — coarse: session-tainted ⇒ range-tainted).
Review-verdict batches (StagedBatchKind::ReviewVerdict) are exempt
from the posture branch only: a review verdict IS the review the
posture defers to (§10.1 “quarantined until steward/operator review”) —
quarantine releases, gating-approved promotions, and proposal accepts
commit as review verdicts, and re-quarantining them would make review
unable to ever produce an Active record under the conservative posture.
The exemption is keyed on the batch’s semantic kind, NOT on the Steward
author: all dream groups carry MemoryAuthor::Steward, but fresh
steward LLM output (consolidate creates, harvest copies, rank batches)
is first-pass content and respects the posture knob. The evidence-taint
branch still applies to every batch, so a consolidation citing a
tainted session quarantines like any other write.
Implementations§
Source§impl TaintLlmWriteGate
impl TaintLlmWriteGate
pub fn new( tracker: Option<SessionTaintTracker>, llm_writes: AgentMemoryLlmWrites, ) -> Self
Trait Implementations§
Source§impl LlmWriteGate for TaintLlmWriteGate
impl LlmWriteGate for TaintLlmWriteGate
Source§fn quarantine_reason(
&self,
author: &MemoryAuthor,
kind: StagedBatchKind,
evidence: &[EvidenceRef],
) -> Option<String>
fn quarantine_reason( &self, author: &MemoryAuthor, kind: StagedBatchKind, evidence: &[EvidenceRef], ) -> Option<String>
Some(reason) when this LLM-authored write must land
RecordStatus::Quarantined. Non-LLM principals are never gated.
kind is the batch’s semantic kind (§10.1): review verdicts are
the review the quarantine posture defers to, fresh writes are not.
evidence is the union of EvidenceRefs the write cites (P2
evidence-range taint, §10.1); empty for writes that cite nothing.Auto Trait Implementations§
impl Freeze for TaintLlmWriteGate
impl RefUnwindSafe for TaintLlmWriteGate
impl Send for TaintLlmWriteGate
impl Sync for TaintLlmWriteGate
impl Unpin for TaintLlmWriteGate
impl UnsafeUnpin for TaintLlmWriteGate
impl UnwindSafe for TaintLlmWriteGate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more