The update flow
Flowchart from the Technical Manual.
Text version
- kitten update
- readDeployedService(): kitten.service exists?
- updateKitten() KittenPackage.releases()
- Release already installed?
- yes: exit 0
- no (older: confirm): stage() → activate() → prune()
- exit 0
- stage() → activate() → prune()
- updateDeployedService() setBasePath(), AppRepository, AutomaticUpdates
- check('requested') git fetch, chooseUpdateTarget()
- busy: exit 2
- none: exit 0
- no-space / error: exit 1
- handed-over: apply(): stage, write updates/pending, activate, systemctl --user restart kitten
- exit 2
- exit 1
- apply(): stage, write updates/pending, activate, systemctl --user restart kitten
- Launcher runs update-guard.js start: switchTo() or rollBack()
- New server requests its home page; confirm() appends to history.jsonl
- waitForOutcome() polls history.jsonl