Skip to content

refactor(cli): cover gen types tests with effect lint (CLI-2410) - #6769

Merged
7ttp merged 3 commits into
7ttp/cli-2410-gen-family-coverage-types-runtimefrom
7ttp/cli-2410-gen-family-coverage-types-tests
Sep 24, 2026
Merged

7ttp merged 3 commits into
7ttp/cli-2410-gen-family-coverage-types-runtimefrom
7ttp/cli-2410-gen-family-coverage-types-tests

Conversation

@7ttp

@7ttp 7ttp commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

TL;DR

brings the supabase gen types tests under the effect lint, finishing the gen family

whats introduced?

effect lint applied to the six gen types test files, which leaves the whole family covered:

  • the twelve gen allow list entries in .oxlintrc.effect.json collapse into one !apps/cli/src/commands/gen/**, which also pulls in types.errors.unit.test.ts, the one gen types test file this branch leaves untouched
  • the integration suite builds its fixtures through FileSystem with scoped temp directories, all eighty five cases kept, and its injected network failure becomes a tagged ApiCallFailure
  • the unit test drops its process.env mutation for a hermetic call, and the generator test awaits through Effect rather than a bare promise
  • e2e tests run through the effect native harness with withTempHome, and the live test forwards the vitest signal

ref:

@7ttp 7ttp self-assigned this Sep 23, 2026
@7ttp
7ttp added this pull request to stack #6766 September 23, 2026 22:24
@7ttp
7ttp requested a review from a team as a code owner September 23, 2026 22:24

@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

Three findings are confirmed: the integration tests use scoped temporary directories without supplying a Scope, Docker failures lose diagnostic detail, and an e2e comment refers to removed checks. The lint finding is refuted: the new pattern adds the migrated tests to Effect lint coverage.

Findings

Severity Location Category Sources Claim
🟠 MAJOR apps/cli/src/commands/gen/types/types.integration.test.ts:65 test-runtime codex The integration tests create scoped temporary directories without supplying a Scope, so tests that call makeWorkdir cannot typecheck or run as written.
🟡 MINOR apps/cli/src/commands/gen/types/types.e2e.test.ts:128 diagnostics claude The new runDocker wrapper loses the actual Docker exit code and can hide the error message when stderr is present. A timeout also loses output captured before the timeout.
⚪ NIT apps/cli/src/commands/gen/types/types.e2e.test.ts:355 comments codex The comment refers to previous undefined and empty-string checks as if they appear below, but the current code uses Option checks.
Refuted findings (kept for transparency, not posted as review comments)
  • .oxlintrc.effect.json:19 (lint-coverage): The new blanket exclusion removes Effect lint coverage from the migrated gen/types test files.
    Refuted: In ignorePatterns, the leading ! reverses the initial ignore-all pattern. The new entry includes the gen/types tests in Effect lint coverage; it does not exclude them.

Stats

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


Models: claude-opus-5-5 + gpt-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/gen/types/types.integration.test.ts
Comment thread apps/cli/src/commands/gen/types/types.e2e.test.ts
Comment thread apps/cli/src/commands/gen/types/types.e2e.test.ts Outdated

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

Great way to finish the family off. I checked every expect chain against base as a multiset across all six files and they line up (268/268 in integration), titles match, and --debug=files shows exactly the 36 gen files linted with zero findings. Moving container cleanup onto Effect.ensuring is a nice bonus too - it now runs on test timeouts, where the old finally didn't

Also fwiw the failing "Post preview command comment" check is just the cancelled duplicate run, the sibling Test run on the same SHA is fully green

Approving. Only thing I'd ask is a quick tidy of the description before it becomes the squash commit, a few bits don't match the diff:

  • it's twelve allow-list entries collapsing rather than eighteen
  • there's no Cause.pretty in this PR, the suite still uses String(exit.cause)
  • Exit.isFailure and the stateful mocks (api.requests, child.calls) were already there on base

None of that's a problem with the code, just so nobody goes hunting for it later

@7ttp
7ttp added this pull request to the merge queue Sep 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Sep 24, 2026
@7ttp
7ttp added this pull request to the merge queue Sep 24, 2026
@7ttp

7ttp commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

:D another flake

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Sep 24, 2026
@7ttp
7ttp force-pushed the 7ttp/cli-2410-gen-family-coverage-types-tests branch from 8877d85 to 6c69166 Compare September 24, 2026 14:18
@7ttp
7ttp added this pull request to the merge queue Sep 24, 2026
Merged via the queue into develop with commit e5bd715 Sep 24, 2026
21 checks passed
@7ttp
7ttp deleted the 7ttp/cli-2410-gen-family-coverage-types-tests branch September 24, 2026 14:54
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