wip(dev-000073): preserve durable bootstrap checkpoint
CI / test (push) Failing after 19s

DEV-000073 is NOT DONE; current work is partial/stabilized WIP only. go test ./cmd/devctl was last verified PASS. Remaining bootstrap/secret integration requires a stronger long-horizon model. This commit is preservation-only; current ancestry includes DEV-000072 candidate 36fec6c05cdf7aaf413fe... and must be reconciled before DEV-000073 promotion.
This commit is contained in:
m
2026-08-18 12:07:11 +03:00
parent 36fec6c05c
commit 754cbe43d2
12 changed files with 2679 additions and 5 deletions
+25
View File
@@ -23,6 +23,31 @@ powershell -ExecutionPolicy Bypass -File .\deploy\windows\Confirm-DomovoyProduct
The confirmation script accepts the promotion only when every project-built container has that revision label, then atomically records its exact Docker image ID in `%LOCALAPPDATA%\Domovoy\monitoring\deployment-manifest.json` and the private NAS monitoring directory. Production health compares every running label and image ID to this manifest and becomes degraded on drift. The manifest is non-secret operational evidence; it is not canonical Assistant state.
## Production deploy pipeline V1
`cmd/devctl` is now the normal production deployment entrypoint and uses two explicit stages:
- `deploy prepare` reads the compose manifest and an explicit durable bootstrap source (for production: `--env-file`) and resolves required inputs.
- `deploy apply` consumes a prepared deployment plan and is the only normal mutation path.
Safety properties:
- Missing/empty/unresolvable required input blocks prepare readiness (`BLOCKED`) and blocks apply.
- Ambient environment is not authoritative for required production inputs.
- A prepare includes the resolved source revision, config revision, secret references, resolved input classification, migration readiness, known-good snapshot (if available), and a materialized plan binding hash.
- `deploy apply` refuses to execute stale plans (expired, mismatched compose, changed source/config, input drift).
- `apply` verifies running containers, required volumes, and external health (`/healthz`, `/chat`) before returning ready.
- Rollback path to recorded known-good is prepared for recovery when explicitly allowed (`--auto-rollback`).
Operational sequence example:
```powershell
go run ./cmd/devctl deploy prepare --target production --compose deploy/docker-compose.prod.yml --env-file <fresh-production.env> --plan .devctl/deployment-plans/prod-<rev>.json
go run ./cmd/devctl deploy apply --plan .devctl/deployment-plans/prod-<rev>.json
```
`prepare`/`apply` are intentionally decoupled so a fresh Codex session with only repository checkout and durable sources can complete production deployment safely.
The first external operation adds `assistant-notification-receiver-1` on production host port `18081`. Caddy applies `deploy/caddy/assistent.caddy`, routing only `https://assistent.cin.su/delivery/*` to that port and all other paths to Creator Web on `18080`. The receiver has an isolated durable volume and no Assistant database access. Commit success means an immutable receiver receipt exists; Windows display and human reading are not Commit outcomes.
Migrations `010_capability_notification_binding.sql` and `011_commit_notification_envelope.sql` must be applied before the new runtimes start. The initial Capability binding is owner-local for `domovoy-creator-principal`, revision 1, capability `prospective-notification-delivery`, origin `https://assistent.cin.su`, delivery path `/delivery/v1/deliveries`, receipt path `/delivery/v1/receipts`, protocol `IDEMPOTENT_RECEIPT_V1`, and secret reference `domovoy-notification-write-v1`.