feat(supabase): db:trial foundation (plan, create, start, stop, status)

scripts/db-trial.sh builds the persistent manual trial stack on
literal faunosteo_trial_* names, loopback 58xxx ports, named volumes
and a 700 state folder outside any git work tree; it refuses
SANDBOX_* variables, a remote Docker daemon, a missing or failing
ss, and checks each container's exact loopback publication and the
gateway identity. The stub harness (scripts/db-trial-check.sh,
87 cases, no daemon reachable) proves it; db-sandbox.sh refuses a
trial state folder (additions only). Nothing is created here.
This commit is contained in:
bchanot committed 2026-11-10 14:05:56 +01:00
1 parent 9f60d841eb
commit 1a7b952f2f
6 files changed
+1712 -2

No files matched your search

+6
View File
@@ -68,6 +68,12 @@ REPO="$(realpath "$PWD")"
case "$(realpath -m "$STATE")" in
"$REPO" | "$REPO"/*) die "FAUNOSTEO_SANDBOX_DIR must be outside the repository" ;;
esac
# The db:trial state folder (scripts/db-trial.sh) is never the sandbox's: `down` would delete
# files there while the trial volumes keep the matching passwords.
TRIAL_STATE="$(realpath -m "${FAUNOSTEO_TRIAL_DIR:-$HOME/.cache/faunosteo-trial}")"
if [ "$(realpath -m "$STATE")" = "$TRIAL_STATE" ] || [ -e "$STATE/.faunosteo-trial-state" ]; then
die "FAUNOSTEO_SANDBOX_DIR is the db:trial state folder: refused, nothing was run"
fi
# Every value must be present: an empty password would turn --db-url into an
# argument the CLI might read as absent and fall back to the DEV database.
load_secrets() {