env | grep -i supabase; echo "---"; which psql; psql --version
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> --- /usr/bin/psql psql (PostgreSQL) 18.4 (Debian 18.4-1.pgdg12+1)
psql "$SUPABASE_DB_URL" -c "\dt public.*" 2>&1 | head -50
Did not find any tables named "public.*".
cat > /tmp/schema.sql <<'EOF'
CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- 1) authors
CREATE TABLE public.authors (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
name text NOT NULL,
email text NOT NULL UNIQUE
);
-- 2) courses
CREATE TABLE public.courses (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
author_id uuid NOT NULL REFERENCES public.authors(id),
title text NOT NULL,
price_cents integer NOT NULL CHECK (price_cents >= 0),
published boolean NOT NULL DEFAULT false,
created_at timestamptz NOT NULL DEFAULT now()
);
-- 3) enrollments
CREATE TABLE public.enrollments (
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
course_id uuid NOT NULL REFERENCES public.courses(id) ON DELETE CASCADE,
student_email text NOT NULL,
enrolled_at timestamptz NOT NULL DEFAULT now(),
UNIQUE (course_id, student_email)
);
-- indexes
CREATE INDEX idx_courses_author_id ON public.courses(author_id);
CREATE INDEX idx_enrollments_student_email ON public.enrollments(student_email);
EOF
psql "$SUPABASE_DB_URL" -v ON_ERROR_STOP=1 -f /tmp/schema.sql 2>&1psql:/tmp/schema.sql:1: NOTICE: extension "pgcrypto" already exists, skipping CREATE EXTENSION CREATE TABLE CREATE TABLE CREATE TABLE CREATE INDEX CREATE INDEX
psql "$SUPABASE_DB_URL" -c "\d public.authors" -c "\d public.courses" -c "\d public.enrollments" 2>&1
Table "public.authors"
Column | Type | Collation | Nullable | Default
--------+------+-----------+----------+-------------------
id | uuid | | not null | gen_random_uuid()
name | text | | not null |
email | text | | not null |
Indexes:
"authors_pkey" PRIMARY KEY, btree (id)
"authors_email_key" UNIQUE CONSTRAINT, btree (email)
Referenced by:
TABLE "courses" CONSTRAINT "courses_author_id_fkey" FOREIGN KEY (author_id) REFERENCES authors(id)
Table "public.courses"
Column | Type | Collation | Nullable | Default
-------------+--------------------------+-----------+----------+-------------------
id | uuid | | not null | gen_random_uuid()
author_id | uuid | | not null |
title | text | | not null |
price_cents | integer | | not null |
published | boolean | | not null | false
created_at | timestamp with time zone | | not null | now()
Indexes:
"courses_pkey" PRIMARY KEY, btree (id)
"idx_courses_author_id" btree (author_id)
Check constraints:
"courses_price_cents_check" CHECK (price_cents >= 0)
Foreign-key constraints:
"courses_author_id_fkey" FOREIGN KEY (author_id) REFERENCES authors(id)
Referenced by:
TABLE "enrollments" CONSTRAINT "enrollments_course_id_fkey" FOREIGN KEY (course_id) REFERENCES courses(id) ON DELETE CASCADE
Table "public.enrollments"
Column | Type | Collation | Nullable | Default
---------------+--------------------------+-----------+----------+------------------------------
id | bigint | | not null | generated always as identity
course_id | uuid | | not null |
student_email | text | | not null |
enrolled_at | timestamp with time zone | | not null | now()
Indexes:
"enrollments_pkey" PRIMARY KEY, btree (id)
"enrollments_course_id_student_email_key" UNIQUE CONSTRAINT, btree (course_id, student_email)
"idx_enrollments_student_email" btree (student_email)
Foreign-key constraints:
"enrollments_course_id_fkey" FOREIGN KEY (course_id) REFERENCES courses(id) ON DELETE CASCADE
curl -s -o /dev/null -w "courses: HTTP %{http_code}\n" \
"$SUPABASE_URL/rest/v1/courses" \
-H "apikey: $SUPABASE_ANON_KEY" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY"
curl -s -o /dev/null -w "enrollments: HTTP %{http_code}\n" \
"$SUPABASE_URL/rest/v1/enrollments" \
-H "apikey: $SUPABASE_ANON_KEY" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY"
curl -s -o /dev/null -w "authors: HTTP %{http_code}\n" \
"$SUPABASE_URL/rest/v1/authors" \
-H "apikey: $SUPABASE_ANON_KEY" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY"
echo "--- body check ---"
curl -s "$SUPABASE_URL/rest/v1/courses" \
-H "apikey: $SUPABASE_ANON_KEY" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY"courses: HTTP 200 enrollments: HTTP 200 authors: HTTP 200 --- body check --- []
5 earlier narration turn(s) are in the raw transcript.
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