printf 'URL=%s\nREF=%s\nDBURL=%s\n' "$SUPABASE_URL" "$SUPABASE_PROJECT_REF" "$SUPABASE_DB_URL"; command -v psql || true; env | grep '^SUPABASE_' | sed -E 's/(KEY|PASSWORD|URL|DB_URL)=.*/\1=<set>/'
URL=https://<ref>.supabase.co REF=<ref> DBURL=<redacted:SUPABASE_DB_URL> /usr/bin/psql SUPABASE_DB_PASSWORD=<set> SUPABASE_DB_URL=<set> SUPABASE_URL=<set> SUPABASE_SERVICE_ROLE_KEY=<set> SUPABASE_PROJECT_REF=<ref> SUPABASE_ANON_KEY=<set>
cat > pool_smoke.sh <<'EOF'
#!/usr/bin/env bash
# Verify that the Supabase transaction-mode pooler can serve 20 concurrent,
# one-shot connections. The password is supplied only via the environment.
set -u
fail() { printf '%s\n' "pool smoke test: $*" >&2; exit 1; }
: "${SUPABASE_DB_URL:?SUPABASE_DB_URL is required}"
: "${SUPABASE_DB_PASSWORD:?SUPABASE_DB_PASSWORD is required}"
: "${SUPABASE_PROJECT_REF:?SUPABASE_PROJECT_REF is required}"
command -v psql >/dev/null 2>&1 || fail "psql is required"
# The supplied URL is the session-mode URL. Reuse only its pooler hostname;
# explicitly select port 6543 below, rather than inheriting its session port.
eval "$(python3 - "$SUPABASE_DB_URL" <<'PY'
import sys
from urllib.parse import urlsplit
u = urlsplit(sys.argv[1])
if u.scheme not in ("postgres", "postgresql") or not u.hostname:
raise SystemExit("invalid SUPABASE_DB_URL")
if not u.port or u.port == 6543:
raise SystemExit("SUPABASE_DB_URL must be a session-mode URL")
host = u.hostname
if not host.endswith(".pooler.supabase.com"):
raise SystemExit("SUPABASE_DB_URL does not identify a Supabase pooler")
# These values are not secrets and are shell-quoted before eval.
import shlex
print("POOL_HOST=" + shlex.quote(host))
print("POOL_DB=" + shlex.quote((u.path or "/postgres").lstrip("/")))
PY
)" || fail "could not parse SUPABASE_DB_URL"
workdir=$(mktemp -d "${TMPDIR:-/tmp}/pool-smoke.XXXXXX") || fail "cannot create temporary directory"
trap 'rm -rf "$workdir"' EXIT
pids=()
for i in $(seq 1 20); do
(
PGPASSWORD="$SUPABASE_DB_PASSWORD" \
psql -X -w -q -A -t \
--connect-timeout=15 \
-h "$POOL_HOST" -p 6543 \
-U "postgres.${SUPABASE_PROJECT_REF}" -d "$POOL_DB" \
-v ON_ERROR_STOP=1 -c 'SELECT pg_backend_pid();' \
>"$workdir/$i.out" 2>"$workdir/$i.err"
) &
pids+=("$!")
done
ok=0
for pid in "${pids[@]}"; do
if wait "$pid"; then
ok=$((ok + 1))
fi
done
if [ "$ok" -eq 20 ]; then
printf '%s\n' 'POOL OK 20/20'
exit 0
fi
printf 'pool smoke test failed: %d/20 queries succeeded\n' "$ok" >&2
exit 1
EOF
chmod +x pool_smoke.sh
./pool_smoke.sh; rc=$?; echo "exit=$rc"; exit $rcexit=1
pool smoke test failed: 0/20 queries succeeded
cp pool_smoke.sh /tmp/p.sh; sed -i "s/trap 'rm -rf \"\$workdir\"' EXIT/# no cleanup/" /tmp/p.sh; /tmp/p.sh || true; find /tmp -maxdepth 2 -path '/tmp/pool-smoke.*/*' -type f -print -exec cat {} \; | head -100/tmp/pool-smoke.zpLeAD/10.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/1.out /tmp/pool-smoke.zpLeAD/17.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/15.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/18.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/10.out /tmp/pool-smoke.zpLeAD/14.out /tmp/pool-smoke.zpLeAD/7.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/17.out /tmp/pool-smoke.zpLeAD/20.out /tmp/pool-smoke.zpLeAD/11.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/13.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/19.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/8.out /tmp/pool-smoke.zpLeAD/13.out /tmp/pool-smoke.zpLeAD/3.out /tmp/pool-smoke.zpLeAD/6.out /tmp/pool-smoke.zpLeAD/16.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/7.out /tmp/pool-smoke.zpLeAD/14.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/12.out /tmp/pool-smoke.zpLeAD/20.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/2.out /tmp/pool-smoke.zpLeAD/11.out /tmp/pool-smoke.zpLeAD/4.out /tmp/pool-smoke.zpLeAD/2.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/6.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/5.out /tmp/pool-smoke.zpLeAD/15.out /tmp/pool-smoke.zpLeAD/3.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/18.out /tmp/pool-smoke.zpLeAD/9.out /tmp/pool-smoke.zpLeAD/8.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/16.out /tmp/pool-smoke.zpLeAD/1.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/4.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/5.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/19.out /tmp/pool-smoke.zpLeAD/9.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information. /tmp/pool-smoke.zpLeAD/12.err /usr/lib/postgresql/18/bin/psql: unrecognized option '--connect-timeout=15' psql: hint: Try "psql --help" for more information.
pool smoke test failed: 0/20 queries succeeded
python3 - <<'PY'
p='pool_smoke.sh'
s=open(p).read().replace('PGPASSWORD="$SUPABASE_DB_PASSWORD" \\\n psql -X -w -q -A -t \\\n --connect-timeout=15 \\\n', 'PGPASSWORD="$SUPABASE_DB_PASSWORD" PGCONNECT_TIMEOUT=15 \\\n psql -X -w -q -A -t \\\n')
open(p,'w').write(s)
PY
./pool_smoke.sh; rc=$?; echo "exit=$rc"; exit $rcPOOL OK 20/20 exit=0
A shell script executed against the live project and asserted on the state the agent left behind. No model judged another model.
Raw transcript · Task definition and verifier · Every attempt