Skip to content

refactor(cli): cover gen types runtime with effect lint (CLI-2410) - #6768

Merged
7ttp merged 6 commits into
7ttp/cli-2410-gen-family-coverage-signing-keyfrom
7ttp/cli-2410-gen-family-coverage-types-runtime
Sep 24, 2026
Merged

7ttp merged 6 commits into
7ttp/cli-2410-gen-family-coverage-signing-keyfrom
7ttp/cli-2410-gen-family-coverage-types-runtime

Conversation

@7ttp

@7ttp 7ttp commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

TL;DR

brings the supabase gen types runtime under the effect lint

whats introduced?

effect lint applied to the gen types runtime, the tests follow separately:

  • eight allow list entries in .oxlintrc.effect.json, runtime files only, so the not yet migrated test files stay out until the next branch
  • the handler and the shared helpers yield their tagged errors directly instead of wrapping them in Effect.fail, every message left byte for byte the same
  • the flag rejections, the local db inspect failures and the missing preview branch credentials become tagged errors, which adds four names to the error tag fixture and makes --output-format json report their tag as error.code instead of UnknownError
  • an unreachable container runtime is tagged apart from a stopped stack in telemetry, rather than both landing in the same bucket, and the terminal text is unchanged either way
  • the generator layer splits its steps so interruption lands between them, and the duration quote encodes through Schema

ref:

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

@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 findings are confirmed. The exit-code table omits the positional --lang rejection and does not name the new error tags for several listed conditions. Unrelated Docker inspection failures receive telemetry suggesting supabase start. No additional issues surfaced.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/gen/types/types.handler.ts:508 telemetry-classification codex An inspection failure unrelated to container state is classified in telemetry as a local stack that needs supabase start.
⚪ NIT apps/cli/src/commands/gen/types/SIDE_EFFECTS.md:87 documentation claude The exit-code table leaves the new flag-usage and local-database error tags unnamed, and has no row for the positional --lang rejection.

Findings outside the diff

  • ⚪ NIT apps/cli/src/commands/gen/types/SIDE_EFFECTS.md:87 — The exit-code table leaves the new flag-usage and local-database error tags unnamed, and has no row for the positional --lang rejection.

Stats

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

This is a nice step up - -o json reporting real tags instead of UnknownError is a genuine improvement, and I checked every converted message against base and they're byte-identical ("must used" typo included). The 743b698 fix looks right to me as well: "no such container" still gets the supabase start message, everything else lands on the inspect error without it

Approving, with two asks. Both are about the new error.code values, since they become something scripts can branch on once this ships:

  1. inline, on the preview branch credentials tag
  2. SIDE_EFFECTS.md - can't comment inline as it's not in the diff, but the exit code table (L84-96) still doesn't have rows for the positional --lang rejection or missing preview branch credentials, and none of the new tags (GenTypesFlagUsageError, GenTypesLocalDbNotRunningError, GenTypesLocalDbInspectError) are named. The "not running or db inspection failed" row also now covers two tags that behave differently. I think that table is the only place the UnknownError → tag change would get recorded, so it'd be good to land it with this PR

Comment thread apps/cli/src/commands/gen/types/types.handler.ts Outdated
@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
@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-runtime branch from f1fc8c3 to 0b9b6e6 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 3db0661 Sep 24, 2026
21 checks passed
@7ttp
7ttp deleted the 7ttp/cli-2410-gen-family-coverage-types-runtime 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