A SECURITY DEFINER function we believed was locked down could be called by anyone with the publishable key. Postgres role grants, Supabase defaults, and why the comment was true and the code was not.
process.env[name] is invisible to Next's build-time substitution. The server keeps working, so every route handler and curl check passes while the page is broken for every human.
Coding agents are good at producing plausible patches. Reproduction is what separates a repair that works from one that merely looks right — and it is the step most autonomous-fix tooling skips.