Skip to content

refactor(cli): cover start runtime with effect lint (CLI-2414) - #6676

Merged
7ttp merged 14 commits into
developfrom
7ttp/cli-2414-start-runtime-effect-lint
Sep 21, 2026
Merged

7ttp merged 14 commits into
developfrom
7ttp/cli-2414-start-runtime-effect-lint

Conversation

@7ttp

@7ttp 7ttp commented Sep 19, 2026

Copy link
Copy Markdown
Member

TL;DR

brings the supabase start runtime and service tests under the effect lint

whats introduced?

  • enables effect lint for the runtime and service tests
  • filesystem reads and native/POSIX paths use injected FileSystem/Path services, preserving eager validation and existing errors
  • container env overrides keep reading process.env directly, preserving precedence, empty values, and Windows case insensitive lookup
  • service tests use Effect fixtures, regression coverage checks all five container env overrides and Windows mount paths

ref:

@7ttp 7ttp self-assigned this Sep 19, 2026
@7ttp
7ttp added this pull request to stack #6677 September 19, 2026 12:14
@7ttp
7ttp requested a review from a team as a code owner September 19, 2026 12:14
@7ttp

7ttp commented Sep 19, 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.

🤖 AI Review

Both reviews completed. After deduplication, 11 findings are confirmed and 3 are refuted. No critical or major issues were verified; the confirmed issues are minor error-handling, test-coverage, lint-scope, and test-layer concerns plus documentation/style nits. Codex’s two findings duplicate confirmed Claude findings and are merged below.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/start/start.handler.ts:356 error-handling claude A PlatformError without reason.cause produces a degraded email-template read error such as [object Object].
🟡 MINOR apps/cli/src/commands/start/start.integration.test.ts:3770 test-coverage claude The first five new environment-precedence scenarios do not exercise resolveAmbientEnvValues or production preserveEmptyStrings behavior.
🟡 MINOR apps/cli/src/commands/start/services/edge-runtime.service.integration.test.ts:154 testing claude All 17 test bodies redundantly provide BunServices.layer even though the enclosing Effect test suite already supplies it.
🟡 MINOR apps/cli/src/commands/start/start.handler.ts:186 error-handling claude resolveAmbientEnvValues leaves ConfigError in start’s error channel instead of mapping it to a Start domain error.
🟡 MINOR .oxlintrc.effect.json:52 maintainability claude The PR enables Effect lint for the start command but re-excludes its main integration test and all three start E2E test files.
⚪ NIT apps/cli/src/commands/start/services/kong.service.ts:29 documentation claude+codex The Kong network-alias JSDoc now attaches to KongPaths rather than KONG_NETWORK_ALIASES.
⚪ NIT apps/cli/src/commands/start/services/kong.service.ts:30 api-design claude KongPaths is private despite appearing in two exported function signatures, and its wrapper shape differs from sibling path-injected builders.
⚪ NIT apps/cli/src/commands/start/services/edge-runtime.service.integration.test.ts:117 comments claude+codex The same explanatory comment is duplicated consecutively.
⚪ NIT apps/cli/src/commands/start/services/edge-runtime.service.integration.test.ts:1 style claude The file has two separate imports from effect.
⚪ NIT apps/cli/src/commands/start/lib/env-or-default.ts:8 style claude Optional chaining on ambientEnvValues is redundant because the parameter defaults to a non-null object.
⚪ NIT apps/cli/src/commands/start/start.handler.ts:1814 consistency claude One return yield* Effect.fail(...) remains while neighboring failures use direct yielding of yieldable tagged errors.

Findings outside the diff

  • ⚪ NIT apps/cli/src/commands/start/start.handler.ts:1814 — One return yield* Effect.fail(...) remains while neighboring failures use direct yielding of yieldable tagged errors.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/start/services/edge-runtime.service.integration.test.ts:122 (testing): The beforeEach hook unnecessarily starts a nested Effect runtime despite the enclosing suite layer.
    Refuted: The enclosing test layer is not ambient in a plain Vitest beforeEach hook. Effect.runPromise with an explicitly provided layer is the hook’s Promise boundary, not redundant access to the suite runtime.
  • apps/cli/src/commands/start/start.handler.ts:657 (typing): Using void for the missing-container branch inaccurately models a runtime undefined value.
    Refuted: void is the exact success type produced by Effect.void and correctly represents the ignored-value branch; there is no typing or runtime mismatch.
  • apps/cli/src/commands/start/start.handler.ts:1555 (consistency): Two remaining process.env reads make the new Config-based ambient-environment conversion inconsistent.
    Refuted: The remaining reads are deliberate, distinct boundaries: one must enumerate dynamically named variables, and the other is already dependency-injectable. They do not undermine the fixed-key Config migration.

Stats

Claude findings: 14 · Codex findings: 2 · Confirmed: 11 · Refuted: 3 · 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/start/start.handler.ts
Comment thread apps/cli/src/commands/start/start.integration.test.ts
Comment thread apps/cli/src/commands/start/services/edge-runtime.service.integration.test.ts Outdated
Comment thread apps/cli/src/commands/start/start.handler.ts Outdated
Comment thread .oxlintrc.effect.json
Comment thread apps/cli/src/commands/start/services/kong.service.ts Outdated
Comment thread apps/cli/src/commands/start/services/kong.service.ts
Comment thread apps/cli/src/commands/start/services/edge-runtime.service.integration.test.ts Outdated
Comment thread apps/cli/src/commands/start/lib/env-or-default.ts Outdated
Base automatically changed from 7ttp/cli-2460-cover-the-shared-functions-runtime-with-effect-lint to develop September 21, 2026 07:31
@7ttp
7ttp added this pull request to the merge queue Sep 21, 2026
Merged via the queue into develop with commit fa6a9d1 Sep 21, 2026
29 checks passed
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