#!/bin/sh # SPDX-FileCopyrightText: 2026 GPForum Contributors # SPDX-License-Identifier: BSD-3-Clause set -eu # Print private-beta prep commands / entrypoint status only. # Does not run drills, stress, migrate, mail probes, or claim readiness. root=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) cd "$root" usage() { cat <<'EOF' Usage: script/gpforum-private-beta-checklist [--commands|--status|--help] --commands print operator commands for each prep phase (default) --status print whether each entrypoint answers (ok / fails / missing) --help show this help Does not execute migrate, staging drills, staging-host-verify, stress-load, mail-check, or query-budget. Passing --status never means private beta is ready. See docs/ops/private-beta-checklist.md. EOF } mode=commands for argument in "$@"; do case "$argument" in --commands) mode=commands ;; --status) mode=status ;; --help|-h) usage exit 0 ;; *) echo "gpforum-private-beta-checklist: unknown option: $argument" >&2 usage >&2 exit 1 ;; esac done print_banner() { printf '%s\n' \ 'gpforum-private-beta-checklist: print-only orchestrator' \ 'PRIVATE BETA: NOT CLAIMED (commands/status only; record evidence separately)' \ 'Docs: docs/ops/private-beta-checklist.md' \ '' } print_commands() { print_banner cat <<'EOF' # 1. Selected Perl + Homebrew PostgreSQL PATH (macOS) script/gpforum-system-perl --preflight eval "$(script/gpforum-homebrew-env)" script/gpforum-homebrew-env --check # 1b. Carton local/ (use --rebuild-local if Const::Fast / deps missing) script/bootstrap-deps --postgres --rebuild-local # or: make install-deps-postgres # 2. Migrate + query budget (requires GPFORUM_DATABASE_*) bin/gpforum migrate bin/gpforum budgets --sync bin/gpforum budgets --check # 3. Staging DB drill (throwaway DBs) bin/gpforum staging-drill --json # 4. Attachments + deploy checklist (static; host verify when tools exist) bin/gpforum staging-drill-attachments --json # 5. Staging host verify (non-destructive; live flags on the host) bin/gpforum staging-host-verify --json # bin/gpforum staging-host-verify --json --env-file /etc/gpforum/gpforum.env \ # --unit-dir /etc/systemd/system --nginx-conf /etc/nginx/sites-enabled/gpforum \ # --systemd --base-url https://staging.example # 6. Stress / load (requires running Hypnotoad --base-url) bin/gpforum stress-load --dry-run --profile smoke --human bin/gpforum stress-load --profile 100 --base-url http://127.0.0.1:8080 --check --json # 7. Mail probe bin/gpforum mail-check --human --dry-run # bin/gpforum mail-check --send --to you@example.test --human bin/gpforum mail-lifecycle-check --simulate --human # 7b. Dead-letter staging check (in-memory simulate; live /admin/jobs still open) bin/gpforum dead-letter-check --simulate --human # 8. Live evidence command pack (verify + stress + mail → /tmp JSON) # script/gpforum-evidence-live --commands # make evidence-live # Aggregate docs # docs/ops/private-beta-checklist.md # docs/ops/staging-host.md # docs/release/readiness-review.md EOF } status_line() { path=$1 label=$2 if [ -x "$path" ]; then printf 'ok\t%s\t%s\n' "$label" "$path" elif [ -e "$path" ]; then printf 'present\t%s\t%s\n' "$label" "$path" else printf 'missing\t%s\t%s\n' "$label" "$path" fi } # A verb of the front door: ok when bin/gpforum VERB --help answers. verb_line() { verb=$1 if [ ! -x bin/gpforum ]; then printf 'missing\t%s\tbin/gpforum %s\n' "$verb" "$verb" elif bin/gpforum "$verb" --help >/dev/null 2>&1; then printf 'ok\t%s\tbin/gpforum %s\n' "$verb" "$verb" else printf 'fails\t%s\tbin/gpforum %s\n' "$verb" "$verb" fi } print_status() { print_banner printf 'entrypoint\tlabel\tpath\n' status_line script/gpforum-system-perl system-perl status_line script/gpforum-homebrew-env homebrew-env verb_line migrate verb_line budgets verb_line staging-drill verb_line staging-drill-attachments verb_line staging-host-verify verb_line stress-load verb_line mail-check verb_line mail-lifecycle-check verb_line dead-letter-check status_line script/gpforum-evidence-live evidence-live status_line docs/ops/private-beta-checklist.md checklist-doc status_line docs/ops/staging-host.md staging-host-doc printf '\n%s\n' \ 'status=print-only residual_gaps=live-staging-smtp-stress-deploy private_beta=not-claimed' } case "$mode" in commands) print_commands ;; status) print_status ;; esac exit 0