fix(runtime): announce the runtime image once, not on every sweep tick
ci / gates (push) Failing after 12s
ci / rust (push) Skipped
ci / frontend (push) Skipped
ci / e2e (push) Skipped
ci / publish (push) Skipped

`MissionRuntimeProvisioner::from_env` is called per use — on every mission
launch and from the terminal-mission reaper sweep — so the line added in
cdc45bd would have printed on every tick forever. A log that repeats
itself is a log nobody reads, which would have cost exactly the
visibility the line was added to provide.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
Omar Sobh
2026-08-11 14:08:10 -07:00
co-authored by Claude Opus 5
parent cdc45bd082
commit 9f76f0915b
+7 -3
View File
@@ -583,9 +583,13 @@ impl MissionRuntimeProvisioner {
Ok(v) if !v.trim().is_empty() => (v, "CLAWMATES_RUNTIME_IMAGE"), Ok(v) if !v.trim().is_empty() => (v, "CLAWMATES_RUNTIME_IMAGE"),
_ => (DEFAULT_IMAGE.to_string(), "the built-in default"), _ => (DEFAULT_IMAGE.to_string(), "the built-in default"),
}; };
// Said once at startup, because every mission on this host runs in it // ONCE per process. `from_env` is called per use — on every launch, and
// and nothing else names it out loud. // from the reaper sweep — so a bare eprintln here is a line every sweep
eprintln!("mission_runtime: per-mission runtime image = {image} (from {source})"); // tick forever, which is how a log stops being read at all.
static ANNOUNCED: std::sync::Once = std::sync::Once::new();
ANNOUNCED.call_once(|| {
eprintln!("mission_runtime: per-mission runtime image = {image} (from {source})");
});
Some(MissionRuntimeProvisioner { docker, image }) Some(MissionRuntimeProvisioner { docker, image })
} }