pub struct AdaptivePipeline { /* private fields */ }Expand description
Deterministic outcome-to-directive policy engine.
§Example
use termivar_scanner::AdaptivePipeline;
let pipeline = AdaptivePipeline::with_standard_policies()?;
assert_eq!(pipeline.len(), 3);Implementations§
Source§impl AdaptivePipeline
impl AdaptivePipeline
Sourcepub fn with_standard_policies() -> Result<Self, AdaptivePipelineError>
pub fn with_standard_policies() -> Result<Self, AdaptivePipelineError>
Creates policies for common HTTP control-flow signals.
403scheduleshttp.403-bypass;404scheduleshttp.enumeration;429throttles for two seconds and retries the current action.
The pipeline only proposes directives. A crate::DecisionLoop grants
execution authority separately: scheduled actions must be registered,
satisfy current planner policy, and be submitted with an explicit host
suppression context. These example action IDs are not implicit executor
registrations.
Sourcepub fn register(
&mut self,
rule: AdaptationRule,
) -> Result<AdaptiveRuleWrite, AdaptivePipelineError>
pub fn register( &mut self, rule: AdaptationRule, ) -> Result<AdaptiveRuleWrite, AdaptivePipelineError>
Registers an idempotent policy rule.
Sourcepub fn decide(
&self,
outcome: &Outcome,
snapshot: &KnowledgeSnapshot,
ledger: &AdaptationLedger,
limits: AdaptationLimits,
) -> Result<AdaptiveDecision, AdaptivePipelineError>
pub fn decide( &self, outcome: &Outcome, snapshot: &KnowledgeSnapshot, ledger: &AdaptationLedger, limits: AdaptationLimits, ) -> Result<AdaptiveDecision, AdaptivePipelineError>
Produces a pure decision without changing the supplied ledger.
Sourcepub fn decide_with_suppressed_actions(
&self,
outcome: &Outcome,
snapshot: &KnowledgeSnapshot,
ledger: &AdaptationLedger,
limits: AdaptationLimits,
suppressed_actions: &BTreeSet<String>,
) -> Result<AdaptiveDecision, AdaptivePipelineError>
pub fn decide_with_suppressed_actions( &self, outcome: &Outcome, snapshot: &KnowledgeSnapshot, ledger: &AdaptationLedger, limits: AdaptationLimits, suppressed_actions: &BTreeSet<String>, ) -> Result<AdaptiveDecision, AdaptivePipelineError>
Produces a pure decision while excluding actions suppressed by external policy.
The set may be derived from an crate::ExperienceStore, operator
policy, or another scheduler concern. Ledger suppressions are always
merged with the supplied set.
Sourcepub fn decide_and_record(
&self,
outcome: &Outcome,
snapshot: &KnowledgeSnapshot,
ledger: &mut AdaptationLedger,
limits: AdaptationLimits,
) -> Result<AdaptiveDecision, AdaptivePipelineError>
pub fn decide_and_record( &self, outcome: &Outcome, snapshot: &KnowledgeSnapshot, ledger: &mut AdaptationLedger, limits: AdaptationLimits, ) -> Result<AdaptiveDecision, AdaptivePipelineError>
Produces and atomically records one in-order adaptive decision.
Sourcepub fn decide_and_record_with_suppressed_actions(
&self,
outcome: &Outcome,
snapshot: &KnowledgeSnapshot,
ledger: &mut AdaptationLedger,
limits: AdaptationLimits,
suppressed_actions: &BTreeSet<String>,
) -> Result<AdaptiveDecision, AdaptivePipelineError>
pub fn decide_and_record_with_suppressed_actions( &self, outcome: &Outcome, snapshot: &KnowledgeSnapshot, ledger: &mut AdaptationLedger, limits: AdaptationLimits, suppressed_actions: &BTreeSet<String>, ) -> Result<AdaptiveDecision, AdaptivePipelineError>
Produces and records a decision with explicit policy suppressions.
Trait Implementations§
Source§impl Clone for AdaptivePipeline
impl Clone for AdaptivePipeline
Source§fn clone(&self) -> AdaptivePipeline
fn clone(&self) -> AdaptivePipeline
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more