From b9870cad38ee50b3bbafce3c9cb5fdbac21efba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1borj=C3=A1ni-Szab=C3=B3=20=C3=81d=C3=A1m?= <117768520+Programcode@users.noreply.github.com> Date: Thu, 22 Oct 2026 15:53:32 +0000 Subject: [PATCH] Pin the Supabase CLI to 2.121.0 so every worktree uses one image set Each Supabase CLI version pulls its own ~7 GB set of Docker images. The VPS had 2.116.0 in /usr/local/bin and 2.121.0 from npm, so worktrees kept both sets. - Add supabase 2.121.0 as an exact devDependency. - db-gate.sh, teardown.sh, agent-stack.sh and the verify harness put the repo-pinned CLI first on PATH (.superset/lib/supabase-cli.sh). - Bump the setup-cli steps in CI from 2.116.0 to 2.121.0. - AGENTS.md and docs: use only the pinned CLI, never a global or @latest. --- .claude/skills/verify-debatelab/bin/verify.sh | 2 + .github/workflows/agentic-e2e.yml | 4 +- .github/workflows/database.yml | 2 +- .github/workflows/live-e2e.yml | 2 +- .github/workflows/model-matrix.yml | 2 +- .superset/db-gate.sh | 2 + .superset/lib/supabase-cli.sh | 14 ++ .superset/teardown.sh | 3 + AGENTS.md | 6 +- README.md | 2 +- docs/development.md | 6 +- docs/testing.md | 6 +- package-lock.json | 234 ++++++++++++++++++ package.json | 1 + scripts/agent-stack.sh | 4 +- src/test/scripts/db-gate.test.ts | 1 + supabase/README.md | 6 +- 17 files changed, 278 insertions(+), 19 deletions(-) create mode 100644 .superset/lib/supabase-cli.sh diff --git a/.claude/skills/verify-debatelab/bin/verify.sh b/.claude/skills/verify-debatelab/bin/verify.sh index 661b1c272..57070704b 100755 --- a/.claude/skills/verify-debatelab/bin/verify.sh +++ b/.claude/skills/verify-debatelab/bin/verify.sh @@ -25,6 +25,8 @@ SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" REPO="$(git -C "$SKILL_DIR" rev-parse --show-toplevel)" cd "$REPO" source "$REPO/.superset/lib/lock.sh" +source "$REPO/.superset/lib/supabase-cli.sh" +use_pinned_supabase_cli "$REPO" DB_LOCK="$HOME/.superset/debatelab-db.lock" FAKE_PROVIDER=debatelab-fake-openrouter diff --git a/.github/workflows/agentic-e2e.yml b/.github/workflows/agentic-e2e.yml index be4cbde71..b8d68505e 100644 --- a/.github/workflows/agentic-e2e.yml +++ b/.github/workflows/agentic-e2e.yml @@ -80,7 +80,7 @@ jobs: - name: Set up Supabase CLI uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 with: - version: 2.116.0 + version: 2.121.0 - name: Install dependencies run: npm ci @@ -186,7 +186,7 @@ jobs: - name: Set up Supabase CLI uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 with: - version: 2.116.0 + version: 2.121.0 - name: Install dependencies run: npm ci diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 5d4c91132..efb81124a 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -72,7 +72,7 @@ jobs: - name: Set up Supabase CLI uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 with: - version: 2.116.0 + version: 2.121.0 - name: Install dependencies run: npm ci diff --git a/.github/workflows/live-e2e.yml b/.github/workflows/live-e2e.yml index e1adf8564..e559a44b3 100644 --- a/.github/workflows/live-e2e.yml +++ b/.github/workflows/live-e2e.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Supabase CLI uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 with: - version: 2.116.0 + version: 2.121.0 - name: Install dependencies run: npm ci diff --git a/.github/workflows/model-matrix.yml b/.github/workflows/model-matrix.yml index 19db35d24..8b9158c72 100644 --- a/.github/workflows/model-matrix.yml +++ b/.github/workflows/model-matrix.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Supabase CLI uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 with: - version: 2.116.0 + version: 2.121.0 - name: Install dependencies run: npm ci diff --git a/.superset/db-gate.sh b/.superset/db-gate.sh index 7a92b0e3b..279b42034 100755 --- a/.superset/db-gate.sh +++ b/.superset/db-gate.sh @@ -21,6 +21,8 @@ esac DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$DIR/lib/lock.sh" +source "$DIR/lib/supabase-cli.sh" +use_pinned_supabase_cli "$(cd "$DIR/.." && pwd)" DB_LOCK="$HOME/.superset/debatelab-db.lock" FAKE_PROVIDER=debatelab-fake-openrouter diff --git a/.superset/lib/supabase-cli.sh b/.superset/lib/supabase-cli.sh new file mode 100644 index 000000000..e1a02a04d --- /dev/null +++ b/.superset/lib/supabase-cli.sh @@ -0,0 +1,14 @@ +# Puts the repo-pinned Supabase CLI (the exact `supabase` devDependency in +# package.json) first on PATH. Every worktree then runs one CLI version, so +# Docker keeps one Supabase image set instead of one per CLI version. +# Tests point DEBATELAB_SUPABASE_BIN_DIR at a stub directory instead. +# +# usage: use_pinned_supabase_cli +use_pinned_supabase_cli() { + local bin="${DEBATELAB_SUPABASE_BIN_DIR:-$1/node_modules/.bin}" + if [ ! -x "$bin/supabase" ]; then + echo "The repo-pinned Supabase CLI is missing ($bin/supabase). Run npm ci first." >&2 + return 1 + fi + export PATH="$bin:$PATH" +} diff --git a/.superset/teardown.sh b/.superset/teardown.sh index 61b591503..a244540af 100755 --- a/.superset/teardown.sh +++ b/.superset/teardown.sh @@ -6,6 +6,9 @@ set -euo pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$DIR/lib/lock.sh" +source "$DIR/lib/supabase-cli.sh" +# Teardown still runs when npm ci never did; then there is no stack to stop. +use_pinned_supabase_cli "$(cd "$DIR/.." && pwd)" 2>/dev/null || exit 0 WORKSPACE_KEY="$(pwd)" PORTS_LOCK="$HOME/.superset/debatelab-ports/lock" diff --git a/AGENTS.md b/AGENTS.md index a667d78d1..c30364961 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -75,12 +75,12 @@ Database migrations and pgTAP policies use a separate Docker-backed gate. In Sup Outside Superset, run the underlying commands directly: ```bash -supabase db start +npx supabase db start npm run test:db -supabase stop --no-backup +npx supabase stop --no-backup ``` -Supabase CLI 2.115 or newer is required. Do not run this gate concurrently from multiple worktrees. If this task starts the stack, stop it before finishing, including after failures when safe. +Use only the repo-pinned Supabase CLI (the exact `supabase` devDependency, 2.121.0). `npm run` scripts, `./.superset/db-gate.sh`, `scripts/agent-stack.sh`, and the verify harness already put it first on PATH; anywhere else, call `npx supabase`. Never use a global CLI or `npx supabase@latest`, and never bump the version in one worktree only: each CLI version pulls its own ~7 GB set of Docker images onto the shared VPS. Change it in `package.json`, `package-lock.json`, and the `setup-cli` steps in `.github/workflows/` together. Do not run this gate concurrently from multiple worktrees. If this task starts the stack, stop it before finishing, including after failures when safe. WebKit is a separate release smoke test: diff --git a/README.md b/README.md index 45bfbd2a7..22dc9b085 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Requirements: - Node.js 22.x and npm, using the committed `package-lock.json` - Deno 2.x for Edge Function tests -- Docker and Supabase CLI 2.115 or newer for the local database gate +- Docker and Supabase CLI 2.121.0, pinned in `package.json` (`npm ci` installs it) for the local database gate - Playwright browsers for browser tests ```bash diff --git a/docs/development.md b/docs/development.md index 655da5f5e..4c4db217b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -21,7 +21,7 @@ Never overwrite unrelated changes. Do not switch to the primary checkout because - Node.js 22.x - npm and `package-lock.json` - Deno 2.x for Edge Function tests -- Docker and Supabase CLI 2.115 or newer for database work +- Docker and Supabase CLI 2.121.0, pinned in `package.json` (`npm ci` installs it) for database work - Playwright browser binaries for browser gates Install the locked JavaScript tree with the Node version from `.nvmrc`: @@ -132,9 +132,9 @@ In a Superset workspace, use the repository's locking wrapper: Outside Superset, run the underlying commands directly: ```bash -supabase db start +npx supabase db start npm run test:db -supabase stop --no-backup +npx supabase stop --no-backup ``` The default local stack begins at port `54321` and uses shared container names, so it is not parallel-safe across worktrees. The wrapper holds `~/.superset/debatelab-db.lock` through database tests and the real-Auth collaboration browser journey, and stops the stack and owned processes on exit. Outside Superset, coordinate ownership before starting it. The agent that starts the stack stops it before finishing, including after failures when safe. diff --git a/docs/testing.md b/docs/testing.md index 0627e816c..0d8150788 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -166,7 +166,7 @@ It does not start local Supabase, run pgTAP, run WebKit, or use protected stagin Requirements: - Docker -- Supabase CLI 2.115 or newer +- Supabase CLI 2.121.0, pinned in `package.json` (`npm ci` installs it) - exclusive ownership of the local Supabase ports and containers In Superset, run: @@ -178,9 +178,9 @@ In Superset, run: The wrapper acquires `~/.superset/debatelab-db.lock`, starts full local Supabase, runs `npm run test:db`, then holds the same lock while a controlled Mailpit relay, collaboration process, fake model provider, and Vite client run the real-Auth desktop/mobile workspace and full-stack feature journeys. The `Database` workflow runs this same gate on pull requests that touch its paths, and retains its logs and browser traces on failure. It stops every owned process and the stack on exit, including after failure. To run only the database portion under the same lock, use `./.superset/db-gate.sh --db-only`. Outside Superset, run it with: ```bash -supabase db start +npx supabase db start npm run test:db -supabase stop --no-backup +npx supabase stop --no-backup ``` The stack replays migrations and runs pgTAP tests. The browser portion creates isolated local users and deletes them, captures mail only in local Mailpit, restarts the collaboration process, and proves recovery and revocation. `CREATE INDEX CONCURRENTLY` requires the stated CLI floor so it runs outside the migration batch. diff --git a/package-lock.json b/package-lock.json index 9b890d1e3..22fdfdd34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -102,6 +102,7 @@ "knip": "^6.39.0", "postcss": "^8.5.6", "squawk-cli": "^2.67.0", + "supabase": "2.121.0", "tailwindcss": "^3.4.17", "tailwindcss-animate": "^1.0.7", "tsx": "4.19.2", @@ -535,6 +536,21 @@ "e2e": ">=0.15.0 <1" } }, + "node_modules/@ecies/ciphers": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@ecies/ciphers/-/ciphers-0.2.6.tgz", + "integrity": "sha512-patgsRPKGkhhoBjETV4XxD0En4ui5fbX0hzayqI3M8tvNMGUoUvmyYAIWwlxBc1KX5cturfqByYdj5bYGRpN9g==", + "dev": true, + "license": "MIT", + "engines": { + "bun": ">=1", + "deno": ">=2.7.10", + "node": ">=16" + }, + "peerDependencies": { + "@noble/ciphers": "^1.0.0" + } + }, "node_modules/@emnapi/core": { "version": "1.11.2", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.2.tgz", @@ -1733,6 +1749,48 @@ "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" } }, + "node_modules/@noble/ciphers": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", + "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -4585,6 +4643,130 @@ "node": ">=22.0.0" } }, + "node_modules/@supabase/cli-darwin-arm64": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-darwin-arm64/-/cli-darwin-arm64-2.121.0.tgz", + "integrity": "sha512-ZvXKj3wW4Kq5/MrG2xdgZeOWETxmUC9jl16X/i/np7u5A/WLuC/L0+KKY5i0eCrTnNwWFpZdlWKzu/J9QgkPgg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@supabase/cli-darwin-x64": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-darwin-x64/-/cli-darwin-x64-2.121.0.tgz", + "integrity": "sha512-s+bnLljdI5MYlt92rJnsIuVcTYtmJyydUB/FUsKm5KCyD+HpwnY1hL6m/+bKZQCwIHsql1dlmJRZ0HNZOZzuTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@supabase/cli-linux-arm64": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-linux-arm64/-/cli-linux-arm64-2.121.0.tgz", + "integrity": "sha512-JKvffWRuzS1+cVzgv1gWi2nWaCGvS22mMMwEBnSkRFD0BSdN1QHZ7yteI7uRg1HV9R0s+HCwg1rtjrHnAEE55Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@supabase/cli-linux-arm64-musl": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.121.0.tgz", + "integrity": "sha512-8fGnWhnnbf3zdV7mQvEHb4qa1LMTq/JpSdO109O/Lxy246Dwar8o5XrDgy7bBK8QLzvp0XH+p1ky+wxRGVFzpw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@supabase/cli-linux-x64": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-linux-x64/-/cli-linux-x64-2.121.0.tgz", + "integrity": "sha512-87EhtLctkNtC51CPhyeLoSdoGGzCZ3iNbSdczdcSklbvg0RsJbU+mTDaF3v53EWuPhyM0VRYqZJZNnjI5ABLcg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@supabase/cli-linux-x64-musl": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-linux-x64-musl/-/cli-linux-x64-musl-2.121.0.tgz", + "integrity": "sha512-diDbFsC/KRmnOGUYYBxmUqn6ccqB+jliesMfp821grDIVkq9ucqg/aUjCOsCyRbcs5uhgbbWgh9YWTuxfVpZog==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@supabase/cli-windows-arm64": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-windows-arm64/-/cli-windows-arm64-2.121.0.tgz", + "integrity": "sha512-cHpGQTLXUm4Uk9NzIdv8oUvmsNq7mlAN/CmVqNYzMUJyqmFofOPETwYPShDV9apA+5k84oKU93tn3N4wv7B3yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@supabase/cli-windows-x64": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/@supabase/cli-windows-x64/-/cli-windows-x64-2.121.0.tgz", + "integrity": "sha512-uvWiQ3cGKrZhtkctXHJJY0r0L6D2s/Dbc8/CxOVDxlXIH5mG3f8ZbqwMs9eRbPDqifyYFlwl+BX+tY3aJosIxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@supabase/functions-js": { "version": "2.114.0", "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.114.0.tgz", @@ -7948,6 +8130,24 @@ "fsevents": "~2.3.3" } }, + "node_modules/eciesjs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/eciesjs/-/eciesjs-0.5.0.tgz", + "integrity": "sha512-s0J9SEVYAEPg7J63GFMApLYzPH9VNIQIyC6s15JpnqVc0TqcKWdbgFlnAweEBRyMmko2dcs2sfC83Hj4J43tuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ecies/ciphers": "^0.2.6", + "@noble/ciphers": "^1.3.0", + "@noble/curves": "^1.9.7", + "@noble/hashes": "^1.8.0" + }, + "engines": { + "bun": ">=1", + "deno": ">=2.7.10", + "node": ">=16" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.420", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.420.tgz", @@ -9328,6 +9528,16 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jose": { + "version": "6.2.13", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.13.tgz", + "integrity": "sha512-7TIg10ZE1x82YediN+lcrPNvGMKge9yFHQD+Qho/b8y2adfugU3AsvvHfxV0fzyFllT6l9xCjf4RWY9g/Z9PJQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -12675,6 +12885,30 @@ "node": ">= 6" } }, + "node_modules/supabase": { + "version": "2.121.0", + "resolved": "https://registry.npmjs.org/supabase/-/supabase-2.121.0.tgz", + "integrity": "sha512-xffhOgD9rXsXLK+DQ+3Gq8b2KmavMjPHGuJr7lfVlD8vKK1HHFggYlmzdRECqPmOL8g3Yd5PN3URcUR8xWZcWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eciesjs": "^0.5.0", + "jose": "^6.2.10" + }, + "bin": { + "supabase": "dist/supabase.js" + }, + "optionalDependencies": { + "@supabase/cli-darwin-arm64": "2.121.0", + "@supabase/cli-darwin-x64": "2.121.0", + "@supabase/cli-linux-arm64": "2.121.0", + "@supabase/cli-linux-arm64-musl": "2.121.0", + "@supabase/cli-linux-x64": "2.121.0", + "@supabase/cli-linux-x64-musl": "2.121.0", + "@supabase/cli-windows-arm64": "2.121.0", + "@supabase/cli-windows-x64": "2.121.0" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", diff --git a/package.json b/package.json index 2f0f3afe0..4bb5eeb0d 100644 --- a/package.json +++ b/package.json @@ -129,6 +129,7 @@ "knip": "^6.39.0", "postcss": "^8.5.6", "squawk-cli": "^2.67.0", + "supabase": "2.121.0", "tailwindcss": "^3.4.17", "tailwindcss-animate": "^1.0.7", "tsx": "4.19.2", diff --git a/scripts/agent-stack.sh b/scripts/agent-stack.sh index 5d6918e79..6a0a77e32 100755 --- a/scripts/agent-stack.sh +++ b/scripts/agent-stack.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # A private, Docker-free local Supabase project for one agent or worktree. # -# Uses the Supabase CLI's experimental stack engine (CLI 2.121 or newer) with +# Uses the Supabase CLI's experimental stack engine (the repo-pinned CLI, 2.121 or newer) with # the native runtime, so several agents can each run migrations, pgTAP, and # real RLS queries at once without sharing ports, containers, or the # ~/.superset/debatelab-db.lock that ./.superset/db-gate.sh holds. @@ -39,6 +39,8 @@ cmd="${1:-}" shift || true root="$(git rev-parse --show-toplevel)" +source "$root/.superset/lib/supabase-cli.sh" +use_pinned_supabase_cli "$root" name="${name:-$(basename "$root")}" case "$name" in *[!A-Za-z0-9._-]*|"") echo "invalid stack name: $name" >&2; exit 2 ;; diff --git a/src/test/scripts/db-gate.test.ts b/src/test/scripts/db-gate.test.ts index ed4c2547d..dca2b79a0 100644 --- a/src/test/scripts/db-gate.test.ts +++ b/src/test/scripts/db-gate.test.ts @@ -41,6 +41,7 @@ it("stops local Supabase when database tests fail", async () => { env: { ...process.env, CALL_LOG: log, + DEBATELAB_SUPABASE_BIN_DIR: bin, HOME: root, PATH: `${bin}:${process.env.PATH ?? ""}`, TMPDIR: root, diff --git a/supabase/README.md b/supabase/README.md index d6c48592c..3cb0718ae 100644 --- a/supabase/README.md +++ b/supabase/README.md @@ -110,15 +110,15 @@ When creating a table, sequence or function in `public`, grant only the Data API Local gate: ```bash -supabase db start +npx supabase db start npm run test:db -supabase stop --no-backup +npx supabase stop --no-backup ``` Requirements: - Docker -- Supabase CLI 2.115 or newer +- Supabase CLI 2.121.0, pinned in `package.json` (`npm ci` installs it) - exclusive ownership of the default local ports and containers The stack begins at port `54321` and is not parallel-safe across worktrees. Coordinate before starting it. Stop the stack before finishing, including after failures when safe.