Skip to content

Commit ff2fd78

Browse files
committed
docs: align upgrade run lifecycle with the idle/running/failed states
The run verdict is now the state itself — "idle" (none or last succeeded), "running", "failed" — instead of "finished" plus a success flag. Update the GET /upgrade example and the upgrade.info lifecycle snippet to match; the socket upgrade.progress "end" line keeps its own success field (the script's self-report).
1 parent a998307 commit ff2fd78

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ The detector's result file contract is `current`, `latest`, `upgrade_available`
428428
"upgrade_available": true,
429429
"checked_at": "2026-06-15T20:46:34Z",
430430
"extra": { "roles": ["setup", "..."], "manifest": { "odios": "2026.6.0b1" } },
431-
"run": { "state": "running", "percent": 42, "step": "mpd" }, // only during a run
431+
"run": { "state": "running", "percent": 42, "step": "mpd" }, // "idle" until a run, "failed" if the last one failed
432432
"can_check": true, // POST /upgrade/check available
433433
"can_upgrade": true // POST /upgrade/start available
434434
}
@@ -440,9 +440,10 @@ Detector status and run lifecycle stream as `upgrade.info`; live run progress st
440440
// upgrade.info — detector status (on result-file change): the contract fields + "extra", no "run" or capability flags
441441
{"current": "2026.5.0b3", "latest": "2026.6.0b1", "upgrade_available": true, "checked_at": "...", "extra": { /* ... */ }}
442442

443-
// upgrade.info — run lifecycle; success is the systemd job result (authoritative)
444-
{"state": "running"}
445-
{"state": "finished", "success": true}
443+
// upgrade.info — run lifecycle; the state is the verdict (systemd job result is authoritative):
444+
// "idle" (none or last succeeded), "running", "failed"
445+
{"state": "running", "percent": 42, "step": "mpd"}
446+
{"state": "failed"}
446447

447448
// upgrade.progress — emitted by the upgrade script over the socket; minimum contract below, add any field you want
448449
{"event": "begin", "total": 7}

0 commit comments

Comments
 (0)