Repository navigation
Conversation
`supabase start` on the legacy backend and `supabase init` without the stack opt-in now emit an info log pointing to the experimental local stack and its docs. Coding agents get an extra line asking them to offer the switch to the user before changing config. The start nudge shows at most once every 7 days, tracked in $SUPABASE_HOME/stack-nudge.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/ai-review |
CLI benchmark (Lightweight Commands): no changes foundCommit
API calls: unchanged for all 9 commands. Binary size: 135.1 MB, up 4.0 KB from 135.1 MB. Details: timing ranges, API calls per command, slowest phasesTiming ranges
API calls per command
Slowest phasesNo command moved beyond noise, so there are no phase deltas. Comment |
There was a problem hiding this comment.
Superseded by a newer AI review
🤖 AI Review
Verified all six findings against the checked-out code. All are confirmed: four behavior or documentation concerns and two test gaps. No findings overlap, and the supplied next-branch context shows no fundamental conflict.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | apps/cli/src/command-internal/stack-nudge.ts:75 |
output-contract |
claude | The nudge writes to stdout in text mode despite the new SIDE_EFFECTS documentation promising stderr. Agent detection enables this extra stdout output even when start or init is piped. |
| 🟡 MINOR | apps/cli/src/command-internal/stack-nudge.ts:75 |
output-contract |
claude | In stream-json mode, start emits the nudge's log event after its result event, so consumers that stop processing at the result miss the agent-targeted note. |
| 🟡 MINOR | apps/cli/src/command-internal/stack-nudge.ts:16 |
usability |
codex | The init nudge recommends SUPABASE_EXPERIMENTAL_STACK=1 supabase init immediately after initialization, but that command fails in the newly initialized project because its configuration already exists. |
| 🟡 MINOR | apps/cli/src/commands/start/start.integration.test.ts:1973 |
test-coverage |
codex | The test named 'once per 7 days' verifies immediate suppression but never verifies the seven-day interval or expiration. |
| 🟡 MINOR | apps/cli/src/commands/start/start.integration.test.ts:2023 |
test-quality |
codex | The JSON-mode test claims to verify stderr routing but observes only mock message records and success data, so it cannot detect incorrect output-stream routing. |
| ⚪ NIT | apps/cli/src/command-internal/stack-nudge.ts:71 |
error-handling |
claude | A future lastShownAt timestamp suppresses the nudge until seven days after that future timestamp, potentially much longer than the intended weekly interval. |
Stats
Claude findings: 3 · Codex findings: 3 · Confirmed: 6 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
There was a problem hiding this comment.
Superseded by a newer AI review
🤖 AI Review
Verified all six findings and merged the duplicate post-init issue into one entry. Five findings are confirmed: broken init guidance, a log after the stream-json result, inaccurate documentation, missing throttle-expiry coverage, and an overstated test name. The last concern is downgraded to nit because shared JSON routing has separate coverage. Tests were not run.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | apps/cli/src/command-internal/stack-nudge.ts:16 |
correctness |
claude+codex | The post-init nudge recommends a command that fails in the project just initialized: SUPABASE_EXPERIMENTAL_STACK=1 supabase init rejects the config file that init just created. |
| 🟡 MINOR | apps/cli/src/commands/start/start.handler.ts:1669 |
output-contract |
claude | For an eligible agent using stream-json, the nudge emits a log after the result event. Consumers treating the result as completion can miss the nudge or receive an unexpected trailing event. |
| 🟡 MINOR | apps/cli/src/commands/start/start.integration.test.ts:1973 |
test-coverage |
codex | The seven-day throttle test checks immediate suppression but never exercises expiry, so permanent suppression or an incorrect positive interval would still pass. |
| ⚪ NIT | apps/cli/src/commands/start/SIDE_EFFECTS.md:414 |
documentation |
claude | The start and init documentation incorrectly says interactive stdout enables the nudge in every output format. Humans using json or stream-json do not qualify solely because stdout is a TTY. |
| ⚪ NIT | apps/cli/src/commands/start/start.integration.test.ts:2023 |
test-quality |
codex | The JSON-mode test claims to verify stderr routing, but only verifies recorded info messages and success data through a mock Output service. |
Stats
Claude findings: 3 · Codex findings: 3 · Confirmed: 5 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: manual · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
- init nudge suggests `init --force`, since plain init fails on the config it just created - text mode writes the nudge to stderr; json/stream-json keep output.info, and start emits it before the result event - a future throttle timestamp counts as stale - share agentDetected between hosted consent and the nudge - drop unused exports (knip), tighten docs and tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/ai-review |
There was a problem hiding this comment.
Superseded by a newer AI review
🤖 AI Review
Both independent reviews completed. Code inspection confirms Claude's two low-priority UX findings; Codex reported none. No additional findings surfaced. Tests were not run.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| ⚪ NIT | apps/cli/src/command-internal/stack-nudge.ts:14 |
ux |
claude | The init nudge suggests a POSIX inline environment-variable assignment that cannot be copied directly into Windows cmd.exe or PowerShell. |
| ⚪ NIT | apps/cli/src/commands/start/start.handler.ts:1665 |
ux |
claude | The stack promotion also appears after health-check failures accepted through --ignore-health-check, placing it after warnings even when the stack remains unhealthy. |
Stats
Claude findings: 2 · Codex findings: 0 · Confirmed: 2 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: manual · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…start-nudge-8c6d59 # Conflicts: # apps/cli/src/commands/init/SIDE_EFFECTS.md # apps/cli/src/commands/start/SIDE_EFFECTS.md
|
/ai-review |
There was a problem hiding this comment.
🤖 AI Review
CLI reference prose guidance: snapshot supabase/supabase@3b12d2e supplied to reviewers (advisory, not a style pass).
Four findings were confirmed. The highest-impact issue is that the init hint can lead users to overwrite another project's configuration after using --workdir. The start hint also ignores explicit stack opt-outs, concurrent starts can bypass the cooldown, and the JSON test leaves most of the result payload unchecked. The state-file documentation omission is verified, but the reported PR-description mismatch remains uncertain because the PR body was unavailable. The diff changes no CLI reference prose.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟠 MAJOR | apps/cli/src/command-internal/stack-nudge.ts:14 |
data-loss |
codex | After a successful init with --workdir, following the hint from the same shell can overwrite another project's configuration. The suggested command omits --workdir even though the hint says it regenerates the config just created. |
| 🟡 MINOR | apps/cli/src/command-internal/stack-nudge.ts:34 |
correctness |
claude | The start and init hints still appear after an explicit stack opt-out. With SUPABASE_EXPERIMENTAL_STACK=0, adding stack = true as instructed by the start hint cannot switch backends, even if the project already declares it. |
| 🟡 MINOR | apps/cli/src/command-internal/stack-nudge.ts:59 |
concurrency |
codex | Concurrent starts that share a Supabase home can both show the hint within the seven-day cooldown. |
| 🟡 MINOR | apps/cli/src/commands/start/start.integration.test.ts:2008 |
test-coverage |
codex | The agent JSON test would pass if the hint also appeared in the success payload or if status fields other than DB_URL disappeared. |
| 🟡 MINOR | apps/cli/src/command-internal/stack-nudge.ts:20 |
documentation |
claude | The PR adds <SUPABASE_HOME>/stack-nudge.json, which is absent from the state-layout guide. Claude reports that the PR description says the guide documents the new file. |
Stats
Claude findings: 2 · Codex findings: 3 · Confirmed: 4 · Refuted: 0 · Uncertain: 1
Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: manual · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
| const lastShownAt = yield* fs.readFileString(statePath).pipe( | ||
| Effect.flatMap(Schema.decodeUnknownEffect(NudgeState)), | ||
| Effect.map((state) => state.lastShownAt), | ||
| Effect.orElseSucceed(() => undefined), | ||
| ); | ||
| const throttled = | ||
| lastShownAt !== undefined && | ||
| now - lastShownAt >= 0 && | ||
| now - lastShownAt < NUDGE_INTERVAL_MILLIS; | ||
| yield* Effect.annotateCurrentSpan({ "stack_nudge.throttled": throttled }); | ||
| if (throttled) return; | ||
|
|
||
| yield* emitNudge( | ||
| audience === "agent" | ||
| ? `${START_STACK_NUDGE_MESSAGE}\n${START_AGENT_ASK_LINE}` | ||
| : START_STACK_NUDGE_MESSAGE, | ||
| ); | ||
| yield* Effect.gen(function* () { | ||
| const encoded = yield* Schema.encodeEffect(NudgeState)({ lastShownAt: now }); | ||
| yield* fs.makeDirectory(settings.supabaseHome, { recursive: true, mode: 0o700 }); | ||
| yield* fs.writeFileString(statePath, encoded); |
There was a problem hiding this comment.
🟡 MINOR · concurrency · source: codex
Concurrent starts that share a Supabase home can both show the hint within the seven-day cooldown.
Evidence: apps/cli/src/command-internal/stack-nudge.ts:55–56 builds a shared state path. Lines 59–69 read and check the timestamp, lines 71–75 emit the hint, and lines 76–80 write the timestamp. No interprocess synchronization covers those operations.
Suggested fix: Use a per-home lock to serialize the cooldown check, emission, and timestamp update. Keep lock and state failures from failing start.
| expect(out.messages.find((m) => m.type === "success")?.data).toMatchObject({ | ||
| DB_URL: expect.any(String), | ||
| }); |
There was a problem hiding this comment.
🟡 MINOR · test-coverage · source: codex
The agent JSON test would pass if the hint also appeared in the success payload or if status fields other than DB_URL disappeared.
Evidence: apps/cli/src/commands/start/start.integration.test.ts:1995 names payload preservation as part of the test. Lines 2002–2007 check the info message separately, and lines 2008–2010 use a partial object match that requires only DB_URL.
Suggested fix: Assert the complete expected success payload for the fixture and keep the separate info-message assertion.
- init no longer suggests `init --force`; it points to the guide for switching this project and to the env var for the next init - an explicit SUPABASE_EXPERIMENTAL_STACK=0 silences both nudges - document stack-nudge.json in the SUPABASE_HOME guide Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
TL;DR:
supabase starton the legacy backend andsupabase initwithout the stack opt-in now point users to the experimental local stack (faster, lighter, one project per worktree). Coding agents get one extra line asking them to offer the switch to their user rather than act on it. This drives adoption and feedback for the new stack without changing any command result.Before: nothing tells legacy users that the new stack exists.
After:
flowchart LR A["legacy start healthy<br/>or init done"] --> B{"TTY or<br/>coding agent?"} B -- no --> E[no nudge] B -- yes --> C{"start: shown<br/>in last 7 days?"} C -- yes --> E C -- no --> D["output.info nudge<br/>+ agent ask line if agent"]What changed
command-internal/stack-nudge.tsholds the messages, the audience check and the throttle.start(fresh start only, never on the already-running path) emits:$SUPABASE_HOME/stack-nudge.json. Read and write failures never failstart.initwithout the opt-in suggestsSUPABASE_EXPERIMENTAL_STACK=1 supabase init. With the opt-in, it confirms the stack is enabled and links to the CLI issues page for feedback.--agent yesor an auto-detected AI tool), it adds one line: "Coding agents: offer this switch to the user and ask before changing …". Without it, agents in real-CLI runs only mentioned the stack; with it, they offered the switch and asked before editing config.output.info, not raw stderr. Agents run the CLI in JSON mode by default, so a text-only nudge would never reach them. ThestartJSON payload is unchanged; text and json render the line on stderr, and stream-json emits alogevent.Output.interactive. Non-TTY, non-agent runs (CI, pipes) see nothing.apps/cli/docs/supabase-home.mddocuments thestack-nudge.jsonstate file.Agent-driven runs
We drove fresh coding agents through the flow with a neutral task ("spin up my local Supabase and give me the
.envvalues"), never mentioning the new stack, to see whether the nudge reaches them and what they do with it.starttextoutput.infochanneloutput.infoconfig.tomluntouchedEach row is a single run, so this shows direction rather than a rate. The
initagent line has not had a real agent run.Reviewer notes
loginClaude Code hint tag.Linked issue
Supabase maintainer change; no linked issue.
🤖 Generated with Claude Code