Skip to main content

EvoKernel

Struct EvoKernel 

Source
pub struct EvoKernel<S: KernelState> {
    pub kernel: Arc<Kernel<S>>,
    pub sandbox: Arc<dyn Sandbox>,
    pub validator: Arc<dyn Validator>,
    pub store: Arc<dyn EvolutionStore>,
    pub selector: Arc<dyn Selector>,
    pub governor: Arc<dyn Governor>,
    pub economics: Arc<Mutex<EvuLedger>>,
    pub remote_publishers: Arc<Mutex<BTreeMap<String, String>>>,
    pub stake_policy: StakePolicy,
    pub sandbox_policy: SandboxPolicy,
    pub validation_plan: ValidationPlan,
}

Fields§

§kernel: Arc<Kernel<S>>§sandbox: Arc<dyn Sandbox>§validator: Arc<dyn Validator>§store: Arc<dyn EvolutionStore>§selector: Arc<dyn Selector>§governor: Arc<dyn Governor>§economics: Arc<Mutex<EvuLedger>>§remote_publishers: Arc<Mutex<BTreeMap<String, String>>>§stake_policy: StakePolicy§sandbox_policy: SandboxPolicy§validation_plan: ValidationPlan

Implementations§

Source§

impl<S: KernelState> EvoKernel<S>

Source

pub fn new( kernel: Arc<Kernel<S>>, sandbox: Arc<dyn Sandbox>, validator: Arc<dyn Validator>, store: Arc<dyn EvolutionStore>, ) -> Self

Source

pub fn with_selector(self, selector: Arc<dyn Selector>) -> Self

Source

pub fn with_sandbox_policy(self, policy: SandboxPolicy) -> Self

Source

pub fn with_governor(self, governor: Arc<dyn Governor>) -> Self

Source

pub fn with_economics(self, economics: Arc<Mutex<EvuLedger>>) -> Self

Source

pub fn with_stake_policy(self, policy: StakePolicy) -> Self

Source

pub fn with_validation_plan(self, plan: ValidationPlan) -> Self

Source

pub fn select_candidates(&self, input: &SelectorInput) -> Vec<GeneCandidate>

Source

pub fn bootstrap_if_empty( &self, run_id: &RunId, ) -> Result<BootstrapReport, EvoKernelError>

Source

pub async fn capture_successful_mutation( &self, run_id: &RunId, mutation: PreparedMutation, ) -> Result<Capsule, EvoKernelError>

Source

pub async fn capture_mutation_with_governor( &self, run_id: &RunId, mutation: PreparedMutation, ) -> Result<CaptureOutcome, EvoKernelError>

Source

pub async fn capture_from_proposal( &self, run_id: &RunId, proposal: &AgentMutationProposal, diff_payload: String, base_revision: Option<String>, ) -> Result<CaptureOutcome, EvoKernelError>

Source

pub fn feedback_for_agent(outcome: &CaptureOutcome) -> ExecutionFeedback

Source

pub fn replay_feedback_for_agent( signals: &[String], decision: &ReplayDecision, ) -> ReplayFeedback

Source

pub async fn run_supervised_devloop( &self, run_id: &RunId, request: &SupervisedDevloopRequest, diff_payload: String, base_revision: Option<String>, ) -> Result<SupervisedDevloopOutcome, EvoKernelError>

Source

pub fn prepare_supervised_delivery( &self, request: &SupervisedDevloopRequest, outcome: &SupervisedDevloopOutcome, ) -> Result<SupervisedDeliveryContract, EvoKernelError>

Source

pub fn evaluate_self_evolution_acceptance_gate( &self, input: &SelfEvolutionAcceptanceGateInput, ) -> Result<SelfEvolutionAcceptanceGateContract, EvoKernelError>

Source

pub fn discover_autonomous_candidates( &self, input: &AutonomousIntakeInput, ) -> AutonomousIntakeOutput

Autonomous candidate intake: classify raw diagnostic signals without a caller‐supplied issue number, deduplicate across the batch, and return an AutonomousIntakeOutput with accepted and denied candidates.

This is the entry point for EVO26-AUTO-01 — it does not generate mutation proposals or trigger any task planning.

Source

pub fn plan_autonomous_candidate( &self, candidate: &DiscoveredCandidate, ) -> AutonomousTaskPlan

Bounded task planning for an autonomous candidate: assigns risk tier, feasibility score, validation budget, and expected evidence, then approves or denies the candidate for proposal generation.

This is the EVO26-AUTO-02 entry point. It does not generate a mutation proposal — it only produces an auditable AutonomousTaskPlan.

Source

pub fn propose_autonomous_mutation( &self, plan: &AutonomousTaskPlan, ) -> AutonomousMutationProposal

Autonomous mutation proposal generation from an approved AutonomousTaskPlan.

Generates a bounded, machine-readable AutonomousMutationProposal from an approved plan. Unapproved plans, missing scope, or weak evidence sets produce a denied fail-closed proposal.

This is the EVO26-AUTO-03 entry point. It does not execute the mutation.

Source

pub fn evaluate_semantic_replay( &self, task_id: impl Into<String>, task_class: &BoundedTaskClass, ) -> SemanticReplayDecision

Semantic task-class generalization evaluation for replay selection.

Determines whether a task described by task_id and task_class can participate in broad-family replay beyond exact signal matching. Returns a SemanticReplayDecision with an audit-ready EquivalenceExplanation when replay is approved.

This is the EVO26-AUTO-04 entry point. It does not execute replay.

Source

pub fn evaluate_confidence_revalidation( &self, asset_id: impl Into<String>, current_state: ConfidenceState, failure_count: u32, ) -> ConfidenceRevalidationResult

Continuous confidence revalidation evaluation for a given asset.

Given the asset’s current_state and its recent failure_count, produces a ConfidenceRevalidationResult determining whether the asset remains replay-eligible. Assets with three or more failures are revalidated as failed; otherwise they pass.

This is the EVO26-AUTO-05 confidence revalidation entry point.

Source

pub fn evaluate_asset_demotion( &self, asset_id: impl Into<String>, prior_state: ConfidenceState, failure_count: u32, reason_code: ConfidenceDemotionReasonCode, ) -> DemotionDecision

Asset demotion decision for an asset that has exceeded failure policy.

Promotes the decision from Demoted to Quarantined when failure_count >= 5; Demoted otherwise.

This is the EVO26-AUTO-05 asset demotion entry point.

Source

pub fn evaluate_autonomous_pr_lane( &self, task_id: impl Into<String>, task_class: &BoundedTaskClass, risk_tier: AutonomousRiskTier, evidence_bundle: Option<PrEvidenceBundle>, ) -> AutonomousPrLaneDecision

Evaluate whether a task is eligible for the bounded autonomous PR lane.

This is the EVO26-AUTO-06 autonomous PR lane entry point.

Low-risk classes (DocFix, StaticAnalysisFix, FormattingFix) with validated evidence are approved. All other classes, or tasks that are missing evidence, are denied fail-closed.

Source

pub fn evaluate_autonomous_release_gate( &self, task_id: impl Into<String>, task_class: &BoundedTaskClass, risk_tier: AutonomousRiskTier, kill_switch_state: KillSwitchState, evidence_complete: bool, ) -> AutonomousReleaseGateDecision

Evaluate whether a task is eligible for the fail-closed autonomous merge and release gate.

This is the EVO26-AUTO-07 autonomous release gate entry point.

Only low-risk bounded classes (DocsSingleFile, LintFix) with a complete evidence chain, an inactive kill switch, and a Low risk tier are approved. All other configurations are denied fail-closed.

Source

pub fn select_self_evolution_candidate( &self, request: &SelfEvolutionCandidateIntakeRequest, ) -> Result<SelfEvolutionSelectionDecision, EvoKernelError>

Source

pub fn prepare_self_evolution_mutation_proposal( &self, request: &SelfEvolutionCandidateIntakeRequest, ) -> Result<SelfEvolutionMutationProposalContract, EvoKernelError>

Source

pub fn coordinate(&self, plan: CoordinationPlan) -> CoordinationResult

Source

pub fn export_promoted_assets( &self, sender_id: impl Into<String>, ) -> Result<EvolutionEnvelope, EvoKernelError>

Source

pub fn import_remote_envelope( &self, envelope: &EvolutionEnvelope, ) -> Result<ImportOutcome, EvoKernelError>

Source

pub fn fetch_assets( &self, responder_id: impl Into<String>, query: &FetchQuery, ) -> Result<FetchResponse, EvoKernelError>

Source

pub fn revoke_assets( &self, notice: &RevokeNotice, ) -> Result<RevokeNotice, EvoKernelError>

Source

pub async fn replay_or_fallback( &self, input: SelectorInput, ) -> Result<ReplayDecision, EvoKernelError>

Source

pub async fn replay_or_fallback_for_run( &self, run_id: &RunId, input: SelectorInput, ) -> Result<ReplayDecision, EvoKernelError>

Source

pub fn economics_signal(&self, node_id: &str) -> Option<EconomicsSignal>

Source

pub fn selector_reputation_bias(&self) -> BTreeMap<String, f32>

Source

pub fn metrics_snapshot( &self, ) -> Result<EvolutionMetricsSnapshot, EvoKernelError>

Source

pub fn replay_roi_release_gate_summary( &self, window_seconds: u64, ) -> Result<ReplayRoiWindowSummary, EvoKernelError>

Source

pub fn render_replay_roi_release_gate_summary_json( &self, window_seconds: u64, ) -> Result<String, EvoKernelError>

Source

pub fn replay_roi_release_gate_contract( &self, window_seconds: u64, thresholds: ReplayRoiReleaseGateThresholds, ) -> Result<ReplayRoiReleaseGateContract, EvoKernelError>

Source

pub fn render_replay_roi_release_gate_contract_json( &self, window_seconds: u64, thresholds: ReplayRoiReleaseGateThresholds, ) -> Result<String, EvoKernelError>

Source

pub fn render_metrics_prometheus(&self) -> Result<String, EvoKernelError>

Source

pub fn health_snapshot(&self) -> Result<EvolutionHealthSnapshot, EvoKernelError>

Auto Trait Implementations§

§

impl<S> Freeze for EvoKernel<S>

§

impl<S> !RefUnwindSafe for EvoKernel<S>

§

impl<S> Send for EvoKernel<S>

§

impl<S> Sync for EvoKernel<S>

§

impl<S> Unpin for EvoKernel<S>

§

impl<S> UnsafeUnpin for EvoKernel<S>

§

impl<S> !UnwindSafe for EvoKernel<S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more