Skip to content

test: pilot native local Supabase stacks for backend journeys - #332

Open
thannous wants to merge 4 commits into
masterfrom
codex/supabase-local-stack-pilot
Open

thannous wants to merge 4 commits into
masterfrom
codex/supabase-local-stack-pilot

Conversation

@thannous

@thannous thannous commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Le runner backend dépendait de Docker et de ports fixes. Cette PR ajoute un mode local opt-in --runtime native avec la CLI Supabase épinglée en 2.120.0, des ports attribués par instance et un contrôle strict des cibles loopback. Les copies jetables des migrations neutralisent les anciennes URLs HTTP et désactivent les tâches planifiées avant les tests. Les migrations suivies et les configurations de production restent inchangées.

Commit vérifié : ca8168f5cde8812dbf7f7551d9ce9f8c46d804d3

Résultat npm run verify:pr : passed — 7 contrôles exécutés, 4 preuves réutilisées sur des entrées identiques, 4 hors périmètre. Base intégrée : origin/master à 1f6ede3c648273d2a08bda20b67e88bca42acb1a.

Validation :

  • Deux instances natives simultanées : ports distincts, comptes et rêves absents dans l’autre instance, contrôlés dans les deux sens.
  • Les cinq parcours backend existants passent sans retry sur 6c7b9f58cf1038312a81f47963c756e6e0b6fe24, après intégration de master : persistance/édition/suppression, RLS/accès anonyme, Free, Plus, reprise hors ligne. Le head proposé ajoute ensuite uniquement le bilan Markdown.
  • Trois contrôles négatifs de sécurité de la cible et des copies de migrations, lint ciblé et types réussis.
  • Toutes les instances du pilote sont détruites ; zéro instance restante dans le registre local.

Reproduction : mise exec -- npm run test:e2e:backend -- --runtime native.

Bilan et preuves. Les rapports JSON et vidéos restent privés et ignorés par Git.

Note : le runtime natif est expérimental. Docker reste le mode par défaut ; son rejeu n’a pas été fait ici, le daemon étant absent. Pas de qualification mobile, production, IA, rapprochement planifié ou paiement réel. Les changements du runner et de sa configuration Playwright nécessitent la revue du propriétaire avant intégration.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T10:04:29.893488Z ca8168f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca8168f5cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const os = require('node:os');
const { randomUUID } = require('node:crypto');
const { spawnSync } = require('node:child_process');
const { assertBackendTarget, normalizeStackStatus, prepareLocalMigrations } = require('./lib/backend-e2e-local.cjs');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Register the extracted helper as a delivery file

The release e2e-backend runner now delegates target validation and migration rewriting to scripts/lib/backend-e2e-local.cjs, but verify-local.config.mjs still lists only scripts/run-backend-e2e.cjs in deliveryFiles. Consequently, a future PR that changes only this helper can alter what the release check proves without proof-block emitting the required “needs the owner's review” warning; add the helper path to deliveryFiles.

AGENTS.md reference: AGENTS.md:L287-L287

Useful? React with 👍 / 👎.

Comment on lines +31 to +33
const cliEnv = runtime ? {
...Object.fromEntries(Object.entries(process.env).filter(([key]) => !key.startsWith('SUPABASE_'))),
SUPABASE_HOME: process.env.E2E_SUPABASE_HOME || path.join(root, 'test-results/backend-e2e-cli-home'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the native Postgres user override

When --runtime native is used from a root-owned CI or agent container, this filter removes a caller-supplied SUPABASE_NATIVE_POSTGRES_USER. The Supabase native-runtime requirements state that root runs need this variable unless the CLI can discover a suitable account itself, so a correctly prepared host can still fail at Postgres initdb; retain this specific variable while continuing to strip unrelated SUPABASE_* settings.

Useful? React with 👍 / 👎.

Comment on lines +29 to +30
const rerunArgs = [...(runtime ? ['--runtime', runtime] : []), ...args]
.map(arg => `'${arg.replaceAll("'", "'\"'\"'")}'`).join(' ');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include the selected CLI in the rerun recipe

When the documented E2E_SUPABASE_CLI override selects a newer or host-specific executable for a managed-stack run, rerunArgs records only --runtime and Playwright arguments. The resulting report's rerun command therefore falls back to the pinned CLI when used from a fresh shell, rather than rerunning the executable that produced the evidence; record the CLI override as a rerun precondition or command prefix.

AGENTS.md reference: AGENTS.md:L264-L267

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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.

1 participant