diff --git a/docs/CONTINUOUS_DEPLOYMENT.md b/docs/CONTINUOUS_DEPLOYMENT.md index cdf2f01..4ebb86e 100644 --- a/docs/CONTINUOUS_DEPLOYMENT.md +++ b/docs/CONTINUOUS_DEPLOYMENT.md @@ -164,3 +164,30 @@ This deployment mechanism does not mix Device Core and Mission Core inventories. References: [Gitea Actions](https://docs.gitea.com/usage/actions/overview/), [runner configuration](https://docs.gitea.com/runner/configuration/). + +## Release ordering and interruptions + +Each successful main push keeps its own source SHA and CI run identity. A pending +older run holds the delivery queue; a later successful run cannot overtake it. +After a clean CI failure, the next qualified revision may proceed. Multiple +pushes are therefore admitted in order, including pushes from different machines. +The build runner and production installer each execute one job at a time. + +A network outage before installation retains the queued candidate. Before apply, +the controller records its reservation in SQLite. After restart it reconciles +that reservation with the canonical journal, archive checksum and backup. A +confirmed applied release is never installed again. A confirmed rollback is +terminal for that artifact; a new corrected commit gets a new release identity. +An uncertain outcome or failed rollback blocks later installs for diagnosis. + +The installed revision must be an ancestor of the candidate, and the candidate +must remain an ancestor of current main. Divergent/force-pushed history does not +silently replace production. CI artifacts expire after30days; an expired artifact +raises an explicit source error rather than being credited as delivered. Keep +qualified artifacts available until delivery has a canonical receipt. + +The sanitized status file can return to `waiting` after delivery. Read the latest +matching `device-core-release` row in the canonical applied journal to identify +the installed source; do not infer deployment solely from a green CI run or from +a single polling status. Infrastructure changes, schema migrations and another +repository's onboarding still require their own registered deployment contract.