pub enum SwapPolicy {
FinishOnOld,
RestartTurn,
}Expand description
Model hot-swap policy (RFC 0018 §5.3, --model-swap / AGENTD_MODEL_SWAP):
what an in-flight run does when a reload changes the model under it. An
endpoint repoint (model unchanged) is ALWAYS finish-on-old / invisible (§5.1),
regardless of this policy. Default FinishOnOld. Serialized into the
ControlMsg::SwapIntel frame so the child applies the same policy the
supervisor was configured with.
Variants§
FinishOnOld
The turn in flight when the reload lands completes on the OLD model; the NEXT turn uses the new model over the full existing transcript. The natural turn-boundary behaviour — cheapest, no wasted work (§5.3).
RestartTurn
The turn in flight finishes (we never tear a complete_once) but its
result is DISCARDED and the turn is RE-RUN on the new model from the same
pre-turn transcript state — costs one turn, bounded by the step budget
(§5.3). Opt-in.
Implementations§
Trait Implementations§
Source§impl Clone for SwapPolicy
impl Clone for SwapPolicy
Source§fn clone(&self) -> SwapPolicy
fn clone(&self) -> SwapPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more