#!/usr/bin/env bash
set -euo pipefail

cat <<'EOF'
Staging checklist for mmapp-updater:

1. Independent updates
   - Push a new backend :latest image only.
   - Wait for POLL_INTERVAL_SECONDS.
   - Confirm mmapp-backend was recreated and mmapp-frontend stayed on the previous digest.

2. Failed pull
   - Point one target image to a non-existent repository tag.
   - Confirm the running container stays up and updater-state records last_error=pull_failed.

3. Health fail rollback
   - Deploy a backend image that exits immediately or fails /health.
   - Confirm updater rolls back to previous_digest and keeps mmapp-backend running.

4. Registry outage
   - Block access to git.shx.one temporarily.
   - Confirm updater logs remote_digest_failed and does not stop managed containers.

Run ./validate.sh before executing this checklist on a staging host.
EOF
