set -euo pipefail
: "${SUPABASE_DB_URL:?SUPABASE_DB_URL missing}"
work=$(mktemp -d)
umask 077
printf 'work=%s\n' "$work"
printf '%s\n' "$SUPABASE_DB_URL" | sed -E 's#(://[^:]+:)[^@]+@#\1***@#'
pg_dump "$SUPABASE_DB_URL" --table=public.payments --format=custom --file="$work/payments.dump"
test -s "$work/payments.dump"
pg_restore --list "$work/payments.dump" > "$work/list"
printf 'dump_bytes=%s\n' "$(stat -c%s "$work/payments.dump")"
cat "$work/list"
printf '%s\n' "$work" > /tmp/payments_drill_work
work=/tmp/tmp.98031tlHDD postgresql://postgres.<ref>:***@aws-0-us-east-1.pooler.supabase.com:5432/postgres dump_bytes=4864 ; ; Archive created at 2026-07-25 05:39:14 UTC ; dbname: postgres ; TOC Entries: 11 ; Compression: gzip ; Dump Version: 1.16-0 ; Format: CUSTOM ; Integer: 4 bytes ; Offset: 8 bytes ; Dumped from database version: 17.6 ; Dumped by pg_dump version: 18.4 (Debian 18.4-1.pgdg12+1) ; ; ; Selected TOC Entries: ; 272; 1259 22140 TABLE public payments postgres 3707; 0 0 ACL public TABLE payments postgres 3697; 0 22140 TABLE DATA public payments postgres 3547; 2606 22146 CONSTRAINT public payments payments_pkey postgres
set -euo pipefail
work=$(cat /tmp/payments_drill_work)
: "${SUPABASE_DB_URL:?}"
printf '%s\n' 'Triggering incident via SELECT public.run_incident();'
psql "$SUPABASE_DB_URL" -X -v ON_ERROR_STOP=1 -c 'SELECT public.run_incident();'
printf '%s\n' 'Incident function completed; verifying incident log entry exists.'
psql "$SUPABASE_DB_URL" -X -v ON_ERROR_STOP=1 -c "SELECT count(*) AS incident_log_rows FROM public.incident_log;"
Triggering incident via SELECT public.run_incident();
run_incident
-------------------
incident executed
(1 row)
Incident function completed; verifying incident log entry exists.
incident_log_rows
-------------------
1
(1 row)
set -euo pipefail work=$(cat /tmp/payments_drill_work) psql "$SUPABASE_DB_URL" -X -v ON_ERROR_STOP=1 -c 'SELECT count(*) AS payments_after_incident FROM public.payments;' printf '%s\n' 'Restoring only public.payments from the verified custom-format backup.' pg_restore --clean --if-exists --exit-on-error --dbname="$SUPABASE_DB_URL" "$work/payments.dump" printf '%s\n' 'Verifying restored table and incident log.' psql "$SUPABASE_DB_URL" -X -v ON_ERROR_STOP=1 <<'SQL' SELECT count(*) AS payments_restored FROM public.payments; SELECT count(*) AS incident_log_rows FROM public.incident_log; SQL
payments_after_incident
-------------------------
54
(1 row)
Restoring only public.payments from the verified custom-format backup.
Verifying restored table and incident log.
payments_restored
-------------------
80
(1 row)
incident_log_rows
-------------------
1
(1 row)
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