5a80739799
deploy.go, one slice (both edit SaveAppConfig / the deploy goroutine): CTRL-T2-1 (ghost-deployed on crash): DeployStack wrote app.yaml Deployed:true to disk BEFORE the async 'docker compose up -d'; a crash during the image-pull window left a ghost-deployed stack (Deployed:true, no containers) that DeployStack then refused to redeploy. Now the env is persisted with Deployed:false (transitional), and Deployed:true is written by runComposeDeploy ONLY after up -d succeeds. In-memory Deployed stays true during the pull to preserve the no-stale-Telepítés-button UX. On a post-success save failure, revert so the stack is redeployable. H10 (plaintext secret on encrypt failure): SaveAppConfig logged a WARN then fell through to persist the secret in PLAINTEXT. Now fail-closed: return an error on crypto.Encrypt failure, never write plaintext. Callers already propagate it. Regression tests: H10 fail-closed (+ good-key encrypts) and the CTRL-T2-1 transitional durable-state contract (transitional reads not-deployed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>