Skip to content

feat(cli): add experimental stack stop - #6507

Merged
jgoux merged 29 commits into
developfrom
feat/experimental-stack-stop
Sep 9, 2026
Merged

feat(cli): add experimental stack stop#6507
jgoux merged 29 commits into
developfrom
feat/experimental-stack-stop

Conversation

@jgoux

@jgoux jgoux commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

supabase experimental stack stop stops the current or named managed stack, or an explicit stack ID, while preserving its identity and data. Selection works without loading project configuration, including when the config file has been removed or changed.

Use the stack package’s lifecycle API and report whether a stack was found in both human and structured output. This PR builds on the experimental stack start integration.

@jgoux
jgoux requested a review from a team as a code owner September 7, 2026 23:23
@jgoux
jgoux force-pushed the feat/experimental-stack-stop branch from 8f52522 to 14cae37 Compare September 8, 2026 05:31
@jgoux
jgoux force-pushed the feat/experimental-stack-stop branch from 14cae37 to e6eeb8d Compare September 8, 2026 06:02
@jgoux
jgoux force-pushed the feat/experimental-stack-stop branch from e6eeb8d to 865c92f Compare September 8, 2026 12:32
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@865c92fd59ff639193d4a3aa299c1f2af3223556

Preview package for commit 865c92f.

@jgoux

jgoux commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

/ai-review

Base automatically changed from feat/experimental-stack-start to develop September 8, 2026 22:14
@jgoux

jgoux commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/ai-review

@avallete avallete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approve with comments. No blockers: the command meets the stop contract (config-free targeting, preserve data, never destroy). Non-blocking notes on cleanup-error actionability, test names vs asserts, and sharing the small targeting validations with start.

Comment thread apps/cli/src/commands/experimental/stack/stop/stop.handler.ts Outdated
Comment thread apps/cli/src/commands/experimental/stack/stop/stop.integration.test.ts Outdated
Comment thread apps/cli/src/commands/experimental/stack/stop/stop.handler.ts Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 AI Review

Only Claude's independent review was available; the Codex pass did not complete. Eight of Claude's ten findings are confirmed, covering shared targeting duplication, conditional documentation inaccuracy, a compiled-boundary test gap, and several maintainability/test-quality nits. Two findings are refuted: StackRuntimeMismatchError is not emitted by the production openStack path, and the documented catch-all exit-1 condition already covers both flagged validation errors. No critical or major defect was verified.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/experimental/stack/stop/stop.handler.ts:96 code-duplication claude The stop handler duplicates stack-target validation already used by the stack command family instead of sharing it from the family root.
🟡 MINOR apps/cli/src/commands/experimental/stack/stop/SIDE_EFFECTS.md:11 documentation claude The blanket statement that a missing project config does not prevent stopping is inaccurate for implicit or named targeting when workdir resolution changes the project root.
🟡 MINOR apps/cli/src/commands/experimental/stack/stop/stop.integration.test.ts:82 test-coverage claude No compiled CLI test exercises experimental stack stop through the real stack API and supervisor teardown path.
⚪ NIT apps/cli/src/commands/experimental/stack/stop/stop.handler.ts:33 dead-code claude The non-stack-error branch in stopError is unreachable through its statically typed call sites.
⚪ NIT apps/cli/src/commands/experimental/stack/stop/stop.handler.ts:15 maintainability claude ExperimentalStackStopFlags is manually duplicated instead of being inferred from the command configuration.
⚪ NIT apps/cli/src/commands/experimental/stack/stop/stop.integration.test.ts:167 test-quality claude Several stop integration-test names claim semantics their fixtures do not exercise.
⚪ NIT apps/cli/src/shared/cli/hidden-flag.unit.test.ts:182 test-quality claude The two useDocker assertions cannot distinguish parsed flag values from command defaults.
⚪ NIT apps/cli/src/shared/cli/hidden-flag.unit.test.ts:126 scope claude The hidden-flag test rewrite is unrelated to stack stop and removes a real-handler GoProxy forwarding assertion, although that contract remains covered elsewhere.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/experimental/stack/stop/stop.handler.ts:58 (error-classification): StackRuntimeMismatchError is a reachable openStack failure but is classified as unknown instead of actionable flags.
    Refuted: Although OpenStackError includes StackRuntimeMismatchError, the production openStack implementation cannot emit it. Its state read has a narrower failure set and makeHandle is non-failing. A mismatch returned during stop RPC is also narrowed by the package to StackLifecycleConflictError at EffectStack.ts:282-287.
  • apps/cli/src/commands/experimental/stack/stop/SIDE_EFFECTS.md:24 (documentation): The exit-status documentation omits the exit-1 paths for legacy output-flag rejection and mutually exclusive target flags.
    Refuted: Both cited paths are typed ExperimentalStackStopError failures and therefore fall under the document's explicit catch-all "any typed stop failure" exit-1 condition. Their behavior could be documented more specifically, but the exit-status enumeration does not omit them.

Stats

Claude findings: 10 · Codex findings: 0 · Confirmed: 8 · Refuted: 2 · Uncertain: 0


Models: claude-opus-5 + gpt-5.6-sol · Trigger: manual · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread apps/cli/src/commands/experimental/stack/stop/stop.handler.ts Outdated
Comment thread apps/cli/src/commands/experimental/stack/stop/SIDE_EFFECTS.md Outdated
Comment thread apps/cli/src/commands/experimental/stack/stop/stop.handler.ts Outdated
Comment thread apps/cli/src/commands/experimental/stack/stop/stop.handler.ts Outdated
Comment thread apps/cli/src/commands/experimental/stack/stop/stop.integration.test.ts Outdated
Comment thread apps/cli/src/shared/cli/hidden-flag.unit.test.ts Outdated
Comment thread apps/cli/src/shared/cli/hidden-flag.unit.test.ts
@jgoux
jgoux added this pull request to the merge queue Sep 9, 2026
Merged via the queue into develop with commit 9fbe3e3 Sep 9, 2026
21 checks passed
@jgoux
jgoux deleted the feat/experimental-stack-stop branch September 9, 2026 11:37
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.

2 participants