Skip to content

test(cli): cover services and storage mv - #6362

Open
7ttp wants to merge 6 commits into
developfrom
7ttp/cli-2264-storage-command-family-coverage
Open

test(cli): cover services and storage mv#6362
7ttp wants to merge 6 commits into
developfrom
7ttp/cli-2264-storage-command-family-coverage

Conversation

@7ttp

@7ttp 7ttp commented Aug 27, 2026

Copy link
Copy Markdown
Member

TL;DR

adds live e2e coverage for the services command and storage mv

whats introduced?

  • services: links the project and proves the postgres remote version lands in the json output
    proves the table renders that value in the LINKED cell, where a plain substring match would pass vacuously
  • storage mv: uploads an object, moves it through the real move endpoint, and proves via the listing that the destination exists and the source is gone
    closes the storage family, since ls, cp and rm already have coverage
  • db pull: deflakes the shipped live test, pull exits nonzero when nothing changed by design, so the test now seeds remote-only schema through db query and proves the initial pull writes it back as a migration

ref:

  • closes: CLI-2263 CLI-2264 CLI-2278

@7ttp 7ttp self-assigned this Aug 27, 2026
@7ttp
7ttp marked this pull request as ready for review August 27, 2026 14:05
@7ttp
7ttp requested a review from a team as a code owner August 27, 2026 14:05
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@875d0c8361af99a7796257e9350510ea216b1271

Preview package for commit 875d0c8.

@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: 77e38fdf83

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/legacy/commands/services/services.live.test.ts Outdated
Comment thread apps/cli/src/legacy/commands/db/pull/pull.live.test.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 9dbce90ca0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7ttp

7ttp commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

/ai-review

@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.

Superseded by a newer AI review

🤖 AI Review

Two of Claude's four findings are confirmed: the services live test performs redundant live fetches that add flake surface, and the storage cleanup helper is duplicated contrary to the trusted hoisting convention. The cleanup-diagnostic and hardcoded-row-count findings are refuted by concrete surrounding code. Codex reported no findings. No critical or major issues were found.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/legacy/commands/services/services.live.test.ts:30 test-flakiness claude The test compares remote data from two independent CLI invocations, unnecessarily exposing the assertion to a second fallible Management API fetch.
🟡 MINOR apps/cli/src/legacy/commands/storage/mv/mv.live.test.ts:8 duplication claude The new storage live test copies the shared flags and cleanup helper into a fourth command test instead of hoisting them.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/legacy/commands/db/pull/pull.live.test.ts:56 (error-handling): Pushing the raw unlink error loses both cleanup context and the affected file path.
    Refuted: The original filesystem error is preserved, and unlink is called with the full joined path, which native filesystem errors report with the failing operation. throwWithCleanup at tests/helpers/live.ts:125-134 labels the failure as live cleanup, and the same raw-unlink-error convention appears in db/reset/reset.live.test.ts:25 and db/push/push.live.test.ts:25.
  • apps/cli/src/legacy/commands/services/services.live.test.ts:15 (test-quality): The exact row-count assertion is an inappropriate magic-number check for a live test.
    Refuted: The exact count validates that the black-box command emitted the complete service list and intentionally changes when that output contract changes. The test remains a single services golden path as required by trusted/apps/cli/CLAUDE.md:490-505, and the trusted policy does not restrict live assertions to remote-only fields.

Stats

Claude findings: 4 · Codex findings: 0 · Confirmed: 2 · 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/legacy/commands/services/services.live.test.ts Outdated
Comment thread apps/cli/src/legacy/commands/storage/mv/mv.live.test.ts Outdated
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