pub struct RouterPolicy {
pub version: u32,
pub policy: String,
pub granularity: String,
pub phi: PhiSpec,
pub base: SelectionDescriptor,
pub margin: f32,
pub skills_hash: String,
pub measured: Option<Value>,
}Expand description
header.router (bit ROUTER_V2): the per-request backbone-gated
policy. The backbone is the default; a skill runs only when the
calibrated decision says so (cortiq-engine router::decide_backbone_gated).
Fields§
§version: u32policy: String"backbone_gated" (the only value).
granularity: String"request" (the only value today).
phi: PhiSpecHow φ is computed — identical in trainer and runtime.
base: SelectionDescriptorDescriptor of the BACKBONE class (general prompts), same schema and metric as the skills’.
margin: f32A skill must beat the backbone by this much in unit error E.
skills_hash: Stringhex hash64 over the base descriptor + every calibrated skill
descriptor (cortiq-engine router::skills_hash). A mismatch means
the calibration is stale → the backbone runs.
measured: Option<Value>{in_scope_recall, false_accept, false_accept_upper95, n_in, n_general, general_sha256, in_sha256}.
Trait Implementations§
Source§impl Clone for RouterPolicy
impl Clone for RouterPolicy
Source§impl Debug for RouterPolicy
impl Debug for RouterPolicy
Source§impl<'de> Deserialize<'de> for RouterPolicy
impl<'de> Deserialize<'de> for RouterPolicy
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RouterPolicy
impl RefUnwindSafe for RouterPolicy
impl Send for RouterPolicy
impl Sync for RouterPolicy
impl Unpin for RouterPolicy
impl UnsafeUnpin for RouterPolicy
impl UnwindSafe for RouterPolicy
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