Skip to content

refactor(cli): cover functions deploy with effect lint (CLI-2592) - #6968

Open
7ttp wants to merge 1 commit into
7ttp/cli-2592-functions-area-coverage-helpersfrom
7ttp/cli-2592-functions-area-coverage-deploy
Open

7ttp wants to merge 1 commit into
7ttp/cli-2592-functions-area-coverage-helpersfrom
7ttp/cli-2592-functions-area-coverage-deploy

Conversation

@7ttp

@7ttp 7ttp commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

TL;DR

brings functions deploy under the effect lint

whats introduced?

  • deploy.ts, deploy.errors.ts and the new errors unit test join the allow list, and the deploy unit tests follow on the next branch
  • the import map walk, source collection and docker binds run as effects on the FileSystem and Path services, shared with functions serve and supabase start, and onWarning is now an effect that serve.ts passes
  • source collection and the binds walk run in detached fibers that are joined, so an interrupt still lets them finish in the background
  • host failures keep their develop shape, plain Error failures become an untagged FunctionDeployError and the import map parse error keeps the SyntaxError name, so telemetry and traces stay the same
  • the user's deno.json or import map and the list, deploy and function responses decode through Schema, so a malformed document now reads Expected a valid JSON string
  • deployFunctions becomes Effect.fn with the same span name, DEBUG reads through Config and dated rate limit headers read the time through Clock
  • tests cover the decode text and error identity, an invalid static glob, a failed progress write, a NUL byte in an import, an uncreatable bundle dir, both detached walks and DEBUG driving --verbose

ref

@7ttp 7ttp self-assigned this Oct 2, 2026
@7ttp
7ttp added this pull request to stack #6969 October 2, 2026 21:25
@7ttp
7ttp requested a review from a team as a code owner October 2, 2026 21:25

@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

Verified both Claude findings against the checked-out code and trusted conventions. Both are confirmed as minor concerns: reduced import-map parse diagnostics and additional serial filesystem I/O during recursive traversal. Codex reported no findings. The traversal claim is narrowed to the verified call counts; a noticeable slowdown was not measured. Validation was static.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/shared/functions/deploy.ts:696 error-messages claude Malformed local import maps now produce only Expected a valid JSON string, losing the native parser's syntax detail. The error also lacks file context, making failures harder to diagnose when deno.json references another import map.
🟡 MINOR apps/cli/src/shared/functions/deploy.ts:969 performance claude Recursive traversal adds one serial stat call per directory entry and a readLink call for each directory candidate, increasing filesystem I/O for static-file glob expansion and directory import-map targets.

Stats

Claude findings: 2 · Codex findings: 0 · Confirmed: 2 · 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.

Comment thread apps/cli/src/shared/functions/deploy.ts
Comment thread apps/cli/src/shared/functions/deploy.ts

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