Skip to main content

is_runtime_config_only_replace

Function is_runtime_config_only_replace 

Source
fn is_runtime_config_only_replace(
    existing_type: &str,
    target_type: &str,
    force: bool,
) -> bool
Expand description

Is this forced replace merely a runtime-config change (model / effort / permission) on a controller that stays persistent — i.e. the one case that may be deferred to the end of an in-flight turn rather than killing it?

Requires the type to be persistent on BOTH sides. Checking only the existing side was a real bug (reagent P2 on PR #2858): the container-agent override in resync_controller rewrites the target persistent -> subprocess, so a forced resync landing mid-turn on such a block would defer and silently keep the persistent controller — precisely the incompatibility that override exists to correct.

A genuine type change must replace immediately, mid-turn or not; losing an in-flight turn is the lesser harm against running a container agent on a controller that cannot do per-turn docker exec at all.