From fca8b2013e333643d5b41619a5ad09ae3111b20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:18:39 +0000 Subject: [PATCH 1/9] docs: remove the helper migration integration note It was a work note between two worktrees ('parent-owned', 'this worktree'), and its open items are done: the finalizer, the rootplan field and the reconcile transport are wired in the code. No code or doc linked to it except the docs index. Co-Authored-By: Claude Opus 5.5 --- docs/README.md | 1 - docs/helper-migration-integration.md | 228 --------------------------- 2 files changed, 229 deletions(-) delete mode 100644 docs/helper-migration-integration.md diff --git a/docs/README.md b/docs/README.md index 9ca9ec5..48f46c6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -29,7 +29,6 @@ Le point d'entrée du produit reste le [README](../README.md). Le modèle du pro | Document | Sujet | | --- | --- | | [operations-recovery.md](operations-recovery.md) | Réconciliateur de reprise dans `shuttle-root` | -| [helper-migration-integration.md](helper-migration-integration.md) | Migration du helper root | ## Publier diff --git a/docs/helper-migration-integration.md b/docs/helper-migration-integration.md deleted file mode 100644 index d90a52e..0000000 --- a/docs/helper-migration-integration.md +++ /dev/null @@ -1,228 +0,0 @@ -# Root helper migration integration - -This document is the operator and parent integration boundary for the bounded -legacy migration module. The Linux migration code and its focused tests are in -this worktree. The root plan, root dispatcher, capability response, operation -writer implementation, and release changelog remain parent-owned. - -```text -+------------------------------------------------------------+ -| Legacy strict signed helper update | -+-----------------------------+------------------------------+ - | - v -+-----------------------------+------------------------------+ -| Candidate help probe, intent fsync, exact parent and flock | -+-----------------------------+------------------------------+ - | - v -+-----------------------------+------------------------------+ -| Existing atomic replacement and durable replaced phase | -+-----------------------------+------------------------------+ - | - v -+-----------------------------+------------------------------+ -| Signed finalize or signed boot-change reconcile | -+-----------------------------+------------------------------+ - | - v -+-----------------------------+------------------------------+ -| Archived history and completed migration | -+------------------------------------------------------------+ -``` - -## Implemented caller behavior - -`updateSignedRootHelperWithFinalizer` keeps the first legacy exchange -operation-free. It sends the existing `rootplan.NewHelperUpdate` plan after a -capability audit. It never adds an operation ID to that plan. A helper that -reports `signed-helper-update` but not `helper-migration` is treated as legacy, -because it cannot safely receive the finalization action. - -After the candidate has created the durable intent, the caller invokes: - -```go -type helperMigrationFinalizer func( - *shuttlessh.Client, - trustedHostIdentity, - helperMigrationFinalizeRequest, -) error - -type helperMigrationFinalizeRequest struct { - CandidateSHA256 string - Host string - IntentID string - PlanExpiresAt time.Time - Validate func() error -} -``` - -The default finalizer returns an explicit unavailable error. The parent must -wire a signed `helper-migration-finalize` transport before an update can report -success. If the capability response is withheld because a migration is -pending, the caller reports the pending ID and phase and may call the finalizer -directly with the candidate digest. It does not send the legacy update again. - -The status command preserves this read-only pending state even while ordinary -capability advertisement is withheld. A parent status hook may use the typed -adapter already declared in the migration package: - -```go -type helperMigrationStatusReader func( - *shuttlessh.Client, - trustedHostIdentity, -) (helperMigrationStatus, error) -``` - -Modern helpers must use an exact parent adapter that reserves the operation -with the current typed coordinator context. The legacy first hop must remain -operation-free. The old helper is never inferred to understand a new command. - -## Root plan hook - -The parent adds a typed `HelperMigration` field and constructor to -`app/go-cli/internal/rootplan/rootplan.go`: - -```go -type HelperMigrationOperation struct { - CandidateSHA256 string `json:"candidate_sha256"` -} - -func NewHelperMigrationFinalize( - candidateDigest, - operatorKeyFingerprint, - hostFingerprint string, - now time.Time, - validity time.Duration, -) (Plan, error) -``` - -The action is `helper-migration-finalize`. It has no payload, no normal -operation ID, and no unrelated typed operation fields. The parent validates the -candidate digest and rejects unknown fields, an operation ID, and unrelated -payloads. The signed reconcile action uses the same typed candidate and an -explicit reconciliation action: - -```go -type helperMigrationReconcileRequest struct { - CandidateSHA256 string - Host string - IntentID string - PlanExpiresAt time.Time - Validate func() error -} - -func reconcileRootHelperMigration( - context.Context, - helperMigrationReconcileRequest, -) error -``` - -The root dispatcher verifies the signature first. It then calls the migration -guard. The guard must be checked again inside the acquired root-operation flock -before every mutation. `audit`, `operations-status`, `recovery-plan`, signed -`helper-migration-finalize`, and signed `helper-migration-reconcile` are the -only actions that may inspect or complete a pending migration. In particular, -`recovery-apply`, helper update, stack actions, secrets actions, baseline -actions, and arbitrary runs remain blocked. - -The helper-update reservation exception is narrow. It is allowed only when the -caller identity was verified as the exact root helper process and the candidate -digest is linked to the pending intent. An arbitrary active `helper-update` -record is never ignored. - -## Candidate and finalization proof - -The staged candidate `init` path runs only for the exact root lifecycle: - -- uid 0; -- argv `shuttle-root --help`; -- the exact root-helper staging directory and `.shuttle-root.next-*` name; -- a root-owned regular mode 0755 candidate; -- the installed root helper as the parent with argv `path apply`; -- the parent effective UID, stable process birth value, and exact lock proof. - -The lock proof reads `/proc/PID/fdinfo/FD`. It requires the exact lock device and -inode and a `FLOCK` record owned by the parent PID. A free lock acquired by a -different process is not evidence. Process capture filters the exact helper -executable before hashing, bounds every proc read, and checks process birth -before and after the executable read. Permission and ambiguous relevant errors -are returned rather than treated as an absent process. - -The first candidate probe writes a root-owned durable intent before the old -helper renames the candidate. Ordinary help remains pure. A prepared or -replaced retry is accepted only when source, candidate digest, host identity, -probe fields, lock device, and lock inode all match. A replaced retry also -revalidates the installed candidate, journal, and writers under the lock. - -Completed intents are written once to the bounded history directory using their -immutable ID, then removed from the active intent path before a new generation -is initialized. Existing history with different content is refused. - -## Operation journal and writer proof hook - -The migration reader recognizes `/var/lib/shuttle/operations` and its exact -`writers` child. Journal filenames accept both UUID operation IDs and valid -historic 32 hexadecimal operation IDs. Records must use the shared -`shuttle.operation/v1` schema, match their filename, and be terminal. Active, -recovery-required, corrupt, unsafe, and unexpected records refuse migration. - -The operation-writers implementation is parent-owned and is not imported by -this worktree. The owned runtime exposes this narrow adapter: - -```go -const helperMigrationWriterProofSchema = "shuttle.operation-writer/v1" - -type helperMigrationWriterRecord struct { - OperationID string `json:"operation_id"` - State string `json:"state"` - Origin string `json:"origin"` -} - -type helperMigrationWriterProof struct { - Schema string `json:"schema"` - Writers []helperMigrationWriterRecord `json:"writers"` -} - -type helperMigrationWriterProofReader func( - string, -) (helperMigrationWriterProof, error) -``` - -The default reader refuses any nonempty writers directory. A supplied reader -must prove the versioned contract, a legitimate operation ID, and `closed` for -every writer. `local-vps` and `client-origin` are distinct origin values and -must not be collapsed. Free-form `KernelProof` and `AuthenticatedProof` text -is not accepted as proof. - -## Boot-change reconcile - -Finalization refuses a boot ID change. The signed reconcile path acquires the -flock first, re-reads the immutable intent, checks expiry and the signed -validator, reads the real current boot ID, verifies the installed candidate, -and inspects the coordinator journal and typed writers proof under that lock. -It drains matching old executors with bounded proc reads, records the explicit -`reconcile-boot-change` history item, and only then advances the durable phase. -Any missing proof leaves the intent pending. There is no blanket auto-accept -and no named recovery command is claimed here. - -## Parent integration status - -This worktree provides the migration implementation, focused tests, the caller -fallback, and these exact typed hooks. Parent work remains for the root plan -constructor and validation, dispatcher branches, signed finalize and reconcile -transport, capability/status response, replacement callback, coordinator -writer proof reader, and the final changelog entry. Until those hooks are wired, -the default finalizer remains unavailable and this document does not claim that -the overall migration is complete. - -## Changelog text for the parent - -**Legacy root-helper updates now have a bounded signed migration path.** A -legacy helper receives the historical strict signed update first. The candidate -proves the exact root-helper parent and lock context, writes a root-owned -durable intent before replacement, and the new helper waits for old executors -before signed finalization revalidates the host and closes the intent. Existing -strict decoding stays compatible, interrupted fsync transitions remain -resumable, and uncoordinated historical registry clients still require -explicit drainage. From 3ede8aee19bf906a94d53f09f7d82536b54c7dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:19:06 +0000 Subject: [PATCH 2/9] docs: merge release security into the release runbook release-security.md described a CI release job and workflow, with a Bun gate, that do not exist: releases are signed on the maintainer workstation by scripts/release-publish-local.sh. releasing.md named a nonexistent --allow-development-build flag. One runbook now covers cutting, publishing, the manifest signature, key rotation and update recovery, as the scripts do it. Co-Authored-By: Claude Opus 5.5 --- docs/README.md | 3 +- docs/release-security.md | 61 ----------------- docs/releasing.md | 144 ++++++++++++++++++++++++++------------- 3 files changed, 99 insertions(+), 109 deletions(-) delete mode 100644 docs/release-security.md diff --git a/docs/README.md b/docs/README.md index 48f46c6..b5eeed5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -34,5 +34,4 @@ Le point d'entrée du produit reste le [README](../README.md). Le modèle du pro | Document | Sujet | | --- | --- | -| [releasing.md](releasing.md) | Procédure de release | -| [release-security.md](release-security.md) | Confiance des releases et reprise des mises à jour | +| [releasing.md](releasing.md) | Procédure de release, confiance des releases et reprise des mises à jour | diff --git a/docs/release-security.md b/docs/release-security.md deleted file mode 100644 index 1540e63..0000000 --- a/docs/release-security.md +++ /dev/null @@ -1,61 +0,0 @@ -# Release trust and update recovery - -`latest.json` is signed outside the VPS with Ed25519. Its canonical bytes are -`deployshuttle-release-manifest-v1`, then the version, key id, and every asset -checksum sorted by asset name. Signed URLs are intentionally excluded: they are -short-lived delivery URLs, and the updater accepts them only -after signature verification and only from the configured site origin. - -The release job requires `SHUTTLE_RELEASE_SIGNING_KEY` (base64 Ed25519 -seed/private key), `SHUTTLE_RELEASE_PUBLIC_KEY` (base64 raw public key), -`SHUTTLE_RELEASE_KEY_ID`, and -`SHUTTLE_RELEASE_TRUSTED_KEYS` (comma-separated -`key-id=base64-public-key` entries). The keyring is validated before building: -it has unique ids/keys and contains the active signing key with the matching -public key. Missing or invalid material fails the release before upload. The -keyring, key id, and revocation list are embedded in each released CLI with -linker flags; the private key is never embedded. - -Rotation is a two-release bridge: first publish a client embedding both -`old=...` and `new=...`, while manifests may still be signed by old; then sign -the next manifest with new. A following client can embed only `new=...` and -set `SHUTTLE_RELEASE_REVOKED_KEY_IDS=old`. A revoked id is rejected even -if it appears in a keyring. Existing pre-bridge clients cannot be remotely -reconfigured safely, so an operator must retain the old signer until the bridge -client is sufficiently deployed and follow the incident/recovery process for a -compromised old key. - -The updater bounds manifest/download size, uses a 30-second HTTP timeout, -requires HTTPS and the configured host, downloads and hashes before execution. -It writes and fsyncs an `O_EXCL` sibling temporary executable, then creates a -hard-link recovery artifact at `.recovery`, fsyncs its directory, and -atomically replaces `` with the staged file. The recovery artifact is -kept until the published directory is durable, then removed and the directory -is fsynced again. It is not a `.old` rename and it is not promised to survive a -successful update. - -If a failure occurs before recovery cleanup, the command returns an error and -does not hide the retained recovery artifact. Do not retry over it: run -`shuttle update --recover`, which atomically restores `.recovery` and -fsyncs the directory, then investigate the reported filesystem error. A -recovery artifact already present also blocks a new update. - -There is one deliberately different post-cleanup case: when removal of -`.recovery` succeeds but the following directory fsync fails, the new -binary was already published and durably fsynced, while the recovery artifact -is absent. The updater exits successfully with an explicit warning that -`shuttle update --recover` is unavailable; it never labels that state as -recoverable. Repeating cleanup is idempotent (an absent artifact is accepted -and the directory is fsynced again). This gives one-file crash recovery; it -does not claim an atomic transaction across download, filesystem, and network -operations. - -The release workflow gates Go formatting/vet/tests/vulnerability scan and Bun -install/typecheck/tests/build/audit before signing/upload. It has no SBOM or -SLSA provenance publisher yet: that is an explicit current limitation, not a -claim of supply-chain attestation. This repository also has no generated -third-party license notice bundle yet; releases therefore do not claim one. -GitHub production environment protection, -tag protection, release SSH host key, and the signing secret/public key/key-id -must be configured by an operator; repository code cannot prove those external -controls. diff --git a/docs/releasing.md b/docs/releasing.md index 3a8d783..20e6e41 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -1,10 +1,9 @@ # Releasing -Maintainer runbook for cutting a `shuttle` release. +Maintainer runbook for cutting and publishing a signed `shuttle` release, and +the trust model the updater relies on. ---- - -## Cutting a release +## Cut a release ```bash sh scripts/release.sh patch # v0.0.1 -> v0.0.2 @@ -13,60 +12,113 @@ sh scripts/release.sh major # v0.0.1 -> v1.0.0 sh scripts/release.sh v0.2.3 # explicit version ``` -The script runs, in order: +`make release patch` runs the same script. It refuses a dirty working tree, then: -1. `gofmt`, `go vet ./...`, `go test ./...` and `govulncheck`, aborting on failure. -2. `git diff --check`. -3. An annotated git tag for the new version. +1. runs `gofmt`, `go vet ./...`, `go test ./...` and `govulncheck`, and aborts + on failure; +2. runs `git diff --check`; +3. creates an annotated tag for the new version. It builds nothing and leaves the installed `shuttle` alone (`make install` does -that). It stops there and prints the push command. Nothing is published until -you run it: +that). Nothing is published until you push the reviewed `main` commit and the +tag: ```bash git push origin main && git push origin ``` ---- - -## Signed releases - -The release build signs its manifest with an Ed25519 key. Keep the private key -outside the repository and verify the public key through an independent trusted -channel. Development builds without a trusted keyring cannot verify updates. - ---- +## Publish the signed release -## Local builds - -`scripts/build-go.sh` cross-compiles every target into `dist/` without tagging -anything. It takes the version from `SHUTTLE_VERSION`, falls back to `git describe ---tags --always --dirty`, and finally to `dev`. Use it to test the build matrix -before a real release. - -When `SHUTTLE_RELEASE_REQUIRE_SIGNATURE=1` is set, the script also refuses a -dirty Git tree before reading the protected signing configuration. An explicit -`SHUTTLE_VERSION` therefore cannot turn uncommitted changes into a trusted -operator binary. The signed path is intended for a clean, reviewed tag in CI; -development builds must remain explicitly acknowledged with -`--allow-development-build` and are not suitable for destructive missions. - -```bash -make build -``` - -## Publishing a signed release - -Use a checkout of `dev-toolings/shuttle`. Push the reviewed main commit and its -release tag, then check out that exact tag on the signing workstation. Repository -variables named `SHUTTLE_RELEASE_*` hold the public trust configuration. The -private key remains in the workstation's signing file, with mode 0600 or 0400. +Publishing happens on the signing workstation, from a checkout of +`dev-toolings/shuttle` at the exact tag: ```sh git switch --detach vX.Y.Z sh scripts/release-publish-local.sh vX.Y.Z ``` -The script checks the GitHub tag, builds and signs the assets locally, and -verifies them before creating a draft release. It reads all seven assets back -from GitHub and publishes the release only when their bytes match. +The script: + +1. checks that `HEAD` is the commit of the public tag; +2. reads the public trust configuration from the repository variables + `SHUTTLE_RELEASE_KEY_ID`, `SHUTTLE_RELEASE_PUBLIC_KEY`, + `SHUTTLE_RELEASE_TRUSTED_KEYS` and `SHUTTLE_RELEASE_REVOKED_KEY_IDS`; +3. reads the private key from the local signing file + (`~/.config/shuttle/release-signing-.key`, or + `SHUTTLE_RELEASE_SIGNING_KEY_FILE`), which must be mode 0600 or 0400; +4. builds and signs every asset with `scripts/build-go.sh` in signed mode + (`SHUTTLE_RELEASE_REQUIRE_SIGNATURE=1`, which refuses a dirty tree), then + verifies `latest.json` with `release-verify`; +5. creates a draft release, reads every asset back from GitHub and publishes + the release only when their bytes match. + +The private key stays outside the repository; verify the public key through an +independent trusted channel. Builds without a trusted keyring cannot verify +updates. + +## Local builds + +`make build` (`scripts/build-go.sh`) cross-compiles every target into `dist/` +without tagging anything. It takes the version from `SHUTTLE_VERSION`, falls +back to `git describe --tags --always --dirty`, and finally to `dev`. Use it to +test the build matrix before a real release. + +## Manifest signature + +`latest.json` is signed outside the VPS with Ed25519. Its canonical bytes are +`deployshuttle-release-manifest-v1`, then the version, key id and every asset +checksum sorted by asset name. Download URLs are not part of the signed bytes; +the updater accepts them only after signature verification and only from the +release origin. + +The keyring is validated before building: ids and keys are unique, and it +contains the active signing key with its matching public key. Missing or invalid +material fails the release before upload. The keyring, key id and revocation +list are embedded in each released CLI with linker flags; the private key never +is. + +## Key rotation + +Rotation is a two-release bridge: + +1. publish a client that embeds both `old=...` and `new=...`, while manifests + are still signed by `old`; +2. sign the next manifest with `new`; +3. a following client can embed only `new=...` and set + `SHUTTLE_RELEASE_REVOKED_KEY_IDS=old`. A revoked id is rejected even if it + appears in a keyring. + +Clients older than the bridge cannot be reconfigured remotely: keep the old +signer until the bridge client is widely deployed, and follow the incident +process if the old key is compromised. + +## Update recovery + +The updater bounds the manifest and download sizes, uses a 30-second HTTP +timeout, requires HTTPS and the release host, and downloads and hashes before +running anything. It writes and fsyncs an `O_EXCL` sibling temporary +executable, creates a hard-link recovery artifact at `.recovery`, fsyncs +the directory, then atomically replaces `` with the staged file. The +recovery artifact is removed once the published directory is durable, and the +directory is fsynced again. + +If a failure happens before that cleanup, the command returns an error and keeps +the recovery artifact. Do not retry over it: run `shuttle update --recover`, +which atomically restores `.recovery` and fsyncs the directory, then +investigate the reported filesystem error. A recovery artifact already present +also blocks a new update. + +One post-cleanup case differs: when removing `.recovery` succeeds but +the following directory fsync fails, the new binary is already published and +durable while the recovery artifact is gone. The updater exits successfully with +an explicit warning that `shuttle update --recover` is unavailable. Repeating +the cleanup is idempotent. This gives one-file crash recovery, not an atomic +transaction across download, filesystem and network operations. + +## Current limitations + +- No SBOM or SLSA provenance is published: releases make no supply-chain + attestation claim. +- No generated third-party license notice bundle ships with releases. +- Repository settings such as tag protection cannot be proven by code; they are + the maintainer's responsibility. From 29ba17b7f89e60cb2ecd36a54bbca11afcd8ee90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:19:30 +0000 Subject: [PATCH 3/9] docs: fold the monitoring collector and runtime notes into monitoring.md The three monitoring pages repeated each other (default checks, security keys, incident and maintenance behavior) and the collector note kept an internal arbitration paragraph. monitoring.md now holds one copy of each rule, with the collector details and runtime guarantees as its last two sections, and points to backup-monitoring.md for the backup lifecycle. Co-Authored-By: Claude Opus 5.5 --- docs/README.md | 4 +- docs/monitoring-collectors.md | 86 ------------------ docs/monitoring-runtime.md | 87 ------------------ docs/monitoring.md | 160 ++++++++++++++++++++++++++++++++-- 4 files changed, 156 insertions(+), 181 deletions(-) delete mode 100644 docs/monitoring-collectors.md delete mode 100644 docs/monitoring-runtime.md diff --git a/docs/README.md b/docs/README.md index b5eeed5..2856898 100644 --- a/docs/README.md +++ b/docs/README.md @@ -20,9 +20,7 @@ Le point d'entrée du produit reste le [README](../README.md). Le modèle du pro | [check-catalog.md](check-catalog.md) | Contrôles de `shuttle doctor` | | [backups.md](backups.md) | Sauvegardes applicatives et restauration isolée | | [backup-monitoring.md](backup-monitoring.md) | Suivi du cycle de vie des sauvegardes | -| [monitoring.md](monitoring.md) | Surveillance continue | -| [monitoring-collectors.md](monitoring-collectors.md) | Collecteurs de la surveillance | -| [monitoring-runtime.md](monitoring-runtime.md) | Garanties d'exécution de la surveillance | +| [monitoring.md](monitoring.md) | Surveillance continue, collecteurs et garanties d'exécution | ## Contrats internes diff --git a/docs/monitoring-collectors.md b/docs/monitoring-collectors.md deleted file mode 100644 index 57a63a7..0000000 --- a/docs/monitoring-collectors.md +++ /dev/null @@ -1,86 +0,0 @@ -# Monitoring collectors - -The collectors run read-only checks against the state retained by the root -helper and the live host. A result is `healthy` only when the required evidence -was collected and matched the expected configuration. Malformed, empty, -missing, timed out or unsupported evidence is `unavailable`. An observed -configuration or health mismatch is `degraded`. A dependency that is absent -from the expected configuration is `not_applicable`. - -Application expectations come from the root-owned -`/var/lib/shuttle/apps//current.yml`. The file is parsed with the existing -YAML parser and read with a bounded adapter. Every expected service must appear -in the live service roster. The collector compares desired and running -replicas, the task state, the exact retained image, and container health when a -healthcheck is declared. An explicit `replicas: 0` is the only case where -`0/0` is healthy. Redis and RabbitMQ are not applicable only when their service -is absent from this expected inventory. - -PostgreSQL is always treated as a native host service. The configured major and -cluster name are matched against `pg_lsclusters --no-header`, whose columns are -`version cluster port status owner datadir logfile`. The collector then checks -the reported port with `pg_isready` and uses the `datadir` column as the -PostgreSQL filesystem target; it never starts a PostgreSQL container or changes -a cluster version. - -The shared edge service is exactly `shuttle-edge_caddy` and must report restart -condition `any`, converged tasks and healthy containers. The registry must be -running and healthy, use restart policy `always`, and expose exactly -`127.0.0.1:5000`. Docker port bindings and host listener evidence are both -checked, so an extra public IPv4, IPv6 or host listener fails the check. - -Security requirements activate their corresponding collectors. The collectors -reuse readiness semantics for Docker-USER, UFW, private SSH rules, effective -SSH ports and Fail2ban. Installed configuration materializes expected `ops` and -`deploy` accounts, the SSH listen address and the allowed public TCP ports from -trusted project settings and the host group. Explicit monitoring settings -override those defaults. Each required account is probed with one -comma-separated `sshd -T -C` context (`user`, and `laddr`/`lport` when known). -The collector does not invent a loopback peer (`host=localhost,addr=127.0.0.1`) -and does not append `laddr`/`lport` as extra positional arguments. Missing -client peer identity is reported as not observed. A deploy context cannot -certify a different operator context. Public SSH operator access is preserved -and no collector inserts firewall rules, removes bans or changes host services. - -UFW evidence must be verbose and complete: `Status: active` plus an explicit -`Default: deny (incoming), allow (outgoing), deny (routed)` line. Active without -`Default`, or a permissive `allow (routed)` third field, is not a safe policy. -Expected public TCP ports come from the access baseline (HTTPS and SSH unless -SSH is private-interface only). Custom `allowed_tcp_ports` are preserved. - -Application task health compares more than the live service spec. Each Running -task is inspected (JSON `Spec.ContainerSpec.Image`) and must carry the retained -manifest digest. A service spec that already matches a new digest while an old -task still runs is degraded. Missing image identity is unavailable, not healthy. - -Disk paths are observed filesystems, not labels. `disk.data` keeps the -application data path and adds the native PostgreSQL data directory from the -matching `pg_lsclusters --no-header` row when that directory is on a separate -mount. `disk.images_registry` uses `DockerRootDir` when the images path is -the default. Registry storage is selected only by destination -`/var/lib/registry`; a preceding config bind is ignored. Failed or missing -mount inspection emits `disk.images_registry.volume` as `unavailable` instead -of dropping the target. Those inventory commands run inside `runCheck` so a -stalled `pg_lsclusters` or Docker inspect cannot outlive the check timeout. -BuildKit laptop and remote cache are outside VPS scope: `disk.cache` is -`not_applicable` with not-observed evidence, never healthy because -`/var/cache` has free space. Custom explicit disk paths and thresholds are -preserved. An unknown path is unavailable. - -Managed-host monitoring is the Swarm VPS installed by setup. Compose remains -an unmanaged scope and does not gain `sudo` or root-helper operations. Parent -ROOT still owns managed-scope arbitration, recipes and unit/tmpfiles/netlink -behavior; this collector module does not claim Compose coverage. - -For example, this configuration collects all four security checks because each -requirement also enables its matching collector: - -```yaml -monitoring: - enabled: true - security: - require_ssh_key_only: true - require_ufw: true - require_docker_user: true - require_fail2ban: true -``` diff --git a/docs/monitoring-runtime.md b/docs/monitoring-runtime.md deleted file mode 100644 index ea1c5f3..0000000 --- a/docs/monitoring-runtime.md +++ /dev/null @@ -1,87 +0,0 @@ -# Monitoring runtime guarantees - -The monitoring cycle has one deadline derived from `timeout_seconds` and -`interval_seconds`. It is capped at two minutes. Collection receives four -fifths of that budget. Installed local and external entry points pass this -same context through collection and incident processing. A timed out collector -becomes `unavailable`, and the dated partial report remains available to the -caller. - -Collector reads are separate from Shuttle-owned runtime files. The default -collector reader opens an ordinary host path with `O_NOFOLLOW|O_NONBLOCK`, -accepts a regular file at its existing mode and owner, reads a bounded body, -and never creates, chmods or repairs the parent directory or the file. Private -`0700` directories and `0600` files apply only to paths Shuttle owns and -writes: incident state, its lock, the delivery log, maintenance, the episode -archive, and approved root secret files. - -Runtime ancestors must be owned by root or the process EUID. Group or world -writable ancestors are rejected even when owned by root or the EUID. Trusted -root or EUID ancestors that are not group or world writable, including `0755` -intermediates, are accepted. Only the Shuttle-owned runtime directory itself -must be EUID-owned mode `0700`. The only writable-ancestor exception is a -descriptor-verified root-owned sticky temporary directory. That exception does -not apply to its descendants, and it does not accept an arbitrary sticky -`01777` directory. The next components after that sticky root must still be -EUID or root owned and not group or world writable. Foreign-owned directories -are rejected, including a replaceable `0755` parent. Operations stay on opened -`os.OpenRoot` descriptors for the whole lock, read, write, rename and sync -sequence, so an ancestor swap cannot redirect another process onto the held -lock identity. FIFO, socket and device paths fail promptly for state, lock, -secret, maintenance and log files. - -Incident processing for a canonical `incidents.json` path admits at most one -in-process transaction. The worker owns begin, open, flock, load, transitions, -authorized notifications, persistence and `session.Close`. The caller waits for -a buffered result or its context. A timeout returns an independent copy of the -collected report and a typed `transaction_timeout` or -`persistence_unconfirmed` error. It does not unlock or close the worker -descriptors. The worker keeps the flock until I/O and cleanup finish, starts -no new notifications after cancel, and persists already delivered -acknowledgements. Durability is unconfirmed when a rename may have succeeded. -This bound is in-process: it does not promise a goroutine survives CLI exit. - -Incident state is protected by an application-specific `incidents.json.lock`. -The lock covers the complete read, state transition, notification delivery, and -state save sequence. It waits for at most 30 seconds. Each successful -notification acknowledgement is saved before the next event is attempted, so -an interruption can replay only the event whose acknowledgement was not saved. -Every incident and recovery event carries its episode ID. The notification ID -is stable for the application, check, event kind, and episode ID. Receivers must -deduplicate by that ID because the crash window between acknowledgement and -persistence is intentionally at-least-once. - -A missing maintenance file means there is no window. An unsafe path, oversized -file, FIFO, corrupt JSON document or I/O error is not treated as a cleared -window. The installed entry point returns the collected report with a -sanitized error and does not start notifications. - -A failure must remain debounced across cycles. A healthy observation records a -recovery candidate but does not discard it before the positive debounce ends. -An incident is persisted and delivered before its recovery. A maintenance -window suppresses expected delivery while retaining the candidate, and clearing -or expiring the window allows the pending incident and recovery to proceed. -After a recovery is acknowledged, later healthy cycles preserve the completed -transition and do not enqueue it again. Starting a new failure episode retains -unacknowledged events for the old episode and creates an independent episode -identity. An acknowledgement for one episode cannot update another episode. - -Active incident state stays readable. Status shares `schema`, `updated_at`, -`incidents`, `pending`, `maintenance_until` and `last_report`. Fully -acknowledged recovered historical episodes are appended to -`incidents-archive.jsonl` in the same private directory, idempotently by -`check_id` and `episode_id`, then removed from the active `episodes` map. -The archive is a readable JSONL file of the shared status fields `check_id`, -`episode_id`, `state`, `first_seen`, `last_seen`, `incident_sent` and -`recovery_sent`. Duplicate archive records are not rewritten. Unacknowledged -events and the current per-check incident stay in `incidents.json`. A save -that would exceed the 1 MiB reader limit, including the trailing newline, -fails before commit. There is no destructive purge. - -Runtime state and delivery failure paths are absolute, private paths. Existing -symlinks, unsafe ancestors, reserved state names, and writable foreign -ancestors are rejected. State, maintenance and secret reads are bounded and -reject FIFOs, sockets, devices and directories after descriptor metadata is -checked. Failure logs contain only event metadata and a generic delivery -error. URLs, credentials, command output, and raw configuration errors are not -written to reports or logs. diff --git a/docs/monitoring.md b/docs/monitoring.md index 3df6029..3b056af 100644 --- a/docs/monitoring.md +++ b/docs/monitoring.md @@ -199,11 +199,161 @@ the VPS configuration secrets. An expected backup is degraded when no artifact is present, when the newest artifact is older than `max_age_seconds`, or when an encrypted archive lacks a -committed receipt. The backup lifecycle sidecar records source capture, -encryption, receipt publication, and optional cloud read-back separately. A -cloud failure preserves the local encrypted archive and remains visible when -cloud export was explicitly enabled. An unconfigured cloud destination does -not alert. +committed receipt. The lifecycle stages it reads (capture, encryption, +receipt publication and optional cloud read-back) are described in +[backup-monitoring.md](backup-monitoring.md). The existing native PostgreSQL backup timer remains native and is not replaced by this monitor. PostgreSQL is never run in Docker. + +## What the collectors check + +The collectors run read-only checks against the state retained by the root +helper and the live host. A result is `healthy` only when the required evidence +was collected and matched the expected configuration. Malformed, empty, +missing, timed out or unsupported evidence is `unavailable`. An observed +configuration or health mismatch is `degraded`. A dependency that is absent +from the expected configuration is `not_applicable`. + +Application expectations come from the root-owned +`/var/lib/shuttle/apps//current.yml`. The file is parsed with the existing +YAML parser and read with a bounded adapter. Every expected service must appear +in the live service roster. The collector compares desired and running +replicas, the task state, the exact retained image, and container health when a +healthcheck is declared. An explicit `replicas: 0` is the only case where +`0/0` is healthy. Redis and RabbitMQ are not applicable only when their service +is absent from this expected inventory. + +PostgreSQL is always treated as a native host service. The configured major and +cluster name are matched against `pg_lsclusters --no-header`, whose columns are +`version cluster port status owner datadir logfile`. The collector then checks +the reported port with `pg_isready` and uses the `datadir` column as the +PostgreSQL filesystem target; it never starts a PostgreSQL container or changes +a cluster version. + +The shared edge service is exactly `shuttle-edge_caddy` and must report restart +condition `any`, converged tasks and healthy containers. The registry must be +running and healthy, use restart policy `always`, and expose exactly +`127.0.0.1:5000`. Docker port bindings and host listener evidence are both +checked, so an extra public IPv4, IPv6 or host listener fails the check. + +Security requirements activate their corresponding collectors. The collectors +reuse readiness semantics for Docker-USER, UFW, private SSH rules, effective +SSH ports and Fail2ban. Installed configuration materializes expected `ops` and +`deploy` accounts, the SSH listen address and the allowed public TCP ports from +trusted project settings and the host group. Explicit monitoring settings +override those defaults. Each required account is probed with one +comma-separated `sshd -T -C` context (`user`, and `laddr`/`lport` when known). +The collector does not invent a loopback peer (`host=localhost,addr=127.0.0.1`) +and does not append `laddr`/`lport` as extra positional arguments. Missing +client peer identity is reported as not observed. A deploy context cannot +certify a different operator context. Public SSH operator access is preserved +and no collector inserts firewall rules, removes bans or changes host services. + +UFW evidence must be verbose and complete: `Status: active` plus an explicit +`Default: deny (incoming), allow (outgoing), deny (routed)` line. Active without +`Default`, or a permissive `allow (routed)` third field, is not a safe policy. +Expected public TCP ports come from the access baseline (HTTPS and SSH unless +SSH is private-interface only). Custom `allowed_tcp_ports` are preserved. + +Application task health compares more than the live service spec. Each Running +task is inspected (JSON `Spec.ContainerSpec.Image`) and must carry the retained +manifest digest. A service spec that already matches a new digest while an old +task still runs is degraded. Missing image identity is unavailable, not healthy. + +Disk paths are observed filesystems, not labels. `disk.data` keeps the +application data path and adds the native PostgreSQL data directory from the +matching `pg_lsclusters --no-header` row when that directory is on a separate +mount. `disk.images_registry` uses `DockerRootDir` when the images path is +the default. Registry storage is selected only by destination +`/var/lib/registry`; a preceding config bind is ignored. Failed or missing +mount inspection emits `disk.images_registry.volume` as `unavailable` instead +of dropping the target. Those inventory commands run inside `runCheck` so a +stalled `pg_lsclusters` or Docker inspect cannot outlive the check timeout. +BuildKit laptop and remote cache are outside VPS scope: `disk.cache` is +`not_applicable` with not-observed evidence, never healthy because +`/var/cache` has free space. Custom explicit disk paths and thresholds are +preserved. An unknown path is unavailable. + +## Runtime guarantees + +The monitoring cycle has one deadline derived from `timeout_seconds` and +`interval_seconds`. It is capped at two minutes. Collection receives four +fifths of that budget. Installed local and external entry points pass this +same context through collection and incident processing. A timed out collector +becomes `unavailable`, and the dated partial report remains available to the +caller. + +Collector reads are separate from Shuttle-owned runtime files. The default +collector reader opens an ordinary host path with `O_NOFOLLOW|O_NONBLOCK`, +accepts a regular file at its existing mode and owner, reads a bounded body, +and never creates, chmods or repairs the parent directory or the file. Private +`0700` directories and `0600` files apply only to paths Shuttle owns and +writes: incident state, its lock, the delivery log, maintenance, the episode +archive, and approved root secret files. + +Runtime ancestors must be owned by root or the process EUID. Group or world +writable ancestors are rejected even when owned by root or the EUID. Trusted +root or EUID ancestors that are not group or world writable, including `0755` +intermediates, are accepted. Only the Shuttle-owned runtime directory itself +must be EUID-owned mode `0700`. The only writable-ancestor exception is a +descriptor-verified root-owned sticky temporary directory. That exception does +not apply to its descendants, and it does not accept an arbitrary sticky +`01777` directory. The next components after that sticky root must still be +EUID or root owned and not group or world writable. Foreign-owned directories +are rejected, including a replaceable `0755` parent. Operations stay on opened +`os.OpenRoot` descriptors for the whole lock, read, write, rename and sync +sequence, so an ancestor swap cannot redirect another process onto the held +lock identity. FIFO, socket and device paths fail promptly for state, lock, +secret, maintenance and log files. + +Incident processing for a canonical `incidents.json` path admits at most one +in-process transaction. The worker owns begin, open, flock, load, transitions, +authorized notifications, persistence and `session.Close`. The caller waits for +a buffered result or its context. A timeout returns an independent copy of the +collected report and a typed `transaction_timeout` or +`persistence_unconfirmed` error. It does not unlock or close the worker +descriptors. The worker keeps the flock until I/O and cleanup finish, starts +no new notifications after cancel, and persists already delivered +acknowledgements. Durability is unconfirmed when a rename may have succeeded. +This bound is in-process: it does not promise a goroutine survives CLI exit. + +Incident state is protected by an application-specific `incidents.json.lock`. +The lock covers the complete read, state transition, notification delivery, and +state save sequence. It waits for at most 30 seconds. Each successful +notification acknowledgement is saved before the next event is attempted, so +an interruption can replay only the event whose acknowledgement was not saved. +Every incident and recovery event carries its episode ID. The notification ID +is stable for the application, check, event kind, and episode ID. Receivers must +deduplicate by that ID because the crash window between acknowledgement and +persistence is intentionally at-least-once. + +A failure must remain debounced across cycles. A healthy observation records a +recovery candidate but does not discard it before the positive debounce ends. +An incident is persisted and delivered before its recovery. A maintenance +window suppresses expected delivery while retaining the candidate, and clearing +or expiring the window allows the pending incident and recovery to proceed. +After a recovery is acknowledged, later healthy cycles preserve the completed +transition and do not enqueue it again. Starting a new failure episode retains +unacknowledged events for the old episode and creates an independent episode +identity. An acknowledgement for one episode cannot update another episode. + +Active incident state stays readable. Status shares `schema`, `updated_at`, +`incidents`, `pending`, `maintenance_until` and `last_report`. Fully +acknowledged recovered historical episodes are appended to +`incidents-archive.jsonl` in the same private directory, idempotently by +`check_id` and `episode_id`, then removed from the active `episodes` map. +The archive is a readable JSONL file of the shared status fields `check_id`, +`episode_id`, `state`, `first_seen`, `last_seen`, `incident_sent` and +`recovery_sent`. Duplicate archive records are not rewritten. Unacknowledged +events and the current per-check incident stay in `incidents.json`. A save +that would exceed the 1 MiB reader limit, including the trailing newline, +fails before commit. There is no destructive purge. + +Runtime state and delivery failure paths are absolute, private paths. Existing +symlinks, unsafe ancestors, reserved state names, and writable foreign +ancestors are rejected. State, maintenance and secret reads are bounded and +reject FIFOs, sockets, devices and directories after descriptor metadata is +checked. Failure logs contain only event metadata and a generic delivery +error. URLs, credentials, command output, and raw configuration errors are not +written to reports or logs. From 174133b7368c133a758fa40564cf68354f1034b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:20:45 +0000 Subject: [PATCH 4/9] docs: correct stale facts and drop internal process notes setup installs PostgreSQL 18, not 16, when it finds no cluster, and the sample config now shows 18. The recovery contract no longer speaks of worktrees, 'ROOT B', lanes, a work item label, a dated decision or a commit hash; the error messages the code still prints are quoted as they are. Removed the dated Docker source review, the development test narrative of the backup guide and the integration-lot sentence. operations.md now points to the recovery contract instead of repeating the infrastructure image rewrite rules. Co-Authored-By: Claude Opus 5.5 --- docs/backups.md | 12 ------- docs/configuration.md | 6 ++-- docs/operations-recovery.md | 70 +++++++++++++++---------------------- docs/operations.md | 61 +++++++------------------------- 4 files changed, 44 insertions(+), 105 deletions(-) diff --git a/docs/backups.md b/docs/backups.md index 2089436..71f6add 100644 --- a/docs/backups.md +++ b/docs/backups.md @@ -172,15 +172,3 @@ The original application, its database and its volumes remain in service. Recove resources are intentionally retained; remove only the exact cluster, systemd drop-in, account, volumes, tags and recovery directory named in that report after inspection. This initial command does not automate a public production cutover. - -## Verification performed during development - -The local and cloud archive paths have tests for tampering, truncation, wrong -signers, unsafe archives, ownership preservation and interrupted cloud publication. -S3/R2 request ordering is tested with an isolated HTTP service using the AWS SDK. -Actual provider credentials are not needed for the local path and were not used -in that test. - -The VPS acceptance exercise additionally restores a native PostgreSQL database, -a Redis volume and the application's images into separate resources. Application -health and witness data are checked independently of archive checksum validation. diff --git a/docs/configuration.md b/docs/configuration.md index 9e0ca4c..dc01cc5 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -38,7 +38,7 @@ with previous releases. "web": {"port": 3000, "healthcheck": {"type": "http", "path": "/health"}} }, "database": { - "version": 16, + "version": 18, "backup": {"mode": "local", "retention": 7}, "roles": [{"name": "demo"}], "databases": [{"name": "demo", "owner": "demo"}] @@ -440,8 +440,8 @@ application. A recorded derived role still has its password re-synchronised on every deploy. On an adopted host whose PostgreSQL you manage yourself, that would reset a live credential, so leave the `database` block out entirely. `setup` still converges the cluster: with no declared version it adopts the -single supported cluster it finds under `/etc/postgresql`, installs 16 if it -finds none, and refuses to guess if it finds several, asking you to name one +single supported cluster it finds under `/etc/postgresql`, installs 18 (the +default) if it finds none, and refuses to guess if it finds several, asking you to name one with `database.version`. `retention.registry_cache` caps the VPS registry volume and is enforced there by diff --git a/docs/operations-recovery.md b/docs/operations-recovery.md index ef208e7..7cdffd1 100644 --- a/docs/operations-recovery.md +++ b/docs/operations-recovery.md @@ -1,10 +1,8 @@ # VPS recovery reconciler -This document is the wiring contract for the SHU3 recovery reconciler that -runs inside `shuttle-root` on Linux. It replaces process-table substring -scans and current-digest heuristics. It is not a new orchestration platform. -ROOT B owns writer implementation, migration, Control, reboot, and the -helper caller that prints JSON on a nonzero exit. +This document is the contract of the recovery reconciler that runs inside +`shuttle-root` on Linux. It replaces process-table substring scans and +current-digest heuristics. It is not a new orchestration platform. Deploy recovery keeps a running official, digest-pinned Redis or RabbitMQ image when local `Config.Env` versions prove it has the same major and is no @@ -25,7 +23,7 @@ current slot and the next observation plans no rewrite. The rewrite protects a rollback only after the next deploy rotates current into `previous.yml`, since rollback deploys that previous slot. A concurrent `docker service update` between the final inspect and the current file write remains an accepted race -window under the 2026-10-27 operator decision. Rollback records keep their +window. Rollback records keep their existing recovery behavior. The new journal field remains subject to strict decoding. Downgrading the @@ -52,7 +50,7 @@ succeed, and the stateful-image protections remain in force. This change does not alter the separate `operations recover` reconciler or any signed payload or journal format. -## Root B hook +## Closed-writer hook Production recovery never opens the writer store itself and never assumes `Record.Revision` or a generation. The only closed-writer seam is this @@ -64,10 +62,10 @@ type rootRecoveryWriterReadFunc func(context.Context, coord.Record) (operationwr var rootRecoveryWriterReader rootRecoveryWriterReadFunc = readCoordinatedRootWriterState ``` -ROOT B binds `rootRecoveryWriterReader` to `readCoordinatedRootWriterState`, -which returns the verified generation, host-key and boot binding, and the -signed closed inventory for that operation. A nil function is still an -authentic missing integration dependency: observation then fails closed with: +`rootRecoveryWriterReader` is bound to `readCoordinatedRootWriterState`, which +returns the verified generation, host-key and boot binding, and the signed +closed inventory for that operation. A nil function is a missing dependency: +observation then fails closed with: `closed writer reader is not bound: ROOT B must assign rootRecoveryWriterReader` @@ -618,7 +616,7 @@ the frozen nested-snapshot regression test covers both cases and acceptance by the current CLI. Do not remove the journal proof to accommodate an older CLI. An older helper that strictly decodes the full journal record rejects -`registry_replacement`. The normal candidate admission scan in c762f5f reads +`registry_replacement`. The normal candidate admission scan reads those full records through the retained closed writer inventories and therefore refuses that candidate before replacement. The default release-version check also refuses a downgrade without `--allow-downgrade`; that flag does not bypass @@ -655,39 +653,27 @@ replacement intent, which alone never proves container absence or volume identit error. Invalid `ExpiresAt` uses the same structured apply-report path. The body is never nil unless JSON encoding itself failed. Schema `shuttle.recovery-apply/v1` carries the plan fields plus -`completed_steps`, `error`, and `remaining_recovery`. The helper caller in -this B worktree already writes that body on stdout through -`emitRootHelperResult` and keeps the nonzero exit. The parent decoder stays -strict. +`completed_steps`, `error`, and `remaining_recovery`. The helper caller writes +that body on stdout through `emitRootHelperResult` and keeps the nonzero exit. +The client decoder stays strict. ## Tests and host isolation Go tests inject a per-call runtime (reader, filesystem, docker, clock, executors). They do not race the production global, do not call real Docker, SSH, PostgreSQL or shared `/var`, and do not brute-force unsafe -helpers. Live VPS and VM recipes stay exclusive to ROOT. - -## Honest remaining boundary - -`rootRecoveryWriterReader` is bound to `readCoordinatedRootWriterState` in -this B worktree. Helper apply JSON on a nonzero exit is already emitted -outside these owned files. - -Production recovery still stays fail-closed for missing baseline bytes: -closed baseline only stores C0/P0 hashes, and after slot rotation the disk -can be C1/C0 with P0 gone. This reconciler selects C0 if those bytes remain -in a slot and will not authorize unknown C1, but it cannot invent P0. When -baseline.Previous is still present and the bytes are absent, observation is -unsafe with `authorized baseline artifact is absent after rotation; ROOT B -must persist baseline bytes before slot replacement`. Full pre/post-rotation -recovery needs B to fsync baseline artifacts and the signed candidate -identity before replacing slots. - -The pending backup marker is not a B-owned durable recovery proof. If B -deletes the marker before a crash, captured replica targets are lost and -later observation can fall back to manifest counts. This lane restores from -the live marker only. - -Writer package implementation, migration, Control, reboot, and caller -changes outside these three owned files stay out of this lane. No live -VPS/PVE/install proof is claimed here. +helpers. + +## Known limits + +Recovery stays fail-closed for missing baseline bytes. The closed baseline +stores only the C0/P0 hashes, and after slot rotation the disk can hold C1/C0 +with P0 gone. The reconciler selects C0 if those bytes remain in a slot and never +authorizes an unknown C1, but it cannot invent P0: when `baseline.Previous` is +still present and its bytes are absent, observation is unsafe with the +`authorized baseline artifact is absent after rotation` error quoted above. + +The pending backup marker is not a durable recovery proof. If the marker is +deleted before a crash, the captured replica targets are lost and later +observation can fall back to manifest counts. Recovery restores from the live +marker only. diff --git a/docs/operations.md b/docs/operations.md index ee9b3ab..33b95a2 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -14,8 +14,7 @@ The Go tests use temporary journal roots and mocked or local process seams. They prove locking, identity, freshness, fsync ordering, plan confirmation, and JSON protocol behavior. They do not prove full data-content persistence, external availability, real SSH reachability, or a live VPS -recovery. Those require the separate integration lot and the parent-owned live -recipe. +recovery. ## Coordinated maintenance and recovery @@ -113,33 +112,12 @@ journal, or whose bytes hash to anything else, is still an unknown artifact and recovery refuses it. Records written before this field existed are read and recovered as before. -For `deploy` recovery, Redis and RabbitMQ are checked against the running -Swarm service before a reapply is planned. When local image metadata proves -that the live official image with a valid digest is the same major and no older -than the retained image, recovery keeps the live reference and uses its digest -for convergence. Versions come from each image's `Config.Env`; dry-run never -pulls from a registry. Major changes, unofficial or missing-digest references, and -unreadable local image versions block reapply for manual recovery. The -substitution changes the materialized recovery copy. When the selected retained -manifest is the on-disk `current.yml`, recovery also records the exact rewritten -file digest in `recovery_current_manifest_sha256` before atomically replacing -only the kept image value bytes in `current.yml`, then syncs its directory. -`previous.yml` is not changed. The deploy's `current_manifest_sha256` remains -the proof for the artifact written by the failed deploy. Recovery accepts the -rewritten current slot only when its full digest matches either that original -proof or the same record's recovery proof. Another digest, including a -one-byte difference, remains unknown and refused. A baseline manifest loaded -from its archive instead of the on-disk current slot is not copied into that -slot. - -The action journals its digest before rename and replays the same rewrite after -a crash in that interval. Once the rename completes, a new observation selects -the rewritten current manifest and plans no rewrite. The executor repeats the -infrastructure decision before writing. A concurrent `docker service update` -between the last inspect and the write remains an accepted race window. The -rewritten current manifest protects a later rollback only after the next deploy -rotates it into `previous.yml`, because rollback applies `previous.yml`. -Rollback recovery itself keeps its existing behavior. +For `deploy` recovery, a running official Redis or RabbitMQ image of the same +major and no older than the retained one is kept, and `current.yml` is +rewritten to that digest under a second journaled digest. Major changes, +unofficial or missing-digest references and unreadable image versions block +the reapply for manual recovery. The exact rules, journal fields and crash +windows are in [operations-recovery.md](operations-recovery.md). The new journal field is decoded strictly. Downgrading the helper to a version that predates this field is unsupported. An older CLI also cannot decode the @@ -393,25 +371,12 @@ The signed stack remains the only application deployment input to the helper. Docker documents the daemon flag as "Set no-new-privileges by default for new containers": [dockerd reference](https://docs.docker.com/reference/cli/dockerd/). -The flag first appears in [Docker 17.06.0-ce config_unix.go, line 49](https://github.com/moby/moby/blob/v17.06.0-ce/cmd/dockerd/config_unix.go#L49) -(absent in 17.05). This is the mechanism's minimum version, not a supported -Shuttle installation target; setup resolves the current stable package. -Verified against official Docker 29.9.3 source on 05-11-2026: - -- [Swarm executor adapter.go:328](https://github.com/moby/moby/blob/docker-v29.9.3/daemon/cluster/executor/container/adapter.go#L328) - calls `CreateManagedContainer`; [create.go:44](https://github.com/moby/moby/blob/docker-v29.9.3/daemon/create.go#L44) - uses the same container creation path as ordinary containers. -- [container.go:207](https://github.com/moby/moby/blob/docker-v29.9.3/daemon/container.go#L207) - parses the security options; [daemon_unix.go:198](https://github.com/moby/moby/blob/docker-v29.9.3/daemon/daemon_unix.go#L198) - initializes `NoNewPrivileges` from daemon configuration, and - [oci_linux.go:1050](https://github.com/moby/moby/blob/docker-v29.9.3/daemon/oci_linux.go#L1050) - applies it to the runtime specification. -- [info.go:225](https://github.com/moby/moby/blob/docker-v29.9.3/daemon/info.go#L225) - exposes the effective default as `name=no-new-privileges` in `SecurityOptions`. - `doctor --strict` checks this live value, never the YAML or daemon.json. -- [reload.go:94](https://github.com/moby/moby/blob/docker-v29.9.3/daemon/reload.go#L94) - copies the current configuration and only updates reloadable settings; - `NoNewPrivileges` is not among them. A daemon restart is required. +The flag exists since Docker 17.06; setup installs the current stable package. +Swarm tasks are created through the same container path as ordinary containers, +so the daemon default applies to them. Docker exposes the effective default as +`name=no-new-privileges` in `docker info` `SecurityOptions`, and +`doctor --strict` checks that live value, never the YAML or `daemon.json`. The +setting is not reloadable: a daemon restart is required. For an existing host, schedule maintenance: merge the setting into the existing Docker configuration, validate it with `dockerd --validate --config-file From 28d32eda063f28aef4d81bb20765ddf9035d1681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:20:55 +0000 Subject: [PATCH 5/9] docs: use placeholder values in the configuration examples The examples carried a real-looking SSH host key fingerprint, a bcrypt hash and a third-party domain. They now use example.com, an elided fingerprint and an elided hash, like the rest of the documentation. Co-Authored-By: Claude Opus 5.5 --- docs/configuration.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index dc01cc5..4781227 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -124,7 +124,7 @@ the user allowed to deploy. "app": "demo", "domain": "app.staging.example.com", "server": { "host": "203.0.113.3", "user": "bob", "port": 22, - "host_key": "SHA256:PN6Mtv/scCozb87ZBUr24B/HMDTR6PdM+5O7KT4RTlQ" }, + "host_key": "SHA256:..........................................." }, "deploy": { "strategy": "compose", "compose_files": ["deploy/compose.yml"], "primary_service": "web", "edge_proxy": true, "prune_build_cache": "all", "compose": { "project": "shuttle-demo" } }, @@ -656,12 +656,12 @@ network and one set of secrets. `caddy.host_routes` adds further hostnames to the same application, each proxied to a service of that stack: ```json -"domain": "domebao.com", +"domain": "example.com", "deploy": { "primary_service": "frontend" }, "caddy": { "host_routes": [ - { "host": "api.domebao.com", "service": "api", "port": 8005, "health_path": "/api/v1/health" }, - { "host": "bo.domebao.com", "service": "api", "port": 8005, + { "host": "api.example.com", "service": "api", "port": 8005, "health_path": "/api/v1/health" }, + { "host": "bo.example.com", "service": "api", "port": 8005, "path_routes": [ { "path": "/app/*", "service": "reverb", "port": 8086 } ] }, { "host": "umami.example.com", "service": "umami", "port": 3000, "headers": { "X-Robots-Tag": "noindex" } } @@ -669,8 +669,8 @@ the same application, each proxied to a service of that stack: } ``` -Here `domebao.com` reaches `frontend:3011` as the domain always did, while -`api.domebao.com` and `bo.domebao.com` reach `api:8005`; on the back office, +Here `example.com` reaches `frontend:3011` as the domain always did, while +`api.example.com` and `bo.example.com` reach `api:8005`; on the back office, `/app/*` goes to `reverb:8086` first and everything else falls through to the API. Each host has its own `path_routes` and `headers`, with the same rules as `caddy.path_routes` and `caddy.headers`; the domain's do not carry over. The TLS @@ -709,13 +709,13 @@ must still set `basic_auth: true` to import the shared users. "caddy": { "basic_auth": { "users": [ - { "username": "domebao", "hash": "$2a$14$k3Z7GEBmEg8Go2bSKa6pHeI6zP6Y2kYq6E3gYsO4Q0ZK0KZ6mQ9pW" } + { "username": "admin", "hash": "$2a$14$..." } ] }, "domain_basic_auth": false, "host_routes": [ - { "host": "bo.domebao.com", "service": "api", "port": 8005, "basic_auth": true }, - { "host": "api.domebao.com", "service": "api", "port": 8005 } + { "host": "bo.example.com", "service": "api", "port": 8005, "basic_auth": true }, + { "host": "api.example.com", "service": "api", "port": 8005 } ] } ``` @@ -727,8 +727,8 @@ rather than writing a half-gated site. Usernames match `[a-z0-9_.-]{1,64}`. A host route carries the same gate when it says `"basic_auth": true`; it cannot declare users of its own, and asking for the gate when `caddy.basic_auth` has -no user is refused. Here `bo.domebao.com` prompts for the same login as the -domain while `api.domebao.com` stays open. +no user is refused. Here `bo.example.com` prompts for the same login as the +domain while `api.example.com` stays open. `caddy.basic_auth.public_paths` lists paths served without the gate, for the files a browser fetches without credentials whatever the page holds: a PWA @@ -738,7 +738,7 @@ answers each one with a new password prompt, so a gated PWA prompts in a loop. ```json "basic_auth": { - "users": [{ "username": "hdv", "hash": "$2a$10$..." }], + "users": [{ "username": "admin", "hash": "$2a$10$..." }], "public_paths": ["/manifest.webmanifest", "/sw.js", "/offline", "/_next/static/*"] } ``` From ff80230be23f8c360faac5157609467571c9f3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:21:08 +0000 Subject: [PATCH 6/9] docs: give the budget, cache, APP_KEY and edge proxy rules their own headings They sat under the database.version heading, which ran for 242 lines and covered the registry cache, the setup and deploy budgets, the Laravel APP_KEY and the first certificate. Text unchanged; only headings were added. Co-Authored-By: Claude Opus 5.5 --- docs/configuration.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index 4781227..d338b11 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -444,6 +444,8 @@ single supported cluster it finds under `/etc/postgresql`, installs 18 (the default) if it finds none, and refuses to guess if it finds several, asking you to name one with `database.version`. +### Registry cache + `retention.registry_cache` caps the VPS registry volume and is enforced there by the root helper after every promotion: stale release manifests are deleted, the collector runs with `--delete-untagged` so the cache manifests each deploy @@ -460,6 +462,8 @@ local cache eviction; `min` exports only the layers of the final image. Choose then a framework build): max mode then compresses and uploads that whole stage through the tunnel on each deploy for a cache no later build can hit. +### Setup and deploy budgets + `setup.slo_seconds` is the budget `shuttle setup` measures itself against, not a gate. A host that converges exits zero whatever the clock says, with a warning naming the field to raise; only a real convergence failure fails the command. @@ -508,6 +512,8 @@ must not exceed the total one, because every internal wait a promotion performs is sized as a share of it. Passwords are never valid JSON values; managed credentials are generated on the VPS and stored as secrets. +### Laravel `APP_KEY` + Under the `laravel` preset, `APP_KEY` is not an ordinary secret: it must reach the primary service as an environment variable, because that is the only form the framework boots with, and anything else is refused. Under every other preset @@ -531,6 +537,8 @@ encrypted local store: `openssl rand -base64 32 | sed 's/^/base64:/' | shuttle s Retain an existing key; generating a replacement can invalidate sessions and prevent decryption of previously encrypted application data. +### First certificate and `edge_proxy` + The application domain must resolve directly to the VPS before deployment. Caddy obtains and renews certificates through standard ACME HTTP validation. The first deployment of a hostname also waits for certificate issuance during From 76dd245f4ebcb9a2f27ec85c9210147d3fe318ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:21:45 +0000 Subject: [PATCH 7/9] docs: translate the docs index, check catalog, ADR and AGENTS.md to English Every Markdown file of the repository is now written in English, and AGENTS.md says so. The docs index also drops the two pages merged earlier and links the ADR folder instead of a single file. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 89 ++++++++++++++++++------------------- docs/README.md | 45 ++++++++++--------- docs/adr/0001-apache-2.0.md | 39 ++++++++-------- docs/check-catalog.md | 66 +++++++++++++-------------- 4 files changed, 119 insertions(+), 120 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 13fb076..0647491 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,51 +1,50 @@ -# Shuttle : regles du projet - -## Versions et securite des composants - -Ces regles s'appliquent aux nouvelles installations, aux configurations generees, -aux images par defaut et aux mises a jour des dependances de Shuttle. - -- PostgreSQL est toujours installe nativement sur l'hote et gere par systemd. - Ne jamais proposer ou installer PostgreSQL dans Docker, y compris pour une - recette de restauration. Sa configuration doit etre adaptee a la production : - acces prive, SCRAM, droits restreints, sauvegardes et ordre de demarrage verifie. -- PostgreSQL n'a pas de branche officiellement appelee LTS. Pour une nouvelle - installation, utiliser la derniere majeure stable supportee et son dernier - correctif mineur, depuis le depot officiel signe. Verifier la politique de - support avant d'actualiser le defaut. Reference verifiee le 2026-09-13 : 18.6. - Exclure les versions beta et RC. -- Ne pas transformer une mise a jour de configuration en migration majeure - implicite d'une base existante. Conserver la compatibilite des sauvegardes - et restaurer leur majeure source ; une migration majeure se prepare et se teste. -- Docker Engine, Redis, RabbitMQ, Caddy, le registre et les autres composants - conteneurises doivent utiliser leur derniere version stable officielle, - resolue a chaque setup et deploy. Resoudre la version puis conserver le digest exact - dans le deploiement. Un tag mutable `latest` seul ne constitue jamais une - identification de l'image executee. -- Les scans CVE sont des diagnostics optionnels. Ils ne bloquent ni installation, - ni mise a jour, ni deploiement, et ne demandent pas d'exception operateur. - Lorsqu'un scan est demande, conserver son rapport date et son identite d'image. - Un scan absent ou echoue ne vaut pas un resultat sain. Cette decision du - 2026-09-13 remplace l'ancienne obligation de scan et de refus sur CVE. -- Conserver les images necessaires au rollback. Ne pas changer la majeure d'un - service stateful existant sans verifier la compatibilite de ses donnees. - -References : +# Shuttle: project rules + +## Component versions and security + +These rules apply to new installations, generated configurations, default images +and updates of Shuttle's dependencies. + +- PostgreSQL is always installed natively on the host and managed by systemd. + Never propose or install PostgreSQL in Docker, not even for a restore recipe. + Its configuration must fit production: private access, SCRAM, restricted + rights, backups and a verified start order. +- PostgreSQL has no branch officially called LTS. For a new installation, use the + latest supported stable major and its latest minor patch, from the signed + official repository. Check the support policy before updating the default. + Reference checked on 2026-09-13: 18.6. Exclude beta and RC versions. +- Never turn a configuration update into an implicit major migration of an + existing database. Keep backups compatible and restore their source major; a + major migration is prepared and tested. +- Docker Engine, Redis, RabbitMQ, Caddy, the registry and the other containerized + components must use their latest official stable version, resolved at every + setup and deploy. Resolve the version, then keep the exact digest in the + deployment. A mutable `latest` tag alone never identifies the image that runs. +- CVE scans are optional diagnostics. They block no installation, update or + deployment, and need no operator exception. When a scan is requested, keep its + dated report and its image identity. A missing or failed scan is not a healthy + result. This decision of 2026-09-13 replaces the former mandatory scan and CVE + refusal. +- Keep the images needed for rollback. Do not change the major of an existing + stateful service without checking the compatibility of its data. + +References: - https://www.postgresql.org/support/versioning/ - https://docs.docker.com/scout/quickstart/ -## Sauvegardes +## Backups -L'export cloud est optionnel. Sans cloud, conserver une archive chiffree dans le -repertoire choisi. Les destinations cloud prises en charge sont AWS S3 et -Cloudflare R2. Les identifiants viennent de l'environnement ou du mecanisme de -credentials du SDK, jamais de config.json, des journaux ou du depot Git. -Une restauration de test doit utiliser des ressources isolees et ne doit pas -remplacer les bases, volumes, comptes ou services en production. +Cloud export is optional. Without cloud, keep an encrypted archive in the chosen +directory. The supported cloud destinations are AWS S3 and Cloudflare R2. +Credentials come from the environment or the SDK credentials mechanism, never +from config.json, logs or the Git repository. A test restore must use isolated +resources and must not replace production databases, volumes, accounts or +services. -## Travail dans ce depot +## Working in this repository -Preserver les modifications deja presentes dans l'arbre de travail. Pour lancer -le CLI compile depuis ces sources, utiliser `make install`, jamais `shuttle update`. -A chaque changement utilisateur, mettre a jour CHANGELOG.md (en tete) et -README.md, en anglais, et lancer les tests adaptes. Depuis app/go-cli, lancer gofmt -l ., go vet ./... et go test ./.... +Preserve changes already present in the working tree. To run the CLI built from +these sources, use `make install`, never `shuttle update`. Write every Markdown +file in English. With every user-facing change, update CHANGELOG.md (at the top) +and README.md, and run the matching tests. From app/go-cli, run `gofmt -l .`, +`go vet ./...` and `go test ./...`. diff --git a/docs/README.md b/docs/README.md index 2856898..8f3bf29 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,35 +1,36 @@ -# Documentation de Shuttle +# Shuttle documentation -Le point d'entrée du produit reste le [README](../README.md). Le modèle du produit se trouve dans [`adr/`](adr/0001-apache-2.0.md). +The product entry point is the [README](../README.md). Product decisions are +recorded in [`adr/`](adr/). -## Configurer et déployer +## Configure and deploy -| Document | Sujet | +| Document | Topic | | --- | --- | -| [configuration.md](configuration.md) | Référence de `config.json` | -| [build-runners.md](build-runners.md) | Build local ou sur un runner distant | -| [existing-stack.md](existing-stack.md) | Mise à jour d'une stack Swarm gérée par la plateforme | -| [hashvault.md](hashvault.md) | Backend de secrets Hashvault | -| [image-security.md](image-security.md) | Versions stables et diagnostics de vulnérabilités optionnels | +| [configuration.md](configuration.md) | `config.json` reference | +| [build-runners.md](build-runners.md) | Local builds or builds on a remote runner | +| [existing-stack.md](existing-stack.md) | Upgrading a Swarm stack owned by the platform | +| [hashvault.md](hashvault.md) | Hashvault secrets backend | +| [image-security.md](image-security.md) | Stable versions and optional vulnerability diagnostics | -## Exploiter +## Operate -| Document | Sujet | +| Document | Topic | | --- | --- | -| [operations.md](operations.md) | Opérations durables, reprise et frontières d'exécution | -| [check-catalog.md](check-catalog.md) | Contrôles de `shuttle doctor` | -| [backups.md](backups.md) | Sauvegardes applicatives et restauration isolée | -| [backup-monitoring.md](backup-monitoring.md) | Suivi du cycle de vie des sauvegardes | -| [monitoring.md](monitoring.md) | Surveillance continue, collecteurs et garanties d'exécution | +| [operations.md](operations.md) | Durable operations, recovery and execution boundaries | +| [check-catalog.md](check-catalog.md) | `shuttle doctor` checks | +| [backups.md](backups.md) | Application backups and isolated restore | +| [backup-monitoring.md](backup-monitoring.md) | Backup lifecycle tracking | +| [monitoring.md](monitoring.md) | Continuous monitoring, collectors and runtime guarantees | -## Contrats internes +## Internal contracts -| Document | Sujet | +| Document | Topic | | --- | --- | -| [operations-recovery.md](operations-recovery.md) | Réconciliateur de reprise dans `shuttle-root` | +| [operations-recovery.md](operations-recovery.md) | Recovery reconciler inside `shuttle-root` | -## Publier +## Release -| Document | Sujet | +| Document | Topic | | --- | --- | -| [releasing.md](releasing.md) | Procédure de release, confiance des releases et reprise des mises à jour | +| [releasing.md](releasing.md) | Release procedure, release trust and update recovery | diff --git a/docs/adr/0001-apache-2.0.md b/docs/adr/0001-apache-2.0.md index 76372ef..0cf8af1 100644 --- a/docs/adr/0001-apache-2.0.md +++ b/docs/adr/0001-apache-2.0.md @@ -1,30 +1,29 @@ -# ADR 0001 : tout Shuttle est Apache-2.0 +# ADR 0001: all of Shuttle is Apache-2.0 -Date : 2026-11-05 -Statut : accepted +Date: 2026-11-05 +Status: accepted -## Contexte +## Context -Le site de distribution a été retiré le 2026-09-14. Depuis, aucune fonction -n'a jamais été conditionnée à quoi que ce soit, et le code qui préparait une -vente n'était branché sur rien. La priorité est de livrer un produit stable et -fonctionnel. +The distribution site was retired on 2026-09-14. Since then, no feature has +been gated on anything, and the code that prepared a commercial offer was not +wired to anything. The priority is to ship a stable, working product. -## Décision +## Decision -Le CLI, le helper, les templates, le backup local et distant, les alertes et -la doc d'exploitation sont Apache-2.0. Apache-2.0 plutôt que MIT : grant de -brevets explicite. +The CLI, the helper, the templates, local and remote backup, alerts and the +operations documentation are Apache-2.0. Apache-2.0 rather than MIT for its +explicit patent grant. -Un seul binaire, sans édition ni condition d'usage. `shuttle update` ne -présente aucun identifiant : c'est la signature de la release qui fait foi. +One binary, with no edition and no usage condition. `shuttle update` presents +no identifier: the release signature is what counts. -## Hors périmètre +## Out of scope -Origine GitHub de `shuttle update`. +The GitHub origin of `shuttle update`. -## Invariants conservés +## Invariants kept -PostgreSQL reste natif sous systemd. Pas de Postgres Docker en production. -Compte `deploy` hors sudo et hors docker. Helper root signé, pas de shell dans -les plans. Images digest-pinned. +PostgreSQL stays native under systemd; no PostgreSQL in Docker in production. +The `deploy` account stays outside sudo and docker. The root helper is signed, +and plans carry no shell. Images are pinned by digest. diff --git a/docs/check-catalog.md b/docs/check-catalog.md index 8ccc128..cb975d0 100644 --- a/docs/check-catalog.md +++ b/docs/check-catalog.md @@ -1,32 +1,32 @@ -# Catalogue `doctor` +# `doctor` check catalog -`shuttle doctor` audite le VPS via un plan Ed25519 court et signé. L’utilisateur -`deploy` ne reçoit jamais l’accès au socket Docker. Tous les contrôles sont -exécutés sur le VPS via un plan signé et sans jeton d’infrastructure externe. +`shuttle doctor` audits the VPS through a short signed Ed25519 plan. The +`deploy` user never gets access to the Docker socket. Every check runs on the +VPS through a signed plan, without any external infrastructure token. -`doctor --strict` échoue dès qu’un contrôle actif est en échec ou sans preuve. +`doctor --strict` fails as soon as an active check fails or lacks evidence. -## Contrôles actifs +## Active checks -| Catégorie | Contrat vérifié | +| Category | Verified contract | | --- | --- | -| Système | Ubuntu 24.04 ou Debian 13, disque, mémoire, horloge, mises à jour, reboot requis, unités défaillantes, AppArmor, Fail2ban et désactivation LLMNR/mDNS | -| SSH | root fermé, authentification par clé, mots de passe et interaction clavier désactivés, `AllowUsers deploy` plus le compte opérateur explicitement déclaré ou préservé lors d'une adoption, drop-in signé réellement en vigueur, port effectif et jail Fail2ban alignés | -| Privilèges | `deploy` hors des groupes `sudo`/`docker`, avec son unique règle NOPASSWD limitée à `shuttle-root apply`; ce contrôle ciblé ne transforme pas le compte opérateur optionnel, explicitement root-equivalent, en anomalie `deploy` | -| Docker | service actif, registre persistant sain sur loopback, healthchecks, redémarrage, absence de socket monté et conteneurs bornés | -| Pare-feu | UFW deny-by-default, politique `DOCKER-USER`, bases non publiées et seuls SSH/HTTP/HTTPS autorisés | -| Caddy/TLS | configuration valide, API admin non publique, certificat, HSTS et endpoint de santé | -| PostgreSQL | service natif actif, écoute privée, SCRAM et sauvegarde locale récente | -| Redis | service privé et sain lorsqu’il est activé | -| Détection | échecs SSH récents agrégés, unités systemd en échec et SUID/SGID non gérés par un paquet | - -## Identifiants de contrôle - -Ces identifiants viennent de `app/go-cli/internal/readiness`. Ce sont les valeurs -attendues par `readiness.ignore` dans `config.json`. Selon le profil et la -configuration, un contrôle peut être sauté ou sans objet. - -| Famille | Identifiants | +| System | Ubuntu 24.04 or Debian 13, disk, memory, clock, updates, required reboot, failed units, AppArmor, Fail2ban and LLMNR/mDNS disabled | +| SSH | root closed, key authentication, passwords and keyboard-interactive disabled, `AllowUsers deploy` plus the operator account declared explicitly or preserved by an adoption, signed drop-in actually in effect, effective port and Fail2ban jail aligned | +| Privileges | `deploy` outside the `sudo`/`docker` groups, with a single NOPASSWD rule limited to `shuttle-root apply`; this targeted check does not turn the optional, explicitly root-equivalent operator account into a `deploy` anomaly | +| Docker | active service, healthy persistent registry on loopback, healthchecks, restart policy, no mounted socket and bounded containers | +| Firewall | UFW deny-by-default, `DOCKER-USER` policy, unpublished databases and only SSH/HTTP/HTTPS allowed | +| Caddy/TLS | valid configuration, admin API not public, certificate, HSTS and health endpoint | +| PostgreSQL | active native service, private listener, SCRAM and a recent local backup | +| Redis | private and healthy service when enabled | +| Detection | aggregated recent SSH failures, failed systemd units and SUID/SGID files not managed by a package | + +## Check identifiers + +These identifiers come from `app/go-cli/internal/readiness`. They are the values +`readiness.ignore` expects in `config.json`. Depending on the profile and the +configuration, a check can be skipped or not applicable. + +| Family | Identifiers | | --- | --- | | `access` | `access.deploy_user_docker_group` `access.deploy_user_exists` `access.deploy_user_nopasswd` `access.deploy_user_ssh_files` | | `adminer` | `adminer.ip_restriction_missing` | @@ -46,18 +46,18 @@ configuration, un contrôle peut être sauté ou sans objet. | `system` | `system.apparmor_inactive` `system.apt_cache_stale` `system.disk_space_low` `system.fail2ban_inactive` `system.fail2ban_sshd_jail_inactive` `system.fail2ban_sshd_port` `system.failed_units` `system.memory_low` `system.os_supported` `system.other_updates_pending` `system.reboot_required` `system.security_updates_pending` `system.swap_missing` `system.time_sync_inactive` `system.unattended_security_policy` `system.unattended_upgrades_inactive` `system.updates_pending` | | `tls` | `tls.cert_missing` `tls.hsts_missing` | -Les sauvegardes locales ne protègent pas contre la perte complète du VPS. +Local backups do not protect against losing the whole VPS. -Les vues `shuttle debug` ne contournent pas ce contrat : elles passent par des -opérations signées en lecture seule, limitées aux ressources de l'application, -avec sorties bornées; `debug inspect` ne restitue que sa liste positive de champs -non sensibles. Les commandes Docker arbitraires restent réservées au compte -opérateur root-equivalent, lorsqu'il a été explicitement configuré. +The `shuttle debug` views do not bypass this contract: they go through signed +read-only operations, limited to the application's resources, with bounded +output; `debug inspect` returns only its allow-list of non-sensitive fields. +Arbitrary Docker commands stay reserved to the root-equivalent operator +account, when one was configured explicitly. -Voir aussi [configuration](configuration.md) et [opérations](operations.md). +See also [configuration](configuration.md) and [operations](operations.md). ## Tools the checks need on the target The DNS check runs `dig` on the target, and `setup` does not install it. Install -`dnsutils` on Debian or Ubuntu, otherwise `doctor --strict` fails that check for lack -of proof. +`dnsutils` on Debian or Ubuntu, otherwise `doctor --strict` fails that check for +lack of evidence. From ba6f6a1491e5315d170396dac74b3757cad55cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:24:20 +0000 Subject: [PATCH 8/9] docs(changelog): record the documentation cleanup Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 515ca2c..c8722d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Shuttle: active changes +## Documentation cleanup + +- `docs/release-security.md` is merged into `docs/releasing.md`, which now + describes the release as the scripts run it: signed on the maintainer + workstation by `scripts/release-publish-local.sh`, with no CI release job. +- `docs/monitoring-collectors.md` and `docs/monitoring-runtime.md` are merged + into `docs/monitoring.md`, without the repeated rules. +- `docs/helper-migration-integration.md`, an internal work note whose open items + are done, is removed. +- `setup` installs PostgreSQL 18 when it finds no cluster; the configuration + guide said 16. Internal process notes, dated source reviews and real-looking + sample values are removed from the guides. +- Every Markdown file is in English. + ## README in English, with a logo - The README is now in English, in GitHub format, with the Shuttle logo From 19c264dbe1d0cff60ade36b1de58531689a212a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Aubr=C3=A9e?= Date: Wed, 2 Dec 2026 00:34:09 +0000 Subject: [PATCH 9/9] docs(changelog): translate the history to English Every Markdown file in the repository is now in English, as AGENTS.md requires. Wording only: headings, versions, identifiers, commands and dates are unchanged, and the em dashes of the older English entries become plain punctuation. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 5371 +++++++++++++++++++++++++------------------------- 1 file changed, 2644 insertions(+), 2727 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8722d8..8903f8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,719 +45,709 @@ compose file pins by digest, unless `production.redis` or `production.rabbitmq` replaces that service. -## L'export public omettait le point d'entrée de Shuttle +## The public export left out Shuttle's entry point -- L'export ajoute tous les fichiers suivis qui ont passé son filtrage. La règle - Git qui ignore le binaire local cible désormais son chemin exact. +- The export adds every tracked file that passed its filter. The Git rule that + ignores the local binary now targets its exact path. -## Publication signée depuis le dépôt public +## Signed publishing from the public repository -- La commande de publication vérifie le tag public, signe sur le poste de - publication et compare les fichiers du brouillon avant sa mise en ligne. -- La clé privée reste dans le fichier de signature local. Les clients - continuent de vérifier les releases avec la même clé publique. +- The publish command checks the public tag, signs on the publishing + workstation and compares the draft's files before it goes live. +- The private key stays in the local signing file. Clients keep verifying + releases with the same public key. -## Les imports Go et les outils de recette utilisaient encore l'ancien nom +## Go imports and the acceptance tools still used the old name -- Le module Go correspond désormais à son chemin dans le dépôt public, - `github.com/dev-toolings/shuttle/app/go-cli`. Les scripts de release et - l'installation locale injectent les informations de version à ce même chemin. -- La CI de publication utilise les variables `SHUTTLE_RELEASE_*`. Les essais - VPS utilisent `SHUTTLE_E2E_*` et les nouvelles preuves portent le schéma - `shuttle-vps-e2e/v2`. -- Le format signé de `latest.json` reste compatible avec les versions de - `shuttle update` et les installateurs déjà publiés. +- The Go module now matches its path in the public repository, + `github.com/dev-toolings/shuttle/app/go-cli`. The release scripts and the + local install inject the version information at that same path. +- The publishing CI uses the `SHUTTLE_RELEASE_*` variables. VPS trials use + `SHUTTLE_E2E_*` and new evidence carries the + `shuttle-vps-e2e/v2` schema. +- The signed `latest.json` format stays compatible with the `shuttle update` + versions and installers already published. -## Le rapport console de doctor affichait encore l'ancien nom +## The doctor console report still showed the old name -- Cause : le titre du rapport console était codé en dur. -- Correction : `shuttle doctor` affiche « Shuttle Doctor Report ». -- Compatibilité : ce changement touche uniquement le titre de la sortie console. +- Cause: the console report title was hard-coded. +- Fix: `shuttle doctor` shows "Shuttle Doctor Report". +- Compatibility: this change only touches the console output title. -## La sonde /ready appelait l'IP overlay depuis l'hôte (27-11-2026) +## The /ready probe called the overlay IP from the host (27-11-2026) -- Cause : après la promotion preprod, la sonde ouvrait `http://10.0.5.125:8000/api/v1/ready` depuis l'hôte. Cette adresse d'overlay n'est pas routée, l'appel expirait, et l'opération passait en recovery alors que `https://backend-preprod.example.com/api/v1/ready` répondait déjà `{"status":"ready"}`. -- Correction : la sonde fait `docker exec` dans la tâche et appelle `127.0.0.1` avec `Host: _`. -- Compatibilité : le helper de cette version est requis dès qu'un `readiness.ready_path` est déclaré. +- Cause: after the preprod promotion, the probe opened `http://10.0.5.125:8000/api/v1/ready` from the host. That overlay address is not routed, the call timed out, and the operation went into recovery while `https://backend-preprod.example.com/api/v1/ready` already answered `{"status":"ready"}`. +- Fix: the probe runs `docker exec` in the task and calls `127.0.0.1` with `Host: _`. +- Compatibility: this version's helper is required as soon as a `readiness.ready_path` is declared. -## Le pre-deploy ne voyait pas l'environnement du service (27-11-2026) +## The pre-deploy did not see the service environment (27-11-2026) -- Cause : le job one-shot recevait les secrets et les réseaux, pas les variables du compose. `doctrine:migrations:migrate` s'arrêtait sur `CORE_STAGE is empty` avant toute promotion. La preprod est restée sur l'image précédente. -- Correction : `deploy.pre_deploy` recopie l'environnement non secret du service (`--env`). Les secrets restent des fichiers montés. -- Compatibilité : sans `deploy.pre_deploy`, rien ne change. Le helper doit être cette version pour appliquer les variables. +- Cause: the one-shot job received the secrets and the networks, not the compose variables. `doctrine:migrations:migrate` stopped on `CORE_STAGE is empty` before any promotion. Preprod stayed on the previous image. +- Fix: `deploy.pre_deploy` copies the service's non-secret environment (`--env`). Secrets stay mounted files. +- Compatibility: without `deploy.pre_deploy`, nothing changes. The helper must be this version to apply the variables. -## Le pre-deploy ne rejoignait pas les réseaux du service (27-11-2026) +## The pre-deploy did not join the service networks (27-11-2026) -- Cause : le conteneur one-shot était attaché à `_default`. Les stacks réelles nomment leurs réseaux (`caddy_network`, `internal`, …) et n'utilisent pas ce réseau-là, donc une migration n'atteignait pas la base. -- Correction : `deploy.pre_deploy` attache chaque réseau du service déclaré. Un réseau externe garde son `name`, les autres deviennent `_`. -- Compatibilité : une configuration sans `deploy.pre_deploy` ne change pas. Le helper doit être celui de cette version pour appliquer plusieurs `--network`. +- Cause: the one-shot container was attached to `_default`. Real stacks name their networks (`caddy_network`, `internal`, ...) and do not use that one, so a migration could not reach the database. +- Fix: `deploy.pre_deploy` attaches every network the service declares. An external network keeps its `name`, the others become `_`. +- Compatibility: a configuration without `deploy.pre_deploy` does not change. The helper must be this version's to apply several `--network`. -## Les secrets, la sonde de promotion et le pre-deploy tenaient dans 32 clés et un conteneur déjà promu (27-11-2026) +## Secrets, the promotion probe and the pre-deploy were limited to 32 keys and an already promoted container (27-11-2026) -- Cause : un déploiement host ne portait que 32 secrets, une clé absente du fichier du VPS faisait échouer toute la promotion, `services..replicas` était ignoré au profit du compose, et rien ne sondait `/ready` ni ne lançait une migration sur l'image neuve avant `docker stack deploy`. Une application interne ne pouvait pas déclarer `deploy.availability_url`. -- Correction : le plafond passe à 64 (`host-secrets-64`). `optional: true` n'échoue plus quand la clé est absente ou vide et ne la monte pas. `services..secrets` est normalisé vers `secrets.items`. `expose: env_file` publie un seul fichier `/run/secrets/shuttle..env` (`SHUTTLE_ENV_FILE`). `deploy --dry-run` affiche la matrice service → secrets. `readiness.ready_path` est sondé sur le VPS après convergence, pour `public` comme pour `internal`, et un non-2xx échoue la promotion. `deploy.pre_deploy` lance la commande sur le digest neuf avant le stack deploy. `services..replicas` est appliqué et une divergence avec le compose est refusée. Deux `config*.json` du même répertoire qui réutilisent le même `app` sur le même hôte avec un domaine différent sont refusés. -- Compatibilité : une configuration qui n'utilise aucun de ces champs se déploie comme avant. Les nouvelles actions exigent un helper à jour (`shuttle helper update`). Le service publié reste à 1 réplique. +- Cause: a host deploy carried only 32 secrets, a key missing from the VPS file failed the whole promotion, `services..replicas` was ignored in favor of the compose file, and nothing probed `/ready` or ran a migration on the new image before `docker stack deploy`. An internal application could not declare `deploy.availability_url`. +- Fix: the ceiling goes to 64 (`host-secrets-64`). `optional: true` no longer fails when the key is missing or empty, and does not mount it. `services..secrets` is normalized to `secrets.items`. `expose: env_file` publishes a single file `/run/secrets/shuttle..env` (`SHUTTLE_ENV_FILE`). `deploy --dry-run` shows the service → secrets matrix. `readiness.ready_path` is probed on the VPS after convergence, for `public` as for `internal`, and a non-2xx fails the promotion. `deploy.pre_deploy` runs the command on the new digest before the stack deploy. `services..replicas` is applied and a mismatch with the compose file is refused. Two `config*.json` in the same directory that reuse the same `app` on the same host with a different domain are refused. +- Compatibility: a configuration that uses none of these fields deploys as before. The new actions require an up-to-date helper (`shuttle helper update`). The published service stays at 1 replica. -## Les Dockerfile PHP installaient vendor/ avec un Composer flottant (26-11-2026) +## The PHP Dockerfiles installed vendor/ with a floating Composer (26-11-2026) -- Cause : `shuttle init` épinglait par digest chaque image de base des presets, sauf `composer/composer:2-bin` dans les Dockerfile Laravel et Symfony (`internal/templates/docker.go`). Le Composer qui installe le `vendor/` de production changeait donc sans trace d'un build à l'autre. `doctor --outdated` ne pouvait pas non plus le comparer. -- Correction : `init` résout cette image comme les autres, sur la dernière version stable de la majeure 2 en variante `-bin`, et écrit `composer/composer:-bin@sha256:`. `--image composer/composer:@sha256:` fournit une identité explicite. -- Mesuré : Docker Hub publie la ligne `2.x.y-bin` (dernière au 26-11-2026 : `2.11.3-bin`). -- Compatibilité : seuls les Dockerfile générés à partir de maintenant changent. En `deploy.strategy: compose`, le build de ces presets garde `--pull`, parce que leur runtime reste désigné par `FROM ${SHUTTLE_PHP_RUNTIME}`, que la détection des bases épinglées ne développe pas. Un Dockerfile existant reste tel quel ; `init --force` le régénère avec l'image épinglée. Une image non joignable fait échouer la génération en la nommant, comme pour les autres bases. +- Cause: `shuttle init` pinned every preset base image by digest, except `composer/composer:2-bin` in the Laravel and Symfony Dockerfiles (`internal/templates/docker.go`). The Composer that installs the production `vendor/` therefore changed without a trace from one build to the next. `doctor --outdated` could not compare it either. +- Fix: `init` resolves this image like the others, on the latest stable version of major 2 in the `-bin` variant, and writes `composer/composer:-bin@sha256:`. `--image composer/composer:@sha256:` gives an explicit identity. +- Measured: Docker Hub publishes the `2.x.y-bin` line (latest on 26-11-2026: `2.11.3-bin`). +- Compatibility: only Dockerfiles generated from now on change. Under `deploy.strategy: compose`, the build of these presets keeps `--pull`, because their runtime is still named by `FROM ${SHUTTLE_PHP_RUNTIME}`, which the pinned base detection does not expand. An existing Dockerfile stays as it is; `init --force` regenerates it with the pinned image. An unreachable image fails the generation and names it, as for the other bases. -## Rien ne signalait qu'une image de base ou d'infrastructure avait une version plus récente (26-11-2026) +## Nothing reported that a base or infrastructure image had a newer version (26-11-2026) -- Cause : `setup` et `deploy` re-résolvent l'infrastructure (Redis, RabbitMQ, Caddy, registre) seulement quand ils tournent. Les images de base que `init` épingle dans le Dockerfile ne sont jamais relues : une image `node:24-alpine` reconstruite avec un correctif de sécurité restait hors de la production tant que personne ne modifiait la ligne `FROM` à la main. Aucune commande ne disait ce qu'une nouvelle résolution changerait. -- Correction : `shuttle doctor --outdated` (`--format json` pour un script) compare, sans rien modifier, Shuttle à sa dernière release publiée, chaque `FROM` des Dockerfiles déclarés dans `config.json` à la dernière version de sa ligne (même majeure, même variante), et l'infrastructure lue par l'audit signé du VPS au digest actuel de son tag. Chaque ligne donne la commande qui applique la mise à jour. Un `FROM ${SHUTTLE_PHP_RUNTIME}` est lu à travers son `ARG` global ou `build.args` : sans cela, l'image principale des presets Laravel et Symfony restait invisible. Une ligne en retard ne fait pas échouer la commande, comme le scan CVE. Une recherche qui n'a pas pu se faire la fait échouer, parce qu'une absence de réponse n'est pas une preuve d'être à jour. -- Mesuré : sur un projet Laravel généré par `init`, FrankenPHP 1.14.0 est lu à travers son `ARG` et sort `current`. Sur le fixture `tmp/apps/laravel-demo`, `oven/bun:1.2.20-alpine` sort `outdated`, 1.4.5 étant disponible sur Docker Hub. -- Compatibilité : nouvelle option, désactivée par défaut. `doctor`, `setup` et `deploy` ne changent pas. Aucun changement de majeure n'est proposé, et un digest écrit dans `config.json` reste tel quel. +- Cause: `setup` and `deploy` re-resolve the infrastructure (Redis, RabbitMQ, Caddy, registry) only when they run. The base images that `init` pins in the Dockerfile are never read again: a `node:24-alpine` image rebuilt with a security fix stayed out of production as long as nobody edited the `FROM` line by hand. No command said what a new resolution would change. +- Fix: `shuttle doctor --outdated` (`--format json` for a script) compares, without changing anything, Shuttle with its latest published release, each `FROM` of the Dockerfiles declared in `config.json` with the latest version of its line (same major, same variant), and the infrastructure read by the signed VPS audit with the current digest of its tag. Each line gives the command that applies the update. A `FROM ${SHUTTLE_PHP_RUNTIME}` is read through its global `ARG` or `build.args`: without that, the main image of the Laravel and Symfony presets stayed invisible. A line behind does not fail the command, like the CVE scan. A lookup that could not run fails it, because no answer is no proof of being up to date. +- Measured: on a Laravel project generated by `init`, FrankenPHP 1.14.0 is read through its `ARG` and comes out `current`. On the `tmp/apps/laravel-demo` fixture, `oven/bun:1.2.20-alpine` comes out `outdated`, 1.4.5 being available on Docker Hub. +- Compatibility: new option, off by default. `doctor`, `setup` and `deploy` do not change. No major change is proposed, and a digest written in `config.json` stays as it is. -## shuttle init écrivait pour Symfony trois fichiers que l'image n'utilisait jamais (24-11-2026) +## shuttle init wrote three files for Symfony that the image never used (24-11-2026) -- Cause : `shuttle init` créait `docker/Caddyfile`, `docker/conf.d/10-app.ini` et `docker/conf.d/20-app.prod.ini` pour le preset Symfony. Aucune étape du Dockerfile généré ne les copie : l'image démarre avec le `/etc/frankenphp/Caddyfile` de FrankenPHP et écrit elle-même `99-shuttle-production.ini`. Les modifier ne changeait rien en production, ce qui a fait chercher un en-tête au mauvais endroit. -- Correction : `shuttle init` ne les écrit plus, et `SymfonyCaddyfile`, `SymfonyBaseIni` et `SymfonyProdIni` sont supprimées. -- Compatibilité : aucune image ne change, ces fichiers n'y entraient pas. Ceux déjà présents dans un projet restent en place et peuvent être supprimés. `docker/opcache.ini`, écrit pour Laravel, est dans le même cas et n'est pas traité ici. +- Cause: `shuttle init` created `docker/Caddyfile`, `docker/conf.d/10-app.ini` and `docker/conf.d/20-app.prod.ini` for the Symfony preset. No step of the generated Dockerfile copies them: the image starts with FrankenPHP's `/etc/frankenphp/Caddyfile` and writes `99-shuttle-production.ini` itself. Editing them changed nothing in production, which sent someone looking for a header in the wrong place. +- Fix: `shuttle init` no longer writes them, and `SymfonyCaddyfile`, `SymfonyBaseIni` and `SymfonyProdIni` are removed. +- Compatibility: no image changes, these files never went into it. Those already present in a project stay in place and can be deleted. `docker/opcache.ini`, written for Laravel, is in the same case and is not handled here. -## Une image Symfony avec AssetMapper ne contenait aucun asset compilé (24-11-2026) +## A Symfony image with AssetMapper contained no compiled asset (24-11-2026) -- Cause : en production, AssetMapper ne sert plus les assets par PHP et attend `public/assets` compilé. Le commentaire de `symfonyAssetParts` annonçait que le builder lançait `asset-map:compile` quand `importmap.php` existe, mais aucune étape du Dockerfile généré ne le faisait. Un projet AssetMapper devait commiter ses fichiers compilés, sinon ses scripts et ses feuilles de style répondaient 404. -- Correction : l'étape `builder` lance `bin/console importmap:install` puis `bin/console asset-map:compile` quand `importmap.php` est présent, après le `cache:warmup` dont ils utilisent le conteneur et avant le déplacement de `var/cache`. `importmap:install` passe en premier parce que `assets/vendor` n'est pas commité. -- Mesuré : sur un projet `symfony/skeleton` + `webapp` neuf, avec le Dockerfile de `shuttle init` et FrankenPHP 1.14.0, le build réussit et affiche « Compiled 12 assets », « Manifest written to public/assets/manifest.json ». Le conteneur, lancé en lecture seule, sans capacités et en uid 33, sert `/assets/app-TNXHCQF.js` en 200. -- Compatibilité : sans `importmap.php` le build est identique. Avec, le build télécharge les paquets de l'importmap et échoue si la compilation échoue, au lieu de livrer une image sans assets. Un projet déjà initialisé doit régénérer son `Dockerfile`. +- Cause: in production, AssetMapper no longer serves assets through PHP and expects a compiled `public/assets`. The `symfonyAssetParts` comment said the builder ran `asset-map:compile` when `importmap.php` exists, but no step of the generated Dockerfile did. An AssetMapper project had to commit its compiled files, otherwise its scripts and stylesheets answered 404. +- Fix: the `builder` stage runs `bin/console importmap:install` then `bin/console asset-map:compile` when `importmap.php` is present, after the `cache:warmup` whose container they use and before `var/cache` is moved. `importmap:install` comes first because `assets/vendor` is not committed. +- Measured: on a fresh `symfony/skeleton` + `webapp` project, with the `shuttle init` Dockerfile and FrankenPHP 1.14.0, the build succeeds and prints "Compiled 12 assets", "Manifest written to public/assets/manifest.json". The container, run read-only, with no capabilities and as uid 33, serves `/assets/app-TNXHCQF.js` with 200. +- Compatibility: without `importmap.php` the build is identical. With it, the build downloads the importmap packages and fails if the compilation fails, instead of shipping an image without assets. An already initialized project must regenerate its `Dockerfile`. -## Les images PHP retéléchargeaient tous les paquets Composer et ne laissaient aucun asset en cache navigateur (24-11-2026) +## PHP images downloaded every Composer package again and left no asset in the browser cache (24-11-2026) -- Cause : l'étape `deps` des Dockerfile générés lançait `composer install` sans cache de téléchargement (avec `--no-cache` pour Symfony, depuis le premier commit), alors que Bun et uv ont un montage de cache BuildKit. Chaque changement de `composer.lock` retéléchargeait donc tous les paquets. Côté réponses, aucun `Cache-Control` n'était posé sur les fichiers statiques : le navigateur revalidait chaque script et chaque feuille de style à chaque visite. Le `docker/Caddyfile` écrit par `shuttle init` pour Symfony n'est copié par aucune étape, l'image démarre avec le `/etc/frankenphp/Caddyfile` de FrankenPHP (lu dans `dunglas/frankenphp:1.13.4-php8.4`). -- Correction : `composer install` utilise `--mount=type=cache,target=/tmp/composer-cache,sharing=locked` avec `COMPOSER_CACHE_DIR`. L'étape `prod` de Laravel et de Symfony écrit `/etc/frankenphp/shuttle-static-cache.caddy` et le branche par `CADDY_SERVER_EXTRA_DIRECTIVES`, la variable que ce Caddyfile développe dans son bloc de site. L'en-tête `Cache-Control: public, max-age=31536000, immutable` n'est envoyé que si trois conditions sont réunies : chemin `/assets/*` (AssetMapper) ou `/build/assets/*` (Vite), manifeste du compilateur présent, nom de fichier terminé par un hash. Un an « immutable » ne se reprend pas par un déploiement, d'où ces trois gardes. -- Mesuré : dans un conteneur `dunglas/frankenphp:1.13.4-php8.4` avec le fragment, `/assets/app-BsdTrfr.js` et `/build/assets/app-BRBmoGS9.js` reçoivent l'en-tête ; `/assets/plain.css`, `/assets/manifest.json`, `/build/assets/logo.svg`, `/build/app.js` et la page PHP ne le reçoivent pas ; sans manifeste, aucun fichier ne le reçoit. Sur un projet `symfony/skeleton` + `webapp` réel, après un changement de `composer.lock`, l'étape `composer install` passe de 96 téléchargements à 0 (4,7 s à 2,1 s sur une liaison rapide), et l'image construite envoie l'en-tête sur ses deux scripts hachés, pas sur ses trois fichiers JSON. -- Compatibilité : `vendor/` et le digest de sa couche ne changent pas, le montage n'entre pas dans l'image. Un builder jetable perd le montage avec lui, comme avant. Les assets Encore gardent le comportement précédent, leur hachage dépendant du projet. Un projet qui définit lui-même `CADDY_SERVER_EXTRA_DIRECTIVES` remplace la valeur de l'image. Un projet déjà initialisé doit régénérer son `Dockerfile` pour en profiter. +- Cause: the `deps` stage of the generated Dockerfiles ran `composer install` with no download cache (with `--no-cache` for Symfony, since the first commit), while Bun and uv have a BuildKit cache mount. Every change to `composer.lock` therefore downloaded every package again. On the response side, no `Cache-Control` was set on static files: the browser revalidated every script and stylesheet on every visit. The `docker/Caddyfile` that `shuttle init` writes for Symfony is copied by no stage; the image starts with FrankenPHP's `/etc/frankenphp/Caddyfile` (read in `dunglas/frankenphp:1.13.4-php8.4`). +- Fix: `composer install` uses `--mount=type=cache,target=/tmp/composer-cache,sharing=locked` with `COMPOSER_CACHE_DIR`. The `prod` stage of Laravel and Symfony writes `/etc/frankenphp/shuttle-static-cache.caddy` and plugs it in through `CADDY_SERVER_EXTRA_DIRECTIVES`, the variable that Caddyfile expands in its site block. The `Cache-Control: public, max-age=31536000, immutable` header is sent only when three conditions hold: a `/assets/*` (AssetMapper) or `/build/assets/*` (Vite) path, the compiler manifest present, and a file name ending in a hash. A one-year "immutable" cannot be taken back by a deploy, hence these three guards. +- Measured: in a `dunglas/frankenphp:1.13.4-php8.4` container with the fragment, `/assets/app-BsdTrfr.js` and `/build/assets/app-BRBmoGS9.js` get the header; `/assets/plain.css`, `/assets/manifest.json`, `/build/assets/logo.svg`, `/build/app.js` and the PHP page do not; without a manifest, no file gets it. On a real `symfony/skeleton` + `webapp` project, after a `composer.lock` change, the `composer install` step goes from 96 downloads to 0 (4.7 s to 2.1 s on a fast link), and the built image sends the header on its two hashed scripts, not on its three JSON files. +- Compatibility: `vendor/` and its layer digest do not change; the mount does not go into the image. A throwaway builder loses the mount with it, as before. Encore assets keep the previous behavior, since their hashing depends on the project. A project that sets `CADDY_SERVER_EXTRA_DIRECTIVES` itself replaces the image's value. An already initialized project must regenerate its `Dockerfile` to benefit. -## Les binaires compilés avec Go 1.27.3 embarquaient la vulnérabilité GO-2026-6859 (16-11-2026) +## Binaries built with Go 1.27.3 shipped vulnerability GO-2026-6859 (16-11-2026) -- Cause : la toolchain `go1.27.3` porte GO-2026-6859 dans `net/http` (plantage du serveur HTTP/1, course sur les en-têtes de `MaxBytesReader`), corrigée en `go1.27.4`. `govulncheck` la juge atteignable par les chemins client HTTP : webhooks (`internal/monitoring/alerts.go`), export S3 des sauvegardes (`internal/backup/cloud.go`) et `shuttle update` (`internal/cli/update.go`), avec 34 traces. Elle est passée inaperçue parce que les jobs GitHub Actions ne démarrent plus depuis le 8 novembre 2026 environ (facturation du compte), alors que seule la porte de release locale (`scripts/release.sh`) lance `govulncheck`. -- Correction : `app/go-cli/go.mod` déclare `toolchain go1.27.4`. `scripts/ci-local.sh` lit cette version pour choisir l'image Go, et les workflows utilisent `stable`. -- Compatibilité : aucun changement de configuration, de protocole ni de comportement. +- Cause: the `go1.27.3` toolchain carries GO-2026-6859 in `net/http` (HTTP/1 server crash, race on `MaxBytesReader` headers), fixed in `go1.27.4`. `govulncheck` finds it reachable through the HTTP client paths: webhooks (`internal/monitoring/alerts.go`), S3 backup export (`internal/backup/cloud.go`) and `shuttle update` (`internal/cli/update.go`), with 34 traces. It went unnoticed because GitHub Actions jobs have not started since about 8 November 2026 (account billing), while only the local release gate (`scripts/release.sh`) runs `govulncheck`. +- Fix: `app/go-cli/go.mod` declares `toolchain go1.27.4`. `scripts/ci-local.sh` reads that version to pick the Go image, and the workflows use `stable`. +- Compatibility: no configuration, protocol or behavior change. -## Le plan à blanc acceptait 35 secrets que le helper refuse au-delà de 32 (08-11-2026) +## The dry-run plan accepted 35 secrets that the helper refuses above 32 (08-11-2026) -- Cause : la validation de `config.json` comptait les secrets applicatifs en retirant toujours les trois clés d'infrastructure (`REDIS_PASSWORD`, `RABBITMQ_PASSWORD`, `POSTGRES_PASSWORD`), même non déclarées. Une configuration de 35 secrets `host` (une application) chargeait et passait `deploy --dry-run`, puis le helper la refusait en plein déploiement (`host secrets operation must name between 1 and 32 keys`), avec une opération à récupérer. -- Correction : le plafond compte exactement les clés que l'opération transporte (`ApplicationSecretKeys`), comme le helper. Une configuration au-delà de 32 est refusée au chargement, avec le nombre de secrets. -- Compatibilité : plafond et protocole signé inchangés. Seules les configurations que le helper refusait déjà sont maintenant refusées plus tôt. +- Cause: `config.json` validation counted application secrets by always removing the three infrastructure keys (`REDIS_PASSWORD`, `RABBITMQ_PASSWORD`, `POSTGRES_PASSWORD`), even when they were not declared. A configuration with 35 `host` secrets (one application) loaded and passed `deploy --dry-run`, then the helper refused it in the middle of the deploy (`host secrets operation must name between 1 and 32 keys`), with an operation to recover. +- Fix: the ceiling counts exactly the keys the operation carries (`ApplicationSecretKeys`), like the helper. A configuration above 32 is refused at load time, with the number of secrets. +- Compatibility: ceiling and signed protocol unchanged. Only configurations the helper already refused are now refused earlier. -## Doctor échouait sans expliquer le chemin de readiness manquant (07-11-2026) +## Doctor failed without explaining the missing readiness path (07-11-2026) -- Cause : pour une application publique sans bloc `readiness`, le plan d'audit refusait le chemin vide avec une erreur obscure. -- Correction : doctor indique la clé `readiness.healthcheck_path` à ajouter et donne un exemple dans `config.json` avant de construire le plan. -- Compatibilité : les applications internes, la validation du helper et le protocole signé restent inchangés. +- Cause: for a public application without a `readiness` block, the audit plan refused the empty path with an obscure error. +- Fix: doctor names the `readiness.healthcheck_path` key to add and gives a `config.json` example before building the plan. +- Compatibility: internal applications, helper validation and the signed protocol stay unchanged. -## Le scan d'images s'arrêtait à la première image avec des CVE (07-11-2026) +## The image scan stopped at the first image with CVEs (07-11-2026) -- Cause : `doctor --scan-images` retournait dès la première image signalée. Le premier vrai scan a produit un rapport pour Caddy et n'a jamais atteint le registre, alors que les deux étaient annoncés. -- Correction : chaque image sélectionnée est scannée, puis les constats sont rendus ensemble. -- Compatibilité : le scan reste optionnel et ne bloque rien. Une erreur de scan arrête toujours la commande sans résultat sain. +- Cause: `doctor --scan-images` returned at the first flagged image. The first real scan produced a report for Caddy and never reached the registry, although both were announced. +- Fix: every selected image is scanned, then the findings are reported together. +- Compatibility: the scan stays optional and blocks nothing. A scan error still stops the command with no healthy result. -## Un nom IPv6 seul faisait échouer doctor --strict (07-11-2026) +## An IPv6-only name failed doctor --strict (07-11-2026) -- Cause : le contrôle DNS ne lisait que l'enregistrement A. Sur un hôte en IPv6 seul, avec un certificat Let's Encrypt valide, `doctor --strict` sortait 1 à 95 sur 100. -- Correction : sans enregistrement A, le contrôle lit l'AAAA et le compare aux adresses globales de l'hôte. Il réussit si l'adresse est la sienne et échoue sinon. -- Compatibilité : un nom avec un enregistrement A garde le même contrôle. Un nom sans A ni AAAA échoue comme avant. +- Cause: the DNS check read only the A record. On an IPv6-only host, with a valid Let's Encrypt certificate, `doctor --strict` exited 1 at 95 out of 100. +- Fix: without an A record, the check reads the AAAA record and compares it with the host's global addresses. It passes if the address is the host's and fails otherwise. +- Compatibility: a name with an A record keeps the same check. A name with neither A nor AAAA fails as before. -## Le verrou Compose ne fonctionnait pas sur toutes les versions de mv (07-11-2026, DEV-DEPL-111) +## The Compose lock did not work on every version of mv (07-11-2026, DEV-DEPL-111) -- Cause : la publication par mv dépendait des options et du comportement de coreutils, différents sur macOS et les versions récentes de Linux. -- Correction : les métadonnées complètes sont écrites dans un fichier temporaire puis publiées par lien physique atomique. Un échec distingue un verrou existant d’une erreur de publication par la présence du fichier, sans analyser le message de ln. -- Compatibilité : les anciens verrous sous forme de dossier demandent une inspection manuelle. Aucun essai sur hôte réel n’a été effectué. +- Cause: publishing through mv depended on coreutils options and behavior, which differ on macOS and recent Linux versions. +- Fix: the full metadata is written to a temporary file, then published through an atomic hard link. A failure tells an existing lock from a publishing error by the presence of the file, without parsing the ln message. +- Compatibility: old directory-style locks need a manual inspection. No trial on a real host was run. -## Des exemples neutres pour la publication des sources (07-11-2026) +## Neutral examples for publishing the sources (07-11-2026) -Les exemples et récits de diagnostic utilisent des noms et adresses de documentation afin de conserver les détails techniques sans exposer des environnements privés. +The examples and diagnostic stories use documentation names and addresses, to keep the technical details without exposing private environments. -## Le plan d'adoption ne prouve plus l'accès PostgreSQL depuis les conteneurs (07-11-2026, DEV-DEPL-115) +## The adoption plan no longer proves PostgreSQL access from containers (07-11-2026, DEV-DEPL-115) -- Correction : le plan montre une règle HBA possible et précise que seul un premier déploiement avec un healthcheck PostgreSQL peut vérifier cet accès. Un healthcheck qui ne teste pas la base ne constitue pas cette preuve. +- Fix: the plan shows a possible HBA rule and states that only a first deploy with a PostgreSQL healthcheck can verify that access. A healthcheck that does not test the database is not that proof. -## Le sondage d'adoption déduisait à tort les règles HBA chargées (07-11-2026, DEV-DEPL-115) +## The adoption probe wrongly inferred the loaded HBA rules (07-11-2026, DEV-DEPL-115) -- Correction : l'adoption ne déduit plus l'accès PostgreSQL des fichiers HBA ; elle vérifie seulement que le serveur écoute sur la passerelle Docker. +- Fix: adoption no longer infers PostgreSQL access from the HBA files; it only checks that the server listens on the Docker gateway. -## Une interruption pouvait vider la politique de rétention pendant l'adoption (07-11-2026, DEV-DEPL-115) +## An interruption could empty the retention policy during adoption (07-11-2026, DEV-DEPL-115) -- Correction : après contrôle du fichier, l'adoption écrit la nouvelle politique dans le même répertoire puis la renomme ; une interruption avant le renommage conserve la politique précédente. +- Fix: after checking the file, adoption writes the new policy in the same directory, then renames it; an interruption before the rename keeps the previous policy. -## Une rétention Shuttle valide ne pouvait pas être modifiée pendant l'adoption (07-11-2026, DEV-DEPL-115) +## A valid Shuttle retention could not be changed during adoption (07-11-2026, DEV-DEPL-115) -- Correction : les fichiers de rétention au format Shuttle valide sont mis à jour vers la valeur demandée entre 1 et 7 ; les fichiers étrangers et les liens restent refusés. Le plan montre l'ancienne et la nouvelle valeur. +- Fix: retention files in the valid Shuttle format are updated to the requested value between 1 and 7; foreign files and links stay refused. The plan shows the old and the new value. -## Une règle HBA SCRAM couvrant toutes les adresses était refusée (07-11-2026, DEV-DEPL-115) +## A SCRAM HBA rule covering all addresses was refused (07-11-2026, DEV-DEPL-115) -- Correction : l'adresse HBA all couvre le réseau Docker sans masque ; samehost et samenet restent refusées si leur portée ne peut pas être prouvée. +- Fix: the HBA address all covers the Docker network without a mask; samehost and samenet stay refused if their scope cannot be proven. -## Les fichiers HBA inclus échappaient au contrôle du dernier chargement (07-11-2026, DEV-DEPL-115) +## Included HBA files escaped the last-load check (07-11-2026, DEV-DEPL-115) -- Correction : l'adoption refuse les inclusions, car la date du fichier principal ne prouve pas celle des fichiers inclus ; une vérification manuelle reste nécessaire. +- Fix: adoption refuses includes, because the date of the main file does not prove that of the included files; a manual check is still needed. -## Les inclusions HBA pouvaient fausser la preuve d'ordre (07-11-2026, DEV-DEPL-115) +## HBA includes could distort the order proof (07-11-2026, DEV-DEPL-115) -- Correction : le sondage refuse les fichiers HBA inclus, dont les numéros de lignes ne sont pas comparables à ceux du fichier principal. Les versions sans colonne de fichier restent prises en charge. +- Fix: the probe refuses included HBA files, whose line numbers cannot be compared with those of the main file. Versions without a file column stay supported. -## Le plan d'adoption omettait des étapes exécutées (07-11-2026, DEV-DEPL-115) +## The adoption plan left out steps it ran (07-11-2026, DEV-DEPL-115) -- Correction : le plan nomme helper-safety et l'étape administrateur lorsqu'elle est prévue, et ne classe pas le cutover demandé parmi les étapes restantes ou non tentées. +- Fix: the plan names helper-safety and the administrator step when it is planned, and does not list the requested cutover among the remaining or not attempted steps. -## Le plan ne nommait pas les services Swarm publiés en ingress (07-11-2026, DEV-DEPL-116) +## The plan did not name Swarm services published through ingress (07-11-2026, DEV-DEPL-116) -- Correction : le sondage lit les ports publiés par chaque service et le refus de cutover nomme le service qui occupe 80 ou 443, en mode ingress ou host. +- Fix: the probe reads the ports each service publishes, and the cutover refusal names the service that holds 80 or 443, in ingress or host mode. -## Un refus de cutover Swarm retournait un dry run réussi (07-11-2026, DEV-DEPL-116) +## A Swarm cutover refusal returned a successful dry run (07-11-2026, DEV-DEPL-116) -- Correction : le dry run renvoie le refus de cutover ou de reconvergence avant de déclarer le précontrôle vérifié. +- Fix: the dry run returns the cutover or reconvergence refusal before declaring the precheck verified. -## Une politique de rétention étrangère pouvait être écrasée (07-11-2026, DEV-DEPL-115) +## A foreign retention policy could be overwritten (07-11-2026, DEV-DEPL-115) -- Correction : le sondage et l'écriture refusent un fichier de rétention différent de la valeur demandée ou un lien symbolique ; un fichier identique est conservé sans réécriture. +- Fix: the probe and the write refuse a retention file that differs from the requested value, or a symbolic link; an identical file is kept without being rewritten. -## Une adoption interrompue après Swarm ne pouvait pas reprendre (07-11-2026, DEV-DEPL-115) +## An adoption interrupted after Swarm could not resume (07-11-2026, DEV-DEPL-115) -- Correction : un hôte déjà revendiqué sans checkpoint Docker peut créer le réseau overlay manquant comme étape nommée ; un réseau étranger conserve son refus. +- Fix: a host already claimed without a Docker checkpoint can create the missing overlay network as a named step; a foreign network keeps its refusal. -## Un registre arrêté pouvait passer la convergence d'adoption (07-11-2026, DEV-DEPL-115) +## A stopped registry could pass adoption convergence (07-11-2026, DEV-DEPL-115) -- Correction : l'étape autonome vérifie l'appartenance du conteneur, démarre un registre Shuttle arrêté et attend sa santé et la réponse loopback avant de poursuivre. +- Fix: the standalone step checks the container's ownership, starts a stopped Shuttle registry and waits for its health and the loopback answer before going on. -## La preuve HBA pouvait accepter une règle masquée ou non chargée (07-11-2026, DEV-DEPL-115) +## The HBA proof could accept a shadowed or unloaded rule (07-11-2026, DEV-DEPL-115) -- Correction : la première règle HBA applicable à chaque base et propriétaire gérés doit autoriser SCRAM sur le sous-réseau Docker. Le sondage refuse aussi un fichier HBA plus récent que le dernier chargement PostgreSQL. +- Fix: the first HBA rule that applies to each managed database and owner must allow SCRAM on the Docker subnet. The probe also refuses an HBA file newer than the last PostgreSQL load. -## Le basculement de l'edge acceptait une tâche Swarm étrangère (07-11-2026, DEV-DEPL-116) +## The edge cutover accepted a foreign Swarm task (07-11-2026, DEV-DEPL-116) -- Cause : arrêter un conteneur de tâche Swarm laisse le service le remplacer et reprendre les ports 80/443 ; la restauration cible seulement l'ancien conteneur. Le test reproduit sur 46255a6 un plan qui accepte cette tâche. -- Correction : le relevé conserve le nom du service de chaque conteneur et refuse le basculement demandé avant les étapes, en dry run comme en exécution. L'opérateur doit supprimer ou réduire lui-même le service, puis relancer setup. -- Compatibilité : les conteneurs ordinaires et les exécutions sans --cutover-edge gardent leur comportement. Aucun protocole signé ni format stocké ne change. Aucun essai sur hôte réel n'a été effectué. +- Cause: stopping a Swarm task container lets the service replace it and take ports 80/443 back; the restore targets only the old container. The test reproduces, on 46255a6, a plan that accepts that task. +- Fix: the survey keeps each container's service name and refuses the requested cutover before the steps, in dry run as in execution. The operator must remove or scale down the service, then run setup again. +- Compatibility: ordinary containers and runs without --cutover-edge keep their behavior. No signed protocol or stored format changes. No trial on a real host was run. -## Le plan d'adoption ne correspondait pas aux étapes exécutées (07-11-2026, DEV-DEPL-115) +## The adoption plan did not match the steps it ran (07-11-2026, DEV-DEPL-115) -- Cause : la présence de Docker, Swarm et PostgreSQL suffisait au sondage pour annoncer une étape ignorée, mais seuls les marqueurs de checkpoint décidaient de son exécution. -- Correction : les étapes 20-docker et 30-postgres satisfaites ne lancent plus leur corps. Le registre, le script et le timer de sauvegarde et le drop-in systemd sont nommés séparément. Le sondage refuse les prérequis réseau ou PostgreSQL manquants et les fichiers de sauvegarde étrangers ; PostgreSQL ne redémarre pas pendant cette installation. -- Compatibilité : le setup initial conserve ses commandes. Aucun protocole signé ni format stocké ne change. Aucun essai sur hôte réel n'a été effectué. +- Cause: the presence of Docker, Swarm and PostgreSQL was enough for the probe to announce a skipped step, but only the checkpoint markers decided whether it ran. +- Fix: satisfied 20-docker and 30-postgres steps no longer run their body. The registry, the backup script and timer, and the systemd drop-in are named separately. The probe refuses missing network or PostgreSQL prerequisites and foreign backup files; PostgreSQL does not restart during this installation. +- Compatibility: the initial setup keeps its commands. No signed protocol or stored format changes. No trial on a real host was run. -## Le diagnostic CVE pouvait scanner une autre image que celle du VPS (07-11-2026, DEV-DEPL-97) +## The CVE diagnostic could scan an image other than the VPS one (07-11-2026, DEV-DEPL-97) -- Cause : le diagnostic choisissait des tags locaux avant toute lecture du VPS et ignorait la selection RabbitMQ resolue. Le rapport pouvait donc porter sur une autre image. -- Correction : l'audit signe existant fournit les references retenues avec digest. Chaque image sans identite disponible utilise la selection locale et affiche sa portee ; le rapport conserve la reference, le digest et sa provenance. Une erreur de scan ne constitue pas un resultat sain. -- Compatibilite : aucun changement au protocole signe. Les scans restent optionnels et ne bloquent ni installation ni deploiement. Aucun essai sur hote reel n'a ete effectue. +- Cause: the diagnostic picked local tags before reading the VPS and ignored the resolved RabbitMQ selection. The report could therefore cover another image. +- Fix: the existing signed audit provides the selected references with their digest. Each image with no identity available uses the local selection and shows its scope; the report keeps the reference, the digest and their origin. A scan error is not a healthy result. +- Compatibility: no change to the signed protocol. Scans stay optional and block neither installation nor deployment. No trial on a real host was run. -## L’installation pouvait remplacer une version plus récente (07-11-2026) +## The installer could replace a newer version (07-11-2026) -- Cause : un manifeste valide pouvait désigner une release antérieure au binaire installé, sans contrôle de version. -- Correction : l’installateur refuse une rétrogradation sauf si `SHUTTLE_INSTALL_ALLOW_DOWNGRADE=1`. Une version installée illisible ou de développement ne bloque pas l’installation. -- Compatibilité : la vérification de signature et du checksum reste obligatoire, sans changement du manifeste. +- Cause: a valid manifest could name a release older than the installed binary, with no version check. +- Fix: the installer refuses a downgrade unless `SHUTTLE_INSTALL_ALLOW_DOWNGRADE=1`. An unreadable or development installed version does not block the installation. +- Compatibility: the signature and checksum checks stay mandatory, with no manifest change. -## Un canal public pour les mises à jour et l’installation (07-11-2026, DEV-DEPL-10, DEV-DEPL-9) +## A public channel for updates and installation (07-11-2026, DEV-DEPL-10, DEV-DEPL-9) -- Cause : le site de téléchargement a fermé et le manifeste de release signé contient des assets plutôt que les URL de l’ancien site. -- Correction : le CLI utilise le dépôt public prévu et vérifie le manifeste existant ; un installateur vérifie signature et empreinte avant installation, et un export prépare les sources publiques. -- Compatibilité : le format signé et la surcharge SHUTTLE_SITE_URL restent inchangés. Le dépôt public et sa première release restent à créer. +- Cause: the download site closed, and the signed release manifest holds assets rather than the old site's URLs. +- Fix: the CLI uses the planned public repository and verifies the existing manifest; an installer verifies the signature and the checksum before installing, and an export prepares the public sources. +- Compatibility: the signed format and the SHUTTLE_SITE_URL override stay unchanged. The public repository and its first release are still to be created. -## Les objets externes pouvaient contourner les contrôles de la stack (07-11-2026, DEV-DEPL-110, DEV-DEPL-98) +## External objects could bypass the stack checks (07-11-2026, DEV-DEPL-110, DEV-DEPL-98) -- Cause : les déclarations de volumes et secrets étaient contrôlées sans inspecter les objets Docker existants. Un volume externe pouvait monter un chemin hôte ou appartenir à une autre application. -- Correction : avant application, le helper contrôle les noms et inspecte les volumes et secrets avec les commandes Docker typées. Il refuse les volumes étrangers, les pilotes non locaux et les options de montage. Les volumes du edge et le volume de certificats adopté restent utilisables. Les nouveaux secrets Redis et RabbitMQ portent le label du propriétaire. -- Compatibilité : les secrets historiques dans l'espace de noms de l'application restent acceptés sans label ; les secrets hors de cet espace doivent porter le label de l'application. Les manifestes conservés pour rollback et reprise gardent les contrôles de leur application initiale. Le protocole signé et les formats stockés ne changent pas. Aucun essai Docker ou sur hôte réel n'a été effectué. +- Cause: volume and secret declarations were checked without inspecting the existing Docker objects. An external volume could mount a host path or belong to another application. +- Fix: before applying, the helper checks the names and inspects volumes and secrets with the typed Docker commands. It refuses foreign volumes, non-local drivers and mount options. The edge volumes and the adopted certificate volume stay usable. New Redis and RabbitMQ secrets carry the owner label. +- Compatibility: historical secrets in the application's namespace stay accepted without a label; secrets outside that namespace must carry the application label. Manifests kept for rollback and resume keep the checks of their original application. The signed protocol and stored formats do not change. No Docker or real host trial was run. -## Une interruption pouvait rendre un verrou Compose illisible (07-11-2026, DEV-DEPL-111) +## An interruption could make a Compose lock unreadable (07-11-2026, DEV-DEPL-111) -- Cause : une interruption entre la création du verrou et son écriture empêchait la commande de reprise de lire son titulaire. -- Correction : les métadonnées sont écrites dans un dossier temporaire, puis publiées par renommage atomique sans remplacer un verrou existant. -- Compatibilité : la reprise reste manuelle et le protocole signé ne change pas. Aucun essai sur hôte réel n’a été effectué. +- Cause: an interruption between creating the lock and writing it kept the resume command from reading its holder. +- Fix: the metadata is written to a temporary directory, then published through an atomic rename that does not replace an existing lock. +- Compatibility: resuming stays manual and the signed protocol does not change. No trial on a real host was run. -## Un refus local de build Compose conservait le verrou (07-11-2026, DEV-DEPL-111) +## A local Compose build refusal kept the lock (07-11-2026, DEV-DEPL-111) -- Cause : toute erreur du build sur le serveur était considérée comme un résultat SSH inconnu, même avant le lancement de Docker. -- Correction : les refus locaux et les échecs de build dont BuildKit rapporte le code de sortie libèrent le verrou ; un échec de transport ou sans preuve de fin le conserve. -- Compatibilité : les builds Swarm et le protocole signé ne changent pas. Aucun essai sur hôte réel n’a été effectué. +- Cause: any build error on the server was treated as an unknown SSH result, even before Docker started. +- Fix: local refusals and build failures whose exit code BuildKit reports release the lock; a transport failure, or one with no proof of completion, keeps it. +- Compatibility: Swarm builds and the signed protocol do not change. No trial on a real host was run. -## Deux déploiements Compose pouvaient supprimer une release en préparation (07-11-2026, DEV-DEPL-111) +## Two Compose deploys could delete a release being prepared (07-11-2026, DEV-DEPL-111) -- Cause : les promotions partagent un projet Docker et la rétention supprimait les dossiers qui ne sont ni current ni previous, y compris la préparation concurrente. -- Correction : deploy, rollback et destroy prennent un verrou par projet avant les mutations. Le verrou reste en place si une opération distante a un résultat inconnu ou si le client est interrompu ; sa suppression manuelle exige la lecture du titulaire et la confirmation de son identifiant. La rétention vérifie le titulaire et conserve les préparations plus récentes. -- Compatibilité : aucun protocole signé ne change. La reprise manuelle exige de vérifier les processus Compose sur le serveur ; aucun essai sur hôte réel n’a été effectué. +- Cause: promotions share a Docker project, and retention deleted the directories that are neither current nor previous, including the concurrent preparation. +- Fix: deploy, rollback and destroy take a per-project lock before mutating anything. The lock stays in place if a remote operation has an unknown result or the client is interrupted; removing it by hand requires reading its holder and confirming its identifier. Retention checks the holder and keeps newer preparations. +- Compatibility: no signed protocol changes. A manual resume requires checking the Compose processes on the server; no trial on a real host was run. -## Les images des modèles et de BuildKit restaient figées dans le CLI (07-11-2026, DEV-DEPL-96) +## Template and BuildKit images stayed frozen in the CLI (07-11-2026, DEV-DEPL-96) -- Cause : les versions et digests étaient compilés dans les modèles et l'identité du builder, dont la comparaison refusait aussi un builder existant plus ancien. -- Correction : la génération résout les versions stables dans la majeure des modèles et inscrit leurs digests ; `--image` accepte une identité explicite avec digest. Un builder absent reçoit la dernière version stable de BuildKit, dont l'identité est affichée. Un builder existant conserve son image jusqu'à sa suppression et sa recréation. -- Compatibilité : sans `--force`, un Dockerfile existant reste inchangé. Aucun format de configuration ou protocole signé ne change. Aucun registre ni hôte réel n'a été interrogé pendant ces tests. +- Cause: versions and digests were compiled into the templates and the builder identity, whose comparison also refused an older existing builder. +- Fix: generation resolves the stable versions within the templates' major and writes their digests; `--image` accepts an explicit identity with a digest. A missing builder gets the latest stable BuildKit version, whose identity is shown. An existing builder keeps its image until it is removed and recreated. +- Compatibility: without `--force`, an existing Dockerfile stays unchanged. No configuration format or signed protocol changes. No registry or real host was queried during these tests. -## La fermeture des writers après reboot signalait un échec malgré la reprise requise (07-11-2026, DEV-DEPL-117) +## Closing the writers after a reboot reported a failure although recovery was required (07-11-2026, DEV-DEPL-117) -- Cause : après fermeture des writers, abort pouvait enregistrer recovery_required pour un bail ou un boot expiré puis renvoyer une erreur, affichée comme une fermeture non résolue. -- Correction : après une erreur abort, le CLI relit le statut signé et confirme la reprise requise pour la même opération avant de déclarer les writers fermés. Il conserve l'erreur abort sur stderr et rappelle que la reprise signée reste nécessaire. Une fermeture échouée, un statut actif ou illisible conserve un code de sortie non nul. -- Compatibilité : aucun changement au protocole signé, au journal ou à la forme JSON. Aucun essai sur hôte réel n'a été effectué. +- Cause: after the writers were closed, abort could record recovery_required for an expired lease or boot, then return an error, shown as an unresolved close. +- Fix: after an abort error, the CLI reads the signed status again and confirms that recovery is required for the same operation before declaring the writers closed. It keeps the abort error on stderr and reminds that the signed recovery is still needed. A failed close, or an active or unreadable status, keeps a non-zero exit code. +- Compatibility: no change to the signed protocol, the journal or the JSON shape. No trial on a real host was run. -## La reprise confondait le registre supprimé avec son volume homonyme (07-11-2026, DEV-DEPL-108) +## Recovery confused the removed registry with its same-name volume (07-11-2026, DEV-DEPL-108) -- Cause : après le SIGKILL suivant docker rm dans le test VM transmis, docker inspect renvoyait le volume shuttle-registry au lieu de constater l'absence du conteneur. Le faux Docker masquait cette collision en renvoyant No such object ; corrigé, il reproduit sur 2bacbe4 le refus « registry does not mount the journaled data volume ». -- Correction : toutes les lectures du registre par nom précisent container inspect, pour l'observation de reprise, son attente de santé et les vérifications après reboot. Le test simule le volume renvoyé par l'inspection générique et No such container pour l'inspection typée ; il vérifie aussi le type de la sonde de santé après recréation. -- Compatibilité : aucun format signé, journal ou paramètre réseau ne change. Le volume et sa preuve restent conservés. Les inspections de tâches et conteneurs par ID restent inchangées ; aucun nouvel essai Docker ou sur hôte réel n'est revendiqué ici. +- Cause: after the SIGKILL that followed docker rm in the VM test provided, docker inspect returned the shuttle-registry volume instead of seeing that the container was missing. The fake Docker hid that collision by returning No such object; once fixed, it reproduces on 2bacbe4 the refusal "registry does not mount the journaled data volume". +- Fix: every read of the registry by name specifies container inspect, for the recovery observation, its health wait and the post-reboot checks. The test simulates the volume returned by the generic inspection and No such container for the typed inspection; it also checks the type of the health probe after recreation. +- Compatibility: no signed format, journal or network parameter changes. The volume and its proof are kept. Inspections of tasks and containers by ID stay unchanged; no new Docker or real host trial is claimed here. -## La reprise des writers exige le CLI de cette release lorsque le journal porte la preuve du registre (07-11-2026, DEV-DEPL-108) +## Resuming the writers requires this release's CLI when the journal carries the registry proof (07-11-2026, DEV-DEPL-108) -- Cause : operations writers utilise un lecteur Python administrateur embarqué dans le CLI, qui renvoie le record complet dans un snapshot record/writers. Après un déploiement interrompu portant registry_replacement, le décodeur strict de l'ancien CLI refuse le champ imbriqué avant observation ou fermeture des writers, pour --dry-run comme pour --yes. La projection des réponses du helper ne modifie pas ce lecteur déjà distribué. -- Correction : la procédure exige désormais le CLI de cette release, qui introduit la preuve DEV-DEPL-108, ou une version ultérieure pour ces deux commandes. Il faut mettre à jour le CLI exécutant la reprise, puis relire --dry-run avant confirmation ; mettre à jour uniquement le helper du VPS ne suffit pas. Le test fige la forme historique du snapshot imbriqué, démontre son refus avec la preuve et vérifie que le lecteur actuel conserve la preuve et l'inventaire. -- Compatibilité : aucun comportement, protocole ou journal n'est modifié dans ce suivi documentaire. L'ancien lecteur accepte toujours les snapshots sans cette preuve ; les réponses de statut et de contrôle restent projetées. La preuve durable doit rester dans le journal. Aucun essai SSH ou sur hôte réel n'a été effectué. +- Cause: operations writers uses an administrator Python reader embedded in the CLI, which returns the full record in a record/writers snapshot. After an interrupted deploy carrying registry_replacement, the old CLI's strict decoder refuses the nested field before observing or closing the writers, for --dry-run as for --yes. Projecting the helper's answers does not change that already distributed reader. +- Fix: the procedure now requires this release's CLI, which introduces the DEV-DEPL-108 proof, or a later version for these two commands. Update the CLI running the recovery, then read --dry-run again before confirming; updating only the VPS helper is not enough. The test freezes the historical shape of the nested snapshot, shows that it is refused with the proof, and checks that the current reader keeps the proof and the inventory. +- Compatibility: no behavior, protocol or journal is changed in this documentation follow-up. The old reader still accepts snapshots without that proof; status and control answers stay projected. The durable proof must stay in the journal. No SSH or real host trial was run. -## La preuve privée du registre rendait les réponses illisibles pour un ancien CLI (07-11-2026, DEV-DEPL-108) +## The private registry proof made answers unreadable for an old CLI (07-11-2026, DEV-DEPL-108) -- Cause : le champ registry_replacement ajouté au journal était aussi sérialisé dans les réponses de contrôle et de statut. Le décodeur strict du CLI de c762f5f refusait ce champ inconnu, y compris après une fin de déploiement déjà enregistrée comme réussie. Le test reproduit les quatre refus sur renouvellement, statut actif, fin et statut terminé. -- Correction : les deux sorties projettent une copie du record sans la preuve privée. Le test utilise la forme stricte historique, compare tous les champs publics et relit le journal pour vérifier que la preuve durable reste intacte. -- Compatibilité : aucune modification du protocole signé, du format du journal ou des règles de rétrogradation. Un ancien helper refuse toujours le champ privé lorsqu'il lit directement le journal ; la sonde du candidat de c762f5f rencontre ce refus en vérifiant les inventaires de writers conservés. Les réponses de contrôle et de statut restent compatibles avec l'ancien CLI. Aucun remplacement de binaire ni essai sur hôte réel n'a été effectué. +- Cause: the registry_replacement field added to the journal was also serialized in the control and status answers. The strict decoder of the c762f5f CLI refused that unknown field, even after the end of a deploy already recorded as successful. The test reproduces the four refusals on renewal, active status, finish and finished status. +- Fix: both outputs project a copy of the record without the private proof. The test uses the historical strict shape, compares every public field and reads the journal again to check that the durable proof stays intact. +- Compatibility: no change to the signed protocol, the journal format or the downgrade rules. An old helper still refuses the private field when it reads the journal directly; the c762f5f candidate probe meets that refusal when it checks the kept writer inventories. Control and status answers stay compatible with the old CLI. No binary replacement or real host trial was run. -## Un registre supprimé pendant son remplacement bloquait toute reprise (07-11-2026, DEV-DEPL-108) +## A registry removed during its replacement blocked any recovery (07-11-2026, DEV-DEPL-108) -- Cause : une interruption entre rm et création supprimait le conteneur dont la reprise tirait son identité. Le volume restait présent, mais la seule réparation disponible était docker start. Le test reproduit un refus même avec le bon volume et l'image locale attendue. -- Correction : avant toute mutation du registre, le helper journalise le digest issu de la demande signée et une empreinte des métadonnées stables du volume existant. La reprise confirmée recrée le registre absent seulement si le volume correspond et si l'image locale porte le digest attendu. Elle revérifie ces preuves avant action, conserve les paramètres loopback et le durcissement existants, puis vérifie la santé. Les tests couvrent le cycle du journal et de la reprise confirmée, le volume remplacé avant ou après confirmation, le mauvais digest, le daemon indisponible, le refus d'une liaison publique et l'échec d'écriture du journal avant toute destruction. -- Compatibilité : le champ registry_replacement est optionnel et omis lorsqu'il est absent ; la version du journal et le protocole signé ne changent pas. Les anciens journaux restent lisibles et continuent de refuser une recréation sans preuve. Aucun volume n'est créé volontairement ni supprimé, aucune image n'est téléchargée par la reprise. La preuve porte sur l'identité du volume, pas sur l'intégrité de chaque blob. Aucun essai Docker ou sur hôte réel n'est revendiqué. +- Cause: an interruption between rm and create removed the container from which recovery drew its identity. The volume stayed, but the only repair available was docker start. The test reproduces a refusal even with the right volume and the expected local image. +- Fix: before any registry mutation, the helper journals the digest taken from the signed request and a fingerprint of the existing volume's stable metadata. The confirmed recovery recreates the missing registry only if the volume matches and the local image carries the expected digest. It checks these proofs again before acting, keeps the loopback parameters and the existing hardening, then checks health. The tests cover the journal and confirmed recovery cycle, the volume replaced before or after confirmation, the wrong digest, the unavailable daemon, the refusal of a public binding and the journal write failure before any destruction. +- Compatibility: the registry_replacement field is optional and omitted when absent; the journal version and the signed protocol do not change. Old journals stay readable and keep refusing a recreation without proof. No volume is created on purpose or deleted, and the recovery downloads no image. The proof covers the volume's identity, not the integrity of each blob. No Docker or real host trial is claimed. -## Deux déploiements pouvaient remplacer le registre partagé en même temps (07-11-2026, DEV-DEPL-107) +## Two deploys could replace the shared registry at the same time (07-11-2026, DEV-DEPL-107) -- Cause : la convergence du registre exécutait pull, stop, rm et création sans exclusion entre applications. Deux appels concurrents reproduisent deux remplacements du même digest ; un push actif ne prend pas le verrou des ressources partagées. -- Correction : l'inspection et le remplacement prennent ce verrou, puis le remplacement exige une opération seule sous le verrou du journal. Le second appel relit donc le digest courant. En présence d'une autre opération, la convergence est différée sans arrêter le registre ; le diagnostic indique la cible signée et le digest observé, conservé pour les commandes suivantes. Les tests reproduisent le double remplacement et vérifient la poursuite du déploiement après report, sans modification du manifeste signé. -- Compatibilité : le protocole signé et les journaux restent inchangés. Le digest demandé reste une cible de convergence, pas une attestation de remplacement ; le manifeste applicatif ne contient pas le service registre. Le prochain déploiement seul peut appliquer la mise à jour différée. Aucun Docker ni hôte réel n'a été utilisé pour ces vérifications. +- Cause: registry convergence ran pull, stop, rm and create with no exclusion between applications. Two concurrent calls reproduce two replacements of the same digest; an active push does not take the shared resources lock. +- Fix: inspection and replacement take that lock, then replacement requires a lone operation under the journal lock. The second call therefore reads the current digest again. When another operation is present, convergence is deferred without stopping the registry; the diagnostic shows the signed target and the observed digest, kept for the following commands. The tests reproduce the double replacement and check that the deploy goes on after the deferral, without changing the signed manifest. +- Compatibility: the signed protocol and the journals stay unchanged. The requested digest stays a convergence target, not a replacement attestation; the application manifest does not contain the registry service. The next lone deploy can apply the deferred update. No Docker or real host was used for these checks. -## Le seuil disque des déploiements empêchait un rollback (07-11-2026, DEV-DEPL-109) - -- Cause : le contrôle commun du helper exigeait 20 % d'espace libre même pour remettre en service la release conservée. Le test sur la base c762f5f reproduit le refus à 19 %, avant toute soumission à Docker. -- Correction : le rollback conserve une réserve de 1 % pour les écritures du journal, des manifests et des métadonnées d'exécution, sans réserver la marge d'une nouvelle release. Les tests atteignent la soumission simulée à Docker à 19 % et à 1 %, refusent à 0,99 % et vérifient que les deux contrôles du déploiement refusent toujours à 19 %. -- Compatibilité : le déploiement garde son seuil de 20 %, ses précontrôles et ses valeurs par défaut. Le helper choisit la réserve depuis l'action signée existante ; aucun protocole, format stocké ni drapeau ne change. Le contrôle porte toujours sur la racine, sans mesurer une partition Docker séparée. Aucun essai sur hôte réel n'est revendiqué. - -## Un helper rétrogradé pouvait reprendre un destroy avec d'anciennes règles (05-11-2026, DEV-DEPL-102) - -- Cause : les journaux portant le consentement de suppression conservaient le schéma v1 et la sonde du candidat vérifiait l'interface sans comparer les versions. Un consentement faux omis du JSON pouvait rester lisible par un ancien helper. Les refus déterministes imposaient une récupération globale, les temporaires bloquaient indéfiniment le remplacement et setup contournait le contrôle des journaux. -- Correction : les nouvelles écritures utilisent v2, refusé par les lecteurs historiques de journaux ; le helper compare sa version à celle du candidat réel. Le drapeau signé `--allow-downgrade` autorise un retour explicite, mais tout journal de destroy restant le bloque sous verrou. Les refus de version confirmés clôturent la réservation en échec sans récupération ; les sondes incertaines restent bloquantes. Setup refuse également de remplacer un helper avec un journal en attente dès une première étape dédiée, avant tout envoi de fichier, toute mutation de l'hôte et la prise en charge en mode adoption. Seuls les temporaires `.shuttle-root-`, réguliers, root et strictement 0600, sont ignorés sans modification. Les tests exécutent la commande réelle jusqu’au plan signé et le chemin privilégié de refus ; ils vérifient le consentement faux sans drapeau, vrai avec drapeau, la conservation de la réservation et de la récupération si une intention reste en attente, puis la réservation suivante après un refus sûr. Les mutations ciblées protègent ces connexions, le nettoyage de l’admission et le premier contrôle de setup. -- Compatibilité : v1 reste lisible sans ajouter de consentement, puis devient v2 à la prochaine écriture. Les builds `dev` et `git describe` restent installables sans journal en attente ; un helper de développement installé bloque aussi un candidat release tant que ce journal existe. Un ancien helper déjà installé et les journaux v1 non réécrits ne sont pas rétroactivement protégés ; les versions antérieures au lecteur de journaux nécessitent aussi le contrôle de rétrogradation. La procédure figure dans `docs/operations-recovery.md`. Aucun essai sur VM ni changement d'hôte réel n'est revendiqué. - -## Un destroy bloquait le scan des mises à jour du helper (05-11-2026, DEV-DEPL-101) - -- Cause : le scan refusait le répertoire privé `destroy-cleanup` conservé après un destroy, ainsi que les temporaires de journal laissés par une interruption. -- Correction : le scan reconnaît ce répertoire et les temporaires du journal et du writer store, avec contrôle du type, du propriétaire et des permissions ; les entrées inconnues restent refusées. Le précontrôle précède la phase de mutation et clôture une réservation sans phase en échec sans récupération ; le client demande également ce refus si nécessaire. Les tests couvrent le scan, le refus et la procédure administrateur sur fixtures. -- Compatibilité : l'ancien helper installé effectue le premier scan, donc une release corrigée ne suffit pas sur un hôte déjà bloqué. La procédure de `docs/operations-recovery.md` refuse tout journal de destroy restant et ne retire que le répertoire vide, sous verrou, avant récupération signée puis mise à jour. Aucun journal ni donnée n'est supprimé ; une phase déjà commencée conserve ses preuves et exigences de récupération. Aucune validation sur VM n'est revendiquée. - -## Un échec de dump en reprise conservait les noms des bases déjà supprimées dans le ledger (05-11-2026, DEV-DEPL-70) - -- Cause : après une suppression partielle, le chemin de conservation effaçait - la preuve des objets terminés du journal sans retirer leur propriété du ledger. - Une base recréée hors Shuttle sous le même nom pouvait donc être supprimée - lors d’un prochain destroy explicitement autorisé. -- Correction : les suppressions confirmées sont retirées du ledger avant de - convertir le journal en objets conservés, y compris si l’échec de dump n’a - pas pu être enregistré. Un échec d’écriture ou de synchronisation du ledger - conserve le journal et sa preuve ; la reprise réécrit durablement le ledger. - Les tests permanents couvrent les trois chemins d’échec, la nouvelle base - homonyme et les mutations qui omettent le retrait ou retirent un objet en attente. -- Compatibilité : les objets en attente, explicitement conservés et étrangers - au plan restent dans le ledger avec leurs identifiants. Aucun nom sans preuve - de suppression n’est retiré et aucun consentement n’est ajouté. Les essais - sur VM et la mise à jour des helpers restent à effectuer. - -## La reprise destroy pouvait appeler un helper sans garde-fous et perdre la preuve d’un drop (05-11-2026, DEV-DEPL-70) - -- Cause : la reprise ne vérifiait pas le contrat du helper et assimilait un exit 1 - de PostgreSQL à un refus certain. Les générations suivantes de dumps ne - revérifiaient pas l’espace ; leur délai fixe pouvait épuiser le watchdog. - Un échec après suppression partielle annonçait des bases déjà supprimées comme - conservées, masquait stderr et gardait un répertoire vide sans ledger. -- Correction : chaque plan et application de reprise destroy exige - `destroy-safe-options`, avec indication de `shuttle helper update`. Après - exit 1, l’OID est relu : absence confirmée, refus certain ou intention conservée. - Chaque génération contrôle l’espace et estime son délai depuis la taille, - dans le temps restant du watchdog avec une réserve pour le nettoyage. - Un budget insuffisant conserve les données. Le rapport nomme seulement les - objets encore en attente, explique l’échec et conserve le diagnostic nettoyé - de pg_dump. Un état sans ledger est entièrement retiré. Les tests couvrent - aussi la suppression de la base suivante après un refus certain. -- Compatibilité : aucun consentement n’est ajouté à un ancien journal ; les - reprises des autres opérations gardent leur chemin habituel. Les archives - existantes restent conservées. Les essais sur VM et le déploiement du helper restent à - effectuer ; aucune connexion à un hôte réel n’a été utilisée pour ces tests. - -## La reprise destroy réutilisait un dump antérieur à une intention interrompue (05-11-2026, DEV-DEPL-70) - -- Cause : une intention de drop persistée avant le lancement de la commande - autorisait la réutilisation d'une archive malgré des écritures plus récentes. - Un drop refusé laissait aussi son intention bloquer les bases suivantes. -- Correction : chaque reprise utilise une nouvelle génération de dumps et - conserve les anciennes archives. Le contrôle OID protège toujours les objets - recréés. Un refus natif terminé efface son intention avant la base suivante ; - un timeout, signal ou résultat inconnu conserve l'intention pour la reprise. - Le test de refus suivi d'un échec de reload vérifie que la reprise garde le - ledger et les identifiants des objets conservés, et détecte la mutation P2. -- Compatibilité : aucun consentement supplémentaire n'est déduit ; les bases - absentes sont ignorées et les anciennes archives ne sont ni écrasées ni - réutilisées. Les échecs certains gardent la nouvelle tentative normale. - -## Destroy bloquait la nouvelle tentative après un drop refusé (05-11-2026, DEV-DEPL-70) - -- Cause : un refus PostgreSQL après un dump réussi laissait le host en reprise - obligatoire malgré le conseil de relancer destroy. La reprise réutilisait - aussi un dump antérieur sans tentative de drop, et les lignes d'inventaire - épuisaient la limite de 32 actions avec 11 bases et 11 rôles. -- Correction : les objets non supprimés restent dans le ledger avec leurs - identifiants ; le nettoyage se termine avec une erreur connue qui autorise - une nouvelle tentative normale. Une reprise prend un nouveau dump sous un - autre nom, sauf pour la base visée par une intention de drop déjà journalisée, - protégée par son OID. L'inventaire complet est séparé de l'unique action de - nettoyage et reste lié à la confirmation. Le rapport d'échec garde un délai - pour ses lectures PostgreSQL. Les tests utilisent le vrai stderr du helper - et la clôture effective des writers ; les refus sans preuve connue sont testés. -- Compatibilité : les archives précédentes sont conservées, les erreurs autres - qu'un refus connu restent soumises à reprise, et aucun consentement de drop - n'est ajouté. Les contrôles et essais VM doivent utiliser le helper actualisé. - -## La simulation destroy échouait sur les volumes facultatifs absents (05-11-2026, DEV-DEPL-70) - -- Cause : le test réel sur VM d'une application sans Redis ni RabbitMQ a - rencontré le message Docker `volume managed-app_redis_data not found` sur - stderr. Le lecteur de stdout conservait seulement `exit status 1`, ce qui - empêchait la découverte de reconnaître l'absence du volume ou d'un secret. -- Correction : les lectures de sous-processus conservent stderr dans l'erreur, - sans le mélanger au stdout analysé. Le test exécute un vrai processus local - reproduisant les flux Docker et couvre les volumes absents, les secrets - absents, les avertissements et les erreurs réelles du daemon. -- Compatibilité : le destroy effectif et la découverte de reprise conservaient - déjà stderr ; leur comportement reste inchangé. Une erreur autre que - l'absence reste bloquante, et le code de sortie du sous-processus est conservé. - -## Destroy pouvait encore supprimer les bases sans consentement ni dump (05-11-2026, DEV-DEPL-70) - -- Cause : la suppression limitée au ledger était déjà livrée, mais un simple - `destroy --yes` supprimait toujours ses bases et rôles sans sauvegarde préalable. - La première correction conservait le ledger mais bloquait sa reprise, prenait - le dump avant le drainage et datait le plan avant l'attente de réservation. -- Correction : les bases, rôles, identifiants et ledger restent conservés par - défaut. Le consentement et la simulation voyagent dans le plan signé, daté - après réservation. Avant toute mutation, le contrôle d'espace exige la taille - des bases et une réserve de 10 %. Les dumps natifs sous l'uid `postgres` suivent - le drainage et précèdent les drops ; seules les archives vérifiées sont - publiées par renommage. Un échec conserve tous les objets PostgreSQL, termine - le reste du destroy et clôture l'opération avec une erreur et la commande de - nouvelle tentative. Le même plan signé ne peut pas rejouer cet échec connu. Un début de dump - journalisé sans succès confirmé impose aussi la conservation, même si le - disque empêche ensuite d’enregistrer l’échec. - La reprise ne traite plus un ledger conservé comme du nettoyage inachevé ; - sans journal, elle libère la réservation sans toucher l'application active. - Son aperçu et son compte rendu nomment les objets et chemins de dump. -- Compatibilité : le client refuse les helpers sans le contrat requis. Les - ledgers incomplets et journaux sans consentement ne déduisent aucune propriété - du nom. Un rôle reste conservé dès qu'une base est gardée, même si cette base - l'utilise seulement pour se connecter. Les archives finales ne sont pas - purgées automatiquement. Compose refuse les deux options nouvelles. Les - ledgers du parc, les scénarios VM et la politique de rétrogradation du helper - restent à vérifier ; aucune adoption automatique n'est ajoutée. - -## Redis 8 sans REDIS_VERSION bloquait les mises à jour et la récupération (05-11-2026, DEV-DEPL-100) - -- Cause : les deux lecteurs exigeaient `REDIS_VERSION` dans l'environnement de l'image, alors que Redis 8 ne la déclare plus. -- Correction : lorsque cette variable manque, le helper lit la version prouvée par `redis-server --version` dans l'image exacte, sans réseau, avec système de fichiers en lecture seule, sans capacités, sous utilisateur non privilégié et avec délai borné. Une réponse non reconnue est refusée en nommant l'image ; le tag ne fournit jamais la version. -- Compatibilité : les variables existantes restent prioritaires, les contrôles de majeure et de rétrogradation restent inchangés, et la récupération ne télécharge aucune image. RabbitMQ conserve son exigence de métadonnées, faute de sonde binaire vérifiée. La recette réelle sur VM reste à effectuer. - -## Swarm annonçait no-new-privileges sans l'appliquer (05-11-2026, DEV-DEPL-76) - -- Cause : `docker stack deploy` ignore `security_opt`. Le helper validait seulement sa présence dans le YAML et donnait une fausse assurance de protection. -- Correction : les nouvelles installations Docker configurent le défaut `no-new-privileges` du daemon avant son premier démarrage. `doctor --strict` contrôle le réglage du daemon en cours, et le helper ne présente plus la clé YAML ignorée comme une garantie. Aucun second déploiement de service n'est ajouté. -- Compatibilité : les hôtes et fichiers de configuration existants restent inchangés, sans redémarrage implicite de Docker. Leur activation demande une maintenance et la recréation des tâches, Caddy compris. Le contrôle doctor porte sur les nouveaux conteneurs, pas sur les tâches antérieures. Les images dépendant de setuid ou de capacités de fichier doivent être testées. Le champ `NoNewPrivileges` du service peut rester faux avec ce mécanisme ; la preuve attendue en VM est `NoNewPrivs: 1` sur les processus des tâches. Compose et les protections explicites des conteneurs helper restent inchangés. - -## Un rollback refusé écrasait le manifeste de la release courante (05-11-2026, DEV-DEPL-91) - -- Cause : le traitement commun des échecs de `docker stack deploy` recopiait `previous.yml` sur `current.yml`, même après un rollback qui n'avait pas modifié ce fichier. -- Correction : seule une opération `stack-apply` restaure le contenu de `current.yml` capturé avant son écriture, après un refus de Docker ou une non-convergence. Un redéploiement identique ne reprend plus l’ancienne release de `previous.yml` ; le rollback d’urgence utilise aussi le contenu capturé dans un fichier temporaire indépendant, même si la restauration de `current.yml` échoue. Cette erreur reste jointe à l’échec retourné au client. Si le temporaire ne peut pas être préparé, `previous.yml` sert de repli uniquement lorsque ses octets correspondent exactement au contenu capturé. Le test de rollback vérifie désormais aussi que la release courante reste intacte après cet échec. -- Compatibilité : la restauration d'un déploiement échoué et le comportement d'un rollback réussi restent inchangés ; aucun accès à Docker réel n'est nécessaire au test. - - -## Un helper candidat bloqué retenait indéfiniment le verrou root (05-11-2026, DEV-DEPL-51) - -- Cause : les deux sondes attendaient le candidat et ses sorties sans limite ; un enfant pouvait garder les descripteurs ouverts après la fin du candidat. -- Correction : une limite commune de 30 secondes couvre les réessais et la collecte sur le chemin réellement appelé par `helper update` ; la sonde de migration inutilisée est supprimée. Le groupe est arrêté avant de récolter le leader, sans parcourir les processus de l'hôte. Un descendant détaché qui conserve la sortie ou un arrêt non confirmé est signalé pour récupération manuelle. -- Compatibilité : une intention de migration reste intacte après un arrêt forcé : son identité ne prouve pas l'absence de mutation partielle ultérieure. Le refus distingue délai et signal, lit l’intention avant de la mentionner et renvoie à la procédure administrateur de `docs/operations-recovery.md` ; `--dry-run` ne prétend plus inspecter l’hôte. Un échec de finalisation ne prétend plus que le binaire a été remplacé. Avec une intention absente ou déjà terminée, une fois le leader récolté et les sorties fermées, l’échec avant renommage efface seulement sa réservation propre et permet la récupération signée ; toute intention reste conservée. Ces observations n’excluent pas un descendant détaché silencieux. Après contrôle administrateur, la procédure couvre aussi une réservation sans intention ou avec une intention déjà terminée, conservée intacte, uniquement si le helper installé diffère du candidat. Aucun changement de protocole ; la validation sur VM reste à effectuer. - -## Un secret Swarm déclaré en environnement pouvait manquer sans explication (05-11-2026, DEV-DEPL-74) - -- Cause : `expose: env` montait un fichier et renseignait `SHUTTLE_ENV_SECRETS`, mais seul l'entrypoint des presets PHP exportait sa valeur. La documentation promettait cet export pour toute image. -- Correction : le précontrôle local de Swarm avertit avant tout accès à l'hôte, nomme les secrets et services concernés et explique comment conserver ou fournir l'entrypoint, ou lire le fichier avec `expose: file`. La documentation décrit ce contrat réel. La validation partagée reste silencieuse pour Compose, où `env_file` fournit directement les variables sans entrypoint d'export. -- Compatibilité : aucun entrypoint n'est injecté, aucun secret n'est placé dans l'environnement de la stack. Une image dont le comportement ne peut pas être prouvé reste autorisée, y compris avec `--skip-build`. Les presets PHP fonctionnent sans changement et reçoivent le même rappel du contrat. - -## Le rollback explicite pouvait rétrograder Redis et RabbitMQ (05-11-2026, DEV-DEPL-91) - -- Cause : `stack-rollback` déployait directement `previous.yml`, sans la - protection des données déjà appliquée au rollback d'urgence. -- Correction : les deux chemins réutilisent la même décision sur l'image live - avant déploiement. Le rollback conserve Redis et RabbitMQ si nécessaire et - refuse si leur image live ne peut être établie. Le test inspecte le manifeste - réellement transmis au déploiement, sans contacter Docker. -- Compatibilité : les fichiers retenus restent inchangés par cette décision et - gardent les contrôles de leur époque ; aucune nouvelle politique d'entrée ne - bloque une ancienne stack. La validation sur VM reste à effectuer. - -## Une commande réussie pouvait être rejouée avant clôture (05-11-2026, DEV-DEPL-92) - -- Cause : après une réponse SSH perdue, le coordinateur acceptait une nouvelle - phase `run` malgré un succès déjà journalisé dans la même opération ouverte. -- Correction : sous le verrou de mutation, toute répétition d'un `run` réussi - est refusée explicitement avant l'exécution, même après une phase client. - Le test reproduit deux exécutions avant correction, avec les deux verrous. -- Compatibilité : la clôture du succès reste possible ; les refus des opérations - terminales et des échecs connus sont conservés, sans changement de protocole. - -## Redéployer le même commit Compose écrasait la release de secours (05-11-2026, DEV-DEPL-93) - -- Cause : le SHA servait à la fois de tag d'image et de dossier de release ; la préparation réutilisait ce dossier, puis la reprise arrêtait le projet lorsque `current` portait la version en échec. -- Correction : chaque tentative ajoute un horodatage au dossier de release, dont la création exclusive refuse tout dossier existant avant l'écriture du manifeste ou des secrets. La reprise relance la release intacte désignée par `current` sans déplacer ce lien. La tentative en échec ne peut plus porter son nom ; le chemin de reprise qui prétendait gérer cette situation a été retiré. Les tests détectent explicitement une absence de `down` au premier déploiement et un nom de tentative identique à la source. Chaque manifeste utilise des références de tentative immuables : une image inchangée conserve la référence déjà exécutée pour éviter une recréation, tandis qu’une image modifiée reçoit un nouveau tag. Les nouveaux tags sont créés sur l'hôte depuis les identifiants d'image sans dupliquer les couches ; la rétention supprime les anciens tags et garde les alias source utiles à `--skip-build`. La rotation compare la source et conserve la cible de rollback lors des redéploiements du même commit (W, X, X garde W). -- Compatibilité : les alias source restent disponibles pour `--skip-build` et Swarm reste inchangé ; les services Compose utilisent désormais les tags de tentative. Une ancienne référence source mutable est remplacée par un tag de tentative au prix d'une seule recréation par service. Si les images en cours ne peuvent pas être lues, le CLI le signale et utilise les nouveaux tags. Un premier déploiement en échec sans release saine exécute toujours `down` ; `deploy.auto_rollback: false` conserve son comportement explicite. - -## Le build Compose distant ignorait le port SSH (05-11-2026, DEV-DEPL-95) - -- Cause : le préflight utilisait le port configuré, mais le transport Docker et la recherche de clé OpenSSH utilisaient seulement le nom d'hôte. -- Correction : l'URI Docker et la recherche `ssh-keygen -lF` désignent le même port configuré, avec les crochets nécessaires pour IPv6 et `known_hosts`. -- Compatibilité : le port 22 conserve la forme habituelle pour les noms DNS et IPv4 ; les URI IPv6 sont correctement délimitées. - -## Une stack signée pouvait atteindre l'hôte par ses sections globales (05-11-2026, DEV-DEPL-89, DEV-DEPL-90) - -- Cause : le helper contrôlait les montages de chaque service, mais jamais les - sections globales transmises à `docker stack deploy`, qui tourne en root. Un - volume local avec `driver_opts` redonnait un bind mount, et un secret `file` - pouvait faire lire un fichier de l'hôte. Audit de code du 04-11-2026 : aucune - exploitation constatée, et il fallait une requête signée valide. -- Correction : une stack qui entre sur l'hôte est refusée si elle porte - `driver_opts`, un driver de volume autre que `local`, un driver de réseau - autre que `overlay` ou `bridge`, un `env_file`, une entrée `configs` globale - ou un secret non `external`. Les sections globales d'un fichier compose - traversent presque toutes le renderer sans changement : le client applique - donc le même contrôle avant le build, `--dry-run` compris. `infra recreate` - va plus loin avant de détruire le guest : il joue tous les contrôles locaux - du deploy, rend la stack avec des digests factices et lui applique la - politique du helper, car un refus après la destruction ne laisse aucune stack - retenue. `.env` ne sert qu'à ce contrôle et ne rejoint pas l'environnement de - `pvecli`. Un store de secrets local demande donc sa phrase de passe deux fois. -- Compatibilité : une stack sans ces formes est inchangée, et `env_file` reste - permis dans le fichier compose, le renderer le retire. Un fichier compose - avec un volume NFS, un driver de plugin ou macvlan, un secret `file` ou une - entrée `configs` est refusé au prochain deploy. Les stacks déjà retenues sur l'hôte - ne sont pas rejugées : rollback et reprise restent possibles, avec les - contrôles de leur époque. Côté helper, le contrôle ne vaut qu'après - `shuttle helper update`. -- Reste à faire : un `name:` de volume, ou un volume, un secret ou un réseau - `external`, peut encore viser un objet existant d'une autre application. - -## `shuttle update` réclamait un jeton que plus personne ne peut obtenir (05-11-2026) - -- Cause : le site qui délivrait le jeton de téléchargement a été retiré le 14-09-2026, mais `shuttle update` refusait toujours de continuer sans lui, même avec une origine `SHUTTLE_SITE_URL` publique. La commande `shuttle license` et son paquet `internal/license` restaient aussi dans le binaire alors qu'aucune fonction n'en dépendait (`Require` n'était appelé nulle part) et qu'aucune release n'embarquait de clé. -- Correction : `shuttle update` ne présente plus aucun identifiant, la signature du manifeste reste le seul contrôle. `--token`, `SHUTTLE_DOWNLOAD_TOKEN` et `~/.shuttle/download-token` disparaissent. `shuttle license` et `internal/license` sont supprimés : l'interface publique passe à dix-sept commandes. -- Compatibilité : un script qui passe `--token` échoue sur un drapeau inconnu. Un manifeste sans URL de téléchargement est refusé sous ce nom, et non plus comme un jeton rejeté. Vérification de signature, sha256, révocation des clés et `--recover` sont inchangés. -- Reste à faire (DEV-DEPL-10) : `shuttle update` ne marche toujours pas sur nos releases. Le `latest.json` publié porte `assets`, la CLI attend `sha256` et `urls`, et rien dans le dépôt ne produit les `urls`. Mesuré à la relecture : `malformed release manifest`. L'écart existait avant ce retrait. D'ici là, `make install` et `gh release download` restent les chemins. - -## Promotion Swarm plus courte et couche vendor PHP séparée (01-11-2026, DEV-DEPL-83, DEV-DEPL-85) - -- Cause : la convergence recevait 55 % du SLO quelle que soit la release (web, SLO 90 s : 49,5 s, échec du 01-11 alors que la tâche était saine) ; `update_config` codait en dur `monitor: 10s` et `parallelism: 1` ; `stack-reclaim` tournait avant le build ; les Dockerfiles PHP générés copiaient vendor avec le code (couche de 117 Mo par release mesurée sur Core). -- Correction : budget Swarm à deux modes, choisi par le helper avant `docker stack deploy` (parts historiques et plancher 120 s pour une première release ou un domaine sans certificat valide ; sinon reload Caddy, preuve d'origine et disponibilité plafonnées à 10 s, convergence jusqu'à 410 s) ; `deploy.update_monitor_seconds` (5 s par défaut) et `update_parallelism` par service ; reclaim pendant un build local sans push, push après le contrôle disque ; étapes `deps` et `app-tree` dans les Dockerfiles Laravel et Symfony. Compose inchangé. -- Reste à faire avant release : e2e sur VM jetable (rollback, couche vendor en cache après une release de code, mesure de l'attente d'environ 9 s après convergence). - -## La re-convergence pouvait casser les certificats de l'edge après rollback (30-10-2026) - -- Cause : `setup --adopt` réattribuait les volumes Caddy à `10001:10001` avant - la mise à jour Swarm. Sur production-host, le 30-10-2026, l'edge historique - tourne en root avec `cap_drop: [ALL]` (lu en lecture seule) : après un - rollback, ce root sans `DAC_OVERRIDE` n'aurait plus pu lire ses certificats - en mode 0600, et le HTTPS de toutes les apps de l'hôte serait tombé. -- Correction : avant le changement de propriétaire, la re-convergence relève - le propriétaire de chaque chemin des volumes gérés (pas seulement la - racine) dans un fichier temporaire privé, et refuse de continuer si le - relevé est illisible. La remise rend à chaque chemin son propriétaire - exact (lignes lues entières : un nom finissant par une espace reste - intact) ; un chemin disparu depuis le relevé est sauté sans interrompre la - remise ; un fichier créé pendant l'essai prend le propriétaire de la racine. Après - le retour à la spec précédente, elle restaure ces propriétaires avant les - vérifications HTTP et HTTPS, dès que l'échec est constaté, sans attendre la - fin du rollback Swarm (l'ancien edge ne peut pas démarrer avant). Le - filet est armé avant le premier changement de propriétaire : toute sortie - sans edge convergé (précontrôle, deploy refusé à spec inchangée) rend - aussi les propriétaires. Sur un rollback explicite, les propriétaires - reviennent avant la demande, lancée avec `docker service rollback --detach` - pour ne pas attendre une tâche qui ne peut pas démarrer. Les volumes déjà - en `10001:10001` sont ignorés. -- Preuve : aller-retour réel sur un volume Docker avec l'image `caddy:2` - (racine 10001, sous-dossier 1234:5678, clé root 0600 dans un chemin avec - espace) : propriétaires rendus à l'identique. Test du script généré avec un - faux Docker, qui vérifie l'ordre de - restauration avant le contrôle HTTP, l'absence de restauration après une mise - à jour réussie et le saut des volumes déjà en `10001:10001` ; validation par - `sh -n`. -- Budget de reprise du rollback porté de 60 à 150 s : l'e2e a vu Swarm - démarrer la tâche de rollback exactement 60 s après sa création dans 2 - rollbacks automatiques sur 6 (relance de l'allocateur), ce qui signalait - un CRITICAL environ 10 s avant que l'edge revienne. -- Le délai SSH de la re-convergence passe de 2 à 10 minutes : il couvre - l'attente de la mise à jour (120 s), la reprise (150 s), le pull, le - relevé et les sondes, sinon un rollback lent était coupé avant son - compte rendu. -- E2E (VM jetable 246, edge réglé comme production-host) : sans correctif - (v0.0.62), edge bloqué en `rollback_paused` 0/1 et `permission denied` sur - les certificats ; avec rc4, retour à root, volumes et sous-chemins rendus - à l'identique, même certificat (même numéro de série), puis adoption - réussie en `10001:10001`. -- Compatibilite : le comportement du `setup` neuf reste inchangé ; seuls les - rollbacks de la re-convergence en adoption restaurent les propriétaires. - -## Les tests Go ne profitaient pas des 16 cœurs (30-10-2026) - -- Cause : `go test ./...` prenait environ 98 s, dont 97,9 s dans - `internal/cli` pour 1 067 tests de premier niveau sans `t.Parallel`. Trois - tests totalisaient à eux seuls 59,9 s. -- Correction : `scripts/go-test-sharded.sh` compile une fois chaque paquet, - distribue ses tests entre des processus concurrents et utilise les durées - précédentes pour équilibrer les prochaines exécutions. Le nombre de - résultats est vérifié contre la liste avant de déclarer la réussite. -- Preuve : le 30-10-2026, sur le poste (16 cœurs), `go test ./...` prend 98 s - et `scripts/go-test-sharded.sh -j 8` 32,9 s pour 1 097 tests (3 paquets), - avec le même décompte. Le plancher restant est le test le plus lent (30 s). -- Défaut corrigé à l'intégration : `-test.run` passait la regex en argument - séparé, que les tests qui lisent `os.Args` prenaient pour une commande ; - la regex est désormais passée en un seul jeton `-test.run=...`. -- Compatibilité : `make test` et les tests restent inchangés ; `make test-fast` - ajoute le nouveau lancement parallèle. - -## Docker 29 pouvait bloquer destroy et recovery (30-10-2026) - -- Cause : l'e2e sur VM 246 avec Docker 29.9.2 a montré que l'inspection des - volumes, secrets, services et réseaux absents renvoyait « not - found ». Le helper ne reconnaissait que l'ancien message « no such ». - Un destroy sans Redis, RabbitMQ ou base échouait alors en - `recovery_required`, bloquait les déploiements de l'hôte et empêchait aussi - `shuttle operations recover` de terminer. -- Correction : un prédicat commun reconnaît les deux formats Docker et vérifie - le type d'objet pour écarter les autres erreurs « not found ». -- Preuve : tests ciblés pour les messages Docker 29 et historiques, les erreurs - sans rapport et l'interdiction des comparaisons textuelles directes. -- Compatibilité : les anciens messages restent reconnus et aucune autre étape - de suppression ou de récupération ne change. - -## Destroy refusait toute stack Swarm à cause du format de la durée d'arrêt (30-10-2026) - -- Cause : le helper lisait `StopGracePeriod` avec le gabarit Docker brut, qui - rend une durée Go (`10s`), alors que son parseur n'accepte que des - nanosecondes. `docker stack deploy` pose 10s sur chaque service : l'e2e du - 30-10-2026 (Docker 29.9.2, VM jetable) a vu `invalid Docker stop grace period - "10s"`, un destroy en `recovery_required` et tout l'hôte bloqué. -- Correction : le helper demande `{{json ...StopGracePeriod}}` (nanosecondes, - `null` si absent), et `null` vaut la valeur par défaut de 10 s. -- Preuve : tests du parseur (nanosecondes, `null`, refus de `10s` et d'un jeton - inconnu) ; sortie `{{json}}` vérifiée sur la VM : `10000000000`. -- Compatibilite : actif après `shuttle helper update`. - -## setup --adopt échouait sur un script Caddy laissé dans /tmp (30-10-2026) - -- Cause : `setup` dépose `/tmp/shuttle-caddy-volumes.sh` en root 0600. La - réclamation d'adoption nettoyait les autres fichiers de staging mais pas - celui-ci : dans un `/tmp` sticky, l'utilisateur sudo de l'adoption ne pouvait - pas le remplacer (`mv: cannot move ... Operation not permitted`, e2e du - 30-10-2026 sur VM jetable), et la re-convergence de l'edge s'arrêtait. -- Correction : le fichier est ajouté au nettoyage, et un test de contrat exige - que chaque chemin fixe `/tmp/shuttle-*` envoyé par setup ou l'adoption y - figure. -- Preuve : `TestAdoptionClaimRemovesEveryStagedUpload`. -- Compatibilite : aucune action requise. - -## Le balayage hôte ne supprimait jamais une image tirée par Swarm (30-10-2026) - -- Cause : avec le magasin d'images containerd (Docker 29), Swarm nomme une - image tirée `busybox:1.36@sha256:...`. `docker image ls` montre le tag, mais - `docker image rm busybox:1.36` répond « No such image » : le balayage de - DEV-DEPL-68 gardait donc toute image tierce remplacée, en ne le notant que - dans le journal du helper. -- Correction : quand le tag seul ne se résout pas, le balayage essaie les noms - qualifiés par digest relevés au moment du plan, toujours sans `--force` ; un - refus « image utilisée » n'essaie rien d'autre. -- Preuve : e2e sur VM jetable (Docker 29.9.2) qui a reproduit le défaut, test +## The deploy disk threshold blocked a rollback (07-11-2026, DEV-DEPL-109) + +- Cause: the helper's shared check required 20% free space even to bring the kept release back. The test on base c762f5f reproduces the refusal at 19%, before anything is submitted to Docker. +- Fix: rollback keeps a 1% reserve for the writes of the journal, the manifests and the run metadata, without reserving a new release's margin. The tests reach the simulated Docker submission at 19% and 1%, refuse at 0.99%, and check that both deploy checks still refuse at 19%. +- Compatibility: deploy keeps its 20% threshold, its prechecks and its defaults. The helper picks the reserve from the existing signed action; no protocol, stored format or flag changes. The check still covers the root, without measuring a separate Docker partition. No real host trial is claimed. + +## A downgraded helper could resume a destroy with old rules (05-11-2026, DEV-DEPL-102) + +- Cause: journals carrying the deletion consent kept schema v1, and the candidate probe checked the interface without comparing versions. A false consent omitted from the JSON could stay readable by an old helper. Deterministic refusals forced a global recovery, temporary files blocked the replacement forever, and setup bypassed the journal check. +- Fix: new writes use v2, which historical journal readers refuse; the helper compares its version with the real candidate's. The signed `--allow-downgrade` flag allows an explicit downgrade, but any remaining destroy journal blocks it under lock. Confirmed version refusals close the reservation as failed without recovery; uncertain probes stay blocking. Setup also refuses to replace a helper with a pending journal, from a dedicated first step, before sending any file, mutating the host or taking over in adoption mode. Only `.shuttle-root-` temporary files, regular, owned by root and strictly 0600, are ignored without change. The tests run the real command up to the signed plan and the privileged refusal path; they check the false consent without the flag, the true one with the flag, that the reservation and recovery are kept if an intent stays pending, then the next reservation after a safe refusal. Targeted mutations protect these connections, the admission cleanup and the first setup check. +- Compatibility: v1 stays readable without adding a consent, then becomes v2 on the next write. `dev` and `git describe` builds stay installable without a pending journal; an installed development helper also blocks a release candidate while that journal exists. An old helper already installed and v1 journals not yet rewritten are not protected retroactively; versions older than the journal reader also need the downgrade check. The procedure is in `docs/operations-recovery.md`. No VM trial or real host change is claimed. + +## A destroy blocked the helper update scan (05-11-2026, DEV-DEPL-101) + +- Cause: the scan refused the private `destroy-cleanup` directory kept after a destroy, as well as the journal temporary files left by an interruption. +- Fix: the scan recognizes that directory and the temporary files of the journal and the writer store, checking their type, owner and permissions; unknown entries stay refused. The precheck comes before the mutation phase and closes a reservation with no phase as failed, without recovery; the client also requests that refusal when needed. The tests cover the scan, the refusal and the administrator procedure on fixtures. +- Compatibility: the old installed helper runs the first scan, so a fixed release is not enough on a host already blocked. The procedure in `docs/operations-recovery.md` refuses any remaining destroy journal and removes only the empty directory, under lock, before the signed recovery and then the update. No journal or data is deleted; a phase already started keeps its proofs and recovery requirements. No VM validation is claimed. + +## A dump failure during resume kept the names of already deleted databases in the ledger (05-11-2026, DEV-DEPL-70) + +- Cause: after a partial deletion, the keep path erased the proof of the + completed objects from the journal without removing their ownership from the + ledger. A database recreated outside Shuttle under the same name could + therefore be deleted by a later, explicitly authorized destroy. +- Fix: confirmed deletions are removed from the ledger before the journal is + converted into kept objects, even if the dump failure could not be recorded. + A ledger write or sync failure keeps the journal and its proof; the resume + rewrites the ledger durably. The permanent tests cover the three failure + paths, the new same-name database and the mutations that skip the removal or + remove a pending object. +- Compatibility: pending objects, explicitly kept objects and objects foreign + to the plan stay in the ledger with their credentials. No name without a + deletion proof is removed and no consent is added. VM trials and the helper + update are still to be done. + +## The destroy resume could call a helper without safeguards and lose the proof of a drop (05-11-2026, DEV-DEPL-70) + +- Cause: the resume did not check the helper contract and treated a PostgreSQL + exit 1 as a certain refusal. Later dump generations did not check the space + again; their fixed timeout could exhaust the watchdog. A failure after a + partial deletion reported already deleted databases as kept, hid stderr and + left an empty directory without a ledger. +- Fix: every destroy resume plan and apply requires `destroy-safe-options`, + pointing to `shuttle helper update`. After exit 1, the OID is read again: + confirmed absence, certain refusal or kept intent. Each generation checks the + space and estimates its timeout from the size, within the watchdog's + remaining time with a reserve for cleanup. An insufficient budget keeps the + data. The report names only the objects still pending, explains the failure + and keeps pg_dump's cleaned diagnostic. A state without a ledger is removed + entirely. The tests also cover deleting the next database after a certain + refusal. +- Compatibility: no consent is added to an old journal; resumes of other + operations keep their usual path. Existing archives are kept. VM trials and + the helper rollout are still to be done; no real host connection was used + for these tests. + +## The destroy resume reused a dump older than an interrupted intent (05-11-2026, DEV-DEPL-70) + +- Cause: a drop intent persisted before the command started allowed an archive + to be reused despite newer writes. A refused drop also left its intent + blocking the following databases. +- Fix: each resume uses a new dump generation and keeps the old archives. The + OID check still protects recreated objects. A completed native refusal + clears its intent before the next database; a timeout, signal or unknown + result keeps the intent for the resume. The test of a refusal followed by a + reload failure checks that the resume keeps the ledger and the credentials of + the kept objects, and detects the P2 mutation. +- Compatibility: no extra consent is inferred; missing databases are ignored + and old archives are neither overwritten nor reused. Certain failures keep + the normal retry. + +## Destroy blocked the retry after a refused drop (05-11-2026, DEV-DEPL-70) + +- Cause: a PostgreSQL refusal after a successful dump left the host in + mandatory recovery despite the advice to run destroy again. The resume also + reused an older dump with no drop attempt, and the inventory lines exhausted + the 32-action limit with 11 databases and 11 roles. +- Fix: objects that were not deleted stay in the ledger with their + credentials; the cleanup ends with a known error that allows a normal retry. + A resume takes a new dump under another name, except for the database named + by a drop intent already journaled, protected by its OID. The full inventory + is separated from the single cleanup action and stays tied to the + confirmation. The failure report keeps a timeout for its PostgreSQL reads. + The tests use the helper's real stderr and the actual closing of the + writers; refusals with no known proof are tested. +- Compatibility: previous archives are kept, errors other than a known refusal + stay subject to recovery, and no drop consent is added. VM checks and trials + must use the updated helper. + +## The destroy simulation failed on missing optional volumes (05-11-2026, DEV-DEPL-70) + +- Cause: the real VM test of an application without Redis or RabbitMQ hit the + Docker message `volume managed-app_redis_data not found` on stderr. The + stdout reader kept only `exit status 1`, which kept discovery from + recognizing a missing volume or secret. +- Fix: subprocess reads keep stderr in the error, without mixing it with the + parsed stdout. The test runs a real local process that reproduces the Docker + streams and covers missing volumes, missing secrets, warnings and real daemon + errors. +- Compatibility: the actual destroy and resume discovery already kept stderr; + their behavior is unchanged. An error other than a missing object stays + blocking, and the subprocess exit code is kept. + +## Destroy could still delete databases without consent or a dump (05-11-2026, DEV-DEPL-70) + +- Cause: deletion limited to the ledger had already shipped, but a plain + `destroy --yes` still deleted its databases and roles without a prior backup. + The first fix kept the ledger but blocked its resume, took the dump before + draining and dated the plan before the reservation wait. +- Fix: databases, roles, credentials and the ledger are kept by default. + Consent and simulation travel in the signed plan, dated after the + reservation. Before any mutation, the space check requires the size of the + databases plus a 10% reserve. Native dumps under the `postgres` uid follow + the draining and come before the drops; only verified archives are published + through a rename. A failure keeps every PostgreSQL object, finishes the rest + of the destroy and closes the operation with an error and the retry command. + The same signed plan cannot replay that known failure. A journaled dump start + without confirmed success also forces keeping, even if the disk then prevents + recording the failure. + The resume no longer treats a kept ledger as unfinished cleanup; without a + journal, it releases the reservation without touching the active + application. Its preview and its report name the objects and the dump paths. +- Compatibility: the client refuses helpers without the required contract. + Incomplete ledgers and journals without consent infer no ownership from the + name. A role is kept as soon as a database is kept, even if that database + only uses it to connect. Final archives are not purged automatically. + Compose refuses both new options. The fleet ledgers, the VM scenarios and the + helper downgrade policy are still to be checked; no automatic adoption is + added. + +## Redis 8 without REDIS_VERSION blocked updates and recovery (05-11-2026, DEV-DEPL-100) + +- Cause: both readers required `REDIS_VERSION` in the image environment, while Redis 8 no longer declares it. +- Fix: when that variable is missing, the helper reads the version proven by `redis-server --version` in the exact image, with no network, a read-only file system, no capabilities, an unprivileged user and a bounded timeout. An unrecognized answer is refused and names the image; the tag never provides the version. +- Compatibility: existing variables keep priority, the major and downgrade checks stay unchanged, and recovery downloads no image. RabbitMQ keeps its metadata requirement, for lack of a verified binary probe. The real VM acceptance run is still to be done. + +## Swarm announced no-new-privileges without applying it (05-11-2026, DEV-DEPL-76) + +- Cause: `docker stack deploy` ignores `security_opt`. The helper only checked that it was present in the YAML and gave a false assurance of protection. +- Fix: new Docker installations set the daemon's `no-new-privileges` default before its first start. `doctor --strict` checks the running daemon's setting, and the helper no longer presents the ignored YAML key as a guarantee. No second service deploy is added. +- Compatibility: existing hosts and configuration files stay unchanged, with no implicit Docker restart. Enabling it on them requires maintenance and recreating the tasks, Caddy included. The doctor check covers new containers, not earlier tasks. Images that depend on setuid or file capabilities must be tested. The service's `NoNewPrivileges` field can stay false with this mechanism; the expected VM proof is `NoNewPrivs: 1` on the task processes. Compose and the explicit protections of the helper containers stay unchanged. + +## A refused rollback overwrote the current release's manifest (05-11-2026, DEV-DEPL-91) + +- Cause: the shared handling of `docker stack deploy` failures copied `previous.yml` over `current.yml`, even after a rollback that had not changed that file. +- Fix: only a `stack-apply` operation restores the `current.yml` content captured before it was written, after a Docker refusal or a non-convergence. An identical redeploy no longer takes back the old release from `previous.yml`; the emergency rollback also uses the captured content in an independent temporary file, even if restoring `current.yml` fails. That error stays attached to the failure returned to the client. If the temporary file cannot be prepared, `previous.yml` serves as a fallback only when its bytes match the captured content exactly. The rollback test now also checks that the current release stays intact after that failure. +- Compatibility: restoring a failed deploy and the behavior of a successful rollback stay unchanged; the test needs no access to a real Docker. + + +## A stuck candidate helper held the root lock forever (05-11-2026, DEV-DEPL-51) + +- Cause: both probes waited for the candidate and its outputs with no limit; a child could keep the descriptors open after the candidate ended. +- Fix: a shared 30-second limit covers the retries and the collection on the path `helper update` actually calls; the unused migration probe is removed. The group is stopped before reaping the leader, without walking the host's processes. A detached descendant that keeps the output, or an unconfirmed stop, is reported for manual recovery. +- Compatibility: a migration intent stays intact after a forced stop: its identity does not prove the absence of a later partial mutation. The refusal tells a timeout from a signal, reads the intent before mentioning it and points to the administrator procedure in `docs/operations-recovery.md`; `--dry-run` no longer claims to inspect the host. A finalization failure no longer claims that the binary was replaced. With a missing or already finished intent, once the leader is reaped and the outputs closed, the failure before the rename clears only its own reservation and allows the signed recovery; any intent is kept. These observations do not rule out a silent detached descendant. After an administrator check, the procedure also covers a reservation with no intent or with an already finished intent, kept intact, only if the installed helper differs from the candidate. No protocol change; VM validation is still to be done. + +## A Swarm secret declared as environment could be missing with no explanation (05-11-2026, DEV-DEPL-74) + +- Cause: `expose: env` mounted a file and set `SHUTTLE_ENV_SECRETS`, but only the PHP presets' entrypoint exported its value. The documentation promised that export for any image. +- Fix: the local Swarm precheck warns before any host access, names the secrets and services involved, and explains how to keep or provide the entrypoint, or read the file with `expose: file`. The documentation describes this real contract. The shared validation stays silent for Compose, where `env_file` provides the variables directly with no export entrypoint. +- Compatibility: no entrypoint is injected and no secret is placed in the stack environment. An image whose behavior cannot be proven stays allowed, including with `--skip-build`. The PHP presets work unchanged and get the same contract reminder. + +## The explicit rollback could downgrade Redis and RabbitMQ (05-11-2026, DEV-DEPL-91) + +- Cause: `stack-rollback` deployed `previous.yml` directly, without the data + protection already applied to the emergency rollback. +- Fix: both paths reuse the same decision on the live image before deploying. + The rollback keeps Redis and RabbitMQ when needed and refuses if their live + image cannot be established. The test inspects the manifest actually passed + to the deploy, without contacting Docker. +- Compatibility: the kept files are not changed by this decision and keep the + checks of their time; no new admission policy blocks an old stack. VM + validation is still to be done. + +## A successful command could be replayed before closing (05-11-2026, DEV-DEPL-92) + +- Cause: after a lost SSH answer, the coordinator accepted a new `run` phase + despite a success already journaled in the same open operation. +- Fix: under the mutation lock, any repeat of a successful `run` is refused + explicitly before running, even after a client phase. The test reproduces two + runs before the fix, with both locks. +- Compatibility: closing the success stays possible; refusals of terminal + operations and known failures are kept, with no protocol change. + +## Redeploying the same Compose commit overwrote the fallback release (05-11-2026, DEV-DEPL-93) + +- Cause: the SHA served both as the image tag and as the release directory; preparation reused that directory, then the resume stopped the project when `current` carried the failed version. +- Fix: each attempt adds a timestamp to the release directory, whose exclusive creation refuses any existing directory before the manifest or secrets are written. The resume restarts the intact release that `current` points to without moving that link. The failed attempt can no longer carry its name; the resume path that claimed to handle that situation was removed. The tests explicitly detect a missing `down` on the first deploy and an attempt name identical to the source. Each manifest uses immutable attempt references: an unchanged image keeps the reference already running to avoid a recreation, while a changed image gets a new tag. New tags are created on the host from the image IDs without duplicating layers; retention deletes old tags and keeps the source aliases `--skip-build` needs. Rotation compares the source and keeps the rollback target when the same commit is redeployed (W, X, X keeps W). +- Compatibility: source aliases stay available for `--skip-build` and Swarm stays unchanged; Compose services now use the attempt tags. An old mutable source reference is replaced by an attempt tag at the cost of a single recreation per service. If the running images cannot be read, the CLI says so and uses the new tags. A failed first deploy with no healthy release still runs `down`; `deploy.auto_rollback: false` keeps its explicit behavior. + +## The remote Compose build ignored the SSH port (05-11-2026, DEV-DEPL-95) + +- Cause: the preflight used the configured port, but the Docker transport and the OpenSSH key lookup used only the host name. +- Fix: the Docker URI and the `ssh-keygen -lF` lookup name the same configured port, with the brackets IPv6 and `known_hosts` need. +- Compatibility: port 22 keeps the usual form for DNS names and IPv4; IPv6 URIs are delimited correctly. + +## A signed stack could reach the host through its top-level sections (05-11-2026, DEV-DEPL-89, DEV-DEPL-90) + +- Cause: the helper checked each service's mounts, but never the top-level + sections passed to `docker stack deploy`, which runs as root. A local volume + with `driver_opts` brought back a bind mount, and a `file` secret could make + it read a host file. Code audit of 04-11-2026: no exploitation found, and a + valid signed request was required. +- Fix: a stack entering the host is refused if it carries `driver_opts`, a + volume driver other than `local`, a network driver other than `overlay` or + `bridge`, an `env_file`, a top-level `configs` entry or a non-`external` + secret. Nearly all top-level sections of a compose file go through the + renderer unchanged: the client therefore applies the same check before the + build, `--dry-run` included. `infra recreate` goes further before destroying + the guest: it runs every local deploy check, renders the stack with fake + digests and applies the helper policy to it, because a refusal after the + destruction leaves no kept stack. `.env` serves only this check and does not + join the `pvecli` environment. A local secret store therefore asks for its + passphrase twice. +- Compatibility: a stack without these forms is unchanged, and `env_file` stays + allowed in the compose file; the renderer removes it. A compose file with an + NFS volume, a plugin or macvlan driver, a `file` secret or a `configs` entry + is refused on the next deploy. Stacks already kept on the host are not judged + again: rollback and resume stay possible, with the checks of their time. On + the helper side, the check applies only after `shuttle helper update`. +- Still to do: a volume `name:`, or an `external` volume, secret or network, + can still target an existing object of another application. + +## `shuttle update` asked for a token nobody can get anymore (05-11-2026) + +- Cause: the site that issued the download token was retired on 14-09-2026, but `shuttle update` still refused to go on without it, even with a public `SHUTTLE_SITE_URL` origin. The `shuttle license` command and its `internal/license` package also stayed in the binary although no feature depended on them (`Require` was called nowhere) and no release embedded a key. +- Fix: `shuttle update` presents no identifier anymore; the manifest signature stays the only check. `--token`, `SHUTTLE_DOWNLOAD_TOKEN` and `~/.shuttle/download-token` are gone. `shuttle license` and `internal/license` are removed: the public interface goes down to seventeen commands. +- Compatibility: a script that passes `--token` fails on an unknown flag. A manifest without a download URL is refused under that name, no longer as a rejected token. Signature verification, sha256, key revocation and `--recover` are unchanged. +- Still to do (DEV-DEPL-10): `shuttle update` still does not work on our releases. The published `latest.json` carries `assets`, the CLI expects `sha256` and `urls`, and nothing in the repository produces the `urls`. Measured during review: `malformed release manifest`. The gap existed before this removal. Until then, `make install` and `gh release download` remain the paths. + +## Shorter Swarm promotion and a separate PHP vendor layer (01-11-2026, DEV-DEPL-83, DEV-DEPL-85) + +- Cause: convergence got 55% of the SLO whatever the release (web, 90 s SLO: 49.5 s, failure on 01-11 while the task was healthy); `update_config` hard-coded `monitor: 10s` and `parallelism: 1`; `stack-reclaim` ran before the build; the generated PHP Dockerfiles copied vendor with the code (117 MB layer per release, measured on Core). +- Fix: a two-mode Swarm budget, picked by the helper before `docker stack deploy` (historical shares and a 120 s floor for a first release or a domain without a valid certificate; otherwise Caddy reload, origin proof and availability capped at 10 s, convergence up to 410 s); `deploy.update_monitor_seconds` (5 s by default) and `update_parallelism` per service; reclaim during a local build without push, push after the disk check; `deps` and `app-tree` stages in the Laravel and Symfony Dockerfiles. Compose unchanged. +- Still to do before release: e2e on a throwaway VM (rollback, vendor layer cached after a code release, measuring the wait of about 9 s after convergence). + +## Re-convergence could break the edge certificates after a rollback (30-10-2026) + +- Cause: `setup --adopt` reassigned the Caddy volumes to `10001:10001` before + the Swarm update. On production-host, on 30-10-2026, the historical edge runs + as root with `cap_drop: [ALL]` (read-only check): after a rollback, that root + without `DAC_OVERRIDE` could no longer have read its mode 0600 certificates, + and HTTPS for every app on the host would have gone down. +- Fix: before the ownership change, re-convergence records the owner of every + path of the managed volumes (not only the root) in a private temporary file, + and refuses to go on if the record is unreadable. The restore gives each path + back its exact owner (whole lines are read: a name ending in a space stays + intact); a path gone since the record is skipped without stopping the + restore; a file created during the attempt takes the root's owner. After the + return to the previous spec, it restores these owners before the HTTP and + HTTPS checks, as soon as the failure is seen, without waiting for the end of + the Swarm rollback (the old edge cannot start before). The safety net is + armed before the first ownership change: any exit without a converged edge + (precheck, deploy refused with an unchanged spec) also restores the owners. + On an explicit rollback, the owners come back before the request, run with + `docker service rollback --detach` so as not to wait for a task that cannot + start. Volumes already at `10001:10001` are skipped. +- Proof: a real round trip on a Docker volume with the `caddy:2` image (root + 10001, subdirectory 1234:5678, root key 0600 in a path with a space): owners + restored identically. Test of the generated script with a fake Docker, which + checks the restore order before the HTTP check, that nothing is restored + after a successful update, and that volumes already at `10001:10001` are + skipped; validated with `sh -n`. +- Rollback recovery budget raised from 60 to 150 s: the e2e saw Swarm start the + rollback task exactly 60 s after its creation in 2 automatic rollbacks out of + 6 (allocator restart), which reported a CRITICAL about 10 s before the edge + came back. +- The re-convergence SSH timeout goes from 2 to 10 minutes: it covers the wait + for the update (120 s), the recovery (150 s), the pull, the record and the + probes; otherwise a slow rollback was cut before its report. +- E2E (throwaway VM 246, edge set up like production-host): without the fix + (v0.0.62), edge stuck in `rollback_paused` 0/1 and `permission denied` on the + certificates; with rc4, back to root, volumes and subpaths restored + identically, same certificate (same serial number), then a successful + adoption at `10001:10001`. +- Compatibility: the behavior of a fresh `setup` stays unchanged; only the + re-convergence rollbacks in adoption restore the owners. + +## The Go tests did not use the 16 cores (30-10-2026) + +- Cause: `go test ./...` took about 98 s, of which 97.9 s in `internal/cli` + for 1,067 top-level tests without `t.Parallel`. Three tests alone added up to + 59.9 s. +- Fix: `scripts/go-test-sharded.sh` compiles each package once, spreads its + tests across concurrent processes and uses the previous durations to balance + the next runs. The number of results is checked against the list before + declaring success. +- Proof: on 30-10-2026, on the workstation (16 cores), `go test ./...` takes + 98 s and `scripts/go-test-sharded.sh -j 8` 32.9 s for 1,097 tests (3 + packages), with the same count. The remaining floor is the slowest test + (30 s). +- Defect fixed at integration: `-test.run` passed the regex as a separate + argument, which tests that read `os.Args` took for a command; the regex is + now passed as a single `-test.run=...` token. +- Compatibility: `make test` and the tests stay unchanged; `make test-fast` + adds the new parallel run. + +## Docker 29 could block destroy and recovery (30-10-2026) + +- Cause: the e2e on VM 246 with Docker 29.9.2 showed that inspecting missing + volumes, secrets, services and networks returned " not found". + The helper only recognized the old "no such " message. A destroy + without Redis, RabbitMQ or a database then failed into `recovery_required`, + blocked the host's deploys and also kept `shuttle operations recover` from + finishing. +- Fix: a shared predicate recognizes both Docker formats and checks the object + type to rule out other "not found" errors. +- Proof: targeted tests for the Docker 29 and historical messages, unrelated + errors and the ban on direct text comparisons. +- Compatibility: the old messages stay recognized and no other deletion or + recovery step changes. + +## Destroy refused every Swarm stack because of the stop duration format (30-10-2026) + +- Cause: the helper read `StopGracePeriod` with the raw Docker template, which + renders a Go duration (`10s`), while its parser accepts only nanoseconds. + `docker stack deploy` sets 10s on every service: the e2e of 30-10-2026 + (Docker 29.9.2, throwaway VM) saw `invalid Docker stop grace period "10s"`, + a destroy in `recovery_required` and the whole host blocked. +- Fix: the helper requests `{{json ...StopGracePeriod}}` (nanoseconds, `null` + if absent), and `null` means the 10 s default. +- Proof: parser tests (nanoseconds, `null`, refusal of `10s` and of an unknown + token); `{{json}}` output checked on the VM: `10000000000`. +- Compatibility: active after `shuttle helper update`. + +## setup --adopt failed on a Caddy script left in /tmp (30-10-2026) + +- Cause: `setup` drops `/tmp/shuttle-caddy-volumes.sh` as root 0600. The + adoption claim cleaned the other staging files but not this one: in a sticky + `/tmp`, the adoption's sudo user could not replace it (`mv: cannot move ... + Operation not permitted`, e2e of 30-10-2026 on a throwaway VM), and the edge + re-convergence stopped. +- Fix: the file is added to the cleanup, and a contract test requires every + fixed `/tmp/shuttle-*` path that setup or adoption sends to be listed there. +- Proof: `TestAdoptionClaimRemovesEveryStagedUpload`. +- Compatibility: no action required. + +## The host sweep never deleted an image pulled by Swarm (30-10-2026) + +- Cause: with the containerd image store (Docker 29), Swarm names a pulled + image `busybox:1.36@sha256:...`. `docker image ls` shows the tag, but + `docker image rm busybox:1.36` answers "No such image": the DEV-DEPL-68 sweep + therefore kept every replaced third-party image, noting it only in the helper + log. +- Fix: when the tag alone does not resolve, the sweep tries the digest-qualified + names recorded at plan time, still without `--force`; an "image in use" + refusal tries nothing else. +- Proof: e2e on a throwaway VM (Docker 29.9.2) that reproduced the defect, test `TestRemoveRootHostImageRefFallsBackToPinnedDigestName`. -- Compatibilité : aucune image protégée n'entre dans le plan ; seul le nom - employé pour la supprimer change. - -## Destroy pouvait bloquer les opérations de tout l'hôte (30-10-2026) - -- Cause : après `docker service rm`, Swarm pouvait encore conserver un - conteneur de tâche arrêté qui référençait un volume. Le helper ne vérifiait - que les conteneurs actifs, imposait un délai fixe de 30 secondes, puis - échouait sur un volume temporairement « in use ». Le parseur ne garantissait - pas strictement le contrat de durée d'arrêt en nanosecondes. Un arrêt au - milieu d'un `dropdb` pouvait aussi laisser le nom en - attente après la suppression effective, puis viser une base recréée. Les - processus enfants PostgreSQL pouvaient survivre à l'échéance, une reprise - pouvait redécouvrir un volume créé après son instantané, et des échecs de - suppression PostgreSQL pouvaient être suivis d'une suppression du journal. - Enfin, la recovery ne voyait pas les identifiants encore à nettoyer après la - suppression de l'état ou de la route. L'opération globale `destroy` passait - alors en `recovery_required` et bloquait l'hôte (demo-prod, - 30-10-2026 00:07 UTC). -- Correction : attendre l'absence de tous les conteneurs de la stack, retirer - uniquement les anciennes tâches portant le label Swarm, et vérifier les - labels de propriété avant chaque suppression de volume. La durée d'arrêt - fournie par Docker fixe la borne au plus grand `stop_grace_period` plus - 30 secondes, plafonné à cinq minutes; les commandes de découverte, retrait, - PostgreSQL et reload Caddy respectent l'échéance journalisée. PostgreSQL - s'exécute dans un groupe de processus; l'annulation tue le groupe et - `WaitDelay` borne le drainage des pipes. Avant chaque suppression PostgreSQL, - le journal conserve le type, le nom et l'OID. Une reprise règle un objet - absent sans le supprimer une seconde fois, et garde avec un rapport tout - objet recréé avec un autre OID. Après préparation, la reprise traite - uniquement les volumes encore inscrits dans le journal. Un échec laisse les - objets pending et interdit la suppression du journal tant que toutes les - listes et étapes ne sont pas terminées. La route n'est terminée qu'après - synchronisation du répertoire Caddy. La recovery termine le destroy signé, - même si les ressources visibles ont déjà disparu, ou libère sans action une - opération dont le journal est absent et le reste vide. La preuve du plan - confirmé lie l'inventaire et le journal à l'approbation. -- Reprise des volumes : un nom journalisé dont le volume a déjà disparu - (Docker l'a supprimé juste avant l'interruption) ou qui appartient désormais - à une autre app est soldé dans le journal. Avant, il restait en attente et - bloquait la clôture du destroy pour toujours. -- Rôle PostgreSQL gardé : un rôle dont la suppression échoue parce qu'une base - conservée en dépend est inscrit comme gardé dans le journal, sort de la - liste en attente avec son intention de suppression, et garde ses - identifiants. La reprise peut finir au lieu de répéter « PostgreSQL removal - remains pending ». -- Preuve : les tests ciblés couvrent la deadline de découverte, le drainage et - ses limites, les volumes appartenant à l'application, la conservation d'un - volume marqué pour une autre application, la reprise des seuls volumes - journalisés, la terminaison d'une tâche bloquée avec descendant, la - réconciliation d'un drop interrompu par OID, la conservation du journal en - présence d'objets pending, la synchronisation du répertoire Caddy, la reprise - avec ou sans ressources restantes, la fermeture des writers, le refus de - capacité et chaque type d'opération réservé par le CLI. L'e2e opérateur sur - VM jetable reste en attente. -- Compatibilite : le correctif est actif après `shuttle helper update`. Jusque-là, - le CLI refuse `shuttle destroy` sur cet hôte et indique la mise à jour du - helper. Les autres opérations et le caractère global de `destroy` restent - inchangés. - -## Une premiere release en echec pouvait bloquer durablement l'application (30-10-2026) - -- Cause : après une phase de secrets, un refus de préflight pouvait laisser une - opération `deploy` en `recovery_required` sans manifeste ni service. Pour une - première release, l'état des services seul ne distinguait pas une release - jamais convergée d'une release convergée puis dégradée après un échec tardif. - La suppression globale de stack pouvait aussi détruire des secrets de la - stack, et le retrait d'une route Caddy sans synchronisation de son répertoire - pouvait la faire réapparaître après un crash (errortrack, 30-10-2026). -- Correction : une preuve de writers fermés et un baseline sans release - autorisent la libération sans action si aucun manifeste ni service n'existe. - Le helper écrit `pending` avant l'application Docker et ne le remplace par - `converged` qu'après son succès. Une suppression confirmée des services et - réseaux étiquetés exige un journal lisible, lié au manifeste, qui indique - `pending` ou `not-converged`. Une release convergée ou un ancien journal sans - marqueur suit la récupération par réapplication. Un journal de suppression - illisible bloque les mutations. Les volumes, tous les secrets et les bases - sont conservés. Après le retrait d'une route, la recovery synchronise le - répertoire Caddy avant de recharger Caddy et d'effacer l'indicateur de - reprise. Les deux suppressions conservent leur preuve jusqu'au fsync réussi. -- Preuve : les tests `TestRecoveryFirstReleaseRefusedAfterSecretsPhaseIsReleased`, +- Compatibility: no protected image enters the plan; only the name used to + delete it changes. + +## Destroy could block operations on the whole host (30-10-2026) + +- Cause: after `docker service rm`, Swarm could still keep a stopped task + container that referenced a volume. The helper checked only running + containers, imposed a fixed 30-second timeout, then failed on a temporarily + "in use" volume. The parser did not strictly enforce the nanosecond stop + duration contract. A stop in the middle of a `dropdb` could also leave the + name pending after the actual deletion, then target a recreated database. + PostgreSQL child processes could outlive the deadline, a resume could + rediscover a volume created after its snapshot, and PostgreSQL deletion + failures could be followed by the journal's deletion. Finally, recovery did + not see the credentials still to clean after the state or the route was + deleted. The global `destroy` operation then went into `recovery_required` + and blocked the host (demo-prod, 30-10-2026 00:07 UTC). +- Fix: wait until every container of the stack is gone, remove only the old + tasks carrying the Swarm label, and check the ownership labels before each + volume deletion. The stop duration Docker provides sets the bound to the + largest `stop_grace_period` plus 30 seconds, capped at five minutes; the + discovery, removal, PostgreSQL and Caddy reload commands respect the + journaled deadline. PostgreSQL runs in a process group; cancellation kills + the group and `WaitDelay` bounds the draining of the pipes. Before each + PostgreSQL deletion, the journal keeps the type, the name and the OID. A + resume settles an absent object without deleting it a second time, and keeps, + with a report, any object recreated with another OID. After preparation, the + resume handles only the volumes still listed in the journal. A failure leaves + the objects pending and forbids deleting the journal until every list and + step is finished. The route is finished only after the Caddy directory is + synced. Recovery finishes the signed destroy, even if the visible resources + are already gone, or releases with no action an operation whose journal is + missing and whose remainder is empty. The confirmed plan proof ties the + inventory and the journal to the approval. +- Volume resume: a journaled name whose volume is already gone (Docker deleted + it just before the interruption) or that now belongs to another app is + settled in the journal. Before, it stayed pending and blocked the destroy + from closing forever. +- Kept PostgreSQL role: a role whose deletion fails because a kept database + depends on it is recorded as kept in the journal, leaves the pending list + with its deletion intent, and keeps its credentials. The resume can finish + instead of repeating "PostgreSQL removal remains pending". +- Proof: the targeted tests cover the discovery deadline, draining and its + limits, the volumes owned by the application, keeping a volume labeled for + another application, resuming only journaled volumes, ending a stuck task + with a descendant, reconciling an interrupted drop by OID, keeping the + journal while objects are pending, syncing the Caddy directory, resuming with + or without remaining resources, closing the writers, the capability refusal + and every operation type the CLI reserves. The operator e2e on a throwaway VM + is still pending. +- Compatibility: the fix is active after `shuttle helper update`. Until then, + the CLI refuses `shuttle destroy` on that host and points to the helper + update. The other operations and the global nature of `destroy` stay + unchanged. + +## A failed first release could block the application for good (30-10-2026) + +- Cause: after a secrets phase, a preflight refusal could leave a `deploy` + operation in `recovery_required` with no manifest or service. For a first + release, the state of the services alone did not tell a release that never + converged from one that converged and then degraded after a late failure. + The global stack deletion could also destroy stack secrets, and removing a + Caddy route without syncing its directory could make it come back after a + crash (errortrack, 30-10-2026). +- Fix: a proof of closed writers and a baseline with no release allow a release + with no action if no manifest or service exists. The helper writes `pending` + before the Docker apply and replaces it with `converged` only after it + succeeds. A confirmed deletion of the labeled services and networks requires + a readable journal, tied to the manifest, that says `pending` or + `not-converged`. A converged release, or an old journal without a marker, + follows recovery by reapplying. An unreadable deletion journal blocks + mutations. Volumes, every secret and the databases are kept. After a route is + removed, recovery syncs the Caddy directory before reloading Caddy and + clearing the resume flag. Both deletions keep their proof until the fsync + succeeds. +- Proof: the tests `TestRecoveryFirstReleaseRefusedAfterSecretsPhaseIsReleased`, `TestRecoveryFirstReleaseWithServicesButNoManifestStaysUnresolved`, `TestRecoveryFirstReleaseThatNeverConvergedIsRemovedNotReplayed`, `TestRecoveryFirstReleasePendingAfterDockerRejectionIsRemoved`, @@ -770,2113 +760,2040 @@ Les exemples et récits de diagnostic utilisent des noms et adresses de document `TestRecoveryFirstReleaseUnreadableOperationJournalIsRefused`, `TestRecoveryFirstReleaseUnreadableRemovalJournalIsRefused`, `TestRecoveryFirstReleaseRemovalRefusesAChangedCurrent`, - `TestRecoveryFirstReleaseIgnoresAnUnknownCurrent` et - `TestRecoveryReapplyDoesNotForceUnconvergedServices` couvrent ces chemins. -- Compatibilite : le changement côté helper atteint l'hôte seulement après - `shuttle helper update`, commande utilisable pendant `recovery_required`. - -## Une redirection pouvait détourner la suppression privilégiée du registre (30-10-2026) - -- Cause : les clients HTTP de l'aide root suivaient les redirections du registre - loopback. Une réponse 307 pouvait transmettre un DELETE à une autre cible, - puis faire compter sa réponse 202 comme une suppression réussie. -- Correction : tous les clients HTTP du registre root utilisent un constructeur - commun qui refuse les redirections. Les réponses 3xx font échouer la lecture - ou la suppression, et l'erreur de suppression conserve le code HTTP. -- Preuve : les tests `TestRootRegistryRedirect*` vérifient les redirections du - DELETE, du catalogue, du HEAD et du contrôle de santé avec des serveurs - `httptest` sur loopback. `TestRootRegistryHTTPClientsRefuseRedirects` protège - le constructeur commun contre le retour de clients ad hoc. -- Compatibilite : après une erreur de nettoyage, la promotion réussie conserve - son comportement de nettoyage différé. Le correctif est actif lorsque - `/usr/local/libexec/shuttle-root` correspond à cette version, après + `TestRecoveryFirstReleaseIgnoresAnUnknownCurrent` and + `TestRecoveryReapplyDoesNotForceUnconvergedServices` cover these paths. +- Compatibility: the helper-side change reaches the host only after + `shuttle helper update`, a command usable during `recovery_required`. + +## A redirect could divert the registry's privileged deletion (30-10-2026) + +- Cause: the root helper's HTTP clients followed the loopback registry's + redirects. A 307 answer could pass a DELETE on to another target, then have + its 202 answer counted as a successful deletion. +- Fix: every HTTP client of the root registry uses a shared constructor that + refuses redirects. 3xx answers fail the read or the deletion, and the + deletion error keeps the HTTP code. +- Proof: the `TestRootRegistryRedirect*` tests check the redirects of the + DELETE, the catalog, the HEAD and the health check with `httptest` servers on + loopback. `TestRootRegistryHTTPClientsRefuseRedirects` protects the shared + constructor against the return of ad hoc clients. +- Compatibility: after a cleanup error, the successful promotion keeps its + deferred cleanup behavior. The fix is active when + `/usr/local/libexec/shuttle-root` matches this version, after `shuttle helper update`. -## Les déploiements et opérations distantes négocient leurs issues coordonnées (30-10-2026) - -- Cause : `shuttle deploy` et `shuttle run` réservaient une opération avant de - vérifier que le helper savait traiter l'audit des images d'infrastructure et - refuser une opération terminée sans mutation. Avec un helper ancien, l'échec - finissait en `recovery_required` sans indiquer la mise à jour nécessaire. -- Correction : négocier `infra-images-audit` et `operation-refusal` avant toute - réservation. Un garde-fou de test exige que chaque action et mode d'audit du - plan racine déclare une capacité ou appartienne à la base coordonnée v0.0.20. -- Preuve : des tests ciblés vérifient les capacités deploy/run, le message pour - un helper v0.0.47, la compatibilité du helper courant et la couverture des - actions et modes d'audit. -- Compatibilite : chaque hôte dont le helper est en v0.0.60 ou antérieur doit - exécuter une fois `shuttle helper update` avant `shuttle deploy` ou - `shuttle run`, même si son helper accepte déjà l'audit et le refus. Cette - commande reste utilisable si une opération est déjà `recovery_required`. Le - rollback, les sauvegardes, destroy et la synchronisation des secrets ne sont - pas modifiés par cette exigence. - -## Les commandes de reprise perdaient la configuration de la cible (30-10-2026) - -- Cause : les erreurs de reprise etaient construites loin des commandes Cobra - et ne conservaient ni le chemin `--config` ni la surcharge `-e` de l'invocation. - Sur un depot avec plusieurs cibles, la commande copiee pouvait donc lire une - autre configuration. -- Correction : enregistrer une fois les seuls drapeaux config et env explicitement - modifies dans le `PersistentPreRun` racine, puis les ajouter a chaque commande - de reprise. Les valeurs necessitant une protection shell sont echappees. -- Preuve : les tests cibles couvrent les formes sans drapeau et avec drapeaux, - l'echappement shell, les erreurs d'execution et le refus de reprise automatique. -- Compatibilite : sans `--config` ni `-e`, les messages gardent leur texte actuel. - Les commandes imprimees utilisent toujours `-e`, quelle que soit la forme - utilisee dans l'invocation. - -## Les incidents de commande masquaient leur cause (30-10-2026) - -- Cause : les commandes de surveillance conservaient l'erreur du processus, - mais leurs résumés fixes l'abandonnaient. Pour UFW en production, l'incident - disait seulement que la posture ne pouvait pas être inspectée, alors que - stderr indiquait un système de fichiers en lecture seule sur `/run/ufw.lock`. -- Correction : ajouter au résumé et aux preuves `command_error` un extrait - borné, nettoyé et expurgé des secrets de l'erreur de commande. Les états et - les chemins sains restent identiques. -- Preuve : les tests couvrent le cas UFW, l'extraction stderr, le nettoyage et - l'expurgation, ainsi que Docker, le registre, PostgreSQL, sshd et fail2ban. -- Compatibilite : les contrôles fondés sur readiness restent sans détail ; leur - traitement est un suivi séparé. - -## Une réservation restait bloquée après la perte de sa réponse SSH (30-10-2026) - -- Cause : le CLI créait un nouvel ID à chaque tentative. Si le helper avait - écrit la réservation avant une coupure SSH, le CLI abandonnait sans connaître - son ID. La réservation active bloquait les opérations incompatibles pendant - son bail de 35 minutes, puis exigeait une récupération. -- Correction : le CLI réutilise un seul ID et renvoie le plan signé jusqu'à - trois fois quand la commande distante a pu démarrer sans retour de statut. - Si le résultat reste inconnu, l'erreur donne l'ID et les commandes de contrôle - et de récupération. Le helper reconnaît sous verrou une phase - `writers-initialize` terminée et la considère réussie sans nouvelle phase ni - nouvelle observation de la baseline. -- Preuve : les tests ciblés couvrent la perte de réponse, la réutilisation de - l'ID après refus temporaire, les refus définitifs, l'indication de récupération - et l'initialisation unique des writers. -- Compatibilité : la partie CLI fonctionne avec tout helper. Avec un ancien - helper, une réponse perdue peut rejouer l'initialisation, que le stockage des - writers rend idempotente pour la même baseline. En cas d'erreur, le CLI nomme - l'ID et la commande de récupération. L'évitement de la phase et de - l'observation dupliquées est actif une fois - `/usr/local/libexec/shuttle-root` remplacé par cette version. Aucun contrôle - de capacité n'est ajouté. - -## L'historique Swarm arrêté gardait des manifestes de versions supprimées (30-10-2026) - -- Cause : les conteneurs d'historique arrêtés empêchaient la suppression de leur - image hôte et conservaient aussi leur manifeste dans le registre. -- Correction : le manifeste registre d'une ancienne version référencée uniquement - par un conteneur d'historique Swarm arrêté est maintenant supprimé, tandis que - son image reste sur l'hôte. Parmi les instantanés d'état actif, seul l'échec - du premier arrête le dépôt. Un échec de relecture est associé à sa balise, - puis la suivante tente un nouvel instantané. Les étapes avec un résultat - enregistré ne sont pas comptées comme non tentées. Une erreur HEAD bloque - seulement la balise illisible, sauf si la protection dépend d'un alias - conservé ou actif. L'échec d'inventaire des images hôte est signalé une seule - fois au niveau du dépôt, même sans ancienne balise, et laisse continuer - l'évaluation indépendante du registre. HTTP 405 suspend les suppressions - registre suivantes du dépôt. Le résumé compte aussi les erreurs de dépôt et - les étapes non tentées. -- Preuve : les tests ciblés vérifient la séparation des références actives et - arrêtées, la reprise après deux échecs d'instantané, le décompte des seules - étapes non tentées, l'isolation d'une erreur HEAD, le signalement d'un - inventaire hôte en échec sans ancienne balise et la poursuite du registre. -- Compatibilité : les dépôts exacts du plan restent seuls éligibles, et les - manifestes utilisés par un service, une tâche ou un conteneur actif sont - conservés. Une image hôte référencée par un conteneur d'historique arrêté reste - sur l'hôte. - -## Le pré-déploiement ne réclamait que les images publiées par Shuttle (30-10-2026) - -- Cause : le refus de disque mesurait tout le système de fichiers racine, mais - le nettoyage avant déploiement ne voyait que les images du registre local et - celles de l'infrastructure Shuttle. Les anciennes images des autres services - Swarm et leurs conteneurs de tâches arrêtées restaient sur le disque. -- Correction : le pré-déploiement retire les conteneurs de tâches arrêtées - seulement si une tâche plus récente du même service et du même slot répliqué - tourne sur cet hôte. Pour un service global, cette tâche plus récente doit - tourner sur le même nœud. Si le slot ou l'ordre des tâches est illisible, le - conteneur reste intact. La passe retire ensuite les images réellement - pendantes et les anciennes références de dépôts utilisés par un service Swarm - actuel, âgées de plus de 24 heures et sans conteneur ni référence de rollback - ou de service. - Les références avec digest seul suivent aussi l'éligibilité de leur dépôt. - Chaque suppression est affichée à l'opérateur. -- Protection : aucune image utilisée par un conteneur, une pile retenue ou une - spécification Swarm actuelle ou précédente n'est supprimée. La passe hôte - laisse les images du registre local à la passe de release. Une spécification - précédente protège ses images de rollback sans rendre son ancien dépôt - éligible. Les images de moins de 24 heures et les dépôts qu'aucun service - actuel n'utilise restent intacts. La lecture d'un ensemble d'infrastructure - retenu vide est valide pour la passe hôte quand les références Swarm assurent - la protection; le balayage infrastructure seul continue de la refuser. Les - commandes n'emploient jamais `--force` et ne touchent ni volumes, ni réseaux, - ni cache de build. -- Preuve : tests de régression pour le changement de dépôt A vers B, le dépôt - digest-only inutilisé et la passe hôte avec lecteur réel et ensemble retenu - vide. Les tests de conteneurs couvrent les slots différents ou illisibles et - une tâche active plus ancienne. -- Compatibilité : cette passe s'active sur un hôte après `shuttle helper update`. - Les erreurs de nettoyage restent des avertissements et ne bloquent pas le - déploiement. Les autres dépôts inutilisés seront traités par la tranche - `doctor --disk` après consentement explicite. - -## L'adoption corrige le Caddy partagé hérité (30-10-2026) - -- Cause : `setup --adopt` considérait le service Caddy présent comme déjà - convergé, même lorsque son conteneur tournait en root avec un système de - fichiers inscriptible et une ancienne image. De plus, le contrôle exigeait - `NoNewPrivileges` après `docker stack deploy`, alors que la conversion Swarm - de Docker ne renseigne pas ce champ. La récupération TLS sur l'adresse IP - pouvait aussi échouer malgré un domaine rétabli, et l'inventaire ne lisait - qu'un répertoire fixe de fragments. Une mise à jour pouvait être annoncée - réussie sans vérifier HTTP sur le port 80, une erreur de `docker stack deploy` - pouvait quitter sans examiner le service, et le contrôle HTTPS en direct - arrivait après des écritures sur l'hôte. -- Correction : le plan compare l'utilisateur, le système de fichiers en lecture - seule, les capacités, l'image et les sources de volumes `/data` et `/config`. - Les sources inattendues sont refusées avant mutation. `NoNewPrivileges` est - retiré de la détection de dérive et des contrôles après mise à jour, car cette - voie Swarm ne peut pas l'appliquer. Les domaines sont dérivés de la - configuration Caddy effective, imports développés par `caddy adapt` inclus. - Avant toute écriture sur l'hôte, un domaine HTTPS doit répondre et les - domaines qui réussissent ce contrôle forment la référence conservée pendant - toute l'adoption. Après les étapes hôte, chacun doit encore répondre avant - le remplacement de l'edge; une perte entraîne un refus sans remplacement. - Une erreur de déploiement inspecte le service: si son spec n'a pas changé, - l'erreur est rendue sans rollback; si le spec a changé ou ne peut être lu, la - reprise est engagée. - Après remplacement, HTTP sur 80 et HTTPS sur 443 pour chaque domaine de cette - référence initiale doivent réussir dans un délai borné. Tout échec passe par - le rollback, annoncé comme rétabli seulement après les mêmes contrôles de - trafic; sinon l'échec de récupération est explicite. -- Preuve : tests ciblés du programme shell avec des retours Docker et curl simulés. - Ils couvrent deux domaines initialement sains dont un cesse de répondre après - les étapes hôte, HTTPS fonctionnel avec HTTP 80 en échec, un déploiement non nul - après modification du service, un déploiement non nul sans modification, le - refus HTTPS avant écriture, la récupération des ports et domaines, le refus - d'un volume de certificats non déclaré, la dérive limitée aux capacités et - les contrôles postérieurs de toutes les propriétés de durcissement. -- Compatibilité : les hôtes existants se corrigent avec - `shuttle setup --adopt --dry-run`, puis `shuttle setup --adopt --yes`. - `caddy.data_volume` doit correspondre au volume de certificats existant si - son nom n'est pas celui par défaut. La commande refuse aussi une dérive si la - configuration effective ne fournit aucun domaine vérifiable ou si aucun - domaine ne répond avant les changements sur l'hôte. La vérification postérieure - couvre l'utilisateur, l'image, le système de fichiers en lecture seule et les - capacités; `NoNewPrivileges` reste hors de portée de cette voie Swarm. Pendant - les quelques secondes de mise à jour stop-first, l'edge est indisponible sur - les ports 80/443. - -## Les services Swarm restaient arrêtés après un reboot (30-10-2026) - -- Cause : `on-failure` ne relançait pas une tâche arrêtée proprement par SIGTERM - pendant l'arrêt de l'hôte. La limite de trois essais pouvait aussi être - atteinte avant que PostgreSQL natif ou Redis soit prêt au démarrage. -- Correction : les services applicatifs et les services Redis et RabbitMQ - activés utilisent maintenant `condition: any`, un délai de 5 s et - `max_attempts: 0`. Les tâches de type job conservent `on-failure`. -- Preuve : le test `TestSwarmRestartPolicy` vérifie les services applicatifs, - Redis, RabbitMQ et l'exception des jobs. -- Compatibilite : cette politique atteint un hôte existant au prochain déploiement - de chaque application. Avant cela, après un reboot, relancer une application - restée à 0/1 avec +## Deploys and remote operations negotiate their coordinated outcomes (30-10-2026) + +- Cause: `shuttle deploy` and `shuttle run` reserved an operation before + checking that the helper could handle the infrastructure image audit and + refuse a finished operation without mutation. With an old helper, the failure + ended in `recovery_required` without naming the update needed. +- Fix: negotiate `infra-images-audit` and `operation-refusal` before any + reservation. A test guard requires every action and audit mode of the root + plan to declare a capability or belong to the coordinated v0.0.20 base. +- Proof: targeted tests check the deploy/run capabilities, the message for a + v0.0.47 helper, the current helper's compatibility and the coverage of the + actions and audit modes. +- Compatibility: every host whose helper is v0.0.60 or older must run + `shuttle helper update` once before `shuttle deploy` or `shuttle run`, even + if its helper already accepts the audit and the refusal. That command stays + usable if an operation is already `recovery_required`. Rollback, backups, + destroy and secret sync are not affected by this requirement. + +## Resume commands lost the target's configuration (30-10-2026) + +- Cause: resume errors were built far from the Cobra commands and kept neither + the `--config` path nor the invocation's `-e` override. In a repository with + several targets, the copied command could therefore read another + configuration. +- Fix: record once, in the root `PersistentPreRun`, only the config and env + flags that were explicitly set, then add them to every resume command. Values + that need shell protection are escaped. +- Proof: the targeted tests cover the forms with and without flags, shell + escaping, run errors and the refusal of an automatic resume. +- Compatibility: without `--config` or `-e`, the messages keep their current + text. The printed commands always use `-e`, whatever form the invocation + used. + +## Command incidents hid their cause (30-10-2026) + +- Cause: the monitoring commands kept the process error, but their fixed + summaries dropped it. For UFW in production, the incident only said the + posture could not be inspected, while stderr reported a read-only file system + on `/run/ufw.lock`. +- Fix: add to the summary and to the `command_error` evidence a bounded, + cleaned excerpt of the command error, with secrets redacted. States and + healthy paths stay identical. +- Proof: the tests cover the UFW case, the stderr extraction, cleaning and + redaction, as well as Docker, the registry, PostgreSQL, sshd and fail2ban. +- Compatibility: readiness-based checks stay without details; handling them is + a separate follow-up. + +## A reservation stayed stuck after its SSH answer was lost (30-10-2026) + +- Cause: the CLI created a new ID for each attempt. If the helper had written + the reservation before an SSH cut, the CLI gave up without knowing its ID. + The active reservation blocked incompatible operations for its 35-minute + lease, then required a recovery. +- Fix: the CLI reuses a single ID and sends the signed plan again up to three + times when the remote command may have started without returning a status. + If the result stays unknown, the error gives the ID and the control and + recovery commands. The helper recognizes, under lock, a finished + `writers-initialize` phase and treats it as successful with no new phase and + no new baseline observation. +- Proof: the targeted tests cover the lost answer, reusing the ID after a + temporary refusal, final refusals, the recovery hint and the single + initialization of the writers. +- Compatibility: the CLI part works with any helper. With an old helper, a lost + answer can replay the initialization, which the writer store makes idempotent + for the same baseline. On error, the CLI names the ID and the recovery + command. Avoiding the duplicated phase and observation is active once + `/usr/local/libexec/shuttle-root` is replaced by this version. No capability + check is added. + +## Stopped Swarm history kept manifests of deleted versions (30-10-2026) + +- Cause: stopped history containers kept their host image from being deleted + and also kept their manifest in the registry. +- Fix: the registry manifest of an old version referenced only by a stopped + Swarm history container is now deleted, while its image stays on the host. + Among the active state snapshots, only the failure of the first one stops the + repository. A read-back failure is tied to its tag, then the next one tries a + new snapshot. Steps with a recorded result are not counted as not attempted. + A HEAD error blocks only the unreadable tag, unless the protection depends on + a kept or active alias. A failed host image inventory is reported only once + at the repository level, even with no old tag, and lets the independent + registry evaluation go on. HTTP 405 suspends the following registry deletions + of the repository. The summary also counts repository errors and steps not + attempted. +- Proof: the targeted tests check the separation of active and stopped + references, the resume after two snapshot failures, counting only steps not + attempted, isolating a HEAD error, reporting a failed host inventory with no + old tag, and the registry going on. +- Compatibility: only the plan's exact repositories stay eligible, and + manifests used by a service, a task or an active container are kept. A host + image referenced by a stopped history container stays on the host. + +## The pre-deploy only reclaimed images published by Shuttle (30-10-2026) + +- Cause: the disk refusal measured the whole root file system, but the cleanup + before deploy only saw the local registry's images and those of the Shuttle + infrastructure. Old images of the other Swarm services and their stopped task + containers stayed on disk. +- Fix: the pre-deploy removes stopped task containers only if a newer task of + the same service and the same replicated slot runs on this host. For a global + service, that newer task must run on the same node. If the slot or the task + order is unreadable, the container stays intact. The pass then removes truly + dangling images and old references of repositories used by a current Swarm + service, older than 24 hours and with no container, rollback reference or + service reference. + Digest-only references also follow their repository's eligibility. Each + deletion is shown to the operator. +- Protection: no image used by a container, a kept stack or a current or + previous Swarm spec is deleted. The host pass leaves the local registry's + images to the release pass. A previous spec protects its rollback images + without making its old repository eligible. Images younger than 24 hours and + repositories no current service uses stay intact. Reading an empty kept + infrastructure set is valid for the host pass when the Swarm references + provide the protection; the infrastructure-only sweep still refuses it. The + commands never use `--force` and touch neither volumes, nor networks, nor the + build cache. +- Proof: regression tests for the change from repository A to B, the unused + digest-only repository and the host pass with a real reader and an empty kept + set. The container tests cover different or unreadable slots and an older + active task. +- Compatibility: this pass is enabled on a host after `shuttle helper update`. + Cleanup errors stay warnings and do not block the deploy. Other unused + repositories will be handled by the `doctor --disk` slice after explicit + consent. + +## Adoption fixes the inherited shared Caddy (30-10-2026) + +- Cause: `setup --adopt` treated the existing Caddy service as already + converged, even when its container ran as root with a writable file system + and an old image. Moreover, the check required `NoNewPrivileges` after + `docker stack deploy`, while Docker's Swarm conversion does not set that + field. TLS recovery on the IP address could also fail although a domain was + back, and the inventory read only a fixed fragments directory. An update + could be reported successful without checking HTTP on port 80, a + `docker stack deploy` error could exit without examining the service, and + the live HTTPS check came after writes on the host. +- Fix: the plan compares the user, the read-only file system, the + capabilities, the image and the sources of the `/data` and `/config` volumes. + Unexpected sources are refused before any mutation. `NoNewPrivileges` is + removed from drift detection and from the post-update checks, because this + Swarm path cannot apply it. The domains are derived from the effective Caddy + configuration, including imports expanded by `caddy adapt`. Before any write + on the host, an HTTPS domain must answer, and the domains that pass that + check form the reference kept for the whole adoption. After the host steps, + each must still answer before the edge is replaced; a loss leads to a refusal + with no replacement. + A deploy error inspects the service: if its spec did not change, the error is + returned without rollback; if the spec changed or cannot be read, recovery is + started. + After the replacement, HTTP on 80 and HTTPS on 443 for each domain of that + initial reference must succeed within a bounded time. Any failure goes + through the rollback, reported as restored only after the same traffic + checks; otherwise the recovery failure is explicit. +- Proof: targeted tests of the shell program with simulated Docker and curl + answers. They cover two initially healthy domains, one of which stops + answering after the host steps, working HTTPS with HTTP 80 failing, a + non-zero deploy after the service changed, a non-zero deploy without change, + the HTTPS refusal before writing, recovering ports and domains, refusing an + undeclared certificate volume, drift limited to capabilities and the later + checks of every hardening property. +- Compatibility: existing hosts are fixed with + `shuttle setup --adopt --dry-run`, then `shuttle setup --adopt --yes`. + `caddy.data_volume` must match the existing certificate volume if its name is + not the default one. The command also refuses a drift if the effective + configuration provides no verifiable domain or if no domain answers before + the host changes. The later check covers the user, the image, the read-only + file system and the capabilities; `NoNewPrivileges` stays out of reach of + this Swarm path. During the few seconds of the stop-first update, the edge is + unavailable on ports 80/443. + +## Swarm services stayed stopped after a reboot (30-10-2026) + +- Cause: `on-failure` did not restart a task stopped cleanly by SIGTERM during + the host shutdown. The three-attempt limit could also be reached before + native PostgreSQL or Redis was ready at boot. +- Fix: application services and the enabled Redis and RabbitMQ services now + use `condition: any`, a 5 s delay and `max_attempts: 0`. Job tasks keep + `on-failure`. +- Proof: the `TestSwarmRestartPolicy` test checks the application services, + Redis, RabbitMQ and the job exception. +- Compatibility: this policy reaches an existing host at the next deploy of + each application. Before that, after a reboot, restart an application stuck + at 0/1 with `sudo -n docker service update --force _`. -## Destroy supprimait une base PostgreSQL que Shuttle n'avait pas creee (30-10-2026) - -- Cause : `shuttle destroy` ajoutait toujours le nom PostgreSQL derive de - l'application aux bases et roles a supprimer. Pour `demo-agent`, cela a - supprime `demo_agent`, une base de production creee par Ansible. Les objets - crees par Shuttle avant le registre ne prouvaient pas davantage que ce nom - appartenait a l'application. -- Correction : seuls les objets du registre de l'application peuvent etre - supprimes. Un objet derive existant mais non inscrit est conserve et signale, - et les identifiants revendiques par une autre application restent intacts. - Un role conserve garde aussi son Secret Docker et son fichier de mot de passe. - Un echec de suppression reste inscrit pour qu'un second `shuttle destroy` - puisse reessayer. Les deploys geres refusent aussi de modifier un role ou une - base derivee existante sans entree de registre, sans adoption automatique. -- Les identifiants des roles dont la suppression est reessayable restent - disponibles jusqu'au prochain `shuttle destroy`, y compris pour le role derive. -- Le preflight de `stack-apply` refuse un role ou une base derivee non inscrits - avant toute creation de volume ou de Secret d'infrastructure. -- Les sauvegardes pre-run et le cycle de sauvegarde exigent aussi la capacite - `destroy-ledger-only` pour une application avec base geree. -- Preuve : les tests cibles couvrent les sondes d'existence, la decision de - provisionnement, les suppressions reessayables, la conservation des secrets, - l'ordre durable du nettoyage et le refus d'un ancien helper. -- Compatibilite : la correction est active lorsque - `/usr/local/libexec/shuttle-root` correspond a cette version, installee par - `shuttle setup`, `shuttle setup --adopt` ou `shuttle helper update`. Avant cela, le CLI - refuse `destroy` et les deploys avec base geree sur cet hote. Un objet cree - par Shuttle avant le registre doit etre ajoute manuellement a - `/var/lib/shuttle/apps//postgres.json` avant le prochain deploy. - -## La valeur `postgres_backups` etait validee mais sans effet (30-10-2026) - -- Cause : la validation imposait 7, mais le script de sauvegarde supprimait - toujours les archives au-dela de 7 sans lire cette configuration. -- Correction : accepter 1 a 7, avec 7 par defaut, puis ecrire la valeur de - chaque application dans un fichier root prive. Le script garde le plus grand - nombre declare sur l'hote et ignore les fichiers mal formes avec un message. - La migration remplace les deux scripts distribues connus et refuse toujours - une politique modifiee localement. Script et valeur sont appliques a chaque - `shuttle setup`, hors des etapes executees une seule fois : un hote deja - installe (marqueur `31-postgres-backup` present) les recoit au prochain - setup, et un changement de `postgres_backups` prend effet de la meme facon. -- Preuve : les tests cibles couvrent les bornes de configuration, la retention - executee sur de fausses archives et la migration des politiques distribuees. -- Compatibilite : l'omission ou la valeur 0 conserve le defaut historique de 7; - `min_free_percent` reste fixe a 20. - -## Les tailles de tmpfs declarees etaient remplacees par 64 Mio (29-10-2026) - -- Cause : la normalisation securisee supprimait les options de chaque chemin, - puis fixait tous les montages a 64 Mio, y compris `/tmp:size=256M`. - Chromium pouvait remplir ce volume avec ses fichiers de memoire partagee - et bloquer ses appels CDP sans OOM du conteneur. -- Correction : conserver `size` en octets ou unites binaires, refuser les valeurs - invalides et les declarations contradictoires. La limite reste celle du helper - existant : 512 Mio. Aucun changement du helper distant n'est necessaire. -- Preuve : le test de normalisation complet reproduit le remplacement avant - correction et conserve ensuite 256/128 Mio et le defaut de 64 Mio. Les tailles - invalides sont refusees. `make test` et `make ci` passent (tests, race, - analyse des vulnerabilites, contrats shell, vet Linux et cible macOS). - La revue independante donne GO sans P0/P1/P2. Residuel P3 : le plafond - de 512 Mio reste declare separement dans le client et le helper existant. -- Compatibilite : sans taille explicite, les montages conservent le defaut de - 64 Mio. Le systeme de fichiers reste en lecture seule, avec les memes limites - de chemins et de privileges. - -## Index par version (v0.0.40 a v0.0.59) - -Chaque entree ci-dessous est rangee sous la premiere release publiee qui la -contient, calculee depuis git. Les tags v0.0.43 a v0.0.46 et v0.0.57 n'ont -pas de GitHub Release: leur contenu est range sous la release publiee suivante. +## Destroy deleted a PostgreSQL database Shuttle had not created (30-10-2026) + +- Cause: `shuttle destroy` always added the PostgreSQL name derived from the + application to the databases and roles to delete. For `demo-agent`, this + deleted `demo_agent`, a production database created by Ansible. Objects + created by Shuttle before the ledger did not prove either that the name + belonged to the application. +- Fix: only objects in the application's ledger can be deleted. An existing + derived object that is not listed is kept and reported, and credentials + claimed by another application stay intact. A kept role also keeps its Docker + Secret and its password file. A deletion failure stays listed so that a + second `shuttle destroy` can retry. Managed deploys also refuse to change an + existing derived role or database with no ledger entry, without automatic + adoption. +- Credentials of roles whose deletion can be retried stay available until the + next `shuttle destroy`, including for the derived role. +- The `stack-apply` preflight refuses an unlisted derived role or database + before creating any infrastructure volume or Secret. +- Pre-run backups and the backup cycle also require the `destroy-ledger-only` + capability for an application with a managed database. +- Proof: the targeted tests cover the existence probes, the provisioning + decision, retryable deletions, keeping secrets, the durable cleanup order and + the refusal of an old helper. +- Compatibility: the fix is active when `/usr/local/libexec/shuttle-root` + matches this version, installed by `shuttle setup`, `shuttle setup --adopt` + or `shuttle helper update`. Before that, the CLI refuses `destroy` and deploys + with a managed database on that host. An object created by Shuttle before the + ledger must be added by hand to `/var/lib/shuttle/apps//postgres.json` + before the next deploy. + +## The `postgres_backups` value was validated but had no effect (30-10-2026) + +- Cause: validation required 7, but the backup script always deleted archives + beyond 7 without reading that setting. +- Fix: accept 1 to 7, with 7 by default, then write each application's value to + a private root file. The script keeps the largest number declared on the host + and ignores malformed files with a message. The migration replaces the two + known distributed scripts and still refuses a locally modified policy. Script + and value are applied on every `shuttle setup`, outside the run-once steps: a + host already installed (marker `31-postgres-backup` present) gets them at the + next setup, and a change to `postgres_backups` takes effect the same way. +- Proof: the targeted tests cover the configuration bounds, retention run on + fake archives and the migration of the distributed policies. +- Compatibility: omitting it or setting 0 keeps the historical default of 7; + `min_free_percent` stays fixed at 20. + +## Declared tmpfs sizes were replaced by 64 MiB (29-10-2026) + +- Cause: the secure normalization removed each path's options, then set every + mount to 64 MiB, including `/tmp:size=256M`. Chromium could fill that volume + with its shared memory files and stall its CDP calls with no container OOM. +- Fix: keep `size` in bytes or binary units, refuse invalid values and + contradictory declarations. The limit stays the existing helper's: 512 MiB. + No change to the remote helper is needed. +- Proof: the full normalization test reproduces the replacement before the fix + and then keeps 256/128 MiB and the 64 MiB default. Invalid sizes are refused. + `make test` and `make ci` pass (tests, race, vulnerability analysis, shell + contracts, Linux vet and macOS target). The independent review gives GO with + no P0/P1/P2. Residual P3: the 512 MiB ceiling stays declared separately in + the client and in the existing helper. +- Compatibility: without an explicit size, mounts keep the 64 MiB default. The + file system stays read-only, with the same path and privilege limits. + +## Index by version (v0.0.40 to v0.0.59) + +Each entry below is listed under the first published release that contains it, +computed from git. Tags v0.0.43 to v0.0.46 and v0.0.57 have no GitHub Release: +their content is listed under the next published release. - **v0.0.59**, 28-10-2026 - - Les releases se publient depuis la machine du mainteneur jusqu'en novembre - - Le dry run adoption signalait le registre local comme port a ouvrir - - Setup avec --adopt ignorait les cles SSH declarees sous Match - - setup --adopt refusait l'edge Caddy des generations precedentes - - Doctor signalait une base privee comme publique a cause des regles reject + - Releases are published from the maintainer's machine until November + - The adoption dry run reported the local registry as a port to open + - Setup with --adopt ignored SSH keys declared under Match + - setup --adopt refused the Caddy edge of earlier generations + - Doctor reported a private database as public because of reject rules - **v0.0.58**, 28-10-2026 - - La release v0.0.57 ne compilait pas pour macOS - - Le registre et RabbitMQ echouaient juste apres un deploy sain - - Setup pouvait echouer en plein durcissement SSH, ou sur un verrou apt - - Les digests infra stales polluaient setup et deploy, le premier deploy signalait un faux retard - - `doctor --strict` refusait les applications internes et les hotes Ubuntu ne suivaient pas la politique annoncee - - Reexecuter setup sur un VPS Shuttle donnait un refus SSH opaque et un faux cutover - - L'installation du monitoring activait un webhook absent et omettait l'operateur SSH - - La creation d'une sauvegarde echouait sur un hote correctement configure - - Le premier deploy sur un hote neuf annoncait un nettoyage reporte - - Le monitoring alertait pendant un deploy, et ses alertes Discord etaient illisibles -- **v0.0.57**, 28-10-2026, sans GitHub Release: contenu livre par la suivante + - Release v0.0.57 did not compile for macOS + - The registry and RabbitMQ failed right after a healthy deploy + - Setup could fail in the middle of SSH hardening, or on an apt lock + - Stale infra digests polluted setup and deploy, and the first deploy reported a false lag + - `doctor --strict` refused internal applications and Ubuntu hosts did not follow the announced policy + - Running setup again on a Shuttle VPS gave an opaque SSH refusal and a false cutover + - Installing monitoring enabled a missing webhook and left out the SSH operator + - Creating a backup failed on a correctly configured host + - The first deploy on a new host announced a deferred cleanup + - Monitoring alerted during a deploy, and its Discord alerts were unreadable +- **v0.0.57**, 28-10-2026, no GitHub Release: content shipped by the next one - **v0.0.56**, 28-10-2026 - - Les anciennes images Redis, RabbitMQ et Caddy s'accumulaient sur le noeud - - Un deploy lent ne disait pas pourquoi + - Old Redis, RabbitMQ and Caddy images piled up on the node + - A slow deploy did not say why - **v0.0.55**, 28-10-2026 - - Le balayage de la registry loopback pouvait supprimer les manifestes d'une autre application + - The loopback registry sweep could delete another application's manifests - **v0.0.54**, 28-10-2026 - - Un deploy de code seul passait 70 secondes a recharger une image deja publiee + - A code-only deploy spent 70 seconds reloading an already published image - **v0.0.53**, 27-10-2026 - - Le check security.ufw du monitoring etait toujours `unavailable` sous le timer + - The monitoring security.ufw check was always `unavailable` under the timer - **v0.0.52**, 27-10-2026 - - Le balayage des images du noeud ne liberait presque rien - - Les alertes du monitoring echouaient en silence sur un webhook Discord ou Slack + - The node image sweep freed almost nothing + - Monitoring alerts failed silently on a Discord or Slack webhook - **v0.0.51**, 27-10-2026 - - Un deploy rate apres un rollback d'urgence affichait trois erreurs trompeuses et jamais la commande de recovery - - Un helper update rate cachait la vraie cause derriere un message generique + - A failed deploy after an emergency rollback showed three misleading errors and never the recovery command + - A failed helper update hid the real cause behind a generic message - **v0.0.50**, 27-10-2026 - - Setup tuait un sshd orphelin sans le dire quand il reussissait - - Le rollback d'urgence d'un deploy rate pouvait retrograder Redis ou RabbitMQ - - Le helper ne synchronisait pas le repertoire apres avoir remplace current.yml ou previous.yml - - setup echouait sur une Ubuntu 24.04 neuve quand un sshd orphelin tenait le port 22 + - Setup killed an orphan sshd without saying so when it succeeded + - The emergency rollback of a failed deploy could downgrade Redis or RabbitMQ + - The helper did not sync the directory after replacing current.yml or previous.yml + - setup failed on a fresh Ubuntu 24.04 when an orphan sshd held port 22 - **v0.0.49**, 27-10-2026 - - La recovery laissait current.yml epingler une ancienne image Redis - - Un echec avant promotion bloquait durablement le deploiement - - RabbitMQ ne demarrait jamais avec le secret de mot de passe genere + - Recovery left current.yml pinning an old Redis image + - A failure before promotion blocked deploys for good + - RabbitMQ never started with the generated password secret - **v0.0.48**, 27-10-2026 - - La recovery pouvait downgrader Redis sur ses donnees persistantes - - Un run en echec pouvait bloquer toutes les operations de son application - - Une migration PostgreSQL pouvait demarrer sans sauvegarde recente - - `shuttle init` ne pouvait pas generer une application interne - - Les pins d'infrastructure redevenaient obsoletes - - `shuttle init` generait encore Caddy 2.10.2 + - Recovery could downgrade Redis on its persistent data + - A failed run could block every operation of its application + - A PostgreSQL migration could start without a recent backup + - `shuttle init` could not generate an internal application + - Infrastructure pins became stale again + - `shuttle init` still generated Caddy 2.10.2 - **v0.0.47**, 24-10-2026 - - Un Redis retenu ne pouvait recevoir aucun correctif de securite - - Un deploiement env-only ou secret-only annule pouvait etre annonce comme reussi - - Les jobs CI etaient ignores depuis une branche de fonctionnalite - - Les deploiements peuvent preparer leurs secrets avec Hashvault - - `shuttle logs` lit chaque tache separement - - Un deploiement annule par la sonde de disponibilite se recupere -- **v0.0.46**, 22-10-2026, sans GitHub Release: contenu livre par la suivante -- **v0.0.45**, 19-10-2026, sans GitHub Release: contenu livre par la suivante -- **v0.0.44**, 19-10-2026, sans GitHub Release: contenu livre par la suivante -- **v0.0.43**, 19-10-2026, sans GitHub Release: contenu livre par la suivante + - A kept Redis could receive no security fix + - A cancelled env-only or secret-only deploy could be reported as successful + - CI jobs were skipped from a feature branch + - Deploys can prepare their secrets with Hashvault + - `shuttle logs` reads each task separately + - A deploy cancelled by the availability probe can be recovered +- **v0.0.46**, 22-10-2026, no GitHub Release: content shipped by the next one +- **v0.0.45**, 19-10-2026, no GitHub Release: content shipped by the next one +- **v0.0.44**, 19-10-2026, no GitHub Release: content shipped by the next one +- **v0.0.43**, 19-10-2026, no GitHub Release: content shipped by the next one - **v0.0.42**, 19-10-2026 - - Les gros volumes de logs finissaient en timeout SSH opaque + - Large log volumes ended in an opaque SSH timeout - **v0.0.41**, 19-10-2026 - - Un dockerfile relatif se lit depuis son contexte de build - - make install ne garde plus de shuttle.previous - - existing-stack : deploiement plus rapide et sans coupure inutile - - Les anciennes releases existing-stack remplissaient le disque - - Mettre a jour une stack existante sans remplacer son architecture + - A relative dockerfile is read from its build context + - make install no longer keeps shuttle.previous + - existing-stack: faster deploy with no needless outage + - Old existing-stack releases filled the disk + - Updating an existing stack without replacing its architecture - **v0.0.40**, 15-10-2026 - - Une PWA derriere `basic_auth` ne redemande plus le mot de passe en boucle -- **prochaine release** - - La CI et la release reviennent sur les runners GitHub - -## Les releases se publient depuis la machine du mainteneur jusqu'en novembre - -Le 28-10-2026, GitHub a refuse de lancer le job de release de v0.0.59 -(`recent account payments have failed or your spending limit needs to be -increased`), et les runners self-hosted avaient ete retires le meme jour: le tag -etait pousse, mais aucun binaire n'etait publie. `scripts/release-publish-local.sh -` refait ici ce que fait le workflow apres son gate: build signe des quatre -cibles, verification des checksums, de la version et de la signature de -`latest.json`, puis la GitHub Release. Il refuse un arbre sale, un tag non pousse, -une release existante ou une cle de signature hors mode 0600. `release-verify` -lit aussi la table `assets` que `build-go.sh` ecrit dans `latest.json`: il -rejetait jusque-la tous les manifestes publies. v0.0.59 a ete publiee ainsi. Les -binaires et leur verification sont identiques a ceux du workflow; le script -disparait quand les minutes hebergees reviennent. - -## La CI et la release reviennent sur les runners GitHub - -Le runner self-hosted du VPS est retire. La variable `CI_RUNNER` n'existe plus: -la CI et la release tournent de nouveau sur `ubuntu-latest`, et le job macOS -reprend dans la matrice. Les contournements propres a ce runner (ripgrep sans -sudo, `gh` telecharge quand il manque, `sudo -n` du shim ci-local) sont retires. - -## Le dry run adoption signalait le registre local comme port a ouvrir - -Le 28-10-2026, `shuttle setup --adopt --dry-run` sur production-host a annonce le -port 5000 parmi ceux que `40-runtime` fermerait. Ce port etait celui du registre -Shuttle, publie en `127.0.0.1:5000->5000/tcp`; le conseil de l'ajouter a -`access.allowed_public_tcp_ports` aurait ouvert le registre dans UFW. Le survey -perdait l'adresse de bind et ne gardait que le port. Il rapporte maintenant -l'adresse avec le port et ignore les binds loopback IPv4 et IPv6, tandis que les -binds non loopback restent signales. Les anciennes lignes -`published-port=` restent acceptees pour compatibilite. - -## Setup avec --adopt ignorait les cles SSH declarees sous Match - -Le 28-10-2026, `setup --adopt --target ops@198.51.100.30` echouait avec -`ssh: unable to authenticate, attempted methods [none publickey]`, alors que -`ssh -G ops@198.51.100.30` selectionnait `~/.ssh/id_ed25519_demo_ops`. Le -parseur conservait l'etat du bloc `Host` precedent et ignorait `Match`, donc la -cle et `IdentitiesOnly yes` n'etaient pas appliques. Les criteres `all`, `host`, -`originalhost` et `user` sont maintenant evalues ensemble. Un critere inconnu -ferme le bloc pour eviter qu'une cle de ce bloc soit utilisee par un autre hote. -Les blocs `Host`, la premiere valeur obtenue et l'accumulation des `IdentityFile` -gardent leur comportement existant. - -## setup --adopt refusait l'edge Caddy des generations precedentes - -Le 28-10-2026, `setup --adopt --yes` sur production-host prod s'est arrete sur + - A PWA behind `basic_auth` no longer asks for the password in a loop +- **next release** + - CI and release are back on GitHub runners + +## Releases are published from the maintainer's machine until November + +On 28-10-2026, GitHub refused to start the v0.0.59 release job (`recent account +payments have failed or your spending limit needs to be increased`), and the +self-hosted runners had been retired the same day: the tag was pushed, but no +binary was published. `scripts/release-publish-local.sh ` does here what +the workflow does after its gate: a signed build of the four targets, checks of +the checksums, the version and the `latest.json` signature, then the GitHub +Release. It refuses a dirty tree, an unpushed tag, an existing release or a +signing key outside mode 0600. `release-verify` also reads the `assets` table +that `build-go.sh` writes into `latest.json`: until then it rejected every +published manifest. v0.0.59 was published this way. The binaries and their +verification are identical to the workflow's; the script goes away when the +hosted minutes come back. + +## CI and release are back on GitHub runners + +The VPS self-hosted runner is retired. The `CI_RUNNER` variable no longer +exists: CI and release run on `ubuntu-latest` again, and the macOS job is back +in the matrix. The workarounds specific to that runner (ripgrep without sudo, +`gh` downloaded when missing, `sudo -n` in the ci-local shim) are removed. + +## The adoption dry run reported the local registry as a port to open + +On 28-10-2026, `shuttle setup --adopt --dry-run` on production-host listed port +5000 among those `40-runtime` would close. That port was the Shuttle registry's, +published as `127.0.0.1:5000->5000/tcp`; the advice to add it to +`access.allowed_public_tcp_ports` would have opened the registry in UFW. The +survey lost the bind address and kept only the port. It now reports the +address with the port and ignores IPv4 and IPv6 loopback binds, while +non-loopback binds stay reported. Old `published-port=` lines stay accepted +for compatibility. + +## Setup with --adopt ignored SSH keys declared under Match + +On 28-10-2026, `setup --adopt --target ops@198.51.100.30` failed with +`ssh: unable to authenticate, attempted methods [none publickey]`, while +`ssh -G ops@198.51.100.30` selected `~/.ssh/id_ed25519_demo_ops`. The parser +kept the state of the previous `Host` block and ignored `Match`, so the key and +`IdentitiesOnly yes` were not applied. The `all`, `host`, `originalhost` and +`user` criteria are now evaluated together. An unknown criterion closes the +block so that a key from that block is not used by another host. `Host` blocks, +the first value obtained and the accumulation of `IdentityFile` keep their +existing behavior. + +## setup --adopt refused the Caddy edge of earlier generations + +On 28-10-2026, `setup --adopt --yes` on production-host prod stopped on `setup found caddy running as "caddy@sha256:504a44d7...", which is not an -official image pinned by digest`. Les generations avant v0.0.58 deployaient -l'edge partage sous cette forme digest seul, la meme que `init` ecrivait dans -les configs et que la resolution traitait deja comme non renseignee. C'est -l'image officielle par digest: elle ne porte simplement pas de majeure, donc la -majeure par defaut (Caddy 2, la seule) s'applique, a la sonde de setup comme a -la lecture des images retenues au deploy. Redis et RabbitMQ sous cette forme -restent refuses: leur majeure en service protege leurs donnees. - -## Doctor signalait une base privee comme publique a cause des regles reject - -Le 28-10-2026, `doctor --strict` sur demo a classe -`runtime.database_bind_hba` en echec alors que PostgreSQL n'ecoutait que sur -127.0.0.1 et le pont Docker, en scram-sha-256. Les seules regles signalees -etaient les regles de fermeture standard `host 0.0.0.0/0 reject`, -`host ::/0 reject` et `local reject`: le controle traitait toute regle hors -peer ou scram comme permissive, y compris celles qui refusent la connexion. -Une regle reject ne peut jamais ouvrir l'acces, donc elle est ignoree. Une -regle publique en scram-sha-256 et une ligne en erreur restent des violations. - -## La release v0.0.57 ne compilait pas pour macOS - -Le workflow de release de v0.0.57 a echoue a la compilation croisee darwin: -`internal/cli/root_helper.go:345: undefined: rootStackFirstRelease`. La -variable etait declaree seulement dans un fichier `_linux.go` mais lue par du -code commun, et un test commun appelait une fonction propre a Linux. La CI des -pull requests ne compile que pour Linux depuis la pause du job macOS -(DEV-DEPL-38), donc rien ne l'a vu avant le tag. La variable vit maintenant -dans le fichier commun, le test est passe en `_linux_test.go`, et la CI vet -desormais chaque cible de release (darwin amd64 et arm64, linux arm64). Aucun -binaire v0.0.57 n'a ete publie; v0.0.58 est la premiere release du lot. - -## Le registre et RabbitMQ echouaient juste apres un deploy sain - -Le 28-10-2026, la recette VM sur Ubuntu 24.04 et Debian 13 a montre que le -collecteur annoncait le registre redemarre avant son etat `healthy` et sa -reponse HTTP sur `127.0.0.1:5000/v2/`. `doctor --strict` echouait alors, puis -reussissait quelques secondes plus tard. Le helper attend maintenant les deux -preuves pendant au plus 30 s et signale une panne de redemarrage si elles -n'arrivent pas. - -Sur le premier deploy, le pull froid laissait RabbitMQ en `Starting` apres le -wait de convergence planifie de 16,5 s. Comme le SLO total ne s'evalue pas pour -une premiere release, le helper donne a sa convergence un plancher de 120 s. -Le plafond SSH couvre ce wait, les autres attentes et la marge; les releases -suivantes conservent exactement leur wait planifie. Aucun champ du plan signe -ne change. - -## Setup pouvait echouer en plein durcissement SSH, ou sur un verrou apt - -Sur l'e2e du 28-10-2026 (VM Debian 13 neuve), setup a echoue avec +official image pinned by digest`. Generations before v0.0.58 deployed the +shared edge in that digest-only form, the same one `init` wrote in the configs +and that resolution already treated as unset. It is the official image by +digest: it simply carries no major, so the default major (Caddy 2, the only +one) applies, to the setup probe as to reading the kept images at deploy time. +Redis and RabbitMQ in that form stay refused: their running major protects +their data. + +## Doctor reported a private database as public because of reject rules + +On 28-10-2026, `doctor --strict` on demo marked `runtime.database_bind_hba` as +failed while PostgreSQL listened only on 127.0.0.1 and the Docker bridge, with +scram-sha-256. The only rules reported were the standard closing rules +`host 0.0.0.0/0 reject`, `host ::/0 reject` and `local reject`: the check +treated any rule other than peer or scram as permissive, including those that +refuse the connection. A reject rule can never open access, so it is ignored. +A public scram-sha-256 rule and a line in error stay violations. + +## Release v0.0.57 did not compile for macOS + +The v0.0.57 release workflow failed on the darwin cross-compilation: +`internal/cli/root_helper.go:345: undefined: rootStackFirstRelease`. The +variable was declared only in a `_linux.go` file but read by shared code, and a +shared test called a Linux-only function. Pull request CI has compiled only +for Linux since the macOS job was paused (DEV-DEPL-38), so nothing caught it +before the tag. The variable now lives in the shared file, the test moved to +`_linux_test.go`, and CI now vets every release target (darwin amd64 and +arm64, linux arm64). No v0.0.57 binary was published; v0.0.58 is the first +release of the batch. + +## The registry and RabbitMQ failed right after a healthy deploy + +On 28-10-2026, the VM acceptance run on Ubuntu 24.04 and Debian 13 showed that +the collector reported the registry restarted before its `healthy` state and +its HTTP answer on `127.0.0.1:5000/v2/`. `doctor --strict` then failed, and +passed a few seconds later. The helper now waits for both proofs for at most +30 s and reports a restart failure if they do not arrive. + +On the first deploy, the cold pull left RabbitMQ in `Starting` after the +planned 16.5 s convergence wait. Since the total SLO is not evaluated for a +first release, the helper gives its convergence a 120 s floor. The SSH ceiling +covers that wait, the other waits and the margin; later releases keep exactly +their planned wait. No field of the signed plan changes. + +## Setup could fail in the middle of SSH hardening, or on an apt lock + +In the e2e of 28-10-2026 (fresh Debian 13 VM), setup failed with `post-hardening signed audit failed: dial tcp 198.51.100.32:22: connect: -connection refused; CRITICAL: automatic SSH root rollback failed`, alors que -l'hote etait correctement durci: sshd avait pris un SIGHUP dans la seconde -meme ou setup envoyait l'audit (DEV-DEPL-64, cause enfin prouvee par le -journal sshd). La connexion qui suit le durcissement, l'audit et le rollback -retentent maintenant, pendant 30 s au plus, uniquement sur `connect: -connection refused`: une connexion refusee prouve que rien n'a tourne, donc -l'enveloppe signee n'a pas ete consommee. Toute autre erreur reste immediate. - -Sur Ubuntu 24.04 neuve, setup coupait SSH dans 5 essais sur 7 (cause -mesuree le 28-10-2026): au premier boot, needrestart redemarre ssh.service -pendant les mises a jour apt de cloud-init. Quand setup arretait ensuite -`ssh.socket`, l'unite passait inactive mais systemd gardait son `MainPID`, qui -designait encore ce sshd toujours accroche au port 22. Le nettoyage des -listeners orphelins epargnait le `MainPID`, le redemarrage ne pouvait pas se -lier au port, systemd supprimait `/run/sshd` et l'hote refusait toute -connexion. La conversion arrete maintenant `ssh.service` explicitement, et -n'epargne le `MainPID` que si l'unite est vraiment active. En cas d'echec, elle -libere le port, recree `/run/sshd`, rend le port a `ssh.socket` et verifie -qu'un listener systemd ecoute avant de le dire. Elle attend aussi la fin de -cloud-init. Setup lance pendant cloud-init echouait aussi -sur `E: Could not get lock /var/lib/dpkg/lock-frontend`. Il attend maintenant la fin de cloud-init, et -un drop-in `50shuttle-dpkg-lock` fait attendre le verrou dpkg (600 s) a chaque -appel apt au lieu d'echouer. Enfin, un setup refuse n'affiche plus toute -l'aide des options apres l'erreur, qui noyait la commande `--adopt` a copier. - -## Les digests infra stales polluaient setup et deploy, le premier deploy signalait un faux retard - -Apres quelques jours, les digests Caddy, Redis, RabbitMQ et registry embarques -par v0.0.56 etaient deja en retard ou impossibles a verifier. Setup et deploy -affichaient alors des lignes WARNING, puis installaient quand meme l'ancien -digest. Le CLI resout maintenant les tags officiels sur Docker Hub avant de -generer le stack signe. Redis et RabbitMQ gardent leur majeure retenue; une -majeure suivante est signalee en information et demande une migration explicite. -Le stack conserve le digest exact pour le rollback et la recuperation. Un hote -existant garde son digest courant si Docker Hub est inaccessible; un hote neuf -recoit une erreur explicite. Les anciennes configurations qui ne contiennent -qu'un digest Caddy sont migrees silencieusement vers le tag de majeure. Les -references registry des plans sont validees sur le chemin stack-apply et juste -avant leur usage. Setup et deploy refusent les retours de version et les -changements de majeure implicites, puis convergent le conteneur Shuttle en -gardant son volume nomme apres verification de son montage et ses options de -securite. La recuperation lit RepoDigests depuis l'inspection de l'image -identifiee par le conteneur. Setup ne traite un hote comme neuf qu'apres avoir -confirme l'absence de stack, registre et manifestes conserves sur l'hote; sinon -l'audit des images retenues doit reussir. Les tags explicitement configures -restent exacts. - -Le premier deploy peut depasser le SLO total pendant le pull froid: la promotion -v0.0.56 a mesure 33,46 s pour un budget de 30 s, dont 19,05 s pour la promotion. -Le helper indique maintenant `first_release` et le CLI affiche le temps sans -evaluer ce SLO pour la premiere release. Les deploys suivants gardent la mesure -et le signal existants. Les reponses des anciens helpers restent compatibles. - -## `doctor --strict` refusait les applications internes et les hotes Ubuntu ne suivaient pas la politique annoncee - -Le 28-10-2026, une recette sur VM avec v0.0.56 a montre deux refus sur un -hote fraichement prepare: l'audit readiness exigeait un domaine public pour -une application `expose: internal`, et le controle des mises a jour trouvait -encore l'origine APT generale fournie par Ubuntu 24.04. L'audit accepte -maintenant un domaine vide uniquement avec un chemin de sante vide; le helper -verifie les labels des services deployes, refuse toute publication incoherente, -puis marque TLS, HSTS, DNS et la sante publique comme non applicables avec une -preuve explicite. Les domaines non vides gardent leur validation existante. - -Setup ecrit maintenant hors du checkpoint `10-base` un drop-in Shuttle -security-only adapte a Ubuntu 24.04 ou Debian 13, avec le redemarrage -automatique desactive. La comparaison avant remplacement rend la convergence -repetable et permet a `shuttle setup --adopt` de corriger un hote deja prepare. -`doctor` conserve un controle strict et indique cette commande pour remedier a -une politique absente; les fichiers fournis par la distribution restent -intacts. Les autres operations d'audit et le fichier `20auto-upgrades` restent -compatibles. - -## Reexecuter setup sur un VPS Shuttle donnait un refus SSH opaque et un faux cutover - -Le 28-10-2026, sur la VM e2e avec v0.0.56, relancer `shuttle setup` avec les -memes arguments echouait sur le handshake SSH root: le setup avait deja ferme -cet acces, mais le preflight affichait une erreur brute. Si l'identite locale -de confiance confirme que Shuttle a configure cet hote et que l'authentification -root echoue, le refus indique maintenant clairement la fermeture volontaire et -imprime la commande `shuttle setup --adopt` avec la cible operateur, l'hote et -les options de cle requises. Il n'y a ni nouvelle tentative ni ouverture de SSH -root. - -Le plan d'adoption classait les taches Swarm d'une application comme etrangeres, -car il ne lisait que le label de proprietaire des conteneurs de service. Il -reconnait maintenant le namespace de stack quand le repertoire d'etat Shuttle -de l'application existe sous `/var/lib/shuttle/apps`. Les stacks sans ce -repertoire restent dans la liste des conteneurs etrangers. Si une tache Caddy -de `shuttle-edge` sert deja 80 et 443, l'adoption ne planifie aucun transfert -de ports. Un hote dont toutes les etapes sont satisfaites, sans travail differe -ni redemarrage en attente, est annonce comme deja converge, sans section -restante. Les noms de drapeaux et la fermeture SSH root restent compatibles. - -## L'installation du monitoring activait un webhook absent et omettait l'operateur SSH - -Le 28-10-2026, une installation v0.0.56 sur une VM preparee par `setup ---operator-user ops` signalait `security.ssh [degraded]`: l'operateur existait -sur l'hote mais seulement en flag, pas dans la config, et la liste attendue -par defaut ne lisait que la config. Elle ajoute maintenant les comptes que -setup a enregistres dans l'identite de l'hote, qui reflete ce que l'hote a -vraiment; les comptes declares dans la config (dont `retained_users`) -restent. Une liste `monitoring.security.expected_ssh_users` explicite reste -prioritaire. - -La meme recette acceptait `notifications.webhook_env` alors que la variable -n'existait pas dans l'environnement systemd du VPS. Le timer demarrait ensuite -un service en echec a chaque cycle. Le helper root verifie maintenant avant -toute ecriture ou activation que le fichier secret root existe et contient une -URL HTTPS, ou que la variable est presente dans l'environnement du gestionnaire -systemd. L'unite transmet cette variable avec `PassEnvironment`. En cas -d'echec, le message indique comment configurer le fichier secret ou la variable -puis relancer `shuttle monitoring install --yes`, sans afficher l'URL. - -Si le secret disparait apres l'installation, le cycle continue d'echouer et le -service systemd reste en echec, car la notification est indisponible. Le -rapport persiste aussi `notifications.delivery` comme indisponible afin que -`monitoring status` expose l'incident. - -## La creation d'une sauvegarde echouait sur un hote correctement configure - -Les 12 tentatives sur 12 de la VM e2e du 28-10-2026 ont echoue. Le motif strict -rejetait les UUID dont le premier caractere hexadecimal etait un chiffre, soit -10 des 16 valeurs possibles. Les autres atteignaient la capture, puis le helper -rejetait la publication du chiffrement: la capture et le chiffrement -etaient publies sous la meme phase. Le statut d'echec local marquait ensuite le -chiffrement termine, alors que le journal du helper ne l'avait jamais admis; -les operations restaient `recovery_required`. - -Les tentatives portent maintenant le prefixe fixe `backup-`, et le chiffrement -a sa propre phase avant le recu. Cela garde le motif strict et donne au helper -une transition distincte a valider avant le recu ou un echec ulterieur. Le -schema JSON, ses noms de champs et les phases des journaux v0.0.56 restent -compatibles. - -## Le premier deploy sur un hote neuf annoncait un nettoyage reporte - -Sur l'e2e du 28-10-2026 (VM Ubuntu 24.04 neuve, v0.0.56), le premier deploy -affichait `image store reclaim deferred to the next sweep: no retained release -digest could be read`. Le balayage qui precede la promotion tournait alors -qu'aucune stack n'etait encore retenue sur l'hote: il n'y avait rien a liberer, -mais l'ensemble vide etait traite comme une lecture ratee. Quand aucun fichier -`current.yml` ou `previous.yml` n'existe, ni pour l'app ni pour une autre, le -helper journalise maintenant `image store: nothing to sweep yet` et ne signale -rien. Des fichiers retenus qui existent mais ne donnent aucun digest arretent -toujours le balayage, comme avant. - -## Le monitoring alertait pendant un deploy, et ses alertes Discord etaient illisibles - -Le 28-10-2026 a 10:42, pendant un redeploy d'api sur la prod demo, le -canal critique a recu `[shuttle] api services.application degraded: -Service task health does not match the retained expected replicas`, puis une -reprise une minute plus tard. Un seul echantillon, pris a 10:41:52 en plein -rollout, avait vu une nouvelle tache de `api_worker-high` encore en -demarrage. Trois defauts se combinaient. - -Le debounce (30 s) etait mesure entre le premier echantillon en echec et le -premier echantillon sain suivant. Avec un intervalle de 60 s, cet ecart vaut -toujours 60 s: n'importe quel echantillon isole devenait un incident. Le -debounce compare maintenant la duree d'echec reellement observee, du premier -au dernier echantillon en echec (le `last_seen` precedent, puisqu'un incident -actif veut dire que l'echantillon d'avant etait en echec). Il faut deux -echantillons en echec qui couvrent le debounce pour alerter. Le fichier d'etat -garde son format v1: un retour a l'ancien binaire le relit sans erreur. - -Une tache que Swarm est en train de demarrer (`preparing`, `starting`...), -sans erreur, etait comptee comme malsaine, de meme qu'un conteneur dans la -periode de demarrage de son healthcheck (`starting`). Les deux sont une -convergence, pas une panne: Swarm et Docker les font echouer eux-memes si -elles n'aboutissent pas. Une tache en echec reste degradee, et un service sans -aucune tache en marche le reste aussi, avec le resume `Service tasks are still -starting`. - -Un episode reprenait l'identifiant de l'enregistrement sain cree des heures -plus tot (`episode_id` du 27-10 a 22:28 pour une panne du 28-10 a 10:41). Il -commence maintenant au premier echantillon en echec. - -Les alertes Discord sont des embeds: un titre en clair (`api: application -service degraded`), une couleur qui ne porte que l'etat (ambre degrade, rouge -indisponible ou critique, vert reprise), le constat mesure, l'app, le check, -le debut de l'episode en heure relative, et pour une reprise sa duree -(`Healthy again after 1m12s.`). Le champ `content` reste vide pour ne pas -repeter le titre. Slack et Mattermost lisent la meme phrase dans `text`, et -les champs JSON de la notification restent identiques, plus `created_at`. - -Enfin, les sondes de securite lancaient `sudo -n true` meme en root. Dans -l'unite du monitoring (`NoNewPrivileges`), sudo ne peut pas s'executer: chaque -run journalisait 3 a 4 `unable to open /etc/sudoers : Operation not -permitted`, puis l'echec du mail que sudo envoie a root (exim `Permission -denied`). En root, les sondes n'appellent plus sudo, et la lecture de la -politique sudo du compte deploy (`sudo -l -U`) se saute sans bruit sous -`NoNewPrivileges`; le resultat des checks ne change pas, ils passaient deja -par le chemin direct. - -## Les anciennes images Redis, RabbitMQ et Caddy s'accumulaient sur le noeud - -Le 27-10-2026, sur la prod demo, des conteneurs `exited` de -`shared_rabbitmq`, `shared_redis` et du Caddy partage, vieux de 4 jours a 4 -semaines, retenaient encore les images rabbitmq 3, 4.0 et 4.1 et d'anciennes -images caddy. Dockerd garde l'image tant qu'un conteneur de tache arrete -existe, et le balayage du helper (DEV-DEPL-54) laissait volontairement -l'infrastructure de cote: chaque montee de version laissait donc son image -sur le disque, jusqu'a ce que la garde des 20 % d'espace libre refuse un +connection refused; CRITICAL: automatic SSH root rollback failed`, while the +host was correctly hardened: sshd had taken a SIGHUP in the very second setup +sent the audit (DEV-DEPL-64, cause finally proven by the sshd journal). The +connection that follows the hardening, the audit and the rollback now retry, +for at most 30 s, only on `connect: connection refused`: a refused connection +proves nothing ran, so the signed envelope was not consumed. Any other error +stays immediate. + +On a fresh Ubuntu 24.04, setup cut SSH in 5 tries out of 7 (cause measured on +28-10-2026): at first boot, needrestart restarts ssh.service during +cloud-init's apt updates. When setup then stopped `ssh.socket`, the unit went +inactive but systemd kept its `MainPID`, which still pointed to that sshd, +still bound to port 22. The orphan listener cleanup spared the `MainPID`, the +restart could not bind the port, systemd deleted `/run/sshd` and the host +refused every connection. The conversion now stops `ssh.service` explicitly, +and spares the `MainPID` only if the unit is really active. On failure, it +frees the port, recreates `/run/sshd`, gives the port back to `ssh.socket` and +checks that a systemd listener is listening before saying so. It also waits for +cloud-init to finish. Setup started during cloud-init also failed on +`E: Could not get lock /var/lib/dpkg/lock-frontend`. It now waits for cloud-init +to finish, and a `50shuttle-dpkg-lock` drop-in makes every apt call wait for +the dpkg lock (600 s) instead of failing. Finally, a refused setup no longer +prints the whole options help after the error, which drowned the `--adopt` +command to copy. + +## Stale infra digests polluted setup and deploy, and the first deploy reported a false lag + +After a few days, the Caddy, Redis, RabbitMQ and registry digests embedded in +v0.0.56 were already behind or impossible to verify. Setup and deploy then +printed WARNING lines, and installed the old digest anyway. The CLI now +resolves the official tags on Docker Hub before generating the signed stack. +Redis and RabbitMQ keep their kept major; a next major is reported as +information and requires an explicit migration. The stack keeps the exact +digest for rollback and recovery. An existing host keeps its current digest if +Docker Hub is unreachable; a new host gets an explicit error. Old +configurations that contain only a Caddy digest are migrated silently to the +major tag. Registry references in plans are validated on the stack-apply path +and right before they are used. Setup and deploy refuse version downgrades and +implicit major changes, then converge the Shuttle container while keeping its +named volume after checking its mount and its security options. Recovery reads +RepoDigests from the inspection of the image the container identifies. Setup +treats a host as new only after confirming that no stack, registry or kept +manifests exist on the host; otherwise the audit of the kept images must +succeed. Explicitly configured tags stay exact. + +The first deploy can exceed the total SLO during the cold pull: the v0.0.56 +promotion measured 33.46 s for a 30 s budget, 19.05 s of it for the promotion. +The helper now reports `first_release` and the CLI shows the time without +evaluating that SLO for the first release. Later deploys keep the existing +measurement and signal. Answers from old helpers stay compatible. + +## `doctor --strict` refused internal applications and Ubuntu hosts did not follow the announced policy + +On 28-10-2026, a VM acceptance run with v0.0.56 showed two refusals on a +freshly prepared host: the readiness audit required a public domain for an +`expose: internal` application, and the update check still found the general +APT origin provided by Ubuntu 24.04. The audit now accepts an empty domain +only with an empty health path; the helper checks the labels of the deployed +services, refuses any inconsistent publication, then marks TLS, HSTS, DNS and +public health as not applicable with explicit evidence. Non-empty domains keep +their existing validation. + +Setup now writes, outside the `10-base` checkpoint, a security-only Shuttle +drop-in suited to Ubuntu 24.04 or Debian 13, with automatic reboot disabled. +The comparison before replacement makes convergence repeatable and lets +`shuttle setup --adopt` fix an already prepared host. `doctor` keeps a strict +check and names that command to fix a missing policy; the files the +distribution provides stay intact. The other audit operations and the +`20auto-upgrades` file stay compatible. + +## Running setup again on a Shuttle VPS gave an opaque SSH refusal and a false cutover + +On 28-10-2026, on the e2e VM with v0.0.56, running `shuttle setup` again with +the same arguments failed on the root SSH handshake: setup had already closed +that access, but the preflight printed a raw error. If the trusted local +identity confirms that Shuttle configured this host and root authentication +fails, the refusal now clearly states the deliberate closure and prints the +`shuttle setup --adopt` command with the operator target, the host and the key +options required. There is no retry and no opening of root SSH. + +The adoption plan classified an application's Swarm tasks as foreign, because +it read only the owner label of the service containers. It now recognizes the +stack namespace when the application's Shuttle state directory exists under +`/var/lib/shuttle/apps`. Stacks without that directory stay in the list of +foreign containers. If a `shuttle-edge` Caddy task already serves 80 and 443, +adoption plans no port transfer. A host whose steps are all satisfied, with no +deferred work or pending reboot, is reported as already converged, with no +remaining section. Flag names and the root SSH closure stay compatible. + +## Installing monitoring enabled a missing webhook and left out the SSH operator + +On 28-10-2026, a v0.0.56 installation on a VM prepared by `setup +--operator-user ops` reported `security.ssh [degraded]`: the operator existed +on the host but only as a flag, not in the config, and the default expected +list read only the config. It now adds the accounts setup recorded in the +host identity, which reflects what the host really has; the accounts declared +in the config (including `retained_users`) stay. An explicit +`monitoring.security.expected_ssh_users` list keeps priority. + +The same acceptance run accepted `notifications.webhook_env` while the +variable did not exist in the VPS systemd environment. The timer then started +a failing service on every cycle. The root helper now checks, before any write +or activation, that the root secret file exists and contains an HTTPS URL, or +that the variable is present in the systemd manager's environment. The unit +passes that variable with `PassEnvironment`. On failure, the message explains +how to configure the secret file or the variable, then run +`shuttle monitoring install --yes` again, without printing the URL. + +If the secret disappears after installation, the cycle keeps failing and the +systemd service stays failed, because notification is unavailable. The report +also persists `notifications.delivery` as unavailable so that +`monitoring status` shows the incident. + +## Creating a backup failed on a correctly configured host + +All 12 attempts out of 12 on the e2e VM of 28-10-2026 failed. The strict +pattern rejected UUIDs whose first hexadecimal character was a digit, that is +10 of the 16 possible values. The others reached the capture, then the helper +rejected the encryption publication: capture and encryption were published +under the same phase. The local failure status then marked encryption as +finished, although the helper journal had never admitted it; the operations +stayed `recovery_required`. + +Attempts now carry the fixed `backup-` prefix, and encryption has its own phase +before the receipt. That keeps the strict pattern and gives the helper a +distinct transition to validate before the receipt or a later failure. The +JSON schema, its field names and the v0.0.56 journal phases stay compatible. + +## The first deploy on a new host announced a deferred cleanup + +In the e2e of 28-10-2026 (fresh Ubuntu 24.04 VM, v0.0.56), the first deploy +printed `image store reclaim deferred to the next sweep: no retained release +digest could be read`. The sweep that precedes the promotion ran while no +stack was kept on the host yet: there was nothing to free, but the empty set +was treated as a failed read. When no `current.yml` or `previous.yml` file +exists, for the app or for any other, the helper now logs +`image store: nothing to sweep yet` and reports nothing. Kept files that exist +but yield no digest still stop the sweep, as before. + +## Monitoring alerted during a deploy, and its Discord alerts were unreadable + +On 28-10-2026 at 10:42, during an api redeploy on the demo prod, the critical +channel received `[shuttle] api services.application degraded: +Service task health does not match the retained expected replicas`, then a +recovery a minute later. A single sample, taken at 10:41:52 in the middle of +the rollout, had seen a new `api_worker-high` task still starting. Three +defects combined. + +The debounce (30 s) was measured between the first failing sample and the +next healthy sample. With a 60 s interval, that gap is always 60 s: any +isolated sample became an incident. The debounce now compares the failure +duration actually observed, from the first to the last failing sample (the +previous `last_seen`, since an active incident means the sample before was +failing). Two failing samples that span the debounce are needed to alert. The +state file keeps its v1 format: going back to the old binary reads it without +error. + +A task Swarm is starting (`preparing`, `starting`...), with no error, was +counted as unhealthy, as was a container in its healthcheck start period +(`starting`). Both are convergence, not a failure: Swarm and Docker fail them +themselves if they do not complete. A failed task stays degraded, and a +service with no running task does too, with the summary `Service tasks are +still starting`. + +An episode reused the identifier of the healthy record created hours earlier +(`episode_id` of 27-10 at 22:28 for a failure on 28-10 at 10:41). It now +starts at the first failing sample. + +Discord alerts are embeds: a plain title (`api: application service +degraded`), a color that carries only the state (amber degraded, red +unavailable or critical, green recovery), the measured finding, the app, the +check, the start of the episode in relative time, and for a recovery its +duration (`Healthy again after 1m12s.`). The `content` field stays empty so as +not to repeat the title. Slack and Mattermost read the same sentence in +`text`, and the notification's JSON fields stay identical, plus `created_at`. + +Finally, the security probes ran `sudo -n true` even as root. In the +monitoring unit (`NoNewPrivileges`), sudo cannot run: each run logged 3 to 4 +`unable to open /etc/sudoers : Operation not permitted`, then the failure of +the mail sudo sends to root (exim `Permission denied`). As root, the probes no +longer call sudo, and reading the deploy account's sudo policy (`sudo -l -U`) +is skipped silently under `NoNewPrivileges`; the checks' results do not +change, they already went through the direct path. + +## Old Redis, RabbitMQ and Caddy images piled up on the node + +On 27-10-2026, on the demo prod, `exited` containers of `shared_rabbitmq`, +`shared_redis` and the shared Caddy, 4 days to 4 weeks old, still held the +rabbitmq 3, 4.0 and 4.1 images and old caddy images. Dockerd keeps the image +as long as a stopped task container exists, and the helper sweep +(DEV-DEPL-54) deliberately left the infrastructure aside: each version bump +therefore left its image on disk, until the 20% free space guard refused a deploy (DEV-DEPL-55). -Une passe separee, a cote du balayage existant qui reste inchange, retire -sans `--force` les conteneurs de tache arretes de `_redis`, -`_rabbitmq` et `shuttle-edge_caddy`, puis les images redis, rabbitmq et -caddy que plus rien ne retient. Sont toujours gardees: l'image de tout -conteneur qui n'est pas arrete, chaque digest des `current.yml` et -`previous.yml` de toutes les applications et de `/etc/shuttle/caddy-stack.yml`, -et les images `Spec` et `PreviousSpec` de chaque service Swarm, pour que -`docker service rollback` reste possible. Une lecture qui echoue ou une -donnee mal formee (service sans image, ligne illisible) annule la passe au -lieu d'etre ignoree: on ne peut pas prouver qu'une image est inutile sans -l'avoir lue. Avec des promotions concurrentes, la passe sur les images ne -tourne que sous la cloture d'operation unique, pour qu'un deploy en train de -tirer une image d'infrastructure ne la perde pas. Le journal du helper porte -une ligne `infra images: N kept, N stopped infrastructure task containers -removed, N images removed, N still held by a container`. - -Le setup copie maintenant `/etc/shuttle/caddy-stack.yml` avant le script des -volumes et le pull, pour que ce fichier existe des que l'image Caddy est sur -le noeud. Effet au premier deploy apres `shuttle helper update` en v0.0.56; -les volumes ne sont jamais touches. - -## Un deploy lent ne disait pas pourquoi - -Le 27-10-2026, un deploy d'demo-agent a pris 7m57 au lieu de 6m40: l'image -de base flottante `python:3.12-slim-bookworm` avait bouge en amont, et toute -l'image de 6,8 Go avait ete reconstruite, dont une couche Playwright de 3,36 Go. -La sortie ne donnait que des durees, et le message de SLO manque conseillait de -relever `deploy.total_slo_seconds` "if this is normal", ce qui pousse a masquer -la cause; il a fallu comparer les couches du noeud a la main (DEV-DEPL-53, -partie B). - -Les builds Swarm locaux et Compose lisent maintenant la progression BuildKit -(analyse au fil de l'eau, sans garder la transcription; une ligne inconnue -n'a aucun effet, et une erreur d'affichage ne change jamais le resultat du -build). Une ligne `Build detail:` suit chaque `Timing build.`: etapes -en cache, etape la plus lente (y compris une etape en cache qui extrait -longtemps ses couches parentes, comme `COPY models/` a 14,1 s), et `stage -rebuilt from its base: base image changed or build cache was cold` quand la -premiere instruction apres le FROM d'un stage (etape 2/n) a ete executee -(`(full rebuild)` si rien n'est en cache); Shuttle nomme le stage et ne pretend -pas savoir laquelle des deux causes. Le FROM seul ne prouve rien: sur un build -chaud, BuildKit affiche `FROM ... DONE 0.0s` alors que tout le reste est en -cache. Un COPY ou un ADD relance en etape 2 non plus: un contexte modifie suffit. -Avec le push direct de BuildKit, le temps de push mesure par BuildKit -(`pushing layers`, `pushing manifest`) apparait a part (`registry push 41.5s of -it`), dans la ligne de detail comme dans la cause du SLO, pour qu'un envoi lent -ne passe pas pour un build lent. Un build qui echoue affiche aussi sa ligne de -detail. La ligne porte le nom du service (`Build detail.:`), pour -rester lisible quand plusieurs builds tournent en parallele. Un SLO de promotion -manque nomme la promotion; un SLO total manque en Swarm nomme l'etape dominante -(build, push, promotion, ou "setup and other steps" pour le temps non suivi) et -la cause du build; en Compose, il ne nomme pas d'etape faute de mesure. Les -builds captures forcent `--progress=plain`, en remplacant tout autre format. -Aucun message ne suggere plus de relever le budget. - -Effet visible: la sortie de buildx passe par un tube, donc buildx affiche sa -progression en texte simple au lieu de la vue animee, meme dans un terminal -interactif; c'est aussi ce qui rend l'analyse fiable. Le build distant par SSH -et `deploy existing-stack` sont inchanges. Le partage pull / demarrage de la -promotion demande un champ du protocole du helper (DEV-DEPL-60). - -## Le balayage de la registry loopback pouvait supprimer les manifestes d'une autre application - -Releve le 27-10-2026 par la revue du balayage des images (DEV-DEPL-54): apres -une promotion, le helper choisissait les depots de l'application par le -prefixe `app-` du catalogue, si bien qu'une application `api` balayait aussi -les depots d'`api`, et il lisait une seule fois l'ensemble des digests a -garder alors que les promotions d'applications differentes tournent en -parallele. Un manifeste qu'une autre application venait de pousser et de -retenir pouvait etre supprime (DEV-DEPL-57). - -L'appartenance d'un depot vient maintenant des fichiers retenus de -l'application elle-meme (`current.yml`, `previous.yml`): un depot qu'une autre -application retient aussi est partage, journalise et laisse aux deux. Chaque -passe de suppression (manifestes remplaces, puis eviction du cache de build) -s'execute seule sur l'hote quand des operations concurrentes sont possibles, et -relit l'ensemble a garder et l'appartenance a l'interieur de cette fenetre; une -relecture vide ou en echec reporte la suppression et le GC au balayage -suivant. L'eviction ne supprime jamais un digest qu'une stack retenue -reference. Les noms de depots, de tags et de digests sont valides avant de -construire une URL. Un fichier retenu corrompu d'une autre application arrete -le balayage; un fichier absent (premier deploy) est ignore. - -Compromis assume: un depot que l'application ne retient plus (service retire) -n'est plus balaye, une fuite plutot qu'une suppression a tort (DEV-DEPL-63). -Effet sur un noeud apres `shuttle helper update`. - -## Un deploy de code seul passait 70 secondes a recharger une image deja publiee - -Le 27-10-2026, sur la prod demo, un deploy d'demo-agent sans changement de -couche prenait 1m12, dont 57 s de build alors que les 16 etapes etaient en -cache: 17,5 s pour rapatrier les couches du cache par le tunnel SSH, 53,9 s -pour exporter l'image de 6,8 Go en OCI et l'importer dans le Docker local, puis -un `docker push` qui repondait `Layer already exists` pour chaque couche -(DEV-DEPL-53, partie A). - -Le build Swarm local publie maintenant directement depuis BuildKit (`--push ---metadata-file`) au lieu de `--load` puis `docker push`. Le manifeste -precedent est preserve avant, comme sur le chemin de build distant. Le digest -`containerimage.digest` que BuildKit a pousse est compare au digest que la -registry annonce (HEAD): une difference, ou un digest absent, fait echouer le -deploy avant la promotion, et la stack ne peut promouvoir que ce digest -verifie (un tag reecrit entre les deux lectures est refuse). Les tags jamais charges en local ne sont plus -nettoyes. Mesure sur la meme prod: 14,8 s au total (build 5 s, push 10 ms, -promotion 4,3 s), meme digest, identite de la release verifiee. Avec un vrai -changement de code (une couche modifiee): 47,3 s au lieu de 72 s. - -Le mode Compose et `deploy existing-stack` gardent `--load`; le build distant -par SSH poussait deja directement. `--skip-build` pousse comme avant une image deja construite. - -## Le check security.ufw du monitoring etait toujours `unavailable` sous le timer - -Le 27-10-2026 sur la prod demo, avec le monitoring d'api active, le -check security.ufw etait sain via `shuttle monitoring run` mais `unavailable` -(`UFW posture could not be inspected`) a chaque cycle du timer, et un incident -est parti. L'unit systemd du monitoring tourne en `ProtectSystem=strict` et -n'ouvrait en ecriture que son dossier d'etat et `/run/shuttle-root.lock`; or -`ufw status` ouvre `/run/ufw.lock` en ecriture: `Read-only file system` -(DEV-DEPL-58). Le chemin du helper, non isole, cachait le defaut. - -L'unit ouvre maintenant aussi `-/run/ufw.lock` (le `-` garde l'unit -demarrable sur un hote sans ufw), et l'entree tmpfiles cree ce verrou apres un -reboot, avant la construction du sandbox, comme celui de Shuttle; -l'installation applique aussi cette regle tout de suite (`systemd-tmpfiles ---create`), sinon un hote installe apres le boot restait `unavailable` jusqu'au -reboot suivant, le `-` taisant le fichier absent. Un test -verifie que chaque verrou ecrit par un check est ouvert en ecriture et cree -par tmpfiles. Rien d'autre ne s'ouvre. Sur un hote deja equipe: apres `shuttle -helper update`, relancer `shuttle monitoring install --yes` reecrit l'unit. - -## Le balayage des images du noeud ne liberait presque rien - -Le 27-10-2026 sur la prod demo (198.51.100.10), le journal du helper disait a -chaque balayage `12-13 superseded images found, 0-1 removed, 12-13 still held -by a container`, toujours les memes digests. La limite d'historique Swarm etait -bien a 2, mais chaque slot gardait trois conteneurs arretes, et certains -appartenaient a des taches que Swarm avait deja oubliees (orphelins, par -exemple `demo-agent_agent.1.pty4ai00...` pour la release afba2df1). 38 -conteneurs arretes sur 56; les trois anciennes releases d'demo-agent -retenaient a elles seules 6,78 Go. Le balayage refusait a juste titre de forcer -une image tenue par un conteneur, et rien dans Shuttle ne supprimait ces -conteneurs (DEV-DEPL-54). - -Les deux balayages (avant le deploy et apres la promotion) suppriment -maintenant d'abord les conteneurs de taches Swarm arretes qui tiennent une -release remplacee, puis les images. Un conteneur n'est supprime que s'il est -`exited` ou `dead`, porte le label de tache Swarm et tourne une image de la -registry loopback qu'aucun `current.yml` ni `previous.yml` ne retient; jamais -avec `--force`. La release precedente reste sur le noeud pour un rollback -rapide; un conteneur en marche, lance a la main ou d'infrastructure partagee -n'est jamais touche. L'ensemble a garder est relu juste avant chaque passe de -suppression et l'echange des fichiers d'un rollback se fait sous le meme verrou -que les balayages, pour qu'une promotion ou un rollback concurrent d'une autre -application ne perde pas sa release. L'inspection des conteneurs est bornee a -60 s par balayage. Pas de timer: les releases n'arrivent que par des deploys, -et chacun balaie avant et apres. Le seuil de refus a 20 % d'espace libre est -une seule constante pour le CLI et le helper. - -Effet sur un noeud apres `shuttle helper update` en v0.0.52, au premier deploy -suivant. L'infrastructure partagee (RabbitMQ, Redis, Caddy...) reste hors de ce -balayage; une passe separee la couvre depuis v0.0.56 (DEV-DEPL-55, plus haut). - -## Les alertes du monitoring echouaient en silence sur un webhook Discord ou Slack - -Le 27-10-2026, en preparant le monitoring disque de la prod demo, le corps -du webhook s'est revele etre le JSON brut de la notification (`id`, `kind`, -`app`, `check_id`, `episode_id`, `state`, `summary`). Discord refuse un message -sans `content` et Slack attend `text`: chaque alerte aurait echoue, avec pour -seule trace le journal des echecs de livraison (DEV-DEPL-56). - -Le corps garde tous ces champs pour un recepteur generique et ajoute `content` -et `text`, une ligne lisible: `[shuttle] : `, -coupee a 1900 caracteres sur une limite de caractere (Discord plafonne a 2000). -Un recepteur qui lisait les champs existants n'y voit que deux cles de plus. - -## Un deploy rate apres un rollback d'urgence affichait trois erreurs trompeuses et jamais la commande de recovery - -Le 27-10-2026, sur une VM jetable, un deploy dont la promotion a ete annulee -par Swarm a declenche le rollback d'urgence du helper, qui a ferme l'operation -en `recovery_required` (voulu: `operations recover` inscrit ensuite l'infra -gardee). Le CLI continuait pourtant a la piloter et affichait, apres la vraie -erreur, `operation-renew failed` deux fois puis `operation-abort failed: -operation is not active for this phase`, plus tout l'usage de `shuttle -deploy`, sans jamais nommer `shuttle operations recover` (DEV-DEPL-47). Meme -silence apres un `helper update` rate: l'operation `helper-update` restait -`recovery_required` et chaque deploy suivant etait refuse sans consigne. - -Le helper repond maintenant `operation requires recovery` a un controle sur -une operation deja `recovery_required`, au lieu du message generique qu'il -garde pour les operations terminees. Le CLI reconnait cette reponse, et -l'ancienne (helpers jusqu'a v0.0.50) apres une lecture signee de l'etat bornee -a 15 secondes, arrete d'envoyer des controles, et ajoute une seule ligne apres -l'erreur reelle. Elle depend du type d'operation: deploy et consorts -`recover --dry-run` puis `--yes --plan-digest`; `helper-update` -seulement `--dry-run` (sa preuve de reservation survit a l'echec de la sonde, -donc `--yes` serait refuse); reboot `operations reboot --resume`; destroy et -restore renvoient a `operations status`. Si l'etat ne peut pas etre lu, la -ligne le dit (`may require recovery`). La meme ligne suit un `operation-abort` -reussi, qui met lui-meme l'operation en `recovery_required`, et un deploy -bloque par une operation non recuperee. La fermeture des writers se fait -toujours avant, sinon la recovery nommee serait refusee. `deploy`, `deploy -existing-stack` et `helper update` n'affichent plus l'usage sur une erreur -d'execution, et l'erreur n'est plus imprimee deux fois (cobra puis `main`). - -Aucune transition d'etat ne change: `recovery_required` reste ferme, abort, -refuse et finish le refusent toujours. Les lignes ne reprennent pas encore -`--config`/`-e` (DEV-DEPL-50). - -## Un helper update rate cachait la vraie cause derriere un message generique - -Le 27-10-2026, sur une VM jetable, `shuttle helper update` a echoue avec -`replacement binary does not expose the shuttle-root interface`. Lance a la -main, le candidat disait la vraie cause: `/usr/local/libexec/shuttle-root -exceeds the 33554432 byte limit`. Le helper installe sonde le candidat avec -`shuttle-root --help` avant de le remplacer, et jetait l'erreur comme la sortie -de la sonde (DEV-DEPL-48). - -Les deux sondes (mise a jour directe et preuve de migration) passent -maintenant par une seule capture, bornee a 64 KiB, et l'erreur porte un extrait -de la sortie: UTF-8 valide, sans caractere de controle ni de format (categorie -Unicode C, comme le reste du journal du helper), espaces fusionnes, 240 octets -au plus coupes sur une limite de caractere. La sortie du candidat reste une -donnee non fiable: elle atteint le terminal de l'operateur et le journal, d'ou -ce nettoyage. Un candidat qui n'imprimerait son marqueur qu'apres 64 KiB est -refuse; un vrai shuttle-root l'imprime en premiere ligne. - -Rien ne change dans ce qui est verifie avant la sonde, ni dans l'ordre sonde -puis remplacement. Le detail n'apparait qu'une fois le helper installe en -v0.0.51 ou plus: la mise a jour depuis un helper plus ancien garde l'ancien -message. Pas de timeout sur la sonde pour l'instant (DEV-DEPL-51). - -## Setup tuait un sshd orphelin sans le dire quand il reussissait - -Le 27-10-2026, sur une VM Ubuntu 24.04 jetable, setup a trouve un listener -sshd orphelin sur le port 22, l'a arrete (PID 11025) puis a converge. La ligne -`stopping orphan sshd listener PID 11025` n'existait que sur le stderr du -script, et setup n'affichait ce stderr qu'en cas d'echec: le seul run qui avait -tue un processus sur l'hote n'en laissait aucune trace a l'ecran. - -Setup recopie maintenant ces lignes, et seulement elles, dans sa sortie -(` -> stopping orphan sshd listener PID ...`). Le reste du stderr d'un run -reussi est le bavardage de systemctl (`Removed ...`, `Created symlink ...`) et -reste masque. Le script et ses conditions sont inchanges; un hote sans orphelin -affiche exactement la meme sortie qu'avant. - -## Le rollback d'urgence d'un deploy rate pouvait retrograder Redis ou RabbitMQ - -Le 27-10-2026, sur une VM jetable, `previous.yml` epinglait -`redis:8.10.1-alpine` alors que le service avait ete mis a jour a la main en -8.10.3. Un deploy dont le serveur web meurt au demarrage a echoue a la -promotion; le rollback d'urgence du helper a redeploye `previous.yml` tel quel, -et `docker service inspect` montrait ensuite 8.10.1 en service et 8.10.3 en -precedente: Redis avait ete retrograde sur ses donnees persistantes -(DEV-DEPL-46). `operations recover` gardait deja une image vivante plus recente -depuis v0.0.48; ce chemin-la reappliquait les images de `previous.yml` sans -regarder ce qui tournait. Seul production-host etait expose en production, jusqu'a -son prochain deploy reussi. - -Avant le rollback, le helper lit maintenant l'image en service de chaque Redis -et RabbitMQ du fichier de rollback, avec la decision de `operations recover` -(fonction partagee, verdicts et messages de la recovery inchanges). L'image de -`previous.yml` n'est appliquee que si les deux sont officielles, epinglees par -digest, de meme majeure, et la retenue strictement plus recente. Dans tous les -autres cas (vivante egale ou plus recente, majeure differente, image non -officielle, version illisible), l'image en service est gardee dans un manifeste -temporaire 0600 du repertoire d'etat, supprime apres la tentative, et la raison -va au journal `shuttle-root`. Un changement de majeure n'est donc jamais -applique en silence. Le chemin d'urgence ne peut pas refuser comme la recovery: -la release echoue deja et personne n'est la pour trancher. Laisser un service -avec etat sur ce qu'il execute est le seul choix qui ne peut pas abimer ses -donnees. - -Quand la protection ne peut pas etre etablie (`previous.yml` illisible ou hors -de la forme validee, image vivante illisible ou impossible a ecrire, manifeste -impossible a construire), le rollback est saute et journalise -`emergency rollback SKIPPED`: la release en echec continue de servir, et -`shuttle operations recover` ou un redeploy reste le chemin explicite. C'est -plus long qu'un rollback automatique, mais un downgrade de donnees ne se -rattrape pas. - -`previous.yml` et `current.yml` ne sont pas reecrits: les digests du journal -restent valides. Quand toutes les images en service egalent celles du fichier -de rollback, ou sans Redis ni RabbitMQ, le rollback est exactement celui -d'avant: meme fichier, meme commande docker. `shuttle rollback` et -`operations recover` gardent leur comportement. - -## Le helper ne synchronisait pas le repertoire apres avoir remplace current.yml ou previous.yml - -`writeRootFile` ecrit `current.yml` et `previous.yml` par un fichier temporaire -synchronise puis un renommage, sans jamais synchroniser le repertoire parent. -Le `Sync` du fichier rend son contenu durable, pas le renommage: c'est une -modification du repertoire, qui n'atteint le disque qu'au prochain flush de ses -metadonnees. Le deploy journalise le digest de `current.yml` avant de l'ecrire; -apres une coupure de courant dans cette fenetre, le fichier pouvait revenir a -son ancien contenu alors que le journal nommait deja le nouveau. Constate par -lecture du code (DEV-DEPL-45); `replaceRootHelper` et la reecriture faite par -la recovery synchronisaient deja leur repertoire, ce chemin etait le dernier. - -`writeRootFile` synchronise maintenant le repertoire apres le renommage, et un -echec est renvoye a l'appelant avec une erreur qui dit que le fichier est deja -remplace. La review a montre que cette nouvelle erreur pouvait couper en deux -l'echange de `current.yml` et `previous.yml` d'un `shuttle rollback`: les deux -fichiers auraient porte la cible du rollback et la release annulee aurait -disparu. L'echange termine donc toujours sa seconde ecriture apres un echec de -synchronisation de la premiere, puis renvoie les deux erreurs. Le deploy, lui, -s'arrete avant `docker stack deploy`, dans l'etat qu'un crash au meme point -laisse et que la recovery sait deja traiter. - -Rien ne change pour les formats, les modes ni les chemins; seul un `fsync` de -repertoire en echec, jusqu'ici ignore, devient une erreur visible. - -## setup echouait sur une Ubuntu 24.04 neuve quand un sshd orphelin tenait le port 22 - -Le 27-10-2026, deux setups sur deux d'Ubuntu 24.04 neuves se sont arretes a la -conversion de `ssh.socket` vers `ssh.service` (DEV-DEPL-44): "Job for -ssh.service failed because the control process exited with error code". Le -journal disait "Found left-over process 8655 (sshd) in control group", puis -"Bind to port 22 on 0.0.0.0 failed: Address already in use". La mise a niveau -des paquets de l'etape base avait relance un listener `sshd -D` de PPID 1 dans -le cgroup de `ssh.service` sans qu'il en soit le MainPID. Ubuntu livre l'unite -avec `KillMode=process`: ni l'arret ni le restart ne le tuent, et le nouveau -sshd ne pouvait pas ecouter. L'hote restait a moitie converti, et un second -setup ne reparait rien, puisque `ssh.socket` etait deja desactive. Le -contournement manuel, `kill 8655; systemctl start ssh.service`, gardait la -session ouverte: les sessions sont des enfants du listener et lui survivent. - -Apres `disable --now ssh.socket`, setup lit maintenant les PID en ecoute sur -TCP 22 et le MainPID de `ssh.service`, et n'envoie SIGTERM qu'a un listener -prouve orphelin, lu dans `/proc`: PPID 1, comm `sshd`, cgroup exactement -`0::/system.slice/ssh.service`, ligne de commande d'un listener sshd. L'identite -est relue juste avant le signal, heure de demarrage comprise, pour qu'un PID -reutilise ne soit jamais vise. Tout autre processus sur le port 22 (autre -demon, sshd d'une autre unite, session) arrete setup avec son PID et ce qui a -ete lu, sans etre tue: se tromper couperait le seul transport vers l'hote. Ni -`systemctl kill`, ni `pkill sshd`. Apres le restart, setup exige que chaque -listener du port 22 soit le nouveau MainPID. La conversion tourne aussi quand -`ssh.service` est inactif, pour qu'un setup interrompu se repare au passage -suivant. La premiere version lisait `ps`, dont les colonnes alignees et -tronquees auraient fait refuser l'orphelin reel: la review l'a vu, `/proc` ne -tronque rien. - -Sans orphelin, les commandes et leur ordre restent identiques: seules des -lectures s'ajoutent. Un hote deja sur un `ssh.service` actif n'est pas touche. -La fenetre entre la derniere lecture et le signal reste ouverte (pas de pidfd -en sh POSIX); elle est documentee et acceptee. - -## La recovery laissait current.yml epingler une ancienne image Redis - -Le 26-10-2026, sur production-host, `current.yml` epinglait Redis 7.4.5 alors que -`demo_redis` executait deja Redis 7.4.11. Depuis v0.0.48, recovery conservait -cette image officielle, epinglee par digest, de meme majeure et au moins aussi -recente. Elle ne changeait que la copie `.recovery-*`; le fichier retenu gardait -7.4.5, ce qui permettait a un autre chemin ou a un futur rollback de redemander -une image plus ancienne. - -Pour un enregistrement `deploy`, quand `current.yml` est le manifeste retenu, -recovery lie maintenant au plan les references Redis et RabbitMQ conservees, -inscrit le digest complet du nouveau `current.yml` dans un champ distinct du -journal, puis remplace uniquement les octets des valeurs `image` et synchronise -le repertoire. Le digest d'origine du deploiement echoue reste intact. Si le -processus s'arrete entre journal et renommage, le meme geste est rejoue; apres -le renommage, le digest lie autorise exactement ce fichier. Les images non -officielles, sans digest, de majeure differente ou plus anciennes restent -refusees. Toute autre modification de `current.yml` sans digest exact deja -autorise reste inconnue et refusee. Si le manifeste vient de l'archive de base, -recovery conserve le comportement existant et ne le recopie pas dans le slot. - -Le changement ajoute un champ de journal strictement decode. Un ancien helper -ne peut pas lire ce champ: son downgrade apres cette version n'est pas supporte. -Un ancien CLI ne peut pas lire le statut d'un nouveau helper: mettre le CLI a -cette version ou plus recente avant `operations status` ou recovery contre un -helper mis a jour. Les anciens enregistrements sans ce champ restent lisibles, -et les enregistrements `rollback` gardent leur comportement actuel. Le nouveau -`current.yml` ne protege un rollback qu'apres que le prochain deploiement l'a -tourne dans `previous.yml`, car rollback applique ce slot. - -Une mise a jour concurrente par `docker service update` entre le dernier -inspect et l'ecriture du manifeste reste une fenetre residuelle acceptee par -decision operateur du 27-10-2026. - -## Un echec avant promotion bloquait durablement le deploiement - -Le 27-10-2026, un premier deploiement VM de `e2e48b` a echoue pendant le build -sur une reponse Docker Hub 429. Le build n'avait pas touche a l'application, -mais l'operation est restee `recovery_required` et le deploiement suivant a ete -bloque. Un `RUN false` dans l'image d'une application deja en service a aussi -laisse `e2e48c` en `recovery_required`. Enfin, une premiere installation avec -une ancienne image Redis officielle epinglee a ete refusee faute d'image -retenue, puis les controles de renouvellement et d'abandon ont echoue parce que -la phase `stack-apply` avait deja ete ouverte. - -La cause etait double: le client abandonnait toute erreur, meme avant la -promotion, et le helper ouvrait la phase avant ses refus deterministes. Le -client ne prouve pas qu'aucune mutation n'a eu lieu: son transport peut tomber -apres l'envoi de la promotion alors que son champ local indique encore -`not-started`. Le coordinateur accepte maintenant le refus d'un deploiement -uniquement si son journal prouve une initialisation des writers terminee, puis -eventuellement le seul `stack-reclaim` termine, sans phase de publication de -secrets ni autre phase de mutation. Ce reclaim peut supprimer des images -obsoletes et regler l'historique Swarm, mais ne modifie aucun service ni stack. -Les controles deterministes du helper s'executent avant l'ouverture de la -phase, et le refus signe transporte seulement le motif borne du helper ou le -texte fixe `client failed before promotion`. La recovery d'un ancien abandon -utilise la meme preuve du journal, garde la preuve de fermeture des writers et -n'execute aucune action sur l'hote si aucune phase de mutation n'existe. - -Un deploiement reussi conserve le meme journal et la meme sortie. Les echecs -apres une promotion tentee sans marqueur de refus, les nettoyages incomplets et -les phases de publication de secrets restent recuperables comme avant. La -regle de refus de `shuttle run` reste inchangee. - -## RabbitMQ ne demarrait jamais avec le secret de mot de passe genere - -Le 27-10-2026, un deploiement e2e sur VM avec `rabbitmq:4.3.5-alpine` a -echoue: `stack e2e48 did not converge within 16.5s`, avec `e2e48_rabbitmq: 0 -of 1 task wanted running` et une tache en `Failed: task: non-zero exit (1)`. -Les journaux indiquaient que `RABBITMQ_DEFAULT_PASS_FILE` etait obsolete et -que l'image refusait les variables d'environnement obsoletees. Son script -officiel d'entree liste aussi `RABBITMQ_DEFAULT_USER_FILE` comme obsolete et -termine avec le code 1 avant de lancer le broker. - -Le service lit maintenant le Docker Secret existant, valide sa valeur brute, -puis ecrit `default_user` et `default_pass` dans un fichier RabbitMQ temporaire -sur le tmpfs `/tmp`. Le broker charge ce fichier au demarrage. Cette voie suit -la demande de l'image et evite les variables `RABBITMQ_DEFAULT_USER` et -`RABBITMQ_DEFAULT_PASS`, reservees par la documentation RabbitMQ au -developpement et a l'integration continue. - -Le nom du secret `_rabbitmq_password_v1` et son contenu restent inchanges; -les applications qui montent `RABBITMQ_PASSWORD` continuent de lire la meme -valeur. Aucun hote n'ayant pu demarrer le RabbitMQ gere par Shuttle depuis -l'origine, aucune donnee existante n'est a migrer. - -Le premier deploiement sur VM de ce script a lui-meme ete refuse par le -helper (`stack payload is empty, oversized, or contains unresolved -variables`) : le script utilisait `${#password}` et `${source_file##*/}`, et le -helper refuse tout `${` dans le stack. Le script n'utilise plus que des formes -sans accolades, et un test passe desormais chaque stack Redis et RabbitMQ -genere au validateur du helper. Sur VM, avec `rabbitmq:4.4.0-alpine`, le -service converge, `shuttle` s'authentifie, `guest/guest` est refuse et aucun -mot de passe n'apparait dans l'environnement du conteneur. - -## La recovery pouvait downgrader Redis sur ses donnees persistantes - -Le 26-10-2026, sur le VPS production-host avec le helper v0.0.47, un deploiement a -echoue au build, avant toute modification de l'hote, puis a laisse l'operation -en `recovery_required`. Le plan a reapplique `current.yml` du 22-10, qui -epinglait Redis 7.4.5, sur `demo_redis` deja passe a Redis 7.4.11. Cela a -remplace l'image en service au-dessus de donnees plus recentes. AOF et la meme -majeure ont permis au service de repartir, mais un downgrade pouvait casser -les donnees sur disque. - -Pour les seuls enregistrements `deploy`, recovery inspecte chaque service Redis -ou RabbitMQ declare dans le manifeste retenu. Si les images en service et -retenue sont officielles, epinglees par digest et presentes localement, et si -leurs versions lues dans `Config.Env` partagent la meme majeure, recovery garde -l'image en service quand sa version est egale ou superieure. Ce choix est lie -au plan et revalide juste avant `stack deploy`. Le texte du plan n'affiche que -les versions; les references completes sont liees par la preuve. Le dry-run -ne contacte jamais de registre et ne fait aucun pull. - -Un changement de majeure dans un sens ou dans l'autre, une image non officielle -ou sans digest, une inspection de service autre que l'absence, ou une version -locale manquante ou illisible bloquent le reapply et demandent une intervention -manuelle. Une image retenue de meme majeure plus recente que le service vivant -est reappliquee normalement. Si cette image retenue a ete supprimee du daemon, -ce cas bloque maintenant avec le message demandant a l'administrateur de la -tirer avant de relancer recovery. Les services absents gardent le comportement -precedent. Le manifeste retenu n'est jamais reecrit; `current.yml` et -`previous.yml` restent identiques pendant recovery. - -Une mise a jour concurrente par `docker service update` apres le dernier -inspect et avant `docker stack deploy` reste une fenetre residuelle acceptee par -decision operateur du 26-10-2026. La fermer demande un verrou hote hors de ce -changement. La seconde etape, qui liera la reecriture eventuelle des manifestes -retenus au coordinateur, est differee a DEV-DEPL-41 apres la fusion de -DEV-DEPL-40. Les enregistrements `rollback` gardent leur comportement actuel -et peuvent encore downgrader Redis ou RabbitMQ; cette decision operateur du -26-10-2026 est egalement suivie dans DEV-DEPL-41. - -## Un run en echec pouvait bloquer toutes les operations de son application - -Mesure sur une VM le 2026-10-26 : `shuttle run fail`, dont la commande etait -`node -e process.exit(3)`, a affiche `operation fail failed: exit status 3`, puis -`operation-abort failed: operation is not active for this phase`. Le statut est -reste `recovery_required`, `shuttle deploy` a ete bloque, et le dry-run de -recovery a observe un etat sain avant de rester sans preuve pour liberer les -marqueurs. Un exit code seul ne prouve pas que le processus de commande s'est -termine : Docker renvoie aussi des codes pour ses propres erreurs ou une -connexion perdue. Le helper compare donc les ExecIDs avant et apres `docker -exec`; seul un code qualifie sans nouvel exec encore present, ou la disparition -du conteneur, donne un resultat connu. Apres fermeture des writers, le client -refuse alors explicitement le run : le journal passe a `failed` et l'application -redevient utilisable. - -Pour une issue inconnue, le helper journalise le service et le conteneur avant -l'exec. `operations recover` garde les controles de writers, registry, -manifestes et PostgreSQL. Si le conteneur journalise tourne encore, il remplace -les taches du service, puis prouve que ce conteneur est arrete et que les -replicas sont sains avant de liberer l'operation. Un conteneur deja arrete ou -absent peut etre libere apres les memes controles. Aucune donnee n'est restauree -automatiquement; la restauration depuis une archive reste une decision explicite. - -Le budget du helper reste dix minutes : une commande plus longue est tuee et se -recupere avec `shuttle operations recover`; les travaux longs doivent tourner -dans un service de la stack. Le plan signe ne change pas. Le CLI et le helper -doivent etre mis a jour ensemble, car un ancien CLI peut refuser de decoder les -nouveaux champs `known` et `run_target`. La sortie d'un run reussi reste -inchangee; son journal ne gagne que la cible necessaire a la reconciliation. - -## Une migration PostgreSQL pouvait demarrer sans sauvegarde recente - -`shuttle run migrate` lancait la migration directement : la sauvegarde la plus -recente etait celle du timer quotidien (`pg_dumpall`, jusqu'a 24 heures), et -`rollback` ne restaure jamais PostgreSQL. Une migration qui detruisait des -donnees n'avait donc aucun filet recent. - -Une operation declaree peut maintenant porter `backup_before: true`. Avant le -`docker exec`, le helper fait un `pg_dump -Fc` de chaque base de l'application, -le relit avec `pg_restore --list`, puis le publie en 0600 dans -`/var/backups/shuttle-postgres/pre-run//` (cinq generations, separees des -sept archives quotidiennes). La liste des bases vient de l'hote (base derivee, -ledger et label signe `dev.shuttle.databases`), jamais du CLI : le ledger seul -oubliait une base adoptee. Le dump est refuse s'il laisserait moins de 10 % du -disque libre, si un autre dump ou le dump quotidien tourne, ou s'il depasse -cinq minutes ; pg_dump tourne sous l'identite `postgres` dans son propre groupe -de processus, tue en entier a l'echeance, car `runuser` ne transmet pas SIGKILL. - -Un dump refuse ne bloque plus l'application. Ce pre-flight tourne avant la phase -de mutation, et le refus se termine par la nouvelle action `operation-refuse` -(etat `failed`, sans `recovery_required`), que le coordinateur n'accepte que pour -un `run` dont les seules phases sont des `writers-initialize` terminees et dont -les writers sont fermes. Sans elle, le client envoyait `operation-abort`, et -`shuttle operations recover` ne sait pas reprendre un `run` (DEV-DEPL-40). - -`shuttle run` gardait aussi le delai de transport SSH par defaut de deux -minutes : au-dela, le CLI annoncait un echec et abandonnait l'operation pendant -que le helper continuait en root. Le delai est maintenant derive des budgets du -helper (19 minutes), et le plan signe vaut 15 minutes, le plafond du protocole. - -Compatibilite : une operation sans `backup_before` produit les memes octets de -label et de plan qu'avant. Un deploy qui declare l'option exige la capacite -`pre-run-backup` du helper ; `shuttle run --skip-backup` saute le dump de -facon explicite et inscrite dans le plan signe. - -## `shuttle init` ne pouvait pas generer une application interne - -`shuttle init` ajoutait toujours un domaine, une route Caddy et une URL de -disponibilite. La configuration `expose: internal` les refuse, donc les -applications sans route publique exigeaient une edition manuelle. `init` accepte -maintenant `--expose internal`, genere le service principal et omet ces champs. -Sans cette option, ou avec `--expose public`, la configuration conserve les -meme valeurs et le meme format qu'avant. - -## Les pins d'infrastructure redevenaient obsoletes - -`shuttle setup` signalait que les pins de Redis, RabbitMQ, Caddy et du registre -ne correspondaient plus aux canaux stables : Redis avait depasse 8.10.1, -RabbitMQ etait passe a 4.4.0 et les index de Caddy et du registre avaient ete -reconstruits. Le refresh manuel repart maintenant des digests d'index exposes -par la meme commande Buildx que le controle d'installation, lit les versions -declarees par les images et valide les quatre canaux avant toute ecriture. Un -changement majeur ou un downgrade interrompt le refresh ; RabbitMQ 4.4 demande -qu'un noeud deja passe depuis une ancienne mineure active tous ses feature flags -avec `rabbitmqctl enable_feature_flag all` avant le prochain deploy, sinon il -peut refuser de demarrer en 4.4. Les images -deja retenues sur les hotes existants ne changent pas, et le helper continue -d'accepter une version plus recente dans la meme majeure. - -## `shuttle init` generait encore Caddy 2.10.2 - -Le refresh des pins vers Caddy 2.11.7 n'avait touche que le defaut de `setup`. -Le generateur de configuration ecrivait toujours son propre digest, celui de -Caddy 2.10.2 (CVE-2026-27585 et CVE-2026-27589, corrigees en 2.11.1), et tous -les projets crees depuis portaient ce pin dans `caddy.image`. - -Le generateur reprend maintenant le defaut de `setup`, qui passe au rebuild du -22-10-2026 de Caddy 2.11.7 (magasin de certificats sans la racine emSign -ECC Root CA - G3, CVE-2026-113470). - -## Un Redis retenu ne pouvait recevoir aucun correctif de securite - -Une application gardee sur Redis 7.4.5 par `production.redis_image` ne pouvait -pas passer en 7.4.11, qui corrige CVE-2026-25243 et CVE-2026-81934. Le helper -root n'acceptait que le pin de la release (Redis 8.10.1 depuis v0.0.41) ou -l'image exacte deja en service : le deploiement d'Demo-app a echoue sur -"redis infrastructure image does not match the pinned runtime", puis, avec le -pin de la release, sur "redis major change 7 -> 8 requires an explicit data -migration". Il ne restait que l'image vulnerable. - -Le helper accepte maintenant une version plus recente de l'image retenue dans -la meme majeure : une image officielle `redis` (ou `rabbitmq`) epinglee par -digest, dont la version declaree par l'image elle-meme (`REDIS_VERSION`, -`RABBITMQ_VERSION`, lue apres le pull) a la meme majeure que celle en service et -ne lui est pas inferieure. Le tag n'est pas cru : une reference etiquetee 7.4 -dont le digest est Redis 8 est refusee comme tout changement de majeure. Un -changement de majeure, un retour en arriere, une pre-release, un autre registre -ou une reference sans digest restent refuses ; une premiere installation prend -toujours le pin de la release. Les configurations qui gardent l'image retenue -ou le pin de la release se deploient exactement comme avant. - -Le workflow de release suit maintenant `CI_RUNNER` comme la CI, pour qu'un tag -produise encore des fichiers signes quand les runners heberges de GitHub sont -indisponibles. - -## Un deploiement env-only ou secret-only annule pouvait etre annonce comme reussi - -Un deploiement env-only ou secret-only en echec etait annonce comme reussi -pendant que Swarm le restaurait, car l'ancienne et la nouvelle release -portaient la meme image. Sur Docker 29.9.2, la mesure a montre 13 secondes en -`updating`, 1 en `rollback_started` avec deux taches voulues, puis 4 secondes -avec l'ancienne tache seule et `rollback_started`, avant 27 secondes en -`rollback_completed`. - -La convergence consulte maintenant UpdateStatus depuis le debut du deploiement -et refuse une release des que le rollback est signale. Elle ne demande pas -`completed`, ce qui ajouterait les 10 secondes de surveillance Swarm a chaque -promotion et ferait depasser les petits SLO. Les redeploiements identiques, les -changements d'image et les statuts obsoletes restent compatibles. - -## Les jobs CI etaient ignores depuis une branche de fonctionnalite - -Depuis une branche autre que `main` ou `develop`, les filtres du workflow -ecartaient les trois jobs : `ci-local` annoncait pourtant un pipeline passe en -581 ms. Lorsque les jobs etaient forces, l'image par defaut `golang:1.23` -echouait car le module exige Go 1.27. Le tag 1.27.2 echouait ensuite sur -GO-2026-6809, corrige par le toolchain 1.27.3 du module. - -Le script force maintenant les jobs et derive les images Ubuntu et macOS du -toolchain (ou de la directive Go en son absence). Un resume sans job `ci/` -execute est un echec. Les options supplementaires restent transmises apres les -valeurs par defaut et peuvent toujours les remplacer. - -## Les deploiements peuvent preparer leurs secrets avec Hashvault - -Un `stack deploy` reapplique les references du compose et annule celles ajoutees -hors deploiement. Le backend `secrets.backend: hashvault` fait preparer les -objets Swarm avant la promotion, par le helper signe sur le manager. Seul le -manifeste et ses references voyagent : aucune valeur ne revient au poste. - -La stack conserve les versions, cibles de fichiers et proprietaires declares -dans `hashvault.json`, remplace les anciens montages correspondants et retient -le descripteur pour le rollback. Apres convergence, le helper confirme la release -observee dans le coffre. Un descripteur exporte permet de redeployer pendant -que le coffre est scelle ; une confirmation differee se reprend avec -`shuttle secrets sync`, apres une nouvelle verification de sante. - -La confirmation attend que chaque service ait ses replicas en etat Running sur -l'image appliquee, et que chacune de ces taches monte exactement les secrets de -la stack signee (objet, cible, proprietaire, mode). Elle dispose de 45 s pendant -la promotion, comptees dans le delai de la session SSH, et de 3 min 30 dans -`shuttle secrets sync`. Une rotation ou -un rollback garde souvent les memes images : l'attente de convergence passait -alors sur les anciennes taches, et le coffre aurait enregistre une publication -qu'aucun conteneur ne lisait encore. Le manifeste signe est celui commite a -`HEAD` ; un `hashvault.json` non suivi ou modifie est refuse avant le build. - -Un `shuttle secrets sync` qui ne peut pas encore confirmer (coffre scelle ou -injoignable, taches encore en cours de remplacement) le dit et sort en erreur, -mais termine son operation proprement : il ne laisse plus de verrou -`recovery_required` qui bloquait ensuite tout deploiement, rollback ou sync de -l'application. Une release sans preparation Hashvault est signalee comme telle, -jamais comme confirmee. Une vraie panne (stack illisible, convergence en echec, -enrolement casse) reste un echec, et `shuttle operations recover` la libere en -observant seulement, puisqu'un sync ne touche ni la stack, ni le registre, ni -l'edge. - -Les backends existants gardent leur comportement et leur format de configuration. -La cle machine reste sur le manager, dans une configuration root privee. Le -nouveau contrat est couvert par des tests de configuration, signature, montages -et permissions ; voir `docs/hashvault.md` pour l'enrolement et les limites. - -## Un deploiement annule par la sonde de disponibilite se recupere - -Quand la sonde de disponibilite echoue, le deploiement restaure la release -precedente : `current.yml` redevient l'ancienne release et le manifeste que -l'operation a ecrit et journalise passe dans `previous.yml`. La recuperation ne -reconnaissait ce manifeste propre a l'operation que dans le slot `current`, et -refusait donc tout (`unknown retained previous artifact is not authorized`) : -l'application restait bloquee en `recovery_required`, et aucun deploiement -suivant ne pouvait reserver l'operation (preprod demo-core, 19-10-2026). - -Le digest exact journalise par l'operation est maintenant reconnu dans les deux -slots. Il n'est jamais selectionne : la recuperation converge toujours sur la -release que le rollback a restauree. - -## `shuttle logs` lit chaque tache separement - -La cause du blocage est confirmee sur l'hote de production (Docker 29.7.2, -19-10-2026) : `docker service logs ` ecrit toutes ses lignes puis ne -ferme jamais le flux des que le service a plusieurs taches dans son historique, -meme a `--tail 100`. Le meme appel cible sur une tache (`docker service logs -`) rend la main immediatement, et `docker logs` aussi. - -Le helper liste les taches (`docker service ps --quiet`), puis lit chacune avec -`--tail`, de la plus ancienne a la plus recente, sous un plafond de 3 MiB -(sous les 4 MiB du transport SSH, contre 1 MiB avant) et le meme delai de -15 secondes. La sortie garde la semantique precedente (une -queue par tache, tache en cours en dernier). Un identifiant de tache inattendu -est refuse avant toute lecture. Le helper installe sur un hote doit etre mis a -jour (`shuttle helper update`) pour en beneficier. - -## Les gros volumes de logs finissaient en timeout SSH opaque - -Sur un service avec deux taches dans l'historique, `shuttle logs --lines 100` -rendait 401 lignes en une seconde, mais 300 lignes demandees finissaient au -timeout SSH de 120 secondes. Le helper collectait la sortie Docker sans limite -de taille ni delai propre. Le code ne confirme pas un interblocage de pipe : -les deux flux sont deja draines, y compris au-dela du plafond cote SSH. - -La collecte est maintenant bornee a 1 MiB cumule : le depassement arrete Docker -et demande explicitement de reduire `--lines`, sans renvoyer de logs partiels. -Un delai de diagnostic de 15 secondes signale une collecte Docker bloquee avant -le timeout du transport. Ce delai borne le symptome ; il ne prouve ni ne corrige -la cause d'un blocage interne a Docker sur l'hote observe. Des tests locaux -couvrent les deux flux au-dela de la capacite des pipes et un producteur qui -ne s'arrete pas apres depassement. Aucun acces a l'hote de production. - -`--lines` est valide avant de lire la configuration, entre 1 et 1000, avec une -erreur claire et sans afficher l'aide complete. Le defaut de 100 et la semantique -Docker par flux de chaque tache restent inchanges ; le plafond de taille -s'applique a tous les environnements utilisant le helper signe. - -## Un dockerfile relatif se lit depuis son contexte de build - -Compose lit un `dockerfile` relatif depuis le `context` du service, alors que -`docker build -f` le lit depuis le dossier courant. Une app de monorepo avec -`context: ../..` et `dockerfile: apps/web/Dockerfile` echouait donc avec -`resolve : lstat apps` avant tout build. Le chemin est maintenant resolu contre le -contexte, comme le fait Compose. Un chemin qui n'existe que relativement au -dossier courant reste accepte, pour les configurations existantes. - -## make install ne garde plus de shuttle.previous - -Une seule version de `shuttle` est installee : `make install` remplace le binaire -du PATH et supprime le `shuttle.previous` laisse par les versions precedentes du -script. Une generation conservee derive des sources et finit executee par erreur. -Pour revenir en arriere, relancer `make install` depuis le commit precedent. - -## existing-stack : deploiement plus rapide et sans coupure inutile - -Sur Ploydok staging, un deploiement prenait 11 min 40, dont 6 min 50 de -nettoyage des anciennes releases (environ 2 300 commandes SSH + sudo), et -coupait le trafic 9 s a chaque fois parce que l'image Caddy changeait meme -sans modification. - -- Le nettoyage lit l'etat Docker de l'hote une fois, puis le relit seulement - juste avant chaque suppression de manifeste, et resout les images en un seul - appel. Les memes protections s'appliquent. -- Le builder `shuttle--existing` est conserve entre deux executions : - les couches inchangees viennent du cache. Le cache est plafonne par - `retention.build_cache` (20GB par defaut) et deux executions d'une meme app - ne tournent plus en parallele sur le poste. -- Une image identique a celle qui tourne (couches, configuration, plateforme) - n'est plus transferee : son digest est conserve et Swarm ne redemarre pas le +A separate pass, next to the existing sweep, which stays unchanged, removes +without `--force` the stopped task containers of `_redis`, +`_rabbitmq` and `shuttle-edge_caddy`, then the redis, rabbitmq and caddy +images nothing holds anymore. Always kept: the image of any container that is +not stopped, every digest of the `current.yml` and `previous.yml` of all +applications and of `/etc/shuttle/caddy-stack.yml`, and the `Spec` and +`PreviousSpec` images of each Swarm service, so that `docker service rollback` +stays possible. A failed read or malformed data (a service with no image, an +unreadable line) cancels the pass instead of being ignored: an image cannot be +proven useless without being read. With concurrent promotions, the image pass +runs only under the single-operation fence, so that a deploy pulling an +infrastructure image does not lose it. The helper log carries a line +`infra images: N kept, N stopped infrastructure task containers removed, N +images removed, N still held by a container`. + +Setup now copies `/etc/shuttle/caddy-stack.yml` before the volumes script and +the pull, so that file exists as soon as the Caddy image is on the node. +Effective at the first deploy after `shuttle helper update` to v0.0.56; +volumes are never touched. + +## A slow deploy did not say why + +On 27-10-2026, a demo-agent deploy took 7m57 instead of 6m40: the floating +base image `python:3.12-slim-bookworm` had moved upstream, and the whole +6.8 GB image had been rebuilt, including a 3.36 GB Playwright layer. The output +gave only durations, and the missed SLO message advised raising +`deploy.total_slo_seconds` "if this is normal", which pushes toward hiding the +cause; the node's layers had to be compared by hand (DEV-DEPL-53, part B). + +Local Swarm and Compose builds now read the BuildKit progress (streaming +analysis, without keeping the transcript; an unknown line has no effect, and a +display error never changes the build result). A `Build detail:` line follows +each `Timing build.`: cached steps, the slowest step (including a +cached step that spends a long time extracting its parent layers, like +`COPY models/` at 14.1 s), and `stage rebuilt from its base: base image +changed or build cache was cold` when the first instruction after a stage's +FROM (step 2/n) ran (`(full rebuild)` if nothing is cached); Shuttle names the +stage and does not claim to know which of the two causes. The FROM alone proves +nothing: on a warm build, BuildKit shows `FROM ... DONE 0.0s` while everything +else is cached. Neither does a COPY or ADD rerun at step 2: a changed context +is enough. With BuildKit's direct push, the push time BuildKit measures +(`pushing layers`, `pushing manifest`) appears separately (`registry push 41.5s +of it`), in the detail line as in the SLO cause, so that a slow upload is not +mistaken for a slow build. A failed build also shows its detail line. The line +carries the service name (`Build detail.:`), to stay readable when +several builds run in parallel. A missed promotion SLO names the promotion; a +missed total SLO under Swarm names the dominant step (build, push, promotion, +or "setup and other steps" for untracked time) and the build cause; under +Compose, it names no step for lack of measurement. Captured builds force +`--progress=plain`, replacing any other format. No message suggests raising the +budget anymore. + +Visible effect: buildx output goes through a pipe, so buildx shows its progress +as plain text instead of the animated view, even in an interactive terminal; +that is also what makes the analysis reliable. The remote build over SSH and +`deploy existing-stack` are unchanged. Splitting the promotion into pull and +start requires a helper protocol field (DEV-DEPL-60). + +## The loopback registry sweep could delete another application's manifests + +Found on 27-10-2026 by the review of the image sweep (DEV-DEPL-54): after a +promotion, the helper picked the application's repositories by the `app-` +prefix of the catalog, so an `api` application also swept `api`'s +repositories, and it read the set of digests to keep only once, while +promotions of different applications run in parallel. A manifest another +application had just pushed and kept could be deleted (DEV-DEPL-57). + +A repository's ownership now comes from the application's own kept files +(`current.yml`, `previous.yml`): a repository another application also keeps is +shared, logged and left to both. Each deletion pass (replaced manifests, then +build cache eviction) runs alone on the host when concurrent operations are +possible, and reads the set to keep and the ownership again inside that +window; an empty or failed read defers the deletion and the GC to the next +sweep. Eviction never deletes a digest a kept stack references. Repository, +tag and digest names are validated before building a URL. A corrupt kept file +of another application stops the sweep; a missing file (first deploy) is +ignored. + +Accepted trade-off: a repository the application no longer keeps (removed +service) is no longer swept, a leak rather than a wrongful deletion +(DEV-DEPL-63). Effective on a node after `shuttle helper update`. + +## A code-only deploy spent 70 seconds reloading an already published image + +On 27-10-2026, on the demo prod, a demo-agent deploy with no layer change took +1m12, 57 s of it in the build although all 16 steps were cached: 17.5 s to +bring the cache layers back through the SSH tunnel, 53.9 s to export the +6.8 GB image as OCI and import it into the local Docker, then a `docker push` +that answered `Layer already exists` for every layer (DEV-DEPL-53, part A). + +The local Swarm build now publishes directly from BuildKit (`--push +--metadata-file`) instead of `--load` then `docker push`. The previous manifest +is preserved first, as on the remote build path. The `containerimage.digest` +BuildKit pushed is compared with the digest the registry announces (HEAD): a +difference, or a missing digest, fails the deploy before the promotion, and the +stack can promote only that verified digest (a tag rewritten between the two +reads is refused). Tags never loaded locally are no longer cleaned up. +Measured on the same prod: 14.8 s in total (build 5 s, push 10 ms, promotion +4.3 s), same digest, release identity verified. With a real code change (one +changed layer): 47.3 s instead of 72 s. + +Compose mode and `deploy existing-stack` keep `--load`; the remote build over +SSH already pushed directly. `--skip-build` pushes an already built image as +before. + +## The monitoring security.ufw check was always `unavailable` under the timer + +On 27-10-2026 on the demo prod, with api monitoring enabled, the security.ufw +check was healthy through `shuttle monitoring run` but `unavailable` (`UFW +posture could not be inspected`) on every timer cycle, and an incident went +out. The monitoring systemd unit runs with `ProtectSystem=strict` and opened +for writing only its state directory and `/run/shuttle-root.lock`; but +`ufw status` opens `/run/ufw.lock` for writing: `Read-only file system` +(DEV-DEPL-58). The helper path, which is not sandboxed, hid the defect. + +The unit now also opens `-/run/ufw.lock` (the `-` keeps the unit startable on a +host without ufw), and the tmpfiles entry creates that lock after a reboot, +before the sandbox is built, like Shuttle's own; installation also applies the +rule right away (`systemd-tmpfiles --create`), otherwise a host installed after +boot stayed `unavailable` until the next reboot, since the `-` silences the +missing file. A test checks that every lock a check writes is opened for +writing and created by tmpfiles. Nothing else is opened. On an already equipped +host: after `shuttle helper update`, running `shuttle monitoring install --yes` +again rewrites the unit. + +## The node image sweep freed almost nothing + +On 27-10-2026 on the demo prod (198.51.100.10), the helper log said at every +sweep `12-13 superseded images found, 0-1 removed, 12-13 still held by a +container`, always the same digests. The Swarm history limit was indeed 2, but +each slot kept three stopped containers, and some belonged to tasks Swarm had +already forgotten (orphans, for example `demo-agent_agent.1.pty4ai00...` for +release afba2df1). 38 stopped containers out of 56; the three old demo-agent +releases alone held 6.78 GB. The sweep rightly refused to force an image held +by a container, and nothing in Shuttle deleted those containers +(DEV-DEPL-54). + +Both sweeps (before the deploy and after the promotion) now first delete the +stopped Swarm task containers that hold a replaced release, then the images. A +container is deleted only if it is `exited` or `dead`, carries the Swarm task +label and runs a loopback registry image that no `current.yml` or +`previous.yml` keeps; never with `--force`. The previous release stays on the +node for a fast rollback; a running container, one started by hand or one of +the shared infrastructure is never touched. The set to keep is read again just +before each deletion pass, and a rollback's file swap happens under the same +lock as the sweeps, so that a concurrent promotion or rollback of another +application does not lose its release. Container inspection is bounded to +60 s per sweep. No timer: releases only arrive through deploys, and each one +sweeps before and after. The refusal threshold at 20% free space is a single +constant for the CLI and the helper. + +Effective on a node after `shuttle helper update` to v0.0.52, at the next +deploy. The shared infrastructure (RabbitMQ, Redis, Caddy...) stays outside +this sweep; a separate pass has covered it since v0.0.56 (DEV-DEPL-55, above). + +## Monitoring alerts failed silently on a Discord or Slack webhook + +On 27-10-2026, while preparing disk monitoring for the demo prod, the webhook +body turned out to be the notification's raw JSON (`id`, `kind`, `app`, +`check_id`, `episode_id`, `state`, `summary`). Discord refuses a message with +no `content` and Slack expects `text`: every alert would have failed, with the +delivery failure log as the only trace (DEV-DEPL-56). + +The body keeps all those fields for a generic receiver and adds `content` and +`text`, a readable line: `[shuttle] : `, cut at +1900 characters on a character boundary (Discord caps at 2000). A receiver that +read the existing fields only sees two more keys. + +## A failed deploy after an emergency rollback showed three misleading errors and never the recovery command + +On 27-10-2026, on a throwaway VM, a deploy whose promotion Swarm cancelled +triggered the helper's emergency rollback, which closed the operation as +`recovery_required` (intended: `operations recover` then records the kept +infra). The CLI nevertheless kept driving it and showed, after the real error, +`operation-renew failed` twice then `operation-abort failed: operation is not +active for this phase`, plus the whole `shuttle deploy` usage, without ever +naming `shuttle operations recover` (DEV-DEPL-47). Same silence after a failed +`helper update`: the `helper-update` operation stayed `recovery_required` and +every following deploy was refused with no instruction. + +The helper now answers `operation requires recovery` to a control on an +operation already `recovery_required`, instead of the generic message it keeps +for finished operations. The CLI recognizes that answer, and the old one +(helpers up to v0.0.50) after a signed state read bounded to 15 seconds, stops +sending controls, and adds a single line after the real error. It depends on +the operation type: deploy and the like get `recover --dry-run` then +`--yes --plan-digest`; `helper-update` only `--dry-run` (its reservation proof +survives the probe failure, so `--yes` would be refused); reboot gets +`operations reboot --resume`; destroy and restore point to +`operations status`. If the state cannot be read, the line says so (`may +require recovery`). The same line follows a successful `operation-abort`, which +itself puts the operation in `recovery_required`, and a deploy blocked by an +unrecovered operation. Closing the writers still happens first, otherwise the +named recovery would be refused. `deploy`, `deploy existing-stack` and +`helper update` no longer print the usage on a run error, and the error is no +longer printed twice (cobra then `main`). + +No state transition changes: `recovery_required` stays closed, and abort, +refuse and finish still refuse it. The lines do not carry `--config`/`-e` yet +(DEV-DEPL-50). + +## A failed helper update hid the real cause behind a generic message + +On 27-10-2026, on a throwaway VM, `shuttle helper update` failed with +`replacement binary does not expose the shuttle-root interface`. Run by hand, +the candidate gave the real cause: `/usr/local/libexec/shuttle-root exceeds the +33554432 byte limit`. The installed helper probes the candidate with +`shuttle-root --help` before replacing it, and threw away the error along with +the probe output (DEV-DEPL-48). + +Both probes (direct update and migration proof) now go through a single +capture, bounded to 64 KiB, and the error carries an excerpt of the output: +valid UTF-8, with no control or format character (Unicode category C, like the +rest of the helper log), merged spaces, at most 240 bytes cut on a character +boundary. The candidate's output stays untrusted data: it reaches the +operator's terminal and the log, hence that cleaning. A candidate that would +print its marker only after 64 KiB is refused; a real shuttle-root prints it on +the first line. + +Nothing changes in what is checked before the probe, or in the probe then +replace order. The detail appears only once the helper is installed at v0.0.51 +or later: updating from an older helper keeps the old message. No timeout on +the probe for now (DEV-DEPL-51). + +## Setup killed an orphan sshd without saying so when it succeeded + +On 27-10-2026, on a throwaway Ubuntu 24.04 VM, setup found an orphan sshd +listener on port 22, stopped it (PID 11025) then converged. The line +`stopping orphan sshd listener PID 11025` existed only on the script's stderr, +and setup printed that stderr only on failure: the only run that had killed a +process on the host left no trace of it on screen. + +Setup now copies those lines, and only those, to its output +(` -> stopping orphan sshd listener PID ...`). The rest of a successful run's +stderr is systemctl chatter (`Removed ...`, `Created symlink ...`) and stays +hidden. The script and its conditions are unchanged; a host with no orphan +prints exactly the same output as before. + +## The emergency rollback of a failed deploy could downgrade Redis or RabbitMQ + +On 27-10-2026, on a throwaway VM, `previous.yml` pinned `redis:8.10.1-alpine` +while the service had been updated by hand to 8.10.3. A deploy whose web +server dies at startup failed at promotion; the helper's emergency rollback +redeployed `previous.yml` as is, and `docker service inspect` then showed +8.10.1 running and 8.10.3 as previous: Redis had been downgraded on its +persistent data (DEV-DEPL-46). `operations recover` already kept a newer live +image since v0.0.48; this path reapplied the `previous.yml` images without +looking at what was running. Only production-host was exposed in production, +until its next successful deploy. + +Before the rollback, the helper now reads the running image of each Redis and +RabbitMQ in the rollback file, with the `operations recover` decision (shared +function, recovery verdicts and messages unchanged). The `previous.yml` image +is applied only if both are official, pinned by digest, of the same major, and +the kept one is strictly newer. In every other case (live equal or newer, +different major, unofficial image, unreadable version), the running image is +kept in a temporary 0600 manifest in the state directory, deleted after the +attempt, and the reason goes to the `shuttle-root` log. A major change is +therefore never applied silently. The emergency path cannot refuse like +recovery does: the release is already failing and nobody is there to decide. +Leaving a stateful service on what it runs is the only choice that cannot harm +its data. + +When the protection cannot be established (`previous.yml` unreadable or +outside the validated form, live image unreadable or impossible to write, +manifest impossible to build), the rollback is skipped and logs +`emergency rollback SKIPPED`: the failing release keeps serving, and +`shuttle operations recover` or a redeploy stays the explicit path. That takes +longer than an automatic rollback, but a data downgrade cannot be undone. + +`previous.yml` and `current.yml` are not rewritten: the journal digests stay +valid. When every running image equals those of the rollback file, or without +Redis or RabbitMQ, the rollback is exactly the one from before: same file, same +docker command. `shuttle rollback` and `operations recover` keep their +behavior. + +## The helper did not sync the directory after replacing current.yml or previous.yml + +`writeRootFile` writes `current.yml` and `previous.yml` through a synced +temporary file then a rename, without ever syncing the parent directory. The +file's `Sync` makes its content durable, not the rename: that is a directory +change, which reaches the disk only at the next flush of its metadata. The +deploy journals the `current.yml` digest before writing it; after a power cut +in that window, the file could go back to its old content while the journal +already named the new one. Found by reading the code (DEV-DEPL-45); +`replaceRootHelper` and the rewrite done by recovery already synced their +directory, this path was the last one. + +`writeRootFile` now syncs the directory after the rename, and a failure is +returned to the caller with an error saying the file is already replaced. The +review showed that this new error could cut in half the swap of `current.yml` +and `previous.yml` in a `shuttle rollback`: both files would have carried the +rollback target and the cancelled release would have vanished. The swap +therefore always finishes its second write after a sync failure of the first, +then returns both errors. The deploy, for its part, stops before +`docker stack deploy`, in the state a crash at the same point leaves and that +recovery already knows how to handle. + +Nothing changes for formats, modes or paths; only a failed directory `fsync`, +ignored until now, becomes a visible error. + +## setup failed on a fresh Ubuntu 24.04 when an orphan sshd held port 22 + +On 27-10-2026, two setups out of two on fresh Ubuntu 24.04 stopped at the +conversion from `ssh.socket` to `ssh.service` (DEV-DEPL-44): "Job for +ssh.service failed because the control process exited with error code". The +journal said "Found left-over process 8655 (sshd) in control group", then +"Bind to port 22 on 0.0.0.0 failed: Address already in use". The package +upgrade of the base step had restarted an `sshd -D` listener with PPID 1 in the +`ssh.service` cgroup without it being the MainPID. Ubuntu ships the unit with +`KillMode=process`: neither the stop nor the restart kills it, and the new +sshd could not listen. The host stayed half converted, and a second setup +repaired nothing, since `ssh.socket` was already disabled. The manual +workaround, `kill 8655; systemctl start ssh.service`, kept the session open: +sessions are children of the listener and outlive it. + +After `disable --now ssh.socket`, setup now reads the PIDs listening on TCP 22 +and the `ssh.service` MainPID, and sends SIGTERM only to a listener proven to be +an orphan, read from `/proc`: PPID 1, comm `sshd`, cgroup exactly +`0::/system.slice/ssh.service`, an sshd listener command line. The identity is +read again just before the signal, start time included, so that a reused PID is +never targeted. Any other process on port 22 (another daemon, an sshd of +another unit, a session) stops setup with its PID and what was read, without +being killed: a mistake would cut the only transport to the host. Neither +`systemctl kill` nor `pkill sshd`. After the restart, setup requires every +port 22 listener to be the new MainPID. The conversion also runs when +`ssh.service` is inactive, so that an interrupted setup repairs itself on the +next run. The first version read `ps`, whose aligned and truncated columns +would have refused the real orphan: the review caught it, `/proc` truncates +nothing. + +With no orphan, the commands and their order stay identical: only reads are +added. A host already on an active `ssh.service` is not touched. The window +between the last read and the signal stays open (no pidfd in POSIX sh); it is +documented and accepted. + +## Recovery left current.yml pinning an old Redis image + +On 26-10-2026, on production-host, `current.yml` pinned Redis 7.4.5 while +`demo_redis` already ran Redis 7.4.11. Since v0.0.48, recovery kept that +official image, pinned by digest, of the same major and at least as recent. It +changed only the `.recovery-*` copy; the kept file still had 7.4.5, which let +another path or a future rollback request an older image again. + +For a `deploy` record, when `current.yml` is the kept manifest, recovery now +ties the kept Redis and RabbitMQ references to the plan, records the full +digest of the new `current.yml` in a separate journal field, then replaces only +the bytes of the `image` values and syncs the directory. The original digest of +the failed deploy stays intact. If the process stops between the journal and +the rename, the same step is replayed; after the rename, the tied digest +allows exactly that file. Unofficial images, images without a digest, of a +different major or older stay refused. Any other change to `current.yml` +without an exact digest already allowed stays unknown and refused. If the +manifest comes from the base archive, recovery keeps the existing behavior and +does not copy it into the slot. + +The change adds a strictly decoded journal field. An old helper cannot read +that field: downgrading it after this version is not supported. An old CLI +cannot read a new helper's status: update the CLI to this version or later +before `operations status` or recovery against an updated helper. Old records +without that field stay readable, and `rollback` records keep their current +behavior. The new `current.yml` protects a rollback only after the next deploy +has rotated it into `previous.yml`, because rollback applies that slot. + +A concurrent update through `docker service update` between the last inspect +and the manifest write remains a residual window, accepted by operator decision +of 27-10-2026. + +## A failure before promotion blocked deploys for good + +On 27-10-2026, a first VM deploy of `e2e48b` failed during the build on a +Docker Hub 429 answer. The build had not touched the application, but the +operation stayed `recovery_required` and the next deploy was blocked. A +`RUN false` in the image of an application already running also left `e2e48c` +in `recovery_required`. Finally, a first installation with an old pinned +official Redis image was refused for lack of a kept image, then the renew and +abort controls failed because the `stack-apply` phase had already been opened. + +The cause was twofold: the client aborted on any error, even before the +promotion, and the helper opened the phase before its deterministic refusals. +The client does not prove that no mutation happened: its transport can drop +after the promotion was sent while its local field still says `not-started`. +The coordinator now accepts a deploy's refusal only if its journal proves a +finished writers initialization, then possibly the single finished +`stack-reclaim`, with no secret publication phase or other mutation phase. +That reclaim can delete obsolete images and settle the Swarm history, but +changes no service or stack. The helper's deterministic checks run before the +phase is opened, and the signed refusal carries only the helper's bounded +reason or the fixed text `client failed before promotion`. Recovery of an old +abort uses the same journal proof, keeps the writers closing proof and runs no +action on the host if no mutation phase exists. + +A successful deploy keeps the same journal and the same output. Failures after +an attempted promotion with no refusal marker, incomplete cleanups and secret +publication phases stay recoverable as before. The refusal rule of +`shuttle run` stays unchanged. + +## RabbitMQ never started with the generated password secret + +On 27-10-2026, an e2e VM deploy with `rabbitmq:4.3.5-alpine` failed: +`stack e2e48 did not converge within 16.5s`, with `e2e48_rabbitmq: 0 of 1 task +wanted running` and a task in `Failed: task: non-zero exit (1)`. The logs said +that `RABBITMQ_DEFAULT_PASS_FILE` was deprecated and that the image refused +deprecated environment variables. Its official entry script also lists +`RABBITMQ_DEFAULT_USER_FILE` as deprecated and exits with code 1 before +starting the broker. + +The service now reads the existing Docker Secret, validates its raw value, then +writes `default_user` and `default_pass` into a temporary RabbitMQ file on the +`/tmp` tmpfs. The broker loads that file at startup. This path follows what the +image asks for and avoids the `RABBITMQ_DEFAULT_USER` and +`RABBITMQ_DEFAULT_PASS` variables, which the RabbitMQ documentation reserves +for development and continuous integration. + +The secret name `_rabbitmq_password_v1` and its content stay unchanged; +applications that mount `RABBITMQ_PASSWORD` keep reading the same value. Since +no host could ever start the Shuttle-managed RabbitMQ, there is no existing +data to migrate. + +The first VM deploy of this script was itself refused by the helper (`stack +payload is empty, oversized, or contains unresolved variables`): the script +used `${#password}` and `${source_file##*/}`, and the helper refuses any `${` +in the stack. The script now uses only forms without braces, and a test now +passes every generated Redis and RabbitMQ stack through the helper's +validator. On a VM, with `rabbitmq:4.4.0-alpine`, the service converges, +`shuttle` authenticates, `guest/guest` is refused and no password appears in +the container environment. + +## Recovery could downgrade Redis on its persistent data + +On 26-10-2026, on the production-host VPS with helper v0.0.47, a deploy failed +at the build, before any host change, then left the operation in +`recovery_required`. The plan reapplied the `current.yml` of 22-10, which pinned +Redis 7.4.5, on `demo_redis`, already moved to Redis 7.4.11. That replaced the +running image on top of newer data. AOF and the same major let the service +restart, but a downgrade could break the data on disk. + +For `deploy` records only, recovery inspects each Redis or RabbitMQ service +declared in the kept manifest. If the running and kept images are official, +pinned by digest and present locally, and if their versions read from +`Config.Env` share the same major, recovery keeps the running image when its +version is equal or higher. That choice is tied to the plan and validated again +just before `stack deploy`. The plan text shows only the versions; the full +references are tied by the proof. The dry run never contacts a registry and +pulls nothing. + +A major change in either direction, an unofficial image or one without a +digest, a service inspection other than absence, or a missing or unreadable +local version blocks the reapply and requires manual intervention. A kept image +of the same major newer than the live service is reapplied normally. If that +kept image was deleted from the daemon, that case now blocks with the message +asking the administrator to pull it before running recovery again. Missing +services keep the previous behavior. The kept manifest is never rewritten; +`current.yml` and `previous.yml` stay identical during recovery. + +A concurrent update through `docker service update` after the last inspect and +before `docker stack deploy` remains a residual window, accepted by operator +decision of 26-10-2026. Closing it requires a host lock outside this change. +The second step, which will tie any rewrite of the kept manifests to the +coordinator, is deferred to DEV-DEPL-41 after DEV-DEPL-40 is merged. `rollback` +records keep their current behavior and can still downgrade Redis or RabbitMQ; +that operator decision of 26-10-2026 is also tracked in DEV-DEPL-41. + +## A failed run could block every operation of its application + +Measured on a VM on 2026-10-26: `shuttle run fail`, whose command was +`node -e process.exit(3)`, printed `operation fail failed: exit status 3`, then +`operation-abort failed: operation is not active for this phase`. The status +stayed `recovery_required`, `shuttle deploy` was blocked, and the recovery dry +run observed a healthy state and then stayed without proof to release the +markers. An exit code alone does not prove that the command process ended: +Docker also returns codes for its own errors or a lost connection. The helper +therefore compares the ExecIDs before and after `docker exec`; only a qualified +code with no new exec still present, or the container's disappearance, gives a +known result. After the writers are closed, the client then refuses the run +explicitly: the journal goes to `failed` and the application is usable again. + +For an unknown outcome, the helper journals the service and the container +before the exec. `operations recover` keeps the writers, registry, manifests +and PostgreSQL checks. If the journaled container is still running, it +replaces the service's tasks, then proves that this container is stopped and +the replicas are healthy before releasing the operation. An already stopped or +missing container can be released after the same checks. No data is restored +automatically; restoring from an archive stays an explicit decision. + +The helper budget stays ten minutes: a longer command is killed and is +recovered with `shuttle operations recover`; long jobs must run in a service of +the stack. The signed plan does not change. The CLI and the helper must be +updated together, because an old CLI can refuse to decode the new `known` and +`run_target` fields. The output of a successful run stays unchanged; its +journal only gains the target reconciliation needs. + +## A PostgreSQL migration could start without a recent backup + +`shuttle run migrate` ran the migration directly: the most recent backup was +the daily timer's (`pg_dumpall`, up to 24 hours old), and `rollback` never +restores PostgreSQL. A migration that destroyed data therefore had no recent +safety net. + +A declared operation can now carry `backup_before: true`. Before the +`docker exec`, the helper takes a `pg_dump -Fc` of each database of the +application, reads it back with `pg_restore --list`, then publishes it as 0600 +in `/var/backups/shuttle-postgres/pre-run//` (five generations, separate +from the seven daily archives). The list of databases comes from the host +(derived database, ledger and signed label `dev.shuttle.databases`), never from +the CLI: the ledger alone missed an adopted database. The dump is refused if it +would leave less than 10% of the disk free, if another dump or the daily dump +is running, or if it exceeds five minutes; pg_dump runs as the `postgres` +identity in its own process group, killed as a whole at the deadline, because +`runuser` does not pass SIGKILL on. + +A refused dump no longer blocks the application. That preflight runs before the +mutation phase, and the refusal ends with the new `operation-refuse` action +(state `failed`, without `recovery_required`), which the coordinator accepts +only for a `run` whose only phases are finished `writers-initialize` phases and +whose writers are closed. Without it, the client sent `operation-abort`, and +`shuttle operations recover` cannot resume a `run` (DEV-DEPL-40). + +`shuttle run` also kept the default two-minute SSH transport timeout: beyond +that, the CLI reported a failure and aborted the operation while the helper +went on as root. The timeout is now derived from the helper budgets (19 +minutes), and the signed plan is valid for 15 minutes, the protocol ceiling. + +Compatibility: an operation without `backup_before` produces the same label and +plan bytes as before. A deploy that declares the option requires the helper's +`pre-run-backup` capability; `shuttle run --skip-backup` skips the dump +explicitly, and that choice is recorded in the signed plan. + +## `shuttle init` could not generate an internal application + +`shuttle init` always added a domain, a Caddy route and an availability URL. +The `expose: internal` configuration refuses them, so applications with no +public route required a manual edit. `init` now accepts `--expose internal`, +generates the primary service and leaves those fields out. Without that option, +or with `--expose public`, the configuration keeps the same values and format +as before. + +## Infrastructure pins became stale again + +`shuttle setup` reported that the Redis, RabbitMQ, Caddy and registry pins no +longer matched the stable channels: Redis had moved past 8.10.1, RabbitMQ had +moved to 4.4.0 and the Caddy and registry indexes had been rebuilt. The manual +refresh now starts from the index digests exposed by the same Buildx command as +the installation check, reads the versions the images declare and validates the +four channels before writing anything. A major change or a downgrade stops the +refresh; RabbitMQ 4.4 requires a node already upgraded from an old minor to +enable all its feature flags with `rabbitmqctl enable_feature_flag all` before +the next deploy, otherwise it can refuse to start on 4.4. Images already kept +on existing hosts do not change, and the helper keeps accepting a newer version +within the same major. + +## `shuttle init` still generated Caddy 2.10.2 + +The pin refresh to Caddy 2.11.7 had only touched the `setup` default. The +configuration generator still wrote its own digest, that of Caddy 2.10.2 +(CVE-2026-27585 and CVE-2026-27589, fixed in 2.11.1), and every project created +since carried that pin in `caddy.image`. + +The generator now reuses the `setup` default, which moves to the 22-10-2026 +rebuild of Caddy 2.11.7 (certificate store without the emSign ECC Root CA - G3 +root, CVE-2026-113470). + +## A kept Redis could receive no security fix + +An application kept on Redis 7.4.5 through `production.redis_image` could not +move to 7.4.11, which fixes CVE-2026-25243 and CVE-2026-81934. The root helper +accepted only the release pin (Redis 8.10.1 since v0.0.41) or the exact image +already running: the Demo-app deploy failed on "redis infrastructure image does +not match the pinned runtime", then, with the release pin, on "redis major +change 7 -> 8 requires an explicit data migration". Only the vulnerable image +was left. + +The helper now accepts a newer version of the kept image within the same +major: an official `redis` (or `rabbitmq`) image pinned by digest, whose +version declared by the image itself (`REDIS_VERSION`, `RABBITMQ_VERSION`, read +after the pull) has the same major as the running one and is not lower. The +tag is not trusted: a reference tagged 7.4 whose digest is Redis 8 is refused +like any major change. A major change, a downgrade, a pre-release, another +registry or a reference without a digest stay refused; a first installation +still takes the release pin. Configurations that keep the kept image or the +release pin deploy exactly as before. + +The release workflow now follows `CI_RUNNER` like CI, so that a tag still +produces signed files when GitHub's hosted runners are unavailable. + +## A cancelled env-only or secret-only deploy could be reported as successful + +A failed env-only or secret-only deploy was reported as successful while Swarm +was restoring it, because the old and the new release carried the same image. +On Docker 29.9.2, the measurement showed 13 seconds in `updating`, 1 in +`rollback_started` with two wanted tasks, then 4 seconds with the old task alone +and `rollback_started`, before 27 seconds in `rollback_completed`. + +Convergence now reads UpdateStatus from the start of the deploy and refuses a +release as soon as the rollback is reported. It does not wait for `completed`, +which would add Swarm's 10 monitoring seconds to every promotion and make small +SLOs overrun. Identical redeploys, image changes and stale statuses stay +compatible. + +## CI jobs were skipped from a feature branch + +From a branch other than `main` or `develop`, the workflow filters skipped all +three jobs: `ci-local` nevertheless reported a pipeline passed in 581 ms. When +the jobs were forced, the default `golang:1.23` image failed because the module +requires Go 1.27. Tag 1.27.2 then failed on GO-2026-6809, fixed by the module's +1.27.3 toolchain. + +The script now forces the jobs and derives the Ubuntu and macOS images from the +toolchain (or from the Go directive when it is absent). A summary with no `ci/` +job run is a failure. Extra options are still passed after the defaults and can +still override them. + +## Deploys can prepare their secrets with Hashvault + +A `stack deploy` reapplies the compose file's references and cancels those +added outside a deploy. The `secrets.backend: hashvault` backend has the Swarm +objects prepared before the promotion, by the signed helper on the manager. +Only the manifest and its references travel: no value comes back to the +workstation. + +The stack keeps the versions, file targets and owners declared in +`hashvault.json`, replaces the matching old mounts and keeps the descriptor for +rollback. After convergence, the helper confirms the observed release in the +vault. An exported descriptor allows redeploying while the vault is sealed; a +deferred confirmation is resumed with `shuttle secrets sync`, after a new +health check. + +The confirmation waits until each service has its replicas Running on the +applied image, and each of those tasks mounts exactly the secrets of the signed +stack (object, target, owner, mode). It has 45 s during the promotion, counted +within the SSH session timeout, and 3 min 30 in `shuttle secrets sync`. A +rotation or a rollback often keeps the same images: the convergence wait then +passed on the old tasks, and the vault would have recorded a publication no +container was reading yet. The signed manifest is the one committed at `HEAD`; +an untracked or modified `hashvault.json` is refused before the build. + +A `shuttle secrets sync` that cannot confirm yet (vault sealed or unreachable, +tasks still being replaced) says so and exits with an error, but finishes its +operation cleanly: it no longer leaves a `recovery_required` lock that then +blocked every deploy, rollback or sync of the application. A release with no +Hashvault preparation is reported as such, never as confirmed. A real failure +(unreadable stack, failed convergence, broken enrollment) stays a failure, and +`shuttle operations recover` releases it by observing only, since a sync +touches neither the stack, nor the registry, nor the edge. + +Existing backends keep their behavior and configuration format. The machine +key stays on the manager, in a private root configuration. The new contract is +covered by configuration, signature, mount and permission tests; see +`docs/hashvault.md` for enrollment and limits. + +## A deploy cancelled by the availability probe can be recovered + +When the availability probe fails, the deploy restores the previous release: +`current.yml` becomes the old release again and the manifest the operation +wrote and journaled moves to `previous.yml`. Recovery recognized that +operation-specific manifest only in the `current` slot, and therefore refused +everything (`unknown retained previous artifact is not authorized`): the +application stayed stuck in `recovery_required`, and no later deploy could +reserve the operation (demo-core preprod, 19-10-2026). + +The exact digest journaled by the operation is now recognized in both slots. +It is never selected: recovery always converges on the release the rollback +restored. + +## `shuttle logs` reads each task separately + +The cause of the hang is confirmed on the production host (Docker 29.7.2, +19-10-2026): `docker service logs ` writes all its lines and then never +closes the stream as soon as the service has several tasks in its history, even +with `--tail 100`. The same call aimed at one task (`docker service logs +`) returns immediately, and so does `docker logs`. + +The helper lists the tasks (`docker service ps --quiet`), then reads each one +with `--tail`, from oldest to newest, under a 3 MiB ceiling (below the 4 MiB of +the SSH transport, against 1 MiB before) and the same 15-second timeout. The +output keeps the previous semantics (one tail per task, current task last). An +unexpected task identifier is refused before any read. The helper installed on +a host must be updated (`shuttle helper update`) to benefit. + +## Large log volumes ended in an opaque SSH timeout + +On a service with two tasks in its history, `shuttle logs --lines 100` returned +401 lines in one second, but 300 requested lines ended at the 120-second SSH +timeout. The helper collected the Docker output with no size limit or timeout +of its own. The code does not confirm a pipe deadlock: both streams are already +drained, including beyond the SSH-side ceiling. + +Collection is now bounded to 1 MiB in total: going over stops Docker and asks +explicitly to reduce `--lines`, without returning partial logs. A 15-second +diagnostic timeout reports a stuck Docker collection before the transport +timeout. That timeout bounds the symptom; it neither proves nor fixes the cause +of a hang inside Docker on the observed host. Local tests cover both streams +beyond the pipe capacity and a producer that does not stop after going over. +No access to the production host. + +`--lines` is validated before reading the configuration, between 1 and 1000, +with a clear error and without printing the full help. The default of 100 and +Docker's per-stream semantics for each task stay unchanged; the size ceiling +applies to every environment using the signed helper. + +## A relative dockerfile is read from its build context + +Compose reads a relative `dockerfile` from the service's `context`, while +`docker build -f` reads it from the current directory. A monorepo app with +`context: ../..` and `dockerfile: apps/web/Dockerfile` therefore failed with +`resolve : lstat apps` before any build. The path is now resolved against the +context, as Compose does. A path that exists only relative to the current +directory stays accepted, for existing configurations. + +## make install no longer keeps shuttle.previous + +A single version of `shuttle` is installed: `make install` replaces the binary +on the PATH and deletes the `shuttle.previous` left by earlier versions of the +script. A kept generation drifts from the sources and ends up run by mistake. +To go back, run `make install` again from the previous commit. + +## existing-stack: faster deploy with no needless outage + +On Ploydok staging, a deploy took 11 min 40, 6 min 50 of it cleaning up old +releases (about 2,300 SSH + sudo commands), and cut traffic for 9 s every time +because the Caddy image changed even without any modification. + +- The cleanup reads the host's Docker state once, then reads it again only just + before each manifest deletion, and resolves the images in a single call. The + same protections apply. +- The `shuttle--existing` builder is kept between two runs: unchanged + layers come from the cache. The cache is capped by `retention.build_cache` + (20GB by default) and two runs of the same app no longer run in parallel on + the workstation. +- An image identical to the running one (layers, configuration, platform) is no + longer transferred: its digest is kept and Swarm does not restart the service. -## Les anciennes releases existing-stack remplissaient le disque - -Le mode `shuttle deploy existing-stack` creait un tag neuf a chaque execution, -sans retirer les releases precedentes. Sur Ploydok staging, 26 releases ont -laisse 28,29 Go d'images (19,49 Go recuperables) et 5,426 Go dans le registre ; -la partition racine a atteint 100 %. - -Apres succes de la commande apply et verification de tous les digests, -`retention.keep_releases` conserve une release par defaut (minimum 1). Les tags -plus anciens des seuls depots construits sont retires du Docker de l'hote et -leurs manifestes supprimes du registre. Les references des services, taches et -conteneurs actifs restent protegees, meme anciennes. Le rollback appartient a -apply et se termine avant ce nettoyage ; augmenter la retention permet de garder -un historique pour un rollback ulterieur. Aucun prune global ne tourne. - -Les echecs de nettoyage et le refus de suppression du registre sont des -avertissements, sans echec du deploiement verifie. L'espace libere et l'occupation -avant/apres sont affiches. La collecte des blobs reste une operation hors ligne -du registre gere par la plateforme. Les configurations existantes utilisent la -valeur par defaut sans nouvelle cle obligatoire. Voir `docs/existing-stack.md`. - -## Mettre a jour une stack existante sans remplacer son architecture - -Ploydok utilise deja un Swarm mono-noeud avec son propre agent, son registre, -ses montages et son protocole de mise a jour. Le mode gere de Shuttle refuse -ces montages ; le mode Compose aurait cree une autre architecture. - -`shuttle deploy existing-stack` construit et transfere les images vers un hote -SSH epingle, verifie leur identite, les publie dans le registre loopback deja -present et remet un manifeste par digest a la commande de mise a jour declaree. -La plateforme reste responsable des sauvegardes, migrations, controles de sante -et rollbacks. Les images locales et le builder de cette execution sont nettoyes. -Le helper signe, les installations PostgreSQL et les commandes de deploiement -existantes ne changent pas. Voir `docs/existing-stack.md`. - -## Une PWA derriere `basic_auth` ne redemande plus le mot de passe en boucle - -Le 2026-10-15, la preprod HDV (Next.js PWA derriere `caddy.basic_auth`) -redemandait le mot de passe sans fin. Avec les bons identifiants, les pages -repondaient 200, mais deux requetes partaient toujours sans identifiants : le -manifeste (`/manifest.webmanifest`, que le navigateur charge sans credentials) -et le precache du service worker (`fetch("/offline", { credentials: "omit" })` -puis les assets `/_next/static/*`). Caddy leur repondait `401` avec un defi -`WWW-Authenticate: Basic`, et Safari affiche une nouvelle demande pour chacune. - -- `caddy.basic_auth.public_paths` liste les chemins servis sans le gate. Le - helper ecrit un matcher nomme dans le gate lui-meme - (`@shuttle_gated not path ...` puis `basic_auth @shuttle_gated`), de sorte - qu'une host route qui importe le gate recoit les memes exemptions. -- Les chemins sont valides deux fois (CLI et helper) avec le matcher etroit - des path routes ; `/` et `/*` sont refuses, comme une liste sans - utilisateurs, une traversee `..` ou un doublon. Au plus 16 chemins. -- Une config qui declare la liste exige la capacite helper - `caddy-basic-auth-public-paths` : un helper plus ancien ignorerait le label - et garderait tout derriere le gate, ce qui est sur mais laisse la boucle. -- Sans `public_paths`, le bloc rendu est identique a avant. - -## La recuperation n'est plus refusee sur un hote qui porte plusieurs clusters PostgreSQL - -Le 2026-10-15, un deploiement preprod HDV a echoue au build et l'operation est -restee `recovery_required`. La recuperation (helper v0.0.38) refusait avec +## Old existing-stack releases filled the disk + +The `shuttle deploy existing-stack` mode created a new tag on every run, +without removing previous releases. On Ploydok staging, 26 releases left +28.29 GB of images (19.49 GB reclaimable) and 5.426 GB in the registry; the +root partition reached 100%. + +After the apply command succeeds and every digest is verified, +`retention.keep_releases` keeps one release by default (minimum 1). Older tags +of the built repositories only are removed from the host's Docker and their +manifests deleted from the registry. References of active services, tasks and +containers stay protected, even old ones. Rollback belongs to apply and +finishes before this cleanup; raising the retention keeps a history for a later +rollback. No global prune runs. + +Cleanup failures and the registry's refusal to delete are warnings, and do not +fail the verified deploy. The space freed and the usage before and after are +shown. Blob collection stays an offline operation of the platform-managed +registry. Existing configurations use the default value with no new required +key. See `docs/existing-stack.md`. + +## Updating an existing stack without replacing its architecture + +Ploydok already uses a single-node Swarm with its own agent, registry, mounts +and update protocol. Shuttle's managed mode refuses those mounts; Compose mode +would have created another architecture. + +`shuttle deploy existing-stack` builds and transfers the images to a pinned SSH +host, verifies their identity, publishes them in the loopback registry already +present and hands a manifest by digest to the declared update command. The +platform stays responsible for backups, migrations, health checks and +rollbacks. The local images and the builder of this run are cleaned up. The +signed helper, PostgreSQL installations and existing deploy commands do not +change. See `docs/existing-stack.md`. + +## A PWA behind `basic_auth` no longer asks for the password in a loop + +On 2026-10-15, the HDV preprod (Next.js PWA behind `caddy.basic_auth`) asked +for the password endlessly. With the right credentials, pages answered 200, but +two requests always left without credentials: the manifest +(`/manifest.webmanifest`, which the browser loads without credentials) and the +service worker precache (`fetch("/offline", { credentials: "omit" })` then the +`/_next/static/*` assets). Caddy answered them `401` with a +`WWW-Authenticate: Basic` challenge, and Safari shows a new prompt for each. + +- `caddy.basic_auth.public_paths` lists the paths served without the gate. The + helper writes a named matcher in the gate itself + (`@shuttle_gated not path ...` then `basic_auth @shuttle_gated`), so that a + host route that imports the gate gets the same exemptions. +- Paths are validated twice (CLI and helper) with the narrow matcher of path + routes; `/` and `/*` are refused, as are a list with no users, a `..` + traversal or a duplicate. At most 16 paths. +- A config that declares the list requires the + `caddy-basic-auth-public-paths` helper capability: an older helper would + ignore the label and keep everything behind the gate, which is safe but + leaves the loop. +- Without `public_paths`, the rendered block is identical to before. + +## Recovery is no longer refused on a host with several PostgreSQL clusters + +On 2026-10-15, an HDV preprod deploy failed at the build and the operation +stayed `recovery_required`. Recovery (helper v0.0.38) refused with `missing recovery proof: configured native PostgreSQL version and cluster are -not present on the host`, alors que `pg_lsclusters` montrait `18/main` et -`18/preprod` en ligne. La baseline des writers enregistre tous les clusters en -listes separees par des virgules (`18,18` et `main,preprod`), mais -`observePostgres` collait ces listes brutes en un seul chemin, -`/etc/postgresql/18,18/main,preprod`, qui n'existe jamais. Tout hote a deux -clusters ne pouvait donc plus etre recupere, et chaque deploiement de la cible -restait bloque derriere l'operation. - -- `observePostgres` lit les deux listes paire par paire et exige que chaque - cluster enregistre soit encore present ; des listes de longueurs differentes - ou un element vide restent refuses comme non configures. -- La baseline trie desormais les paires (version, cluster) ensemble au lieu de - trier chaque liste a part, ce qui pouvait apparier une majeure 16 au cluster - d'une 18. Une baseline ancienne reste lisible : avec des majeures egales - l'appariement par index est exact, et un appariement faux ne peut qu'echouer - ferme. -- Un hote a un seul cluster produit la meme baseline et le meme chemin - qu'avant. - -## Une operation a recuperer ne bloque plus `helper update`, ni la recuperation un registre installe par un Shuttle anterieur - -Le 2026-10-15, un deploiement preprod refuse par le garde memoire est reste -`recovery_required`. Le helper root de la VM etait en v0.0.20 : sa recuperation -verifiait la route Caddy avec `caddy config`, une commande qui n'existe pas -(corrigee depuis longtemps dans les sources). Chaque recuperation echouait, et -`shuttle helper update` etait refuse parce que ce meme deploiement attendait -une recuperation : la reservation `helper-update` est globale et -`operations.conflict` la bloquait sur tout enregistrement `recovery_required`, -puis la migration du helper (journal et inventaire des writers) refusait a son -tour. Seul un binaire copie a la main sur l'hote a casse la boucle. - -- Une reservation `helper-update` attend toujours une operation vivante (bail - actif), mais plus une operation `recovery_required` : celle-ci n'a plus - d'executeur, et remplacer le helper est justement le remede quand c'est lui - qui ne sait pas recuperer. La migration admet un tel enregistrement s'il est - coherent (`state` et `recovery_required` d'accord) ; ses writers doivent - toujours etre fermes (sinon `shuttle operations writers ` d'abord), les - processus de l'ancien helper sont toujours draines avant la fin, et - l'enregistrement reste `recovery_required` pour le nouveau helper. Les autres - operations globales (backup, reboot...) attendent toujours la recuperation. -- La recuperation passee ensuite avec un helper v0.0.37 a echoue sur `missing - recovery proof: registry image identity is unsafe` : le registre tournait en - `registry:3.1.1`, pose par un Shuttle anterieur, et seul le pin courant 3.1.2 - etait admis. Ni `setup` ni un deploiement ne recreent un registre existant - pour changer de pin, et seul un deploiement liberable par cette recuperation - aurait pu le faire evoluer. Les pins precedents sont maintenant listes - (`rootRegistryPreviousImages`, digests exacts) et la recuperation accepte un - conteneur qui en porte un s'il a l'etiquette `dev.shuttle.owner=system` ; la - liaison loopback, `restart: always` et la sante restent exigees. La - recuperation restaure l'existant, elle ne monte pas le registre de version. - Aucun autre controle de la recuperation ne compare l'hote a un pin compile. - -Ces deux corrections agissent depuis le helper installe : un hote dont le helper -est anterieur a cette version reste soumis aux anciennes regles jusqu'a sa -premiere mise a jour. - -## Un garde memoire qui avertit n'ecrit plus « deployment refused » - -En `--memory-budget=warn` (Swarm) et en strategie Compose, l'alerte reprenait -le texte du refus : `⚠ deployment refused: the rolling update needs 2.25 GiB -... continuing because --memory-budget=warn`, dans un deploiement qui a -continue et reussi (Demo-app, 2026-10-15). L'alerte s'ouvre maintenant sur -`Memory budget exceeded` suivi des memes chiffres ; seul le refus de `strict` -garde `deployment refused`. - -## `deploy --memory-budget=warn`, et le garde memoire ne compte plus les services stop-first - -Le 2026-10-15, `shuttle deploy` d'Demo-app a refuse avant tout build : +not present on the host`, while `pg_lsclusters` showed `18/main` and +`18/preprod` online. The writers baseline records every cluster as +comma-separated lists (`18,18` and `main,preprod`), but `observePostgres` glued +those raw lists into a single path, `/etc/postgresql/18,18/main,preprod`, which +never exists. Any host with two clusters could therefore no longer be +recovered, and every deploy of the target stayed blocked behind the operation. + +- `observePostgres` reads both lists pair by pair and requires each recorded + cluster to still be present; lists of different lengths or an empty element + stay refused as not configured. +- The baseline now sorts the (version, cluster) pairs together instead of + sorting each list on its own, which could pair a major 16 with the cluster of + an 18. An old baseline stays readable: with equal majors, pairing by index is + exact, and a wrong pairing can only fail closed. +- A host with a single cluster produces the same baseline and the same path as + before. + +## An operation awaiting recovery no longer blocks `helper update`, and a registry installed by an earlier Shuttle no longer blocks recovery + +On 2026-10-15, a preprod deploy refused by the memory guard stayed +`recovery_required`. The VM's root helper was at v0.0.20: its recovery checked +the Caddy route with `caddy config`, a command that does not exist (fixed long +ago in the sources). Every recovery failed, and `shuttle helper update` was +refused because that same deploy was waiting for recovery: the `helper-update` +reservation is global and `operations.conflict` blocked it on any +`recovery_required` record, then the helper migration (journal and writers +inventory) refused in turn. Only a binary copied by hand onto the host broke +the loop. + +- A `helper-update` reservation still waits for a live operation (active + lease), but no longer for a `recovery_required` one: that one has no runner + anymore, and replacing the helper is precisely the remedy when the helper is + what cannot recover. The migration admits such a record if it is consistent + (`state` and `recovery_required` agree); its writers must still be closed + (otherwise `shuttle operations writers ` first), the old helper's + processes are still drained before the end, and the record stays + `recovery_required` for the new helper. Other global operations (backup, + reboot...) still wait for recovery. +- The recovery then run with a v0.0.37 helper failed on `missing recovery + proof: registry image identity is unsafe`: the registry ran + `registry:3.1.1`, set up by an earlier Shuttle, and only the current pin + 3.1.2 was admitted. Neither `setup` nor a deploy recreates an existing + registry to change pins, and only a deploy released by that recovery could + have moved it forward. The previous pins are now listed + (`rootRegistryPreviousImages`, exact digests) and recovery accepts a container + that carries one if it has the `dev.shuttle.owner=system` label; the loopback + binding, `restart: always` and health are still required. Recovery restores + what exists, it does not upgrade the registry. No other recovery check + compares the host with a compiled pin. + +Both fixes act from the installed helper: a host whose helper is older than +this version stays under the old rules until its first update. + +## A memory guard that warns no longer writes "deployment refused" + +With `--memory-budget=warn` (Swarm) and under the Compose strategy, the alert +reused the refusal text: `⚠ deployment refused: the rolling update needs 2.25 +GiB ... continuing because --memory-budget=warn`, in a deploy that went on and +succeeded (Demo-app, 2026-10-15). The alert now opens with `Memory budget +exceeded` followed by the same figures; only the `strict` refusal keeps +`deployment refused`. + +## `deploy --memory-budget=warn`, and the memory guard no longer counts stop-first services + +On 2026-10-15, `shuttle deploy` of Demo-app refused before any build: `the rolling update needs 2.25 GiB of free memory (agents-api 512 MiB, agents-worker 512 MiB, api 512 MiB, redis 256 MiB, web 512 MiB), host has -1.09 GiB available of 2.97 GiB`. Les quatre services applicatifs occupaient -alors environ 420 MiB au total. Le garde additionne des plafonds, pas des -tailles residentes : sur un hote de 3 GiB il exige 75 % de la RAM libre. - -- Le garde Swarm ne compte plus les services `update_order: stop-first` : leur - ancienne tache s'arrete avant que la nouvelle demarre, il n'y a jamais deux - copies. Compose garde la liste complete, comme plafond que l'hote doit tenir. -- `shuttle deploy --memory-budget=warn` signale un depassement du plafond de - chevauchement et deploie quand meme. `strict` reste le defaut. Une - configuration illisible ou un `/proc/meminfo` illisible restent des erreurs - dans les deux modes : `warn` accepte un surengagement visible, pas un garde - qui n'a rien mesure. -- Pas de serialisation des services : `docker stack deploy` n'en offre pas, et - l'orchestrer dans le helper root compliquerait prune, echecs partiels et - rollback. Pas de seuil automatique non plus : le choix reste a l'operateur. - -## L'edge ne publie plus `Via: 1.1 Caddy` - -Le `reverse_proxy` de Caddy ajoute `Via: 1.1 Caddy` a chaque reponse proxifiee : -signale le 2026-10-12 dans l'onglet reseau d'example.com, l'en-tete annonce le -proxy et le protocole devant l'application sans servir aucun client. Le snippet -`shuttle_security` le supprime (`header -Via`). Une suppression est differee par -Caddy, elle retire donc aussi l'en-tete ajoute apres la reponse de l'amont ; -verifie avec caddy v2.11.7, les autres en-tetes inchanges. La preuve de route -d'`origin.go` ne lit pas `Via`. - -## Pins Caddy et registre rafraichis : caddy v2.11.7, registry 3.1.2 - -Les digests embarques pour l'edge Caddy et le registre en boucle locale -n'etaient plus ceux de `caddy:latest` et `registry:latest` : la mise a jour de -l'edge de production du 2026-10-12 l'a signale par deux `WARNING`. Les pins -passent a `caddy@sha256:f2a1290d...` (v2.11.7, la version sur laquelle le -nouveau comportement des en-tetes de `shuttle_security` a ete verifie) et a -`registry:3.1.2@sha256:ddf75434...`. Meme majeure dans les deux cas. Les pins -Redis et RabbitMQ ne changent pas ici : une montee de version d'un service a -donnees demande sa propre verification. - -## Une image d'infrastructure epinglee mais plus recente que `latest` avertit au lieu de refuser - -`setup` et `deploy` refusaient d'installer Caddy, Redis, RabbitMQ ou le registre -des que le digest epingle dans le binaire n'etait plus celui du tag stable sur -Docker Hub. Le 2026-10-12, ce refus a bloque une mise a jour urgente de l'edge -de production : le digest relu restait une release officielle et signee, seul -Docker Hub avait publie plus recent. Decision de l'operateur : c'est une alerte, -pas une barriere. La commande affiche un `WARNING` qui nomme le canal et le pin -installe, et continue avec le pin relu. Un tag stable impossible a resoudre est -traite de meme. Rafraichir les pins reste une tache de release. - -## `setup --adopt --cutover-edge` met a jour l'edge Shuttle deja en place - -Sur un hote dont 80/443 sont tenus par l'edge Shuttle lui-meme, le releve -d'adoption rapporte le conteneur `shuttle-edge_caddy` et, a cote, les processus -`docker-proxy` qui publient ses ports. Le conteneur etait bien ignore (le -redeployer est le chemin idempotent), mais `docker-proxy` etait lu comme un -ecouteur etranger impossible a restaurer, et `--cutover-edge` refusait. Constate -le 2026-10-12 sur la production demo, ce refus empechait d'appliquer le -nouveau snippet `shuttle_security`. - -Un `docker-proxy` sur un port qu'un conteneur publie aussi est desormais compte -comme la publication de ce conteneur. Un `docker-proxy` seul, sans conteneur -publie sur son port, reste refuse comme avant. - -## Un redemarrage en attente n'empeche plus `setup --adopt`, il est signale - -`shuttle setup --adopt --yes` refusait de demarrer des que l'hote portait -`/var/run/reboot-required`. Sur la production demo, le marqueur datait d'une -mise a jour du noyau par unattended-upgrades, cinq semaines plus tot, et le -refus a bloque le 2026-10-12 une simple mise a jour de l'edge Caddy. Le garde ne -protegeait rien : une adoption ne redemarre jamais sans `--allow-reboot`, et -chaque stage est protege par son checkpoint. - -Decision de l'operateur : un redemarrage en attente est une alerte, pas une -barriere. La commande affiche un `WARNING` qui nomme l'hote et le flag, puis -continue sans redemarrer. `--allow-reboot` garde exactement son sens : laisser -le run prendre le redemarrage. La ligne `pending reboot` du plan dit desormais -« warning only ». - -## L'edge ne remplace plus les en-tetes de securite que l'application envoie - -Le snippet `shuttle_security` posait `X-Content-Type-Options`, -`Referrer-Policy` et `X-Frame-Options` sans condition. Caddy ecrasait donc la -valeur de l'application : mesure le 2026-10-12 sur example.com, pro et bo, qui -envoient `X-Frame-Options: DENY` et `Referrer-Policy: no-referrer` sur leurs -routes portant un jeton, le visiteur recevait `SAMEORIGIN` et -`strict-origin-when-cross-origin`. Une application ne pouvait pas se proteger -plus que l'edge. - -Ces trois en-tetes deviennent des valeurs par defaut (`header ?Champ`) : ils ne -sont ecrits que si l'application ne les envoie pas. HSTS reste pose sans -condition, c'est une propriete du domaine. Chaque defaut a sa propre directive -`header` : dans un meme bloc, Caddy regroupe les champs `?` en une seule -condition, vraie seulement si aucun n'existe, si bien qu'une application qui -envoyait `X-Frame-Options` perdait aussi le `nosniff` par defaut (reproduit -avec caddy v2.11.7). Une application qui n'envoie rien garde exactement la -protection d'avant, et la preuve de route d'`origin.go` voit toujours ces -en-tetes. Le contenu du Caddyfile change, donc le nom de sa config Swarm : -le prochain `shuttle setup` met l'edge a jour. - -## Les binaires sont construits avec Go 1.27.2, sans les failles de la stdlib 1.27.0 - -Le gate de `scripts/release.sh` a refuse la release le 2026-10-10 : -`govulncheck` trouvait neuf vulnerabilites appelees par notre code dans la -stdlib de Go 1.27.0 (net/http, http2, crypto/tls, net/textproto, os), toutes -corrigees en 1.27.2. Les workflows epinglaient `go-version: '1.27.0'`, donc la -CI aurait publie des binaires vulnerables. Ils prennent maintenant la derniere -Go stable (`go-version: stable`), et `go.mod` declare `toolchain go1.27.2` pour -que `release.sh` et `make install` sur un poste encore en 1.27.0 telechargent -la toolchain corrigee au lieu d'echouer. Le langage reste `go 1.27`. - -## Un deploy rate sans rien promouvoir ne bloque plus le deploy suivant - -Chaque echec de `shuttle deploy` termine sa reservation en -`operation-abort`, donc en `recovery_required`, y compris quand il meurt -dans le build local de l'image avant toute promotion. Le deploy suivant de -la meme application etait alors refuse d'emblee avec `operation ... requires -recovery for deploy (target demo-console, ...); waited 0s`. Mesure dans le -journal de 198.51.100.31 : une dizaine de deploys de demo-console en -`recovered` entre le 2026-10-06 et le 2026-10-10, chaque fois par le meme -geste manuel (`operations recover --dry-run`, lecture de « tasks match -retained current digests », puis `--yes --plan-digest`) pour un plan qui -n'avait rien a faire (`completed: none`). - -Le deploy joue maintenant ce geste lui-meme, et seulement lui : quand la -reservation est refusee par un deploy non recupere de la MEME application, -il demande le plan au helper et ne l'applique que si l'observation est -`safe`, sans preuve manquante ni element non resolu, et sans aucune action -derivee (`observed.actions` vide). L'application est liee au digest observe, -que le helper re-observe sous son verrou avant de clore l'enregistrement. -Une autre application, un `helper-update`, une operation VPS ou un plan qui -toucherait l'hote restent a l'operateur : le deploy s'arrete et nomme la -commande `shuttle operations recover --dry-run`. Cote helper rien ne -change ; il suffit de mettre a jour le CLI. - -## Le superviseur d'un runner de build ne s'arrete plus sur un heartbeat lu a moitie - -La CI de `main` a echoue le 2026-10-08 sur +1.09 GiB available of 2.97 GiB`. The four application services then used about +420 MiB in total. The guard adds up ceilings, not resident sizes: on a 3 GiB +host it requires 75% of the RAM free. + +- The Swarm guard no longer counts `update_order: stop-first` services: their + old task stops before the new one starts, there are never two copies. + Compose keeps the full list, as a ceiling the host must hold. +- `shuttle deploy --memory-budget=warn` reports going over the overlap ceiling + and deploys anyway. `strict` stays the default. An unreadable configuration + or an unreadable `/proc/meminfo` stay errors in both modes: `warn` accepts a + visible overcommitment, not a guard that measured nothing. +- No serialization of services: `docker stack deploy` does not offer it, and + orchestrating it in the root helper would complicate prune, partial failures + and rollback. No automatic threshold either: the choice stays the operator's. + +## The edge no longer publishes `Via: 1.1 Caddy` + +Caddy's `reverse_proxy` adds `Via: 1.1 Caddy` to every proxied response: +reported on 2026-10-12 in example.com's network tab, the header advertises the +proxy and the protocol in front of the application without serving any client. +The `shuttle_security` snippet removes it (`header -Via`). Caddy defers a +removal, so it also removes the header added after the upstream response; +checked with caddy v2.11.7, the other headers unchanged. The route proof in +`origin.go` does not read `Via`. + +## Caddy and registry pins refreshed: caddy v2.11.7, registry 3.1.2 + +The digests embedded for the Caddy edge and the local loopback registry were no +longer those of `caddy:latest` and `registry:latest`: the production edge update +of 2026-10-12 reported it with two `WARNING`s. The pins move to +`caddy@sha256:f2a1290d...` (v2.11.7, the version on which the new +`shuttle_security` header behavior was checked) and to +`registry:3.1.2@sha256:ddf75434...`. Same major in both cases. The Redis and +RabbitMQ pins do not change here: upgrading a data service requires its own +check. + +## A pinned infrastructure image newer than `latest` warns instead of refusing + +`setup` and `deploy` refused to install Caddy, Redis, RabbitMQ or the registry +as soon as the digest pinned in the binary was no longer that of the stable tag +on Docker Hub. On 2026-10-12, that refusal blocked an urgent update of the +production edge: the digest read back was still an official, signed release; +only Docker Hub had published something newer. Operator decision: it is an +alert, not a barrier. The command prints a `WARNING` that names the channel and +the installed pin, and goes on with the pin read back. A stable tag that cannot +be resolved is handled the same way. Refreshing the pins stays a release task. + +## `setup --adopt --cutover-edge` updates the Shuttle edge already in place + +On a host whose 80/443 are held by the Shuttle edge itself, the adoption survey +reports the `shuttle-edge_caddy` container and, next to it, the `docker-proxy` +processes that publish its ports. The container was indeed ignored (redeploying +it is the idempotent path), but `docker-proxy` was read as a foreign listener +that could not be restored, and `--cutover-edge` refused. Seen on 2026-10-12 on +the demo production, that refusal kept the new `shuttle_security` snippet from +being applied. + +A `docker-proxy` on a port a container also publishes now counts as that +container's publication. A lone `docker-proxy`, with no container published on +its port, stays refused as before. + +## A pending reboot no longer stops `setup --adopt`; it is reported + +`shuttle setup --adopt --yes` refused to start as soon as the host carried +`/var/run/reboot-required`. On the demo production, the marker came from a +kernel update by unattended-upgrades five weeks earlier, and on 2026-10-12 the +refusal blocked a simple update of the Caddy edge. The guard protected nothing: +an adoption never reboots without `--allow-reboot`, and each stage is +protected by its checkpoint. + +Operator decision: a pending reboot is an alert, not a barrier. The command +prints a `WARNING` that names the host and the flag, then goes on without +rebooting. `--allow-reboot` keeps exactly its meaning: let the run take the +reboot. The plan's `pending reboot` line now says "warning only". + +## The edge no longer replaces the security headers the application sends + +The `shuttle_security` snippet set `X-Content-Type-Options`, +`Referrer-Policy` and `X-Frame-Options` unconditionally. Caddy therefore +overwrote the application's value: measured on 2026-10-12 on example.com, pro +and bo, which send `X-Frame-Options: DENY` and `Referrer-Policy: no-referrer` +on their token-carrying routes, the visitor received `SAMEORIGIN` and +`strict-origin-when-cross-origin`. An application could not protect itself more +than the edge. + +These three headers become defaults (`header ?Field`): they are written only if +the application does not send them. HSTS stays set unconditionally; it is a +property of the domain. Each default has its own `header` directive: in a +single block, Caddy groups the `?` fields into a single condition, true only if +none exists, so an application that sent `X-Frame-Options` also lost the +default `nosniff` (reproduced with caddy v2.11.7). An application that sends +nothing keeps exactly the previous protection, and the route proof in +`origin.go` still sees these headers. The Caddyfile content changes, and so +does the name of its Swarm config: the next `shuttle setup` updates the edge. + +## Binaries are built with Go 1.27.2, without the flaws of the 1.27.0 stdlib + +The `scripts/release.sh` gate refused the release on 2026-10-10: `govulncheck` +found nine vulnerabilities called by our code in the Go 1.27.0 stdlib +(net/http, http2, crypto/tls, net/textproto, os), all fixed in 1.27.2. The +workflows pinned `go-version: '1.27.0'`, so CI would have published vulnerable +binaries. They now take the latest stable Go (`go-version: stable`), and +`go.mod` declares `toolchain go1.27.2` so that `release.sh` and `make install` +on a workstation still on 1.27.0 download the fixed toolchain instead of +failing. The language stays `go 1.27`. + +## A failed deploy that promoted nothing no longer blocks the next deploy + +Every `shuttle deploy` failure ends its reservation with `operation-abort`, +therefore in `recovery_required`, even when it dies in the local image build +before any promotion. The next deploy of the same application was then refused +outright with `operation ... requires recovery for deploy (target +demo-console, ...); waited 0s`. Measured in the 198.51.100.31 journal: about +ten demo-console deploys `recovered` between 2026-10-06 and 2026-10-10, each +time by the same manual gesture (`operations recover --dry-run`, reading "tasks +match retained current digests", then `--yes --plan-digest`) for a plan that +had nothing to do (`completed: none`). + +The deploy now performs that gesture itself, and only that one: when the +reservation is refused by an unrecovered deploy of the SAME application, it +asks the helper for the plan and applies it only if the observation is `safe`, +with no missing proof or unresolved item, and no derived action +(`observed.actions` empty). The apply is tied to the observed digest, which the +helper observes again under its lock before closing the record. Another +application, a `helper-update`, a VPS operation or a plan that would touch the +host stay with the operator: the deploy stops and names the command +`shuttle operations recover --dry-run`. Nothing changes on the helper +side; updating the CLI is enough. + +## A build runner's supervisor no longer stops on a half-read heartbeat + +`main` CI failed on 2026-10-08 on `TestRunnerSupervisorCleansItsLeaseAfterControlDisconnect` (`exit status -124`), alors que le meme commit passait sur `develop` et sur macOS. Le -superviseur ecrivait le heartbeat en place (`printf ... > heartbeat`), et sa -boucle de surveillance relit ce fichier chaque seconde depuis un autre -processus. `>` vide le fichier avant d'ecrire : une lecture tombee entre les -deux voyait une valeur vide et terminait le superviseur en `exit 124`, comme -si le client s'etait tu. Sur un runner, c'est un build en cours qui est -arrete. Mesure sous `dash` : 20 lectures vides sur 3848 en ecriture en place, -0 sur 4852 avec un renommage. - -Le heartbeat est maintenant ecrit dans `heartbeat.next` puis renomme, ce qui -est atomique dans un meme repertoire. Rien ne change cote configuration ni -cote protocole ; le correctif vit dans la commande envoyee au runner par le -CLI, donc il suffit de mettre a jour le CLI. - -## Une note d'operateur dans le journal ne bloque plus `shuttle helper update` - -Mesure le 2026-10-08 sur l'hote de demo-console (198.51.100.31) : chaque -`shuttle helper update` signe echouait avant tout remplacement avec -`read operation writer proof: json: unknown field "note"`, et laissait une -reservation `helper-update` en `recovery_required` qui bloquait l'hote. Trois -tentatives de septembre avaient deja fini closes a la main. La cause etait -un enregistrement de deploy clos a la main le 2026-09-15, avec un champ -`note` ajoute sur un evenement. Le coordinateur lit ce fichier sans -probleme, mais la verification prealable de la mise a jour relit tout le -journal en mode strict et le refusait, quelle que soit la version du helper -installe (reproduit avec v0.0.27). - -`Event.note` est maintenant declare. Shuttle n'en ecrit jamais : le champ -existe pour que les lecteurs stricts acceptent une annotation d'operateur, -comme `note` sur l'etat des writers depuis septembre. Tout autre champ -inconnu reste refuse. Rejoue sur les 45 enregistrements reels de l'hote : tous -passent. Un hote dont le helper installe porte deja le defaut ne peut pas se -mettre a jour par le chemin signe : il faut une installation root unique du -nouveau binaire, puis `shuttle helper update` refonctionne. - -## Un balayage du registre rate apres la promotion ne bloque plus l'application - -Mesure le 2026-10-08 sur `web` (operation `3231ee16`) : `stack-apply` -avait converge, la route etait chargee, `web_web` tournait 1/1 sur -l'image de `current.yml`. Puis un seul `DELETE` d'un manifeste perime du -registre local a recu `connection reset by peer`. La phase a echoue comme -n'importe quelle panne, l'operation est passee `recovery_required`, et chaque -`shuttle deploy` suivant etait refuse aussitot. `operations recover` ne -pouvait pas la clore non plus : son plan voulait redeployer la release -d'avant, puis refusait avec `unknown retained current artifact is not -authorized`, parce que le `current.yml` ecrit par l'operation n'etait pas dans -son baseline. `api` avait deja ete clos a la main le 2026-10-05 pour la -meme raison ; `web` aussi. - -Deux corrections, une par cause. - -Le balayage qui suit une promotion (manifestes du registre, collecteur, cap du -cache, images locales) est du menage : chaque passage recalcule son plan a -partir des stacks retenues et supprime les memes restes. Son echec termine -donc la phase avec un avertissement (`warning` dans la phase du journal, -`shuttle-root warning:` affiche par le CLI) au lieu de l'echouer, comme le -report du collecteur quand une autre operation est active. La ligne est -tracee dans `sweepAfterRootPromotion` : le seul echec qui exige encore la -recovery est un registre que le collecteur a arrete sans pouvoir prouver -qu'il est reparti, car chaque pull suivant echouerait. La convergence Swarm -n'en fait pas partie : elle est prouvee avant le balayage, et une stack qui ne -converge pas echoue sa phase comme avant. - -Le balayage qui precede un deploiement (`stack-reclaim`, sous l'operation du -deploy) suit la meme regle : une image que le daemon refuse de retirer, une -liste trop lente ou le verrou partage trop long termine la phase avec un -avertissement, car il laisse l'hote comme il l'a trouve. Le CLI l'affiche, et -seuls l'identite et les controles avant le balayage echouent encore. - -`stack-apply` journalise maintenant le digest complet du `current.yml` qu'il -va ecrire (`current_manifest_sha256`), avant le fichier, et ne l'ecrit pas si -le journal echoue. La recovery d'un `deploy` accepte un `current.yml` dont le -digest est exactement celui que cette operation a journalise, le selectionne -comme cible, compare les taches en service a ses digests et ne le redeploie -que s'ils different. Un `current.yml` non journalise, ou journalise avec un -autre digest, reste inconnu et refuse : la regle fail-closed ne change pas. - -Compatibilite : les deux champs sont optionnels (`omitempty`), les anciens -enregistrements se lisent et se recuperent comme avant, et un ancien helper -ignore les nouveaux champs. Les deux corrections vivent dans le helper : -elles ne s'appliquent sur un VPS qu'apres `shuttle helper update`, a lancer -hors de toute operation active. Le protocole signe ne change pas. - -## Un nettoyage de cache de build rate sur le poste ne bloque plus les deploiements suivants - -Apres une promotion verifiee, le client lance `docker buildx prune` sur la -machine de l'operateur. Cette commande ne touche rien sur le VPS. Quand elle -echouait (demon Docker redemarre, builder deja supprime), `shuttle deploy` -marquait le nettoyage comme echoue et terminait l'operation par un abandon : -le journal d'operations de l'hote passait en `recovery_required`, et chaque -deploiement suivant de l'application etait refuse avec "requires recovery -for deploy" jusqu'a ce qu'on edite a la main `/var/lib/shuttle/operations`. - -Un cache local qui ne se vide pas ne dit rien sur la release, qui est deja -promue et verifiee. L'echec devient un avertissement qui donne la commande -pour recuperer l'espace (`docker buildx prune --builder shuttle-`), et -le deploiement se termine en succes. Le mode compose, qui n'utilise pas le -journal, suit la meme regle. Les echecs des ecrivains (tunnel du registre, -builder distant, fermeture des ecritures) gardent leur comportement : eux -peuvent encore toucher l'hote, donc ils abandonnent toujours l'operation. -Rien ne change dans la configuration. - -## Un build Next.js ne televerse plus a chaque deploiement un cache que personne ne relit - -Le build Swarm exporte son cache vers le registre du VPS en `mode=max`, pour -qu'un etage de dependances compile reste restaurable apres une eviction du -cache local. Sur un Dockerfile Next.js, l'etage intermediaire commence par -`COPY . .` puis `next build` : il change a chaque commit, et son export -(`node_modules`, `.next`) n'est jamais relu. Mesure sur web : 114 s -d'export par deploiement, dont 86 s a compresser cet etage et 28 s a -l'envoyer dans le tunnel, sur un build de 4 min 13. - -`deploy.build_cache_mode` choisit le mode de cet export : `max` (le defaut, -y compris quand le champ est absent) ou `min`, qui n'exporte que les couches -de l'image finale. Avec `min` sur le meme projet, l'export tombe a 3 s et le -deploiement complet passe de 5 min 10 a 2 min 06 (avec un cache de -compilation conserve cote Dockerfile). Les couches de l'image partent -toujours avec l'export, donc le push qui suit reste instantane. - -Rien ne change pour une configuration qui ne nomme pas le champ : elle se -charge a l'identique et exporte toujours en `mode=max`. Une valeur autre que -`max` ou `min` est refusee a la validation. - -## Un VPS dont le reseau est sous 1500 de MTU ne perd plus les gros paquets des conteneurs - -Docker cree `docker_gwbridge` a 1500. Sur Google Cloud (1460), un cloud -VXLAN (1450) ou une VM dans Kubernetes (1400), l'interface de la route par -defaut ne porte pas une trame de 1500. Les taches Swarm et les ports en mode -host (le 80/443 de l'edge) sortent par ce bridge : la poignee de main TCP -passe, puis chaque segment plein est perdu. L'ordre ACME de Caddy reste -pendu et les appels sortants d'une application expirent, sans rien dans les -logs. FrankenDeploy a rencontre la meme panne sur `docker0` +124`), while the same commit passed on `develop` and on macOS. The supervisor +wrote the heartbeat in place (`printf ... > heartbeat`), and its watch loop +reads that file every second from another process. `>` empties the file before +writing: a read that fell between the two saw an empty value and ended the +supervisor with `exit 124`, as if the client had gone silent. On a runner, that +stops a build in progress. Measured under `dash`: 20 empty reads out of 3848 +with in-place writes, 0 out of 4852 with a rename. + +The heartbeat is now written to `heartbeat.next` then renamed, which is atomic +within a directory. Nothing changes in configuration or protocol; the fix lives +in the command the CLI sends to the runner, so updating the CLI is enough. + +## An operator note in the journal no longer blocks `shuttle helper update` + +Measured on 2026-10-08 on the demo-console host (198.51.100.31): every signed +`shuttle helper update` failed before any replacement with +`read operation writer proof: json: unknown field "note"`, and left a +`helper-update` reservation in `recovery_required` that blocked the host. Three +attempts in September had already ended closed by hand. The cause was a deploy +record closed by hand on 2026-09-15, with a `note` field added to an event. The +coordinator reads that file without trouble, but the update's precheck reads +the whole journal again in strict mode and refused it, whatever the installed +helper version (reproduced with v0.0.27). + +`Event.note` is now declared. Shuttle never writes it: the field exists so that +strict readers accept an operator annotation, like `note` on the writers state +since September. Any other unknown field stays refused. Replayed on the host's +45 real records: all pass. A host whose installed helper already carries the +defect cannot update through the signed path: it needs a single root +installation of the new binary, then `shuttle helper update` works again. + +## A failed registry sweep after promotion no longer blocks the application + +Measured on 2026-10-08 on `web` (operation `3231ee16`): `stack-apply` had +converged, the route was loaded, `web_web` ran 1/1 on the `current.yml` image. +Then a single `DELETE` of a stale manifest in the local registry got +`connection reset by peer`. The phase failed like any other failure, the +operation went `recovery_required`, and every following `shuttle deploy` was +refused at once. `operations recover` could not close it either: its plan +wanted to redeploy the previous release, then refused with `unknown retained +current artifact is not authorized`, because the `current.yml` the operation +wrote was not in its baseline. `api` had already been closed by hand on +2026-10-05 for the same reason; `web` too. + +Two fixes, one per cause. + +The sweep that follows a promotion (registry manifests, collector, cache cap, +local images) is housekeeping: each pass recomputes its plan from the kept +stacks and deletes the same leftovers. Its failure therefore ends the phase +with a warning (`warning` in the journal phase, `shuttle-root warning:` shown +by the CLI) instead of failing it, like the collector deferral when another +operation is active. The line is drawn in `sweepAfterRootPromotion`: the only +failure that still requires recovery is a registry the collector stopped +without being able to prove it came back, because every later pull would fail. +Swarm convergence is not part of it: it is proven before the sweep, and a stack +that does not converge fails its phase as before. + +The sweep that precedes a deploy (`stack-reclaim`, under the deploy's +operation) follows the same rule: an image the daemon refuses to remove, a list +that is too slow or a shared lock held too long ends the phase with a warning, +because it leaves the host as it found it. The CLI shows it, and only the +identity and the checks before the sweep still fail. + +`stack-apply` now journals the full digest of the `current.yml` it is about to +write (`current_manifest_sha256`), before the file, and does not write it if the +journal fails. Recovery of a `deploy` accepts a `current.yml` whose digest is +exactly the one this operation journaled, selects it as the target, compares +the running tasks with its digests and redeploys it only if they differ. A +`current.yml` that is not journaled, or journaled with another digest, stays +unknown and refused: the fail-closed rule does not change. + +Compatibility: both fields are optional (`omitempty`), old records read and +recover as before, and an old helper ignores the new fields. Both fixes live in +the helper: they apply on a VPS only after `shuttle helper update`, to be run +outside any active operation. The signed protocol does not change. + +## A failed build cache cleanup on the workstation no longer blocks later deploys + +After a verified promotion, the client runs `docker buildx prune` on the +operator's machine. That command touches nothing on the VPS. When it failed +(Docker daemon restarted, builder already deleted), `shuttle deploy` marked the +cleanup as failed and ended the operation with an abort: the host's operations +journal went into `recovery_required`, and every following deploy of the +application was refused with "requires recovery for deploy" until someone +edited `/var/lib/shuttle/operations` by hand. + +A local cache that does not empty says nothing about the release, which is +already promoted and verified. The failure becomes a warning that gives the +command to reclaim the space (`docker buildx prune --builder shuttle-`), +and the deploy ends successfully. Compose mode, which does not use the +journal, follows the same rule. Writer failures (registry tunnel, remote +builder, closing the writes) keep their behavior: those can still touch the +host, so they still abort the operation. Nothing changes in the configuration. + +## A Next.js build no longer uploads, on every deploy, a cache nobody reads again + +The Swarm build exports its cache to the VPS registry with `mode=max`, so that +a compiled dependency stage stays restorable after the local cache is evicted. +On a Next.js Dockerfile, the intermediate stage starts with `COPY . .` then +`next build`: it changes on every commit, and its export (`node_modules`, +`.next`) is never read again. Measured on web: 114 s of export per deploy, 86 s +of it compressing that stage and 28 s sending it through the tunnel, for a +4 min 13 build. + +`deploy.build_cache_mode` picks the mode of that export: `max` (the default, +including when the field is absent) or `min`, which exports only the final +image's layers. With `min` on the same project, the export drops to 3 s and the +full deploy goes from 5 min 10 to 2 min 06 (with a compilation cache kept on +the Dockerfile side). The image layers still leave with the export, so the push +that follows stays instant. + +Nothing changes for a configuration that does not name the field: it loads +identically and still exports with `mode=max`. A value other than `max` or +`min` is refused at validation. + +## A VPS whose network is below 1500 MTU no longer loses containers' large packets + +Docker creates `docker_gwbridge` at 1500. On Google Cloud (1460), a VXLAN cloud +(1450) or a VM inside Kubernetes (1400), the default route interface does not +carry a 1500 frame. Swarm tasks and host-mode ports (the edge's 80/443) leave +through that bridge: the TCP handshake goes through, then every full segment is +lost. Caddy's ACME order hangs and an application's outgoing calls time out, +with nothing in the logs. FrankenDeploy hit the same failure on `docker0` (yoanbernabeu/frankendeploy#112). -`20-docker` lit le MTU de l'interface de la route par defaut et, s'il est -sous 1500, cree `docker_gwbridge` a ce MTU avant `swarm init`, avec les -options documentees par Docker. Un bridge deja present appartient a un -Swarm actif et le recreer impose de quitter le Swarm : setup n'y touche -pas, et le nouveau controle `doctor` `docker.gateway_mtu` signale l'ecart -avec la marche a suivre. A 1500 ou plus, ou si le MTU est illisible, rien -n'est cree. Le golden de `20-docker` change donc de texte, pas de -comportement sur un reseau a 1500. - -## Un secret ignore par Git n'entre plus dans une image par le contexte de build - -`.gitignore` et `.dockerignore` sont deux listes. Un `.env.local`, une cle -ou un dump SQL cache a Git part quand meme vers BuildKit si `.dockerignore` -ne le nomme pas, et un `COPY . .` le grave dans une couche poussee vers le -registre du VPS et gardee pour chaque rollback. Avec un builder distant, le -contexte traverse aussi SSH. FrankenDeploy a corrige la meme fuite en -n'envoyant que ce que Git suit (yoanbernabeu/frankendeploy#115). - -Shuttle garde le contexte tel que Docker le definit, parce que des assets -generes et des fichiers vendored y vivent legitimement, et refuse le seul -cas jamais voulu : un fichier ignore par Git, dont le nom dit secret -(`.env*` hors modeles, `*.pem`, `*.key`, `*.p12`, `*.pfx`, cles SSH, -`*.sql`, `*.dump`), que `.dockerignore` laisse passer. Le refus nomme les -fichiers et la correction. Les fichiers suivis par Git (choix explicite, -deja audite par `doctor`), `node_modules` et `vendor`, et un contexte hors -Git ne sont pas concernes. Le `.dockerignore` genere par `init` exclut deja -`.env` et `.env.*` : un projet initialise par Shuttle n'est pas bloque. - -## init declare APP_SECRET pour Symfony comme APP_KEY pour Laravel - -Symfony demarre sans `APP_SECRET`, ce qui est pire qu'un refus : CSRF, -URLs signees, remember-me et limitation de login echouent plus tard, a la -premiere requete qui en a besoin. Laravel avait deja son `APP_KEY` declare -par `init`. Symfony n'avait rien, donc le deploy ne pouvait pas refuser -un secret que la configuration ne demandait pas. - -`init --preset symfony` declare maintenant `APP_SECRET`, sur le backend -host, expose en variable d'environnement, comme Laravel, et le resume -indique de le creer dans le fichier du VPS. La resolution existante -refuse alors un deploy ou il manque. Les configurations existantes ne -changent pas. - -## Chaque tag publie ses binaires signes dans une GitHub Release - -Depuis le retrait du site, un tag ne produisait qu'un artefact de workflow, -qui expire et se recupere mal. Le workflow attache maintenant les memes -fichiers (binaires, `checksums.txt`, `latest.json` signe) a une GitHub -Release sur le tag, recuperable par `gh release download`. Le depot est -prive : ce n'est pas un canal public, et `shuttle update` n'a toujours pas -d'origine par defaut (SHU-13). Un tap Homebrew ou un script d'installation, -comme FrankenDeploy, demande des binaires telechargeables par tous, ce qui -reste une decision produit. - -## Un poste qui redemarre ne bloque plus les deploiements d'une application - -Un writer `client_origin` se clot par un fence pidfd sur la machine et dans -le boot qui l'ont lance. Si le poste redemarre avant que le CLI ait clos son -operation (capot ferme, crash, coupure), `operations writers` refusait : -`client origin machine or boot changed; refusing local PID fencing`. -L'operation restait `recovery_required` sans issue, et `conflict()` refusait -toute nouvelle reservation de l'application. Mesure le 2026-10-05 sur -`api` : un deploy du 03-10 avait fini `stack-apply` et converge, le -poste a redemarre, et chaque `make deploy` suivant etait refuse. - -La fin d'un boot est une preuve plus forte qu'un fence : aucun processus -d'un boot precedent ne peut exister. Meme machine-id et boot different -produisent donc un recu sans membre observe -(`EndedBootLocalReceipt`), sans sonder ni signaler aucun PID, puisque ces -numeros designent desormais d'autres processus. Le hash de preuve est celui -qu'un fence pidfd aurait produit sur un groupe deja eteint : le helper du VPS -le verifie sans mise a jour. Une autre machine reste refusee. - -Le residuel note ici le 2026-10-05 (`operations recover` d'un `deploy` -interrompu apres `stack-apply` bloque sur `unknown retained current artifact -is not authorized`) est corrige plus haut, dans l'entree "Un balayage du registre rate -apres la promotion ne bloque plus l'application". - -## Shuttle passe sous Apache-2.0 - -Le CLI, le helper et les templates sont Apache-2.0, installables sans condition. -Le site de distribution est retire depuis le 2026-09-14. -ADR : `docs/adr/0001-apache-2.0.md`. - -## Les .env de production ne doivent plus passer par le poste - -Copier un `.env` de production sur un laptop pour que Shuttle le renvoie au -VPS d'ou il vient est un mouvement sans destination, et une copie de plus -d'ou il peut fuir (disque, agent, zip, journal CI). Le backend -`secrets.backend: host` existait deja. Il n'etait pas le chemin que `init` -ecrivait, et aucun agent n'avait d'instruction pour s'y tenir. - -`shuttle init` ecrit maintenant ce backend des qu'une configuration generee -declare un secret applicatif (Laravel `APP_KEY`), avec -`secrets.host.env_file` a `/opt//.env` sur le serveur. Redis et RabbitMQ -restent generes sur l'hote. Un projet sans secret applicatif (Hono plus -Redis seulement) garde `backend: swarm`, parce que le backend host exige au -moins une cle applicative. `.env.example` decrit le schema et dit de ne pas -le copier en local pour un deploy. `.gitignore` ignore `.env` et `.env.*`. - -Le skill `shuttle-host-env` est embarque dans le binaire. `shuttle --install -skills` et `shuttle skills install` le copient dans tous les harness locaux -(Claude, Grok, Cursor, Codex, OpenCode, Agents), au niveau utilisateur (tous -les projets du poste) et au niveau projet (les collegues). `init` l'installe -deja dans le checkout genere. Relancer l'install apres une mise a jour -rafraichit le texte. - -Rien ne change pour une configuration existante qui ne nomme pas de backend : -`Load` continue de defaulter a `swarm`. `shuttle secrets set` reste le -chemin de ce store. - -## Le site de vente et sa distribution sont retires - -Le 14-09-2026, `releases.example.com` servait encore une image web du -15-08 qui retirait `key_id` et `signature` du manifeste public : `shuttle update` -refusait donc toute release signee. GitHub Actions ne demarrait plus aucun job, -faute de paiement, et la mise a niveau du site demandait sept migrations sur la -base de production, un nouveau secret injecte par le Caddy partage et une -decision sur la vente. Le site est retire plutot que maintenu a moitie. - -Sont supprimes `web/`, `deploy/`, les scripts de deploiement, de sauvegarde, de -restauration et Stripe avec leurs contrats, les jobs CI `web` et `web-image`, -l'audit Bun et l'envoi des releases vers le VPS. Sur le serveur, le service, sa -base, ses secrets, ses images et le repertoire de releases ont ete effaces. - -Le workflow de release passe toujours le gate Go, construit et signe les -binaires, et les garde comme artefact du workflow au lieu de les envoyer vers un -repertoire qui n'existe plus. - -La CLI n'a plus d'origine de release par defaut. Garder l'adresse du site -retire faisait appeler un hote mort par la verification de mise a jour de -chaque commande, et `shuttle update` echouait sur une erreur de -reseau qui n'indiquait pas la vraie cause. Sans `SHUTTLE_SITE_URL`, la -verification en arriere-plan ne fait plus aucun appel, et `shuttle update` -s'arrete avec "no release distribution channel is -configured". Avec `SHUTTLE_SITE_URL`, le comportement signe et epingle sur -l'origine est inchange, et `shuttle update --recover` fonctionne toujours sans -origine. - -## Deux applications du meme VPS ne pouvaient pas deployer en meme temps - -Le 14-09-2026, `make deploy` de `api` a echoue en quelques secondes : -`operation ... is active for deploy (target web, age 49s); waited 0s`. Rien -n'etait casse. `web` deployait sur le meme noeud depuis 49 secondes, et un -deploy etait une operation globale du VPS, reservee avant le build et refusee -sans attente. Pire, le premigrate d'`api` avait deja migre la base : le -schema etait en avance sur le code jusqu'a la relance manuelle. - -Deploy, rollback et run sont maintenant des operations d'application. Elles -excluent une operation globale et une autre mutation de la meme application, -rien d'autre. Backup, restore, GC du registry, cache-prune, mise a jour du -helper, reboot et destroy restent globaux. La phase d'une application tient -`/run/shuttle-root.app-.lock` pendant son travail Docker et ne prend -`/run/shuttle-root.lock` que pour ecrire son journal : c'etait ce verrou, tenu -pendant tout `docker stack deploy`, qui aurait remis les promotions en file -meme avec une regle de conflit assouplie. - -Ce que les applications partagent reste serialise sur -`/run/shuttle-shared.lock` : l'ecriture du fragment Caddy et le reload du bord, -les balayages du registry et du magasin d'images. Le GC du registry ne tourne -que si son operation est seule sur l'hote : il arrete le registry et supprime -tout blob qu'aucun manifest ne reference, c'est-a-dire aussi les couches qu'une -autre application est en train de pousser. Sinon il est differe et journalise, -sans echec ; les manifests perimes sont deja supprimes et la prochaine -promotion seule recupere leurs blobs. Une reprise est refusee tant qu'une autre -operation est vivante, parce qu'elle redemarre le registry. - -Cote client, un conflit avec une operation vivante est attendu jusqu'a dix -minutes au lieu d'echouer ; un conflit avec une operation `recovery_required` -echoue tout de suite, avec un message distinct (`requires recovery for`), -puisque seule une reprise peut le lever. - -Compatibilite : un journal ecrit par un ancien helper porte `scope: global` sur -ses deploys. Il reste lisible et un deploy legacy encore vivant continue -d'exclure tout le monde. Le changement n'agit qu'apres `shuttle helper update` -sur chaque VPS, a faire hors de toute operation active. - -## Le binaire macOS ne compilait plus depuis le journal des opérations - -`make install` sur un Mac échouait avec `undefined: jsonState`, puis -`undefined: reserveRootOperation`, et la même compilation darwin du workflow de -release aurait cassé. Les deux fonctions n'existaient que dans des fichiers -`//go:build linux`, alors que du code compilé partout les appelait. La CI ne -lance `go vet` et `go test` que sous Linux, donc rien ne l'a signalé. -`jsonState` est déplacée dans `store.go`, sans build tag, parce que les deux -implémentations de `writeStateAt` s'en servent. `reserveRootOperation` reçoit -sous macOS le même stub que les autres actions du helper root, qui refuse avec -« shuttle-root is supported only on Linux ». Le comportement sous Linux ne -change pas : `go vet ./...` passe pour darwin et pour `GOOS=linux`. - -## Un VPS en panne ne se voyait qu'en relancant doctor a la main - -Rien ne surveillait le VPS entre deux commandes : un service arrete, un disque -plein, une sauvegarde perimee ou un certificat proche de l'expiration restaient -silencieux. `monitoring.enabled` installe maintenant un timer systemd par -application (`shuttle monitoring install|remove`, idempotents) qui controle les -services Swarm, Docker, Caddy, le registry loopback, PostgreSQL natif, Redis et -RabbitMQ seulement s'ils sont configures, l'espace et les inodes des donnees, -des images, du cache et des sauvegardes, la fraicheur des sauvegardes, TLS et -les derives SSH, UFW, DOCKER-USER et fail2ban, en lecture seule. Les rapports -dates `shuttle.monitoring/v1` distinguent sain, degrade, indisponible et non -applicable ; un controle expire ou en timeout n'est jamais sain. - -Les incidents et retablissements passent par un canal HTTPS explicite, avec -temporisation, deduplication, retries bornes et journal des echecs de livraison. -La recette a coupe le canal pendant une panne applicative : l'incident est reste -en attente puis a ete livre au retour du canal, et le retablissement une seule -fois. La sonde `shuttle monitoring external`, lancee depuis la VM 232, a detecte -la meme panne independamment du VPS. Une maintenance declaree est bornee a sept -jours et ne supprime pas l'historique ; une fenetre illisible n'est jamais -consideree comme levee. Aucun controle ne purge ni ne modifie une regle reseau : -les 203 fichiers de securite controles sont restes identiques. Le monitoring est -opt-in, une configuration sans la cle ne change rien. - -La recette a aussi corrige deux faux diagnostics. Un fichier secret de webhook -sous `/etc/shuttle`, pourtant documente, etait refuse parce que son dossier -parent etait tenu a la regle des dossiers d'etat prives : le canal apparaissait -indisponible sans explication. Et un VPS voyait ses regles publiques 22/tcp, -80/tcp et 443/tcp signalees comme inattendues a chaque cycle, alors que doctor -ne les signalait pas : la configuration installee ne reprenait ni le port SSH ni -`access.allowed_public_tcp_ports` du projet, et le runtime n'a que cette copie. -Elle les reprend maintenant, et une valeur explicite sous `monitoring.security` -reste prioritaire. - -## Deux commandes pouvaient muter le meme VPS et une reprise ne laissait aucune trace - -Un deploy, un rollback, une sauvegarde, un nettoyage du registry, une mise a jour -du helper ou un reboot pouvaient se chevaucher, et un echec au milieu ne laissait -que le verrou libre. Chaque operation est maintenant reservee dans un journal -persistant `/var/lib/shuttle/operations` avec identifiant, phases, resultat et -actions de reprise, sans secret. La recette a lance pendant un deploy actif un -deploy d'une autre application, une mise a jour du helper, un reboot et un -rollback : tous ont ete refuses en nommant l'operation active, sa cible et son -age. Le GC du registry a tourne pendant ce deploy et le rollback suivant a -retrouve le digest precedent. - -Une operation interrompue reste `recovery_required` meme verrou libre. -`shuttle operations writers` puis `shuttle operations recover` montrent l'etat -observe et les actions en simulation, et n'appliquent qu'avec le digest exact ; -un digest perime est refuse. La recette a repris ainsi un deploy reel bloque par -une image tenue par un conteneur arrete, et a revele quatre defauts corriges ici : -le programme de lecture des writers refusait tout identifiant, le superviseur du -builder SSH ecrivait ses recus en 0664 sous umask 0002, le nettoyage echouait sur -une image encore referencee au lieu de la conserver, et la migration du helper -refusait tout journal moderne a cause du champ `revision`, ce qui bloquait toute -mise a jour signee. La mise a jour suivante a revele deux autres impasses : la -migration refusait le dossier `baselines` que chaque deploy coordonne cree, et -une reservation `helper-update` echouee avant tout remplacement ne pouvait plus -etre reprise, bloquant toutes les operations globales. La migration accepte -maintenant ce dossier prive, et la reprise reconnait une mise a jour qui n'a -jamais remplace le helper. Un dernier defaut rendait pourtant toute mise a jour -impossible apres un deploy coordonne : le binaire candidat, lance par le helper -installe pour se sonder, relisait le journal sans lecteur d'inventaire writers. -Des qu'un inventaire ferme existait, il refusait dans son `init` et le helper -installe ne rapportait que « replacement binary does not expose the shuttle-root -interface ». La reproduction manuelle passait parce qu'elle ne lancait pas le -candidat depuis le dossier de staging, seul cas ou cette sonde s'active. Le -candidat et la reprise d'une migration lisent maintenant les inventaires comme -le helper parent. Un helper installe avant ces correctifs ne peut pas les -recevoir seul : sur le VPS de recette, des corrections root consignees ont -marque les reservations echouees `failed`, puis le helper corrige a ete installe -une fois hors flux signe. Il a ensuite repris par plan signe la derniere -reservation bloquee, et une mise a jour signee avec trois inventaires writers -presents a reussi. - -## Builder SSH dedie avec cache persistant et arret du daemon - -`build.runner: "ssh"` permet de compiler sur une VM ou un LXC de build distinct -sans deplacer le registre loopback du VPS. L'identite SSH est verifiee, le tunnel -part du builder et les images deployees restent identifiees par digest. Le mode -local reste le defaut quand la cle est absente. - -La recette sur la VM PVE 232 a revele deux ecarts de transport reel et un daemon -qui survivait a la perte du client. Le wrapper accepte maintenant les arguments -OpenSSH emis par Docker, le superviseur conserve son entree de controle et il -arrete les conteneurs identifies de son run. Apres SIGKILL du client pendant un -build, le daemon s'arrete en 15 secondes ; le volume de cache est conserve. -Le controle SIGINT a aussi revele qu'un second appel a Close pouvait revenir -avant la fin du nettoyage lance par le gestionnaire de signal. Les appels -concurrents attendent maintenant le meme resultat de fermeture ; SIGINT et -SIGTERM ont ete verifies avec daemon arrete, tunnel ferme et cache conserve. -Les mauvaises cles, empreintes et cibles, ainsi qu'un port de tunnel occupe, -sont refuses sans bascule vers le poste local. +`20-docker` reads the MTU of the default route interface and, if it is below +1500, creates `docker_gwbridge` at that MTU before `swarm init`, with the +options Docker documents. An existing bridge belongs to an active Swarm and +recreating it requires leaving the Swarm: setup does not touch it, and the new +`doctor` check `docker.gateway_mtu` reports the gap with the steps to follow. +At 1500 or more, or if the MTU is unreadable, nothing is created. The +`20-docker` golden therefore changes its text, not its behavior on a 1500 +network. + +## A secret ignored by Git no longer enters an image through the build context + +`.gitignore` and `.dockerignore` are two lists. A `.env.local`, a key or an SQL +dump hidden from Git still goes to BuildKit if `.dockerignore` does not name +it, and a `COPY . .` burns it into a layer pushed to the VPS registry and kept +for every rollback. With a remote builder, the context also crosses SSH. +FrankenDeploy fixed the same leak by sending only what Git tracks +(yoanbernabeu/frankendeploy#115). + +Shuttle keeps the context as Docker defines it, because generated assets and +vendored files legitimately live there, and refuses the one case nobody ever +wants: a file ignored by Git, whose name says secret (`.env*` except templates, +`*.pem`, `*.key`, `*.p12`, `*.pfx`, SSH keys, `*.sql`, `*.dump`), that +`.dockerignore` lets through. The refusal names the files and the fix. Files +tracked by Git (an explicit choice, already audited by `doctor`), +`node_modules` and `vendor`, and a context outside Git are not affected. The +`.dockerignore` generated by `init` already excludes `.env` and `.env.*`: a +project initialized by Shuttle is not blocked. + +## init declares APP_SECRET for Symfony like APP_KEY for Laravel + +Symfony starts without `APP_SECRET`, which is worse than a refusal: CSRF, +signed URLs, remember-me and login throttling fail later, at the first request +that needs it. Laravel already had its `APP_KEY` declared by `init`. Symfony +had nothing, so the deploy could not refuse a secret the configuration did not +ask for. + +`init --preset symfony` now declares `APP_SECRET`, on the host backend, exposed +as an environment variable, like Laravel, and the summary says to create it in +the VPS file. The existing resolution then refuses a deploy where it is +missing. Existing configurations do not change. + +## Each tag publishes its signed binaries in a GitHub Release + +Since the site was retired, a tag only produced a workflow artifact, which +expires and is hard to retrieve. The workflow now attaches the same files +(binaries, `checksums.txt`, signed `latest.json`) to a GitHub Release on the +tag, retrievable with `gh release download`. The repository is private: it is +not a public channel, and `shuttle update` still has no default origin +(SHU-13). A Homebrew tap or an install script, like FrankenDeploy's, requires +binaries anyone can download, which remains a product decision. + +## A workstation that reboots no longer blocks an application's deploys + +A `client_origin` writer is closed by a pidfd fence on the machine and in the +boot that started it. If the workstation reboots before the CLI has closed its +operation (lid closed, crash, power cut), `operations writers` refused: +`client origin machine or boot changed; refusing local PID fencing`. The +operation stayed `recovery_required` with no way out, and `conflict()` refused +any new reservation for the application. Measured on 2026-10-05 on `api`: a +deploy of 03-10 had finished `stack-apply` and converged, the workstation +rebooted, and every following `make deploy` was refused. + +The end of a boot is a stronger proof than a fence: no process of a previous +boot can exist. The same machine-id with a different boot therefore produces a +receipt with no observed member (`EndedBootLocalReceipt`), without probing or +signaling any PID, since those numbers now point to other processes. The proof +hash is the one a pidfd fence would have produced on an already dead group: the +VPS helper verifies it without an update. Another machine stays refused. + +The residual noted here on 2026-10-05 (`operations recover` of a `deploy` +interrupted after `stack-apply` stuck on `unknown retained current artifact is +not authorized`) is fixed above, in the entry "A failed registry sweep after +promotion no longer blocks the application". + +## Shuttle moves to Apache-2.0 + +The CLI, the helper and the templates are Apache-2.0, installable with no +condition. The distribution site has been retired since 2026-09-14. +ADR: `docs/adr/0001-apache-2.0.md`. + +## Production .env files must no longer pass through the workstation + +Copying a production `.env` to a laptop so that Shuttle sends it back to the +VPS it came from is a move with no destination, and one more copy it can leak +from (disk, agent, zip, CI log). The `secrets.backend: host` backend already +existed. It was not the path `init` wrote, and no agent had instructions to +stick to it. + +`shuttle init` now writes that backend as soon as a generated configuration +declares an application secret (Laravel `APP_KEY`), with +`secrets.host.env_file` set to `/opt//.env` on the server. Redis and +RabbitMQ stay generated on the host. A project with no application secret +(Hono plus Redis only) keeps `backend: swarm`, because the host backend +requires at least one application key. `.env.example` describes the schema and +says not to copy it locally for a deploy. `.gitignore` ignores `.env` and +`.env.*`. + +The `shuttle-host-env` skill is embedded in the binary. `shuttle --install +skills` and `shuttle skills install` copy it into every local harness (Claude, +Grok, Cursor, Codex, OpenCode, Agents), at user level (every project on the +workstation) and at project level (colleagues). `init` already installs it in +the generated checkout. Running the install again after an update refreshes +the text. + +Nothing changes for an existing configuration that names no backend: `Load` +keeps defaulting to `swarm`. `shuttle secrets set` stays the path for that +store. + +## The sales site and its distribution are retired + +On 14-09-2026, `releases.example.com` still served a web image of 15-08 that +stripped `key_id` and `signature` from the public manifest: `shuttle update` +therefore refused every signed release. GitHub Actions no longer started any +job, for lack of payment, and upgrading the site required seven migrations on +the production database, a new secret injected by the shared Caddy and a +decision about sales. The site is retired rather than half maintained. + +Removed: `web/`, `deploy/`, the deploy, backup, restore and Stripe scripts with +their contracts, the `web` and `web-image` CI jobs, the Bun audit and the +upload of releases to the VPS. On the server, the service, its database, its +secrets, its images and the releases directory were erased. + +The release workflow still runs the Go gate, builds and signs the binaries, +and keeps them as a workflow artifact instead of sending them to a directory +that no longer exists. + +The CLI no longer has a default release origin. Keeping the retired site's +address made every command's update check call a dead host, and +`shuttle update` failed on a network error that did not show the real cause. +Without `SHUTTLE_SITE_URL`, the background check makes no call at all, and +`shuttle update` stops with "no release distribution channel is configured". +With `SHUTTLE_SITE_URL`, the signed behavior pinned to the origin is unchanged, +and `shuttle update --recover` still works with no origin. + +## Two applications on the same VPS could not deploy at the same time + +On 14-09-2026, `make deploy` of `api` failed within seconds: +`operation ... is active for deploy (target web, age 49s); waited 0s`. Nothing +was broken. `web` had been deploying on the same node for 49 seconds, and a +deploy was a global VPS operation, reserved before the build and refused with +no wait. Worse, `api`'s premigrate had already migrated the database: the +schema was ahead of the code until the manual rerun. + +Deploy, rollback and run are now application operations. They exclude a global +operation and another mutation of the same application, nothing else. Backup, +restore, registry GC, cache-prune, helper update, reboot and destroy stay +global. An application's phase holds `/run/shuttle-root.app-.lock` during +its Docker work and takes `/run/shuttle-root.lock` only to write its journal: +that lock, held during the whole `docker stack deploy`, is what would have +queued the promotions again even with a relaxed conflict rule. + +What applications share stays serialized on `/run/shuttle-shared.lock`: writing +the Caddy fragment and reloading the edge, the registry and image store sweeps. +Registry GC runs only if its operation is alone on the host: it stops the +registry and deletes every blob no manifest references, which includes the +layers another application is pushing. Otherwise it is deferred and logged, +without failing; stale manifests are already deleted and the next lone +promotion reclaims their blobs. A resume is refused while another operation is +alive, because it restarts the registry. + +On the client side, a conflict with a live operation is waited on for up to ten +minutes instead of failing; a conflict with a `recovery_required` operation +fails at once, with a distinct message (`requires recovery for`), since only a +resume can lift it. + +Compatibility: a journal written by an old helper carries `scope: global` on +its deploys. It stays readable, and a legacy deploy still alive keeps excluding +everyone. The change takes effect only after `shuttle helper update` on each +VPS, to be done outside any active operation. + +## The macOS binary no longer compiled since the operations journal + +`make install` on a Mac failed with `undefined: jsonState`, then +`undefined: reserveRootOperation`, and the same darwin compilation in the +release workflow would have broken. Both functions existed only in +`//go:build linux` files, while code compiled everywhere called them. CI runs +`go vet` and `go test` only under Linux, so nothing reported it. `jsonState` +moves to `store.go`, with no build tag, because both implementations of +`writeStateAt` use it. `reserveRootOperation` gets, under macOS, the same stub +as the root helper's other actions, which refuses with "shuttle-root is +supported only on Linux". Behavior under Linux does not change: `go vet ./...` +passes for darwin and for `GOOS=linux`. + +## A failing VPS was only visible by running doctor again by hand + +Nothing watched the VPS between two commands: a stopped service, a full disk, a +stale backup or a certificate close to expiry stayed silent. +`monitoring.enabled` now installs one systemd timer per application +(`shuttle monitoring install|remove`, idempotent) that checks the Swarm +services, Docker, Caddy, the loopback registry, native PostgreSQL, Redis and +RabbitMQ only if they are configured, space and inodes for data, images, cache +and backups, backup freshness, TLS and drift in SSH, UFW, DOCKER-USER and +fail2ban, read-only. Dated `shuttle.monitoring/v1` reports tell healthy, +degraded, unavailable and not applicable apart; an expired or timed-out check +is never healthy. + +Incidents and recoveries go through an explicit HTTPS channel, with debounce, +deduplication, bounded retries and a delivery failure log. The acceptance run +cut the channel during an application failure: the incident stayed pending, +then was delivered when the channel came back, and the recovery only once. The +`shuttle monitoring external` probe, run from VM 232, detected the same failure +independently of the VPS. A declared maintenance is bounded to seven days and +does not delete the history; an unreadable window is never treated as lifted. +No check purges or changes a network rule: the 203 security files checked +stayed identical. Monitoring is opt-in; a configuration without the key changes +nothing. + +The acceptance run also fixed two false diagnostics. A webhook secret file +under `/etc/shuttle`, although documented, was refused because its parent +directory was held to the rule for private state directories: the channel +appeared unavailable with no explanation. And a VPS saw its public 22/tcp, +80/tcp and 443/tcp rules reported as unexpected on every cycle, while doctor +did not report them: the installed configuration carried neither the SSH port +nor the project's `access.allowed_public_tcp_ports`, and the runtime has only +that copy. It now carries them, and an explicit value under +`monitoring.security` keeps priority. + +## Two commands could mutate the same VPS and a resume left no trace + +A deploy, a rollback, a backup, a registry cleanup, a helper update or a reboot +could overlap, and a failure in the middle left only the lock free. Each +operation is now reserved in a persistent journal `/var/lib/shuttle/operations` +with an identifier, phases, result and resume actions, with no secret. During +an active deploy, the acceptance run started a deploy of another application, a +helper update, a reboot and a rollback: all were refused, naming the active +operation, its target and its age. Registry GC ran during that deploy and the +following rollback found the previous digest. + +An interrupted operation stays `recovery_required` even with the lock free. +`shuttle operations writers` then `shuttle operations recover` show the +observed state and the actions as a simulation, and apply only with the exact +digest; a stale digest is refused. The acceptance run resumed a real deploy +this way, blocked by an image held by a stopped container, and revealed four +defects fixed here: the writers reader program refused every identifier, the +SSH builder supervisor wrote its receipts as 0664 under umask 0002, cleanup +failed on a still referenced image instead of keeping it, and the helper +migration refused every modern journal because of the `revision` field, which +blocked every signed update. The next update revealed two more dead ends: the +migration refused the `baselines` directory every coordinated deploy creates, +and a `helper-update` reservation that failed before any replacement could no +longer be resumed, blocking every global operation. The migration now accepts +that private directory, and the resume recognizes an update that never replaced +the helper. One last defect still made any update impossible after a +coordinated deploy: the candidate binary, started by the installed helper to +probe itself, read the journal again with no writers inventory reader. As soon +as a closed inventory existed, it refused in its `init` and the installed helper +only reported "replacement binary does not expose the shuttle-root interface". +The manual reproduction passed because it did not start the candidate from the +staging directory, the only case where that probe is active. The candidate and +a migration resume now read the inventories like the parent helper. A helper +installed before these fixes cannot receive them on its own: on the acceptance +VPS, recorded root corrections marked the failed reservations `failed`, then +the fixed helper was installed once outside the signed flow. It then resumed +the last blocked reservation through a signed plan, and a signed update with +three writers inventories present succeeded. + +## Dedicated SSH builder with a persistent cache and daemon shutdown + +`build.runner: "ssh"` allows building on a separate build VM or LXC without +moving the VPS loopback registry. The SSH identity is verified, the tunnel +starts from the builder and deployed images stay identified by digest. Local +mode stays the default when the key is absent. + +The acceptance run on PVE VM 232 revealed two real transport gaps and a daemon +that survived the loss of the client. The wrapper now accepts the OpenSSH +arguments Docker emits, the supervisor keeps its control input and it stops the +identified containers of its run. After a SIGKILL of the client during a build, +the daemon stops within 15 seconds; the cache volume is kept. The SIGINT check +also revealed that a second call to Close could return before the cleanup +started by the signal handler finished. Concurrent calls now wait for the same +close result; SIGINT and SIGTERM were checked with the daemon stopped, the +tunnel closed and the cache kept. Wrong keys, fingerprints and targets, as well +as a busy tunnel port, are refused with no fallback to the local workstation. Changes since `v0.0.1`, newest first. Moved into the release notes when a tag is cut. @@ -2981,7 +2898,7 @@ already running, and `compose up` still stopped and recreated every service using them: the API and its minute of start-up, the CRM poller, the backup sidecar. Only `redis`, on a digest-pinned third-party image, could have been left alone. Measured on 2026-09-12: 10 s to stop the old containers, 59 s for -the API to come back healthy, of a 1 min 37 promotion — for a release that was +the API to come back healthy, of a 1 min 37 promotion, for a release that was byte for byte the one before it. The cause is the immutable tag. Compose recreates a container when the hash of @@ -2992,8 +2909,8 @@ daemon reports the same image ID under both tags. Same ID, different string, restart. Now, once the images are built or loaded and their IDs read from the host, the -deploy reads what the project runs — per container, the image ID, the -reference it was created from, and the ID that reference resolves to today — +deploy reads what the project runs (per container, the image ID, the +reference it was created from, and the ID that reference resolves to today), and a built service whose new tag is the image it already runs is rendered with the reference it already runs. The service hash is then the one Compose has, and the container is not touched; the retention keeps that reference @@ -3005,7 +2922,7 @@ removed or re-pointed since the container started is never written into a release, and only a reference in the repository this run built for is eligible: a container started under the project by hand is not Shuttle's to name. If the report cannot be read, the deploy says so and renders the new -tags as it always did — a recreation too many, never a reference the daemon +tags as it always did: a recreation too many, never a reference the daemon did not confirm. What stays: the release identity check still compares the running containers @@ -3022,7 +2939,7 @@ ever installed by `setup`. That is the product: a host Shuttle hardened, deploying signed stacks as the least-privilege account it created. It left one case with no answer. The Demo pre-production is a shared host, in service, on which the team's only acceptable change is the name of the user allowed to -deploy — no `setup`, no `sudo` rule, not even a temporary one. The first +deploy: no `setup`, no `sudo` rule, not even a temporary one. The first `setup` attempt on it, in September 2026, is what taught the team that. Reaching that host meant `scripts/deploy.sh` and nothing Shuttle offered. @@ -3032,8 +2949,8 @@ builds the images on the workstation with the same buildx pipeline, streams them to the host with `docker save` over SSH into `docker load`, renders a compose project, uploads it under the account's home and runs `docker compose up -d --wait` as that account. The host key comes from `server.host_key` in -`config.json` — an out-of-band fingerprint, versioned with the configuration, -recorded on first contact and refused if it later changes — because no `setup` +`config.json` (an out-of-band fingerprint, versioned with the configuration, +recorded on first contact and refused if it later changes), because no `setup` is there to record one. What it keeps is deliberate: the immutable tag per image and its identity @@ -3044,9 +2961,9 @@ the two cannot drift; the origin proof and availability probe; `current` and it gives up is written in the documentation in as many words: nothing privileged enforces the hardening, `compose up` recreates services in place so the probe reports the gap rather than rolling back, no Docker Secrets, no -shared edge. Every configuration key that would promise one of those — the +shared edge. Every configuration key that would promise one of those (the managed Redis and PostgreSQL, the edge routes and gates, secret owners, the -setup accounts — is refused under this strategy, naming the key and the reason. +setup accounts) is refused under this strategy, naming the key and the reason. Three things were found while writing it and fixed for this path. Compose interpolation was left to the host: a `${VAR:-x}` in a compose environment @@ -3063,7 +2980,7 @@ stream's deadline is sized from the bytes to move. The first real run found the fourth thing. The laptop is Apple silicon and the host is x86; the images built on the laptop were arm64, would have loaded on -the host without a word and failed at exec on the first start — and building +the host without a word and failed at exec on the first start, and building them for amd64 under emulation is not an option either, since Bun crashes under it. Every build now targets the host's architecture, and `deploy.compose.build` decides where it runs: locally with a stream when the @@ -3102,8 +3019,8 @@ same code through the shared hardening function. Adoption exists to converge a host a previous Shuttle generation set up, and it proves that by looking for `/opt/shuttle//state.json` before it does anything. Nothing in this generation writes that file. So a host in service -that Shuttle never touched — a Compose stack somebody deploys by hand, with its -own accounts, its own firewall and its own `daemon.json` — could only be taken +that Shuttle never touched (a Compose stack somebody deploys by hand, with its +own accounts, its own firewall and its own `daemon.json`) could only be taken through a fresh `setup`, which means first contact as `root`, a parked stack, `dist-upgrade` and an unconditional reboot. On a Scaleway instance that path is worse than fragile: the provider rewrites root's `authorized_keys` from its @@ -3116,7 +3033,7 @@ gate being lifted, because "adopt" has meant "what Shuttle already installed" since it existed, and the marker is how it tells a Shuttle host from an unrelated machine. The survey now reports the marker's state instead of exiting on it, and refuses only when the marker is absent, this generation has not -claimed the host either, and the flag was not given — so an interrupted claim +claimed the host either, and the flag was not given, so an interrupted claim resumes without the flag, and the refusal text for the default case has not moved a character. @@ -3138,13 +3055,13 @@ that never was; and on that last kind it says what claiming changes, before carries two global addresses and `swarm init` refuses to choose. The fresh stage is byte-identical, and now has the golden file the other stages had. - 40-runtime resets the firewall to SSH and the declared public ports. A host - in service publishes more — an API on 8001, a second front-end port, a - database — and every one of them stopped answering with no warning. The + in service publishes more (an API on 8001, a second front-end port, a + database), and every one of them stopped answering with no warning. The survey lists what containers publish today, and the plan names the ports that will close and the key that keeps them. - `--cutover-edge` stops the container on 80/443 and leaves its restart policy alone. Stopped is not gone: under `restart: always` the next dockerd restart - — likelier now that live-restore is off — starts it again and races the edge + (likelier now that live-restore is off) starts it again and races the edge for the ports. The cutover reads the policy, sets it to `no` after the stop, and puts the surveyed value back on the restore branch, so a failed cutover leaves the container exactly as it found it. The plan and the completion @@ -3156,7 +3073,7 @@ one, and until the first `shuttle deploy` the edge serves no site on the ports it just took. The deferred-work line about migrating the adopted database is now printed only when there is an adopted database, which on a host Shuttle never installed there is not. And the refusal for a first-contact account -without passwordless sudo — the first thing an operator meets on such a host — +without passwordless sudo (the first thing an operator meets on such a host) now prints the sudoers line to write instead of naming the concept. Nothing changes for an adoption without the flag, and nothing for a fresh @@ -3167,8 +3084,8 @@ setup. The signed SSH baseline names exactly who may log in, and it named `deploy`, the declared operator, and under adoption the account the run arrived on. That is the right list for a VPS one person owns. On a host other people log in to -— a shared pre-production, a server colleagues still deploy to through another -path — every other account lost SSH the moment the baseline committed, and +(a shared pre-production, a server colleagues still deploy to through another +path), every other account lost SSH the moment the baseline committed, and nothing in the plan said so: the dry run listed the accounts it would keep and was silent about the ones it would not. The first `shuttle setup` on such a host on 2026-09-10 ended with the host rebuilt by hand. @@ -3179,14 +3096,14 @@ nothing else happens to it: Shuttle creates none, installs no key, writes no sudo rule and leaves group memberships alone. A `docker` or `sudo` membership it holds is root-equivalent access today and stays so; that is the operator's decision, and the plan and the final report say it in as many words instead -of hiding it. An account meant to be *changed* — given the managed sudo rule, -its groups reduced — is the operator, and an account cannot be both. +of hiding it. An account meant to be *changed* (given the managed sudo rule, +its groups reduced) is the operator, and an account cannot be both. Retaining an account that could not log in afterwards would be the same lockout with a plan claiming the opposite, so a read-only preflight refuses, before anything is changed, an account that does not exist, is a system account, has no login shell, or has no `authorized_keys` holding a key -`ssh-keygen` can read — the baseline closes password logins, so a key is the +`ssh-keygen` can read: the baseline closes password logins, so a key is the only way in. Every refusal names the account and the reason. What is proven afterwards is the directive, not the login: the post-hardening @@ -3202,7 +3119,7 @@ remove it is refused as the contradiction it is. A configuration that names nobody produces the baseline, the plan and the report it always produced, byte for byte. -## `make install` — running the build you just made +## `make install`: running the build you just made `scripts/release.sh` deliberately does not touch an installed binary, and `shuttle update` is the user path: it downloads a signed release. Between @@ -3228,8 +3145,8 @@ from "zero": every field the overlay did not restate was marshalled as its zero value and overwrote a perfectly good one. Sixty-one fields carry no `omitempty`, so sixty-one values were destroyed by an overlay that never mentioned them. -The lucky case failed loudly. An overlay declaring a domain and a host — which -is the whole point of an overlay — reset `version` to 0 and the deploy stopped +The lucky case failed loudly. An overlay declaring a domain and a host (which +is the whole point of an overlay) reset `version` to 0 and the deploy stopped on "unsupported configuration version 0: Shuttle requires version: 2", naming a field the operator had written correctly. The unlucky cases had no such guard: `app`, `deploy.retain`, `secrets.backend` and every `services..port` were @@ -3246,14 +3163,14 @@ a named environment with no file beside the base is still not an error. This is the mechanism's first working release. Anyone who had tried it and concluded that `-e` was unusable was right. -## `secrets.backend: host` — credentials a workstation never holds +## `secrets.backend: host`: credentials a workstation never holds Every declared application secret had exactly one source: the encrypted local store. That is the right default for an application deployed from the machine that created it, and the wrong one for a server whose credentials already exist and are meant to stay where they are. Adopting Shuttle for such a deployment meant copying forty-odd live credentials onto a laptop so that Shuttle could -send them back to the machine they came from — a movement with no destination, +send them back to the machine they came from: a movement with no destination, and one more place they can leak from. `deploy.env_push` looked like the answer and was not. It is declared, it is @@ -3272,8 +3189,8 @@ what the local store produces, so `expose: file` and `expose: env` behave the same and no application code changes. The mechanism is the one the managed Redis and PostgreSQL credentials have -always used — generated on the host, published by the helper, referenced by -name — generalised to secrets the operator owns rather than ones Shuttle +always used (generated on the host, published by the helper, referenced by +name), generalised to secrets the operator owns rather than ones Shuttle generates. Versioning is what made this more than a file read. A Docker Secret is @@ -3292,8 +3209,8 @@ bounded. `secrets-host` is the only action that accepts those coordinates, on the same central guard that keeps secret material on exactly one action. The path must be absolute and traversal-free, checked in the wire contract and again by the helper. The file is opened with `O_NOFOLLOW`, must be regular, must -not be world-writable — a credential is worth what the weakest account able to -rewrite it is worth — and is bounded at 1 MiB. Only the declared keys are +not be world-writable (a credential is worth what the weakest account able to +rewrite it is worth) and is bounded at 1 MiB. Only the declared keys are extracted; a real `.env` holds far more than an application's secrets, and taking it wholesale would publish as a credential every line anybody ever added to it. A key that is present but blank counts as missing, because an empty @@ -3310,7 +3227,7 @@ Missing keys are named. A deploy whose server does not set a declared secret stops with the list of keys and the path to fix, rather than at convergence. Two smaller corrections travel with it. An unknown `secrets.backend` now names -both accepted values instead of only the supported one — the half of the answer +both accepted values instead of only the supported one, the half of the answer the operator already had. And `shuttle secrets --file` no longer defaults to the literal `.shuttle/secrets.enc`: it falls back to `secrets.file`, then to that path. A project that had moved its store was read at the declared path by every @@ -3360,7 +3277,7 @@ host running two. The names are now listed and matched on the suffix. prints one line per value of a repeatable directive, so the `AllowUsers deploy ops` that setup itself signs comes back as two `allowusers` lines. The parser kept the last one, so the check compared `[ops]` against `[deploy ops]` and -failed High — on every host using `--operator-user`, for a configuration +failed High on every host using `--operator-user`, for a configuration Shuttle had just written. Repeated directives are now joined. **`filesystem.unmanaged_suid_sgid` reported a distribution binary.** Under @@ -3373,7 +3290,7 @@ The check now tries the alternate spelling before reporting. ## A fresh setup no longer fails its own deploy-user readiness check `setup` creates the deployment account with `useradd --create-home` and then -sets `.ssh` to 0700 and `authorized_keys` to 0600 — but never the home itself, +sets `.ssh` to 0700 and `authorized_keys` to 0600, but never the home itself, which keeps the distribution default (0750 on Ubuntu). `access.deploy_user_ssh_files` requires 0700 on all three, so every freshly set up host reported a High finding caused by the setup that had just run. Measured on a v0.0.6 host: @@ -3382,7 +3299,7 @@ operator paths. ## `--skip-build` says what it needs instead of failing as `docker push` -The flag reuses an image the workstation already built — it is the retry path +The flag reuses an image the workstation already built: it is the retry path for a deploy whose build succeeded and whose push or promotion did not. Used to re-publish an unchanged stack, no build ran, the daemon held no such tag, and the run died on: @@ -3408,13 +3325,13 @@ console as root. `signed-helper-update` (v0.0.6) makes this a one-time step for hosts that have it; the ones that do not are exactly the ones reading this error. -## `services..update_order` — one service may step aside before its replacement starts +## `services..update_order`: one service may step aside before its replacement starts Shuttle generated `order: start-first` for every service, unconditionally (`swarm_stack.go`). That is what buys zero downtime on a single node, and it is the right default. It is also fatal to one kind of service: a task holding an **exclusive lock on a mounted volume**. Its replacement starts while it still -owns the file, cannot take the lock, and exits — Swarm then rolls the entire +owns the file, cannot take the lock, and exits; Swarm then rolls the entire stack back, and the release fails on a service nobody was changing. Measured on `api` (demo, 04-09-2026), a Mercure hub on a BoltDB file: @@ -3425,8 +3342,8 @@ provision http.handlers.mercure.bolt: "": invalid transport: timeout The outgoing task was still logging health checks 25 seconds after its replacement had started. The stack file already carried the invariant in a -comment — « transport Bolt mono-writer. Jamais deux répliques, jamais -start-first » — and had no way to express it, since Shuttle generates the whole +comment ("Bolt transport, single writer. Never two replicas, never +start-first") and had no way to express it, since Shuttle generates the whole `deploy:` block and replaces the file's. `services..update_order` accepts `start-first` or `stop-first`. Unset means @@ -3435,7 +3352,7 @@ The same order is applied to `rollback_config`: reversing it during a rollback would recreate the overlap at the worst possible moment. **The published service may not opt out.** It is the one behind Caddy, and -stop-first there is not a slower rolling update — it is a window with nothing +stop-first there is not a slower rolling update: it is a window with nothing answering. The configuration is refused at validation rather than discovered mid-promotion.