diff --git a/docs/CONTINUOUS_DEPLOYMENT.md b/docs/CONTINUOUS_DEPLOYMENT.md index 0225e95..cdf2f01 100644 --- a/docs/CONTINUOUS_DEPLOYMENT.md +++ b/docs/CONTINUOUS_DEPLOYMENT.md @@ -8,11 +8,27 @@ Device Core; other repositories keep their existing policy until onboarded. ## Current implementation status The source qualification workflow is implemented in `.gitea/workflows/ci.yml`. -It does **not** deploy. Gitea Actions are enabled and the persistent Synology -runner is installed. The deployment controller, normal recurring release -transition and live end-to-end deployment acceptance are still pending. +It does **not** deploy. Gitea Actions and the persistent Synology build runner +are installed. The normal `device-core-release` transition accepted r7, and the +outbound deployment controller bootstrap was accepted on 2026-09-29 at18:35:52Z +(canonical ledger386). The first automatic end-to-end release is under acceptance. A green qualification is not a deployment receipt. +The installed root runner SHA is +`c1301d1072f3d5d39ba422a09847a05a5aad8a753c816d7fb6916d1f1cadd9c6`, +from Platform `f7416bc59a19a9ac53c4f4591eaf50a7f4a41641`. +Controller bootstrap `device-core-autodeploy-v1-20260929-001` has artifact SHA +`fe9298baa5f41a35c2705ee9946b730ff2de7d5b5c9b2b8eb1b4cca0bc8ed12b`. +Its first eligible run is8; historical failed and already installed runs are excluded. +The accepted baseline is r7 / `edf69068ec64e3d105d5324d39b8eaeface21215`. + +Pushes can originate from any computer. Gitea, the build runner and the controller +on Synology perform the complete pipeline; an operator Mac does not participate. +Native `nodedc-device-autodeploy.timer` invokes the root-owned canonical worker +30seconds after its previous cycle completes, with no additional inbound port. +The separate read token, SQLite queue and private status belong to root under +`/var/lib/nodedc-device-autodeploy`, outside build jobs and application artifacts. + On 2026-09-29, canonical bootstrap `gitea-ci-bootstrap-v4-20260929-005` completed with `deploy-ok`, no published ports and production deploy disabled. The repo-scoped runner `synology-device-core-build` (id 1) is online. The first @@ -81,8 +97,8 @@ for independently checking Gitea job identity and the deploy artifact. checks the source and build hashes again, then emits a deterministic `.tgz` and `release.json` receipt. The archive declares `device-core-release.v1` with the exact source SHA, run id/number and file digests. It cannot choose Compose -files, host roots, install commands or database operations. This new artifact -type still needs the reviewed Platform runner extension before installation. +files, host roots, install commands or database operations. This artifact +type is accepted only by the registered Platform recurring-release domain. Run 3 (commit `415d5e73d7ca0cc283deb9b79a9f5f99fec54ed7`) passed all qualification steps on Synology. Its legacy v3 upload succeeded but is not returned by the Gitea REST artifact API. Therefore the publication step now @@ -102,11 +118,11 @@ Local focused tests: `python3 -m unittest discover -s infra/ci -p 'test_*.py'`. The full artifact suite belongs on the bounded Linux build worker; there is no requirement to start Docker or run load tests on an operator Mac. -## Production activation contract still to implement +## Installed production contract -1. Verify the installed runner digest, applied journals, current manager/core - release descriptors and preserved runtime state on Synology. -2. Introduce a versioned **normal update** transition for repeat releases. +1. The root installer verifies its installed identity, applied journals, current + manager/core release descriptors and preserved runtime state on Synology. +2. The versioned **normal update** transition handles repeat releases. Historical recovery descriptors and fixed predecessor guards remain intact. Reusing the v13 manager or v4 core recovery identity is not a CI strategy. 3. Persist each admitted `main` revision, run identity and artifact digest in a @@ -116,13 +132,15 @@ requirement to start Docker or run load tests on an operator Mac. 4. Link exact source commits to immutable data-only deploy artifacts. Retain existing `manifest.env`, `files.txt`, `payload/...` validation and fixed component/service selection. Exclude secrets, DB state and executable hooks. -5. Under the deploy lock, check the current predecessor, obtain and validate a - fresh canonical plan, then apply that exact digest automatically. Record +5. Obtain a fresh canonical plan, reserve the verified artifact in the durable + queue, then apply with predecessor and payload checks under the deploy lock. Record commit, run, artifact, plan, receipt and backup. The controller's allowlist is root-owned and cannot be expanded by a workflow artifact. -6. Before activation verify push success, failed tests, wrong SHA/repo/branch, - duplicate events, overlapping pushes, restart recovery and failed-health - rollback. Verify that no new host ports or production mounts are exposed. +6. Source tests cover wrong SHA/repo/branch, failed/pending checks, duplicate + events, pagination changes, overlapping runs, restart reconciliation and + canonical rollback. Bootstrap acceptance proves timer identity, private token + import and unchanged existing applications. Live automatic release acceptance + is recorded separately in Ops; unit tests alone do not prove NAS delivery. Build/test failures leave production untouched. Runtime installation failures follow the canonical runner's rollback policy; an ambiguous or failed rollback @@ -131,9 +149,12 @@ deployed. User/device data and tokens survive application updates. ## Operator view -Normal use after activation: push to `main`, then watch Gitea **Actions**. -Deployment status must separately show the installed commit and receipt. A red -check means the candidate did not qualify; it must not show a green deploy. +Normal use: push to `main`, then watch Gitea **Actions** for qualification. +`/volume1/docker/nodedc-device-autodeploy/runtime-status.json` is a sanitized +controller observation available through the existing SMB share. Canonical +`nodedc-deploy/state/applied.jsonl`, its matching archive and backup establish the +installed release. A waiting status does not replace the latest applied receipt. +A red qualification means the candidate did not qualify; it is not a deployment. For emergency pause, stop admitting new deployments without cancelling an in-progress apply. Recovery/rollback remains a recorded canonical transition. diff --git a/infra/ci/sources.lock.json b/infra/ci/sources.lock.json index aa85d46..8875f93 100644 --- a/infra/ci/sources.lock.json +++ b/infra/ci/sources.lock.json @@ -13,7 +13,7 @@ }, "platform": { "url": "https://git.dcserve.ru/SILVER/NODEDC_PLATFORM.git", - "commit": "d46ecc4cb1159940b7aec112a675d44e7378bba6" + "commit": "f7416bc59a19a9ac53c4f4591eaf50a7f4a41641" } } }