Repository navigation
platform-lite: real advisor lints + large-backlog get_issues regression eval - #552
Open
francis-codex wants to merge 2 commits into
Open
francis-codex wants to merge 2 commits into
francis-codex wants to merge 2 commits into
Conversation
|
@francis-codex is attempting to deploy a commit to the Supabase Team on Vercel. A member of the Team first needs to authorize it. |
…on eval Adds 10 Supabase database linter checks to platform-lite (security: policy_exists_rls_disabled, rls_enabled_no_policy, security_definer_view, function_search_path_mutable, materialized_view_in_api; performance: unindexed_foreign_keys, auth_rls_initplan, no_primary_key, multiple_permissive_policies, duplicate_index). The performance advisor now returns real lints instead of an empty list. rls_disabled_in_public remediation is now the docs URL, matching the hosted API. New regression eval investigate-database-001-large-advisor-backlog seeds a Mockamaster-shaped project: 547 findings in 11 issues, 8 at warning or worse, and 3 critical issues that all trace to public.payments having RLS disabled. It checks get_issues was called, its output stayed under 100k chars without harness truncation, and the agent ranked enabling RLS on public.payments first. The experiment pins supabase/mcp at a0137116 (supabase#546 head) so it runs without a local MCP checkout. Drop the pin once get_issues ships. Refs supabase/mcp#546, supabase/mcp#574
francis-codex
force-pushed
the
feat/platform-lite-advisor-lints-large-backlog
branch
from
November 25, 2026 12:08
b92a503 to
184f2bb
Compare
3 tasks
4 tasks
Author
|
repinned to the #546 merge commit on main (01f8021) now that it's merged. live run against it: 3/3, largest get_issues result 64.8k chars, agent fixed rls on payments first. i'll drop the pin once get_issues is in a published release, and re-measure after the docs_url change lands. |
francis-codex
force-pushed
the
feat/platform-lite-advisor-lints-large-backlog
branch
from
November 25, 2026 16:22
cef8df9 to
0e4e5fd
Compare
barryroodt
pushed a commit
to supabase/mcp
that referenced
this pull request
Nov 26, 2026
## What kind of change does this PR introduce? Bug fix (response size). Follow-up to #546, as @barryroodt asked on #574 ([comment](#574 (comment))). Refs #124. ## What is the current behavior? Every finding in `get_issues` repeats its issue's `docs_url`. In splinter, each lint has one fixed remediation link, so these copies add no data for splinter lints. On a project the size of the Mockamaster capture in #546 (547 findings in 11 issues), the copies are about 22% of the default response. ## What is the new behavior? Findings no longer carry `docs_url`. The issue keeps its `docs_url`, so every finding still reaches the link through its issue. Nothing else in the output changes. | Call | Before | After | Saved (chars / tokens) | |---|---:|---:|---:| | default | 62,296 chars, 15,225 tokens | 48,243 chars, 11,614 tokens | 22.6% / 23.7% | | `severity: warning` | 43,789 chars, 10,533 tokens | 34,836 chars, 8,252 tokens | 20.4% / 21.7% | I ran the real splinter SQL in PGlite on the supabase/evals#552 seed and fed the lints to the real `get_issues` on `main`. Splinter also flags 41 unused indexes there, because a fresh database has no index scans. I left those out to match 547 findings in 11 issues. With them, the default call goes from 69,279 to 53,346 chars (23.0%). Tokens are OpenAI `o200k_base`; I did not count Claude tokens. In every call I ran, each removed link was equal to its issue's link, and the rest of the output is byte-identical. There is exactly one way this change can lose data: two findings of the same lint with different docs links, where the second link is now gone. I checked splinter at [`cc529aa9`](https://github.com/supabase/splinter/blob/cc529aa9d3eeffd2e64576c7591e60b22abd205c/splinter.sql): each of its 31 lints has one constant remediation, so this can't happen there. I can't see the platform-only and health lints, though: can you confirm that none of them gives two findings of one lint different links? ## How to Review 1. **Output contract** - `packages/mcp-server-supabase/src/issues.ts` - `docs_url` leaves the finding schema and the finding object. The issue-level `docs_url` does not change. `get_issues` uses this schema as its output schema, so `tools/list` changes too. 2. **Tests** - `packages/mcp-server-supabase/src/server.debugging.test.ts`: a new size test calls `get_issues` through the server harness on 547 findings in 11 issues. The default response must stay under `LARGE_PROJECT_ISSUES_BUDGET` (48,000 chars). - `packages/mcp-server-supabase/src/issues.test.ts`: one #546 test gave two findings of one issue different links. It now checks the issue's link, and that a finding has no `docs_url`. **Review questions** - [ ] Is 48,000 chars a good budget? It is about 10% above today's 43,493 for this fixture, so it catches growth early. It is well under the 25,000-token limit from #124. - [ ] If a platform-only or health lint can give different links (question above), should I keep `docs_url` on a finding only when it differs from the issue's link? - [ ] Should this land before the release in #586? Then no published version has `docs_url` on findings. - [ ] Do the tests check output, not implementation details? ## Verification - With `main`'s `issues.ts`, the new size test fails with `expected 56866 to be less than 48000`. On this branch it passes at 43,493. - `pnpm format:check`, `tsc --noEmit`, and `vitest run --project unit`: 1028/1028 passed. ## Additional context This changes the `get_issues` output schema: `issues[].affected[]` no longer has `docs_url`. So it is best merged before that schema goes into a ChatGPT submission. If #586 merges first, the field is in a published release. Then I will mark the commit as breaking, as CONTRIBUTING asks for a contract step. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs supabase/mcp#546, supabase/mcp#574
platform-lite's security advisor only returned rls_disabled_in_public, and the performance advisor returned an empty list. That meant no eval could exercise get_issues on a project with a real backlog. #574 is about that case: Mockamaster-sized projects with hundreds of findings, where ungrouped advisor output blows past the agent's tool-output limit.
platform-lite
docs_url.eval: regression/investigate-database-001-large-advisor-backlog
experiment: regression/claude-code-opus-5.5-large-advisor-backlog
supabaseMcpServer({ revision })pinned toa0137116(the feat(evals): support suite-owned customMetadata in eval frontmatter #546 head), same pattern as test(debugging): evaluate grouped issues coverage DEBUG-311 #542. It runs withoutSUPABASE_MCP_REPO_PATH.Measured on the seed (MCP at a0137116, stdio client):
The 100k bound is roughly the 25k-token tool output limit common MCP clients enforce. If output regresses to ungrouped, it fails check 2.
Tests:
pnpm testin packages/platform-lite passes 110/110,pnpm typecheckis clean, andeval:dryplans the eval on the new experiment.Live run on the pinned experiment, no local MCP checkout: 3/3 checks in 86s. get_issues returned 64.8KB and the agent put enabling RLS on public.payments first.