Skip to content

fix(evals): let secure-default-grants agents apply the fix and relax the judge - #506

Merged
raulb merged 8 commits into
mainfrom
fix/secure-default-grants-apply-and-judge
Nov 20, 2026
Merged

raulb merged 8 commits into
mainfrom
fix/secure-default-grants-apply-and-judge

Conversation

@raulb

@raulb raulb commented Nov 13, 2026

Copy link
Copy Markdown
Member

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

…the judge

After #463 the fixture reproduces the bug, but the eval still failed 6/6 on the
Nov 13 main run for two reasons:

- 5/6 runs wrote the grant migration but never applied it ("apply it through
  your normal workflow"), so the live-DB grant checks saw no grants. The prompt
  now says the local project is already running and to apply the fix to it,
  matching resolve-sdk-001.
- 3/6 runs failed the judge only because the transcript never named
  api.auto_expose_new_tables. The rubric now accepts a correct diagnosis of
  missing authenticated grants without naming the setting.

Verified locally: codex-gpt-6-luna 3/3 and codex-gpt-6-luna-no-skills 3/3.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@raulb
raulb requested a review from a team as a code owner November 13, 2026 16:33
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
evals Ready Ready Preview Nov 20, 2026 2:33pm UTC

Request Review

@raulb raulb self-assigned this Nov 13, 2026
@raulb raulb added the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Nov 13, 2026
Resolve the conflict in apps/web/src/data/regression-eval-results.json by
taking main's latest refresh (#519) and keeping this PR's CI results for
resolve-dataapi-002-secure-default-grants, which ran with the new prompt and
judge (5/6 pass). All other entries match main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the conflict in apps/web/src/data/regression-eval-results.json by
taking main's latest refresh (#524) and keeping this PR's CI results for
resolve-dataapi-002-secure-default-grants (6/6 pass in the latest CI
refresh). All other entries match main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@raulb raulb removed the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Nov 18, 2026

@barryroodt barryroodt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge, Raúl. I’d loosen the first line of the rubric too. It still asks for “secure-by-default”, so the judge could fail an answer that explains the missing grant in plain language.

raulb and others added 2 commits November 20, 2026 15:32
…rants judge

The rubric's opening line still framed a pass as a "secure-by-default"
diagnosis. Reword it so an answer that explains the missing authenticated
grants in plain language passes, as the bullet list already allows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the conflict in apps/web/src/data/regression-eval-results.json by
taking main's latest refresh and keeping this PR's CI results for
resolve-dataapi-002-secure-default-grants. All other entries match main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@raulb
raulb merged commit 81ba7ab into main Nov 20, 2026
10 checks passed
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
@raulb
raulb deleted the fix/secure-default-grants-apply-and-judge branch November 25, 2026 14:54

This branch was successfully deployed

1 active deployment
Preview — 594e376c Deployed Nov 20, 2026 by vercel[bot]
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