#!/usr/bin/env bash

set -euo pipefail

if [[ $# -lt 3 ]]; then
  echo "usage: $0 <environment> <deploy-commit> <checked-by> [smoke-status]" >&2
  echo "example: $0 rmcp.itexp.me abc1234 \"codex + operator\" partial" >&2
  exit 64
fi

ENVIRONMENT="$1"
DEPLOY_COMMIT="$2"
CHECKED_BY="$3"
SMOKE_STATUS="${4:-partial}"
STAMP="$(TZ="${TZ:-Europe/Moscow}" date '+%Y-%m-%d %H:%M %Z')"

cat <<EOF
## ${STAMP} — ${ENVIRONMENT} (authenticated pass)

- deploy commit: \`${DEPLOY_COMMIT}\`
- checked by: \`${CHECKED_BY}\`
- smoke status: \`${SMOKE_STATUS}\`
- scope:
  - auth
  - ui shell
  - operations
  - wizard
  - agents
  - api keys
  - secrets
  - logs
  - usage
  - streaming
  - mcp smoke

### Passed

- login/logout completed
- shell pages open after auth
- secrets/auth profile flow status: \`<passed|partial|failed>\`
- REST smoke: \`<passed|partial|failed>\`
- GraphQL smoke: \`<passed|partial|failed>\`
- gRPC smoke: \`<passed|partial|failed>\`
- streaming pages status: \`<passed|partial|failed>\`
- WebSocket: \`<not exercised|passed|failed>\`
- SOAP: \`<not exercised|passed|failed>\`

### Findings

- none

### Infra notes

- ...

### Follow-up

- ...
EOF
