lightspeed/ops/operational_autopilot
Cross-surface operational autopilot and SLO-aware controls (M54).
Types
Bounded automated control action.
pub type Control {
ShedRuntimeEvents(percent: Int)
ThrottleTransport(max_events_per_sec: Int)
IsolateTenant(tenant_id: String)
PauseEtlPipelines
}
Constructors
-
ShedRuntimeEvents(percent: Int) -
ThrottleTransport(max_events_per_sec: Int) -
IsolateTenant(tenant_id: String) -
PauseEtlPipelines
Cross-surface incident correlation evidence.
pub type Correlation {
Correlation(
incident_id: String,
surface: Surface,
trace_ref: String,
detected_at_ms: Int,
mitigated_at_ms: Int,
recovered_at_ms: Int,
)
}
Constructors
-
Correlation( incident_id: String, surface: Surface, trace_ref: String, detected_at_ms: Int, mitigated_at_ms: Int, recovered_at_ms: Int, )
Autopilot decision for one control action.
pub type Decision {
Applied
RequiresOverride(override_id: String)
BlockedByPolicy(reason: String)
RolledBack
}
Constructors
-
Applied -
RequiresOverride(override_id: String) -
BlockedByPolicy(reason: String) -
RolledBack
Deterministic autopilot drill result.
pub type DrillResult {
DrillResult(
scenario: DrillScenario,
surface: Surface,
status: slo_autopilot.Status,
baseline_detection_ms: Int,
autopilot_detection_ms: Int,
baseline_mitigation_ms: Int,
autopilot_mitigation_ms: Int,
actions: List(ControlAction),
correlation: Correlation,
)
}
Constructors
-
DrillResult( scenario: DrillScenario, surface: Surface, status: slo_autopilot.Status, baseline_detection_ms: Int, autopilot_detection_ms: Int, baseline_mitigation_ms: Int, autopilot_mitigation_ms: Int, actions: List(ControlAction), correlation: Correlation, )
Deterministic M54 drill scenario.
pub type DrillScenario {
RuntimeLatencySpike
TransportAckStorm
TenantHotspotIsolation
EtlReplayLag
}
Constructors
-
RuntimeLatencySpike -
TransportAckStorm -
TenantHotspotIsolation -
EtlReplayLag
Operator override and automation policy.
pub type OverridePolicy {
OverridePolicy(
name: String,
allow_runtime: Bool,
allow_transport: Bool,
allow_tenant: Bool,
allow_etl: Bool,
require_operator_override: Bool,
max_actions_per_incident: Int,
)
}
Constructors
-
OverridePolicy( name: String, allow_runtime: Bool, allow_transport: Bool, allow_tenant: Bool, allow_etl: Bool, require_operator_override: Bool, max_actions_per_incident: Int, )
Runtime surface controlled by the operational autopilot.
pub type Surface {
RuntimeSurface
TransportSurface
TenantSurface
EtlSurface
}
Constructors
-
RuntimeSurface -
TransportSurface -
TenantSurface -
EtlSurface
Values
pub fn actions_auditable(result: DrillResult) -> Bool
True when every action is auditable and bounded by explicit policy outcomes.
pub fn actions_bounded(
result: DrillResult,
policy: OverridePolicy,
) -> Bool
True when actions are bounded by policy and not silently unbounded.
pub fn actions_reversible(result: DrillResult) -> Bool
True when every emitted action is reversible.
pub fn all_drills_valid(
results: List(DrillResult),
policy: OverridePolicy,
) -> Bool
True when every drill passes the same certification criteria.
pub fn audit_metric(action: ControlAction) -> telemetry.Metric
Telemetry metric for one autopilot action.
pub fn blocked_by_policy(action: ControlAction) -> Bool
True when a control action was blocked by policy.
pub fn blocked_policy() -> OverridePolicy
Blocked policy used by tests and operators to verify policy bounds.
pub fn correlation_label(correlation: Correlation) -> String
Correlation label for incident triage.
pub fn default_policy() -> OverridePolicy
Default policy allows bounded automation on every M54 surface.
pub fn drill_result_signature(result: DrillResult) -> String
Stable drill result signature.
pub fn drill_result_valid(
result: DrillResult,
policy: OverridePolicy,
) -> Bool
True when a drill has acceptable certification evidence.
pub fn drill_scenario_label(scenario: DrillScenario) -> String
Drill scenario label.
pub fn latency_reduced(result: DrillResult) -> Bool
True when autopilot detection and mitigation beat the manual baseline.
pub fn recovery_latency_ms(result: DrillResult) -> Int
Recovery latency measured from detection to recovery.
pub fn requires_override(action: ControlAction) -> Bool
True when a control action requested explicit operator override.
pub fn run_drill(
scenario: DrillScenario,
policy: OverridePolicy,
) -> DrillResult
Run one deterministic M54 drill.
pub fn strict_policy() -> OverridePolicy
Strict policy requires explicit override semantics for high-impact controls.