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 -d "${SUPABASE_DB_URL/:5432/:6543}" -c "SELECT pg_backend_pid()" pg_backend_pid
----------------
8341
(1 row)
cat << 'EOF' > pool_smoke.sh
#!/bin/bash
# Supabase session connection uses port 5432, transaction mode uses 6543.
TRANSACTION_URL="${SUPABASE_DB_URL/:5432\//:6543\/}"
# Output dir for results
TMPDIR=$(mktemp -d)
SUCCESS=0
# Run 20 concurrent queries
for i in {1..20}; do
psql "$TRANSACTION_URL" -c 'SELECT pg_backend_pid()' > "$TMPDIR/$i.out" 2> "$TMPDIR/$i.err" &
done
wait
# Check results
for i in {1..20}; do
# A successful query will have 'pg_backend_pid' or just 1 row of output in .out
# And standard error will typically be empty or we can just check if psql exited with 0
if grep -q "pg_backend_pid" "$TMPDIR/$i.out"; then
SUCCESS=$((SUCCESS + 1))
else
cat "$TMPDIR/$i.err" >&2
fi
done
rm -rf "$TMPDIR"
if [ "$SUCCESS" -eq 20 ]; then
echo "POOL OK 20/20"
exit 0
else
echo "FAILED: $SUCCESS/20 succeeded"
exit 1
fi
EOF
chmod +x pool_smoke.sh
./pool_smoke.shPOOL OK 20/20
cat << 'EOF' > pool_smoke.sh
#!/bin/bash
set -e
# Change default session port 5432 to transaction pooler port 6543
TRANSACTION_URL="${SUPABASE_DB_URL/:5432/:6543}"
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
for i in {1..20}; do
(
if psql "$TRANSACTION_URL" -qtA -c 'SELECT pg_backend_pid()' > /dev/null 2> "$TMPDIR/$i.err"; then
touch "$TMPDIR/$i.ok"
fi
) &
done
wait
SUCCESS=$(ls -1 "$TMPDIR"/*.ok 2>/dev/null | wc -l)
if [ "$SUCCESS" -eq 20 ]; then
echo "POOL OK 20/20"
exit 0
else
echo "FAILED: $SUCCESS/20 succeeded"
cat "$TMPDIR"/*.err >&2 2>/dev/null || true
exit 1
fi
EOF
chmod +x pool_smoke.sh
./pool_smoke.shPOOL OK 20/20
cat << 'EOF' > pool_smoke.sh
#!/bin/bash
set -e
# The environment provides SUPABASE_DB_URL which is session-mode (port 5432).
# Transaction-mode connection pooler is on port 6543.
TRANSACTION_URL="${SUPABASE_DB_URL/:5432/:6543}"
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
for i in {1..20}; do
(
if psql "$TRANSACTION_URL" -qtA -c 'SELECT pg_backend_pid()' > /dev/null 2> "$TMPDIR/$i.err"; then
touch "$TMPDIR/$i.ok"
fi
) &
done
# wait for all background processes to finish
wait
SUCCESS=0
for i in {1..20}; do
if [ -f "$TMPDIR/$i.ok" ]; then
SUCCESS=$((SUCCESS + 1))
fi
done
if [ "$SUCCESS" -eq 20 ]; then
echo "POOL OK 20/20"
exit 0
else
echo "FAILED: $SUCCESS/20 succeeded"
cat "$TMPDIR"/*.err >&2 2>/dev/null || true
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