pub struct MissionState {Show 20 fields
pub mission: Mission,
pub feature_base_shas: BTreeMap<String, String>,
pub runs: BTreeMap<String, WorkerRun>,
pub totals: TokenUsage,
pub total_cost_usd: f64,
pub pending_user_messages: Vec<String>,
pub recent_decisions: Vec<String>,
pub config: MissionConfig,
pub latest_plan_revision: u32,
pub pending_revision: Option<PendingRevision>,
pub pending_grant_request: Option<PendingGrantRequest>,
pub pending_questions: Vec<PendingQuestion>,
pub question_count: u32,
pub last_seq: u64,
pub escalated_milestones: u32,
pub local_executor_milestones: u32,
pub workspace_provider: Option<String>,
pub workspace_pin: Option<WorkspacePin>,
pub workspace_lifecycle: Option<WorkspaceLifecycle>,
pub resolved_divergence_units: BTreeSet<String>,
}Fields§
§mission: Mission§feature_base_shas: BTreeMap<String, String>Sequential feature baselines pinned before worker execution. Empty in older logs; reconstructed from feature.progress rather than trusted from the cached state file.
runs: BTreeMap<String, WorkerRun>All runs keyed by run id (BTreeMap for deterministic serialization).
totals: TokenUsage§total_cost_usd: f64§pending_user_messages: Vec<String>Queued user messages not yet consumed by the orchestrator.
recent_decisions: Vec<String>Recent orchestrator decision summaries (newest last; capped by reducer).
config: MissionConfigPer-role config overrides applied mid-mission via config.changed.
latest_plan_revision: u32Latest revision number observed in the durable log. 0 means the
original approved plan is still the only plan of record.
pending_revision: Option<PendingRevision>A proposed revised plan awaiting human approve/reject. The mission status does not change while this is set; the run loop parks on this gate and the repo stays busy until consent arrives.
pending_grant_request: Option<PendingGrantRequest>A capability denial (today: a validator command outside its allow-set)
awaiting an operator approve/deny decision. Like pending_revision, the
run loop parks on this gate; approving extends command_grants and
respawns, denying (or a timeout) fails the feature closed.
pending_questions: Vec<PendingQuestion>The pending-decision projection (ticket
structured-human-question-events): open structured human questions,
folded from question.opened, in open order; question.answered /
question.cleared remove their entry. Rendered by the dashboard and
Slack in the SAME “your move” area as the parked grant (distinct kind,
shared chrome — the D-X channel unification). Unlike
pending_grant_request the run loop never gates on this list; empty
on pre-field logs and omitted from the wire then.
question_count: u32Total question.opened events folded — the per-mission monotonic
counter the engine mints the next question id (q-<n+1>) from.
Restart-safe by construction (derived from the log, never reset by
answers or clears), so an id is never reused after a process restart.
0 on pre-field logs and omitted from the wire then.
last_seq: u64Seq of the last event folded in.
escalated_milestones: u32Count of tier.escalated events folded (executor bumped from local to
frontier after repeated failed local validations).
local_executor_milestones: u32Count of milestones whose milestone.started folded while the
executor tier was ExecutorTier::Local — the denominator for
MissionState::escalation_rate.
workspace_provider: Option<String>Kind of the workspace provider that last provisioned this mission’s
workspace, folded from workspace.provisioned (design D-B/D-E).
None in logs predating the provider seam.
workspace_pin: Option<WorkspacePin>The workspace provider identity pinned at plan approval, folded from
workspace.provider.pinned (design D-B). None in logs predating
the pin event (missions approved before pinning existed).
workspace_lifecycle: Option<WorkspaceLifecycle>The last known workspace lifecycle transition (state + ts), folded
from workspace.teardown events carrying a state (ticket
workspace-idle-hibernate). None in logs predating the state
field — v1 keep-only teardowns carried no outcome.
resolved_divergence_units: BTreeSet<String>Dispatch-pool units with a recorded resolution, folded from
divergence.resolved (ticket divergence-first-class-event,
KRZ-304). The engine emits at most one resolution per unit — the
FIRST operator judgement stands — and this set is how the unblock
path knows, across a process restart, that a unit’s judgement
already landed. Derived at fold time (state.json is only a cache of
the fold); empty on pre-pool logs and omitted from the wire then.
Implementations§
Source§impl MissionState
impl MissionState
Sourcepub fn escalation_rate(&self) -> f64
pub fn escalation_rate(&self) -> f64
Share of local-tier milestones that were escalated to Frontier.
0.0 when no milestone has ever started under the Local tier (no
divide-by-zero).
Sourcepub fn executor_tier(&self) -> ExecutorTier
pub fn executor_tier(&self) -> ExecutorTier
Which inference tier the Worker executes this mission on, derived
from the current Worker RoleConfig.backend rather than stored:
ExecutorTier::Local when the Worker backend is
BackendKind::Local (applied at seed time by
crate::config::apply_executor_routing or by any later
config.changed), else ExecutorTier::Frontier. A configured
dispatch pool (worker_candidates) is always Frontier: pool
candidates are never local-backed (validation rejects local
entries), so a stray local worker.backend alongside a pool must not
classify the mission’s spend as $0-marginal.
Trait Implementations§
Source§impl Clone for MissionState
impl Clone for MissionState
Source§fn clone(&self) -> MissionState
fn clone(&self) -> MissionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more