A run-once step may name what it reads: the pair run-once + restart-on is no longer refused (novox/hq ADR 0099)

This commit is contained in:
2026-09-21 23:31:06 +02:00
parent 52d39f0740
commit e4da83496f
2 changed files with 12 additions and 21 deletions
+5 -13
View File
@@ -985,11 +985,11 @@ func ParseManifest(raw []byte) (Manifest, error) {
}
// **A run-once container is a step the host runs to completion** (novox/hq ADR 0052). It is a
// boolean modifier on the container shape — the host runs the container, requires it to exit 0,
// and starts whatever the declaration places after it only once it has. Two things are refused
// here rather than only on the machine, for the same near-versus-far reason the action ban
// above records: a value that is not a boolean, and the pair run-once + restart-on, which asks
// for two contradictory lifecycles — restart-on brings a *running* container back, and a
// run-once step does not stay running.
// and starts whatever the declaration places after it only once it has. A value that is not a
// boolean is refused here rather than only on the machine, for the same near-versus-far reason
// the action ban above records. A run-once step may name what it reads under restart-on: for a
// step the word means *run again* when one of those changed, which is how a fact fetched from a
// provider is fetched again when the provider moved (novox/hq ADR 0099).
for _, r := range m.Resources {
if fmt.Sprint(r["type"]) != "container" {
continue
@@ -1003,14 +1003,6 @@ func ParseManifest(raw []byte) (Manifest, error) {
m.Module, r["id"], raw))
} else {
runOnce = once
if once {
if _, hasRestart := r["restart-on"]; hasRestart {
problems = append(problems, fmt.Sprintf(
"%s declares %v as run-once and with restart-on; a run-once step runs to "+
"completion rather than staying running to be restarted (novox/hq ADR 0052)",
m.Module, r["id"]))
}
}
}
}
// **A scheduled container runs on a recurring cadence** (novox/hq ADR 0053), the recurring