Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 38 additions & 50 deletions apps/web/src/data/regression-eval-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -1231,41 +1231,35 @@
],
"suite": "regression",
"interface": "cli",
"passed": false,
"passed": true,
"checks": [
{
"name": "the app's tables exist and accept the rows its queries write",
"passed": false,
"notes": "Stopped services: [supabase_inbucket_sandbox-database-tables supabase_realtime_sandbox-database-tables supabase_storage_sandbox-database-tables supabase_imgproxy_sandbox-database-tables supabase_pg_meta_sandbox-database-tables supabase_studio_sandbox-database-tables supabase_edge_runtime_sandbox-database-tables supabase_analytics_sandbox-database-tables supabase_vector_sandbox-database-tables supabase_pooler_sandbox-database-tables]\nA new version of Supabase CLI is available: v2.116.0 (currently installed v2.67.1)\nWe recommend updating regularly for new features and bug fixes: https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli\nERROR: relation \"routine_library\" does not exist\nLINE 1: INSERT INTO routine_library (title, category)\n ^\n"
"passed": true
},
{
"name": "row level security is enabled on every table in the public schema",
"passed": false,
"notes": "the app's tables are missing: routine_logs, routine_library"
"passed": true
},
{
"name": "every table with row level security enabled carries at least one policy",
"passed": true
},
{
"name": "a signed-out visitor can browse the starter routine library",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "a signed-out visitor cannot read anyone's routines",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "the signed-in owner reads their own routines and nobody else's",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "a signed-out visitor cannot create a routine",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "the agent read the Tables and Data guide the prompt referenced",
Expand All @@ -1287,18 +1281,18 @@
"calls": [
{
"source": "web_fetch",
"query": "Extract all guidance about creating tables in Supabase: syntax, primary keys, data types, columns, schemas, relationships (foreign keys), RLS enabling, GUI vs SQL, naming conventions, and best practices mentioned in this specific page.",
"query": "Return the full raw content of this page verbatim, including any instructions about RLS, policies, permissions, or security.",
"hasContent": true,
"pages": [
{
"url": "https://supabase.com/docs/guides/database/tables.md"
"url": "https://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md"
}
],
"resultChars": 1735
"resultChars": 5258
}
]
},
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://supabase.com/docs/guides/database/tables.md",
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nThe rest of the team is already building against `src/queries.ts`, so use the\ntable and column names it reads and writes:\n\n- `routines` with `owner_id`, `title`, `cadence`, and `created_at`\n- `routine_logs` with `routine_id` and `completed_on`\n- `routine_library` with `title` and `category`\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md",
"promptSourcePath": "evals/build-docs-006-database-tables/PROMPT.md",
"run": 1,
"sourcePath": "claude-code-sonnet-5/build-docs-006-database-tables/run-1/result.json"
Expand All @@ -1325,41 +1319,35 @@
],
"suite": "regression",
"interface": "cli",
"passed": false,
"passed": true,
"checks": [
{
"name": "the app's tables exist and accept the rows its queries write",
"passed": false,
"notes": "Stopped services: [supabase_inbucket_sandbox-database-tables supabase_realtime_sandbox-database-tables supabase_storage_sandbox-database-tables supabase_imgproxy_sandbox-database-tables supabase_pg_meta_sandbox-database-tables supabase_studio_sandbox-database-tables supabase_edge_runtime_sandbox-database-tables supabase_analytics_sandbox-database-tables supabase_vector_sandbox-database-tables supabase_pooler_sandbox-database-tables]\nA new version of Supabase CLI is available: v2.116.0 (currently installed v2.67.1)\nWe recommend updating regularly for new features and bug fixes: https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli\nERROR: relation \"routine_library\" does not exist\nLINE 1: INSERT INTO routine_library (title, category)\n ^\n"
"passed": true
},
{
"name": "row level security is enabled on every table in the public schema",
"passed": false,
"notes": "the app's tables are missing: routine_library"
"passed": true
},
{
"name": "every table with row level security enabled carries at least one policy",
"passed": true
},
{
"name": "a signed-out visitor can browse the starter routine library",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "a signed-out visitor cannot read anyone's routines",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "the signed-in owner reads their own routines and nobody else's",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "a signed-out visitor cannot create a routine",
"passed": false,
"notes": "not run: the app's tables did not accept the rows its queries write"
"passed": true
},
{
"name": "the agent read the Tables and Data guide the prompt referenced",
Expand All @@ -1381,18 +1369,18 @@
"calls": [
{
"source": "web_fetch",
"query": "Extract all guidance about how to create tables in Supabase: syntax, column types, primary keys, schemas (public vs custom), foreign key relationships, enabling RLS, naming conventions, and any complete example table creation code shown on the page. Include everything verbatim where possible.",
"query": "Extract the full content of this guide verbatim, especially any instructions about creating tables, primary keys, foreign keys, RLS policies, and any code examples.",
"hasContent": true,
"pages": [
{
"url": "https://supabase.com/docs/guides/database/tables.md"
"url": "https://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md"
}
],
"resultChars": 2365
"resultChars": 2233
}
]
},
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://supabase.com/docs/guides/database/tables.md",
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nThe rest of the team is already building against `src/queries.ts`, so use the\ntable and column names it reads and writes:\n\n- `routines` with `owner_id`, `title`, `cadence`, and `created_at`\n- `routine_logs` with `routine_id` and `completed_on`\n- `routine_library` with `title` and `category`\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md",
"promptSourcePath": "evals/build-docs-006-database-tables/PROMPT.md",
"run": 2,
"sourcePath": "claude-code-sonnet-5/build-docs-006-database-tables/run-2/result.json"
Expand Down Expand Up @@ -1469,18 +1457,18 @@
"calls": [
{
"source": "web_fetch",
"query": "Summarize the guidance on creating tables in Supabase: naming conventions, column types, primary keys, foreign keys, schemas, RLS considerations mentioned on this page. Include any code examples for creating tables with the Supabase dashboard/SQL editor, especially around identity columns, timestamps, relationships.",
"query": "Extract the full content of this guide verbatim, especially anything about creating tables, primary keys, foreign keys, RLS policies, and any SQL examples.",
"hasContent": true,
"pages": [
{
"url": "https://supabase.com/docs/guides/database/tables.md"
"url": "https://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md"
}
],
"resultChars": 1570
"resultChars": 2477
}
]
},
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://supabase.com/docs/guides/database/tables.md",
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nThe rest of the team is already building against `src/queries.ts`, so use the\ntable and column names it reads and writes:\n\n- `routines` with `owner_id`, `title`, `cadence`, and `created_at`\n- `routine_logs` with `routine_id` and `completed_on`\n- `routine_library` with `title` and `category`\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md",
"promptSourcePath": "evals/build-docs-006-database-tables/PROMPT.md",
"run": 3,
"sourcePath": "claude-code-sonnet-5/build-docs-006-database-tables/run-3/result.json"
Expand Down Expand Up @@ -5327,18 +5315,18 @@
"calls": [
{
"source": "web_fetch",
"query": "Extract the full guide content about creating tables in Supabase: syntax, best practices, primary keys, foreign keys/relationships, RLS enabling, schemas, data types, naming conventions, and any recommended workflow (e.g., using migrations).",
"query": "Extract the full guide content: how to create tables, columns, primary keys, foreign keys, RLS policies, and any conventions recommended (naming, timestamps, identity columns, etc). Give full detail, not a summary.",
"hasContent": true,
"pages": [
{
"url": "https://supabase.com/docs/guides/database/tables.md"
"url": "https://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md"
}
],
"resultChars": 4585
"resultChars": 7784
}
]
},
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://supabase.com/docs/guides/database/tables.md",
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nThe rest of the team is already building against `src/queries.ts`, so use the\ntable and column names it reads and writes:\n\n- `routines` with `owner_id`, `title`, `cadence`, and `created_at`\n- `routine_logs` with `routine_id` and `completed_on`\n- `routine_library` with `title` and `category`\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md",
"promptSourcePath": "evals/build-docs-006-database-tables/PROMPT.md",
"run": 1,
"sourcePath": "claude-code-sonnet-5-no-skills/build-docs-006-database-tables/run-1/result.json"
Expand Down Expand Up @@ -5409,18 +5397,18 @@
"calls": [
{
"source": "web_fetch",
"query": "Summarize all guidance on creating tables: syntax, primary keys, foreign keys/relationships, data types, nullability, schemas, naming conventions, RLS notes, and any best practices mentioned.",
"query": "Extract the full content of this guide about creating tables, including any guidance on RLS (row level security), primary keys, foreign keys, and any specific recommendations or requirements for schema setup.",
"hasContent": true,
"pages": [
{
"url": "https://supabase.com/docs/guides/database/tables.md"
"url": "https://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md"
}
],
"resultChars": 1715
"resultChars": 2344
}
]
},
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://supabase.com/docs/guides/database/tables.md",
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nThe rest of the team is already building against `src/queries.ts`, so use the\ntable and column names it reads and writes:\n\n- `routines` with `owner_id`, `title`, `cadence`, and `created_at`\n- `routine_logs` with `routine_id` and `completed_on`\n- `routine_library` with `title` and `category`\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md",
"promptSourcePath": "evals/build-docs-006-database-tables/PROMPT.md",
"run": 2,
"sourcePath": "claude-code-sonnet-5-no-skills/build-docs-006-database-tables/run-2/result.json"
Expand Down Expand Up @@ -5491,18 +5479,18 @@
"calls": [
{
"source": "web_fetch",
"query": "Extract the full guide content about creating tables in Supabase: best practices, naming conventions, primary keys, foreign keys/relationships, RLS considerations, use of schemas, data types, defaults, timestamps, and any migration workflow guidance. I need the complete methodology to create a database schema following this guide exactly.",
"query": "Extract the full guide content about creating tables, especially anything about RLS (row level security), policies, primary keys, foreign keys, naming conventions, migrations, and best practices for setting up tables in Supabase.",
"hasContent": true,
"pages": [
{
"url": "https://supabase.com/docs/guides/database/tables.md"
"url": "https://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md"
}
],
"resultChars": 2623
"resultChars": 4026
}
]
},
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://supabase.com/docs/guides/database/tables.md",
"prompt": "I'm building a habit tracker. People sign up, create their own routines, and\ntick them off each day. There's also a starter set of routines anyone can\nbrowse before they sign up.\n\nCreate the database for it.\n\nThe rest of the team is already building against `src/queries.ts`, so use the\ntable and column names it reads and writes:\n\n- `routines` with `owner_id`, `title`, `cadence`, and `created_at`\n- `routine_logs` with `routine_id` and `completed_on`\n- `routine_library` with `title` and `category`\n\nRead the guide below before you start and rely on it for how to set this up,\nrather than on what you already know.\n\nREFERENCE\nhttps://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md",
"promptSourcePath": "evals/build-docs-006-database-tables/PROMPT.md",
"run": 3,
"sourcePath": "claude-code-sonnet-5-no-skills/build-docs-006-database-tables/run-3/result.json"
Expand Down
3 changes: 2 additions & 1 deletion evals/build-docs-006-database-tables/EVAL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {
type Fixtures,
} from './access.js';

const GUIDE_PATH = 'guides/database/tables';
const GUIDE_PATH =
'docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables';

const scorer: LocalStackScorer = async (ctx) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion evals/build-docs-006-database-tables/PROMPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Read the guide below before you start and rely on it for how to set this up,
rather than on what you already know.

REFERENCE
https://supabase.com/docs/guides/database/tables.md
https://docs-git-docs-tables-rls-supabase.vercel.app/docs/guides/database/tables.md
6 changes: 5 additions & 1 deletion packages/core/src/docs-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ function extractGraphqlQuery(
*/
function isSupabaseApexUrl(value: string): boolean {
try {
return new URL(value).hostname === 'supabase.com';
const { hostname } = new URL(value);
return (
hostname === 'supabase.com' ||
/^docs-git-[a-z0-9-]+-supabase\.vercel\.app$/.test(hostname)
);
} catch {
return false;
}
Expand Down