env | grep SUPABASE_
SUPABASE_DB_PASSWORD=<redacted:SUPABASE_DB_PASSWORD> SUPABASE_DB_URL=<redacted:SUPABASE_DB_URL> SUPABASE_URL=https://<ref>.supabase.co SUPABASE_SERVICE_ROLE_KEY=<redacted:SUPABASE_SERVICE_ROLE_KEY> SUPABASE_PROJECT_REF=<ref> SUPABASE_ANON_KEY=<redacted:SUPABASE_ANON_KEY>
psql "postgresql://postgres.<ref>:<redacted>@aws-0-us-east-1.pooler.supabase.com:6543/postgres" -c 'SELECT 1;'
?column?
----------
1
(1 row)
cat << 'EOF' > pool_smoke.sh
#!/bin/bash
set -e
# Replace port 5432 with 6543 for Transaction mode
TRANSACTION_URL="${SUPABASE_DB_URL/:5432\//:6543\/}"
# File to keep track of successes
SUCCESS_FILE=$(mktemp)
# Function to run query
run_query() {
if psql "$TRANSACTION_URL" -t -c 'SELECT pg_backend_pid();' > /dev/null 2>&1; then
echo 1 >> "$SUCCESS_FILE"
fi
}
for i in {1..20}; do
run_query &
done
# Wait for all background jobs to finish
wait
SUCCESS_COUNT=$(wc -l < "$SUCCESS_FILE")
rm -f "$SUCCESS_FILE"
if [ "$SUCCESS_COUNT" -eq 20 ]; then
echo "POOL OK 20/20"
exit 0
else
echo "Failed, only $SUCCESS_COUNT/20 succeeded."
exit 1
fi
EOF
chmod +x pool_smoke.sh
./pool_smoke.shPOOL OK 20/20
./pool_smoke.sh
POOL OK 20/20
psql "${SUPABASE_DB_URL/:5432\//:6543\/}" -t -c 'SHOW pool_mode'ERROR: unrecognized configuration parameter "pool_mode"
cat << 'EOF' > pool_smoke.sh
#!/bin/bash
set -e
# Construct connection URL for transaction mode (port 6543)
# Replace port 5432 with 6543 for transaction mode pooler.
TRANSACTION_URL="${SUPABASE_DB_URL/:5432/:6543}"
# Temporary file to store results
SUCCESS_FILE=$(mktemp)
# Function to run a query
run_query() {
if psql "$TRANSACTION_URL" -t -c 'SELECT pg_backend_pid();' > /dev/null 2>&1; then
echo "1" >> "$SUCCESS_FILE"
fi
}
# Run 20 concurrent one-shot queries
for i in {1..20}; do
run_query &
done
# Wait for all queries to finish
wait
# Read success count
SUCCESS_COUNT=$(wc -l < "$SUCCESS_FILE")
rm -f "$SUCCESS_FILE"
# Make sure all 20 succeeded
if [ "$SUCCESS_COUNT" -eq 20 ]; then
echo "POOL OK 20/20"
exit 0
else
echo "Failed: only $SUCCESS_COUNT/20 successful."
exit 1
fi
EOF
chmod +x pool_smoke.sh
./pool_smoke.shPOOL OK 20/20
cat << 'EOF' > pool_smoke.sh
#!/usr/bin/env bash
set -euo pipefail
if [ -z "${SUPABASE_DB_URL:-}" ]; then
echo "Error: SUPABASE_DB_URL environment variable is required."
exit 1
fi
TRANSACTION_URL="${SUPABASE_DB_URL/:5432/:6543}"
TMPFILE=$(mktemp)
trap 'rm -f "$TMPFILE"' EXIT
for i in {1..20}; do
(
if psql "$TRANSACTION_URL" -q -t -c 'SELECT pg_backend_pid();' >/dev/null 2>&1; then
echo "OK" >> "$TMPFILE"
fi
) &
done
wait
SUCCESS_COUNT=$(wc -l < "$TMPFILE" | tr -d ' ')
if [ "$SUCCESS_COUNT" -eq 20 ]; then
echo "POOL OK 20/20"
exit 0
else
echo "POOL FAILED ${SUCCESS_COUNT}/20"
exit 1
fi
EOF
chmod +x pool_smoke.sh
./pool_smoke.shPOOL OK 20/20
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