Skip to content

refactor(cli): cover functions download with effect lint (CLI-2459) - #6713

Merged
7ttp merged 1 commit into
developfrom
7ttp/cli-2459-functions-download-effect-lint
Sep 23, 2026
Merged

7ttp merged 1 commit into
developfrom
7ttp/cli-2459-functions-download-effect-lint

Conversation

@7ttp

@7ttp 7ttp commented Sep 22, 2026

Copy link
Copy Markdown
Member

TL;DR

brings supabase functions download, the last uncovered subcommand, under the effect lint

whats introduced?

effect lint applied to download, so the whole functions family is covered now:

  • the six functions allow list entries in .oxlintrc.effect.json
    collapse into one !apps/cli/src/commands/functions/**, which adds exactly the five download files
  • the handler joins paths through the Path service instead of node:path
  • integration and live tests move onto the FileSystem/Path services
  • env cases run through withEnvVar instead of setting and restoring process.env by hand, and the ambient env assertion reads through Config over a ConfigProvider.fromEnv
  • the project id fixture is a string literal instead of JSON.stringify
  • e2e tests run through the effect native runSupabaseEffect harness with withTempHome, live tests through the cliEffect fixture

ref:

@7ttp 7ttp self-assigned this Sep 22, 2026
@7ttp
7ttp requested a review from a team as a code owner September 22, 2026 20:26

@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

Both independent reviews were available. Of Claude's three nit findings, one duplication concern is confirmed and two style/readability claims are refuted by existing repository patterns. Codex reported no findings. No correctness, security, or user-impacting issues were identified.

Findings

Severity Location Category Sources Claim
⚪ NIT apps/cli/src/commands/functions/download/download.live.test.ts:16 duplication claude The Effect port duplicates the function-cleanup helper and tagged-error pattern across a third functions live test instead of sharing the common responsibility.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/functions/download/download.integration.test.ts:1916 (style): The three withEnvVar call sites use an inline pipe lambda instead of the repository's prevailing direct-wrapper form, making the environment scope harder to see.
    Refuted: The claimed convention is not borne out by the checked-out code: multiple existing tests use the same inline lambda form, including an exact Effect.provide(layer), (body) => withEnvVar(...) pattern.
  • apps/cli/src/commands/functions/download/download.integration.test.ts:953 (readability): Replacing JSON.stringify({ project_id: "json-project" }) with a handwritten JSON literal loses self-documenting structure.
    Refuted: The one-property literal exposes the exact key and value directly, its purpose is explicit from the surrounding filename and assertions, and literal JSON fixtures are an established nearby pattern consistent with the trusted guidance to keep test fixtures concise.

Stats

Claude findings: 3 · Codex findings: 0 · Confirmed: 1 · Refuted: 2 · Uncertain: 0


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

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

Comment thread apps/cli/src/commands/functions/download/download.live.test.ts
@7ttp
7ttp added this pull request to the merge queue Sep 23, 2026
Merged via the queue into develop with commit fd19fe8 Sep 23, 2026
43 checks passed
@7ttp
7ttp deleted the 7ttp/cli-2459-functions-download-effect-lint branch September 23, 2026 08:33
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