pub struct ControllerEnvironment;Expand description
The production environment: the controller as it is on disk right now.
It is reloaded per call rather than held, because a review is rare and the answer must reflect the config as it stands when the review starts – the daemon reloads config.toml every 500 ms for the same reason.
Trait Implementations§
Source§impl Debug for ControllerEnvironment
impl Debug for ControllerEnvironment
Source§impl Default for ControllerEnvironment
impl Default for ControllerEnvironment
Source§fn default() -> ControllerEnvironment
fn default() -> ControllerEnvironment
Returns the “default value” for a type. Read more
Source§impl ReviewEnvironment for ControllerEnvironment
impl ReviewEnvironment for ControllerEnvironment
Source§fn check(&self, session_id: &str, profile: &str) -> Result<(), String>
fn check(&self, session_id: &str, profile: &str) -> Result<(), String>
Refuses, with a sentence for a person, when this session cannot be
reviewed under
profile.Source§fn stage(
&self,
session_id: &str,
profile: &str,
generation: u64,
mcp_servers: &[ReviewMcpServer],
dispatch_tool: bool,
) -> Result<ReviewerLaunchConfig, String>
fn stage( &self, session_id: &str, profile: &str, generation: u64, mcp_servers: &[ReviewMcpServer], dispatch_tool: bool, ) -> Result<ReviewerLaunchConfig, String>
Stages the reviewer profile for one role and describes how to launch
it. Blocking: it copies a profile onto the session’s target.
Source§fn load_state(&self, session_id: &str) -> Result<TurnReviewState, String>
fn load_state(&self, session_id: &str) -> Result<TurnReviewState, String>
How far this session has been reviewed. Blocking: it reads the
controller’s database.
Source§fn save_state(
&self,
session_id: &str,
state: &TurnReviewState,
) -> Result<(), String>
fn save_state( &self, session_id: &str, state: &TurnReviewState, ) -> Result<(), String>
Records how far this session has been reviewed. Blocking: the host
routes it through its ordered persistence lane rather than calling it
on the Tokio task that owns review state.
Source§fn clear_interrupted(&self) -> Result<Vec<String>, String>
fn clear_interrupted(&self) -> Result<Vec<String>, String>
Clears the in-flight flag of every review a restart interrupted, and
reports whose they were. Baselines are deliberately left alone: the
interrupted review never advanced one, so the next review covers the
same change and nothing is lost.
Auto Trait Implementations§
impl Freeze for ControllerEnvironment
impl RefUnwindSafe for ControllerEnvironment
impl Send for ControllerEnvironment
impl Sync for ControllerEnvironment
impl Unpin for ControllerEnvironment
impl UnsafeUnpin for ControllerEnvironment
impl UnwindSafe for ControllerEnvironment
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.