Skip to content

refactor(cli): cover start e2e tests with effect lint (CLI-2414) - #6678

Open
7ttp wants to merge 5 commits into
7ttp/cli-2414-start-runtime-effect-lintfrom
7ttp/cli-2414-start-e2e-effect-lint
Open

7ttp wants to merge 5 commits into
7ttp/cli-2414-start-runtime-effect-lintfrom
7ttp/cli-2414-start-e2e-effect-lint

Conversation

@7ttp

@7ttp 7ttp commented Sep 19, 2026

Copy link
Copy Markdown
Member

TL;DR

brings the supabase start e2e tests under the effect lint, preserving the existing scenarios

whats introduced?

  • enables effect lint for all three start e2e suites
  • tests use the Effect harness with scoped project, process, stack, and proxy cleanup
  • filesystem, HTTP, time, and JSON operations use Effect services and schemas
  • the Docker test helper drains both output streams and retains bounded, Unicode safe diagnostics, with regression coverage in the existing helper tests

ref:

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

@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 completed. The major confirmed issue is that the lifecycle and slim-image E2E effects allocate scoped resources without applying Effect.scoped. Additional confirmed concerns cover effect lint, cleanup timeout budgets, an interruptible cleanup-registration gap, truncated parseable output, and one readability nit. Three Claude findings were refuted by concrete code or trusted conventions.

Findings

Severity Location Category Sources Claim
🟠 MAJOR apps/cli/src/commands/start/start.lifecycle.e2e.test.ts:197 resource-lifecycle claude+codex All three lifecycle tests allocate scoped temporary directories and register finalizers but omit Effect.scoped, leaving an unprovided Scope requirement.
🟠 MAJOR apps/cli/src/commands/start/start.slim-images.e2e.test.ts:286 resource-lifecycle claude+codex The slim-image E2E test uses a scoped project helper without scoping the enclosing effect.
🟡 MINOR apps/cli/src/commands/start/start.lifecycle.e2e.test.ts:3 lint claude The newly effect-linted file imports the effectful node:net server API without the required effecttsgo/node-builtin-import handling.
🟡 MINOR apps/cli/src/commands/start/start.lifecycle.e2e.test.ts:198 test-reliability claude Moving stack teardown into the test scope makes cleanup consume the test timeout, but the previous timeout budgets were retained without a cleanup allowance.
🟡 MINOR apps/cli/src/commands/start/start.lifecycle.e2e.test.ts:309 resource-lifecycle codex The poisoned-image cleanup finalizer is registered only after the Docker build completes, leaving an interruption window in which the tag can remain on the runner.
⚪ NIT apps/cli/tests/helpers/cli.ts:786 api-design claude runDockerEffect embeds its truncation marker directly in returned output, while callers also treat those fields as machine-readable Docker output.
⚪ NIT apps/cli/src/commands/start/start.slim-images.e2e.test.ts:40 readability claude makeProject references SLIM_ENV before its declaration, relying on delayed generator execution after module initialization.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/start/start.lifecycle.e2e.test.ts:239 (error-handling): The proxy-address invariant is incorrectly thrown as a defect instead of returned as StartE2eSetupError.
    Refuted: After the successful TCP listen callback, server.address() must be a TCP AddressInfo: null denotes a non-listening server and a string denotes an IPC server. The checked branch is therefore an impossible invariant, which trusted/CLAUDE.md:59-62 permits treating as a defect.
  • apps/cli/tests/helpers/docker-image.unit.test.ts:247 (test-organization): Placing runDockerEffect tests in docker-image.unit.test.ts violates a repository convention requiring the test basename to match its module.
    Refuted: The test uses the required .unit.test.ts suffix and is colocated in the same helper directory as cli.ts; the trusted convention does not impose the claimed basename rule.
  • apps/cli/src/commands/start/start.slim-images.e2e.test.ts:27 (duplication): The two start E2E suites should extract their similar setup error, port override, and project helper into a shared helper.
    Refuted: The helpers are not verbatim because their teardown environments differ, and trusted/CLAUDE.md:171 explicitly permits some test duplication rather than unnecessary abstractions. No behavioral defect results from the local definitions.

Stats

Claude findings: 8 · Codex findings: 3 · Confirmed: 7 · Refuted: 3 · 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/start/start.lifecycle.e2e.test.ts
Comment thread apps/cli/src/commands/start/start.slim-images.e2e.test.ts
Comment thread apps/cli/src/commands/start/start.lifecycle.e2e.test.ts
Comment thread apps/cli/src/commands/start/start.lifecycle.e2e.test.ts Outdated
Comment thread apps/cli/src/commands/start/start.lifecycle.e2e.test.ts Outdated
Comment thread apps/cli/tests/helpers/cli.ts
Comment thread apps/cli/src/commands/start/start.slim-images.e2e.test.ts
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