pub struct SynthesisPolicy {
pub legacy_per_pair_classifier: Option<bool>,
pub synthesis_failure_mode: Option<SynthesisFailureMode>,
pub synthesis_max_deletes_per_call: Option<u32>,
pub synthesis_max_candidate_chars: Option<u32>,
}Expand description
#880 — Form 1 synthesis curator + legacy per-pair classifier
sub-struct of GovernancePolicy.
Fields§
§legacy_per_pair_classifier: Option<bool>v0.7.x Form 1 (Batman framework) — opt-IN to the legacy per-pair
yes/no contradiction classifier on the store path. Default
(None / Some(false)) routes through the new single-batch
action-emitting synthesiser. Operators who depend on the old
metadata-only confirmed_contradictions behaviour set this to
Some(true) per-namespace.
synthesis_failure_mode: Option<SynthesisFailureMode>v0.7.0 Cluster-B (issue #767) — per-namespace knob controlling what happens when the Form 1 synthesis curator call fails (LLM down, malformed JSON, validation failure, etc.).
None/Some(FallThrough)(default) — preserve the v0.7.0 pre-cluster-B behaviour: log a warning, swallow the error, continue with the legacy dedup-merge / insert path. Backward compatible.Some(BlockWrite)— refuse the write with a typed error so the caller knows the synthesis layer failed and the substrate did not silently fall through to a different code path. Use on namespaces where the synthesis verdict is operationally load-bearing (e.g. a fact-base where duplicate writes are not tolerable).
Synthesis is a QUALITY gate, not a SECURITY gate — the K9 / K10
governance pipeline remains the security surface even under
BlockWrite. This knob simply lets operators choose whether a
curator outage degrades silently or surfaces loudly.
synthesis_max_deletes_per_call: Option<u32>v0.7.0 Cluster-B (issue #767, SEC-1) — per-namespace cap on the
number of delete verdicts a single synthesis batch may apply
without an explicit K10 approval flow.
Default None resolves to 1, matching the principle of
least authority: a single LLM round-trip should not be able to
purge many candidates from the namespace in a silent batch. A
verdict exceeding the cap is refused at the substrate boundary;
the audit-honest event synthesis.refused_unbounded_delete
fires at WARN level.
Operators who need a higher cap (e.g. a corpus where mass dedupe is a normal substrate task) raise this explicitly. The security pipeline (K9 per-delete recheck) still runs regardless.
synthesis_max_candidate_chars: Option<u32>v0.7.0 Cluster-B (issue #767, PERF-7) — per-candidate cap on
the number of characters of content inlined into the
synthesis prompt. A huge candidate (e.g. a 50KB note) otherwise
inflates the prompt unboundedly and inflates LLM cost.
Default None resolves to 1500 characters (~400 tokens at
the cl100k average). The truncation only affects what the LLM
sees; the stored row is untouched. A truncation event records
the byte budget in the synthesis_prompt_size_chars telemetry
counter so operators can observe whether the cap matters in
production.
Trait Implementations§
Source§impl Clone for SynthesisPolicy
impl Clone for SynthesisPolicy
Source§fn clone(&self) -> SynthesisPolicy
fn clone(&self) -> SynthesisPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SynthesisPolicy
impl Debug for SynthesisPolicy
Source§impl Default for SynthesisPolicy
impl Default for SynthesisPolicy
Source§fn default() -> SynthesisPolicy
fn default() -> SynthesisPolicy
Source§impl<'de> Deserialize<'de> for SynthesisPolicy
impl<'de> Deserialize<'de> for SynthesisPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SynthesisPolicy
Source§impl PartialEq for SynthesisPolicy
impl PartialEq for SynthesisPolicy
Source§fn eq(&self, other: &SynthesisPolicy) -> bool
fn eq(&self, other: &SynthesisPolicy) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SynthesisPolicy
impl Serialize for SynthesisPolicy
impl StructuralPartialEq for SynthesisPolicy
Auto Trait Implementations§
impl Freeze for SynthesisPolicy
impl RefUnwindSafe for SynthesisPolicy
impl Send for SynthesisPolicy
impl Sync for SynthesisPolicy
impl Unpin for SynthesisPolicy
impl UnsafeUnpin for SynthesisPolicy
impl UnwindSafe for SynthesisPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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