Skip to content

fix(evals): resolve-dataapi-002-secure-default-grants eval - #463

Merged
raulb merged 1 commit into
mainfrom
rb/fix-secure-default-grants-fixture
Nov 10, 2026
Merged

raulb merged 1 commit into
mainfrom
rb/fix-secure-default-grants-fixture

Conversation

@raulb

@raulb raulb commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Problem

resolve-dataapi-002-secure-default-grants failed in 36 of 36 main-branch regression runs (codex-gpt-6-luna and -no-skills, Oct 23–29, 18 runs each), so no agent could pass it.

The fixture leaves [api].auto_expose_new_tables unset and assumes that means secure-by-default.

Fix

Set auto_expose_new_tables = false explicitly in the fixture's config.toml, the way a project that opted into secure-by-default looks. The README explains why the setting has to be explicit.

I first tried revoking the grants in the seed migration (2/6 passed locally). The agent read the revoke and blamed it, so the judge failed the diagnosis. Setting the value in config avoids giving the answer away.

Verification

Local run on Supabase CLI 2.117.0:
pnpm eval -- --eval resolve-dataapi-002-secure-default-grants --experiment codex-gpt-6-luna --experiment codex-gpt-6-luna-no-skills --runs 3

Experiment Before (CI, 18 runs) After (local, 3 runs)
codex-gpt-6-luna 0/18 2/3
codex-gpt-6-luna-no-skills 0/18 1/3

All deterministic checks, including the anon-grant check, passed in 6 of 6 local runs. The 3 failures are all the judge: the agent fixed the grants correctly but didn't name auto_expose_new_tables as the cause. That's the behavior this eval is meant to catch.

Related to AI-1261

…ts fixture

The eval relied on an unset `[api].auto_expose_new_tables` meaning
secure-by-default. supabase/cli#6337 restored `true` as the unset default,
so with the 2.117.0 pin the table started fully granted to anon and
authenticated, the bug never reproduced, and every run failed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@raulb
raulb requested a review from a team as a code owner October 29, 2026 16:00
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
evals Ignored Ignored Oct 29, 2026 4:00pm UTC

Request Review

@raulb raulb self-assigned this Oct 30, 2026
@raulb
raulb requested a review from mattrossman October 30, 2026 14:27
@raulb raulb changed the title fix(evals): set auto_expose_new_tables = false in secure-default-grants fixture fix(evals): fix resolve-dataapi-002-secure-default-grants eval Oct 30, 2026
@raulb raulb changed the title fix(evals): fix resolve-dataapi-002-secure-default-grants eval fix(evals): resolve-dataapi-002-secure-default-grants eval Oct 30, 2026
@mattrossman

Copy link
Copy Markdown
Collaborator

Thanks for digging into this! For context on why the setting was unset in the original eval from #81, at the time the CLI had just changed the default to false in anticipation of the secure-by-default rollout. I preferred leaving the config empty because I wanted to see if agents would know about the behavior without seeing it hinted at in the config.

As we've upgraded the CLI version broadly in evals, we've dropped the scenario-specific pins that may have been superseded. What surprises me is the CLI later changed the default back to true because the cloud rollout hadn’t landed yet: supabase/cli#6337. I guess it's taking longer than expected for the change to rollout.

Now that the default has switched back, setting it false explicitly makes sense.

@raulb
raulb merged commit 5efc09d into main Nov 10, 2026
10 checks passed
@raulb
raulb deleted the rb/fix-secure-default-grants-fixture branch November 10, 2026 18:01
raulb added a commit that referenced this pull request Nov 20, 2026
…the judge (#506)

## Problem

After #463 the `resolve-dataapi-002-secure-default-grants` fixture
reproduces the bug, but the eval still failed 6/6 on the Nov 13 main
regression run (commit `dc58e70`). All 9 deterministic checks pass when
the fix is applied, so two other things are failing it:

- **The migration is never applied (5/6 runs).** Agents wrote the grant
migration, then ended with "apply it through your normal migration
workflow" or "I couldn't run the migration here". The live-DB grant
checks then saw no grants. Same "wrote the fix, didn't apply it" ending
as the MCP repo-hunting. The prompt never said a local stack was
running.
- **The judge is too strict (3/6 runs).** One run passed all 9
deterministic checks and applied the fix correctly, but failed because
the transcript never named `api.auto_expose_new_tables`.

## Fix

- `PROMPT.md`: say the local Supabase project is already running and the
fix should be applied to it, the same phrasing `resolve-sdk-001` uses.
- `EVAL.ts` rubric: a correct diagnosis of missing explicit grants for
`authenticated`, with RLS already in place, passes without naming the
setting.

## Verification

`pnpm eval -- --eval resolve-dataapi-002-secure-default-grants
--experiment codex-gpt-6-luna --experiment codex-gpt-6-luna-no-skills
--runs 3`: 6/6 pass, 10/10 checks each (local runs only; the main CI run
is the real check).

Part of AI-1261.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
barryroodt added a commit that referenced this pull request Nov 24, 2026
## Problem

PRs here inherit the org template from `supabase/.github`, and nobody
fills it in. Recent evals PRs (#463, #466, #506, #514, #535) all go
Problem, then Changes or Fix, then Verification with the exact `pnpm
eval` command and a pass count. There's also nowhere that tells authors
how to show CI results, which changed when #535 moved results to
Braintrust only.

## Changes

Adds `.github/PULL_REQUEST_TEMPLATE.md` with the shape those PRs already
use:

- **Problem** and **Changes** replace the org template's four prompts.
- **How to Review** is optional, for multi-file PRs. The eval reading
path sits in a comment and links to the reviewer checklist in
`CONTRIBUTING.md` so it doesn't get copied.
- **Verification** asks for the exact commands and before/after pass
counts. The eval checklist matches `CONTRIBUTING.md` after #535:
`run-evals-changed` or Refresh eval results, then link the Braintrust
run.
- A closing comment prompts for the Linear issue.

Small PRs can still replace the whole thing with a couple of sentences.

## Verification

One new file, `.github/PULL_REQUEST_TEMPLATE.md`. Both `CONTRIBUTING.md`
anchors it links to (`#reviewing-an-eval`,
`#submitting-evals-for-review`) exist on `main`.

Closes AI-1130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants