Skip to content

refactor(cli): cover gen signing-key and gen keys with effect lint (CLI-2410) - #6765

Merged
7ttp merged 5 commits into
developfrom
7ttp/cli-2410-gen-family-coverage-signing-key
Sep 24, 2026
Merged

7ttp merged 5 commits into
developfrom
7ttp/cli-2410-gen-family-coverage-signing-key

Conversation

@7ttp

@7ttp 7ttp commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

TL;DR

brings supabase gen signing-key and supabase gen keys under the effect lint

whats introduced?

effect lint applied to signing-key and keys

  • three allow list entries in .oxlintrc.effect.json, gen/*.ts, gen/keys/** and gen/signing-key/**
  • the handler yields its tagged errors directly instead of wrapping them in Effect.fail, and the shared signing keys config runs its alg allowlist check inside Effect.try
  • the stored key file encodes through Schema.fromJsonString, byte for byte what it wrote before, two space indented for the file and compact for the JWK on stdout
  • SUPABASE_ENV reads through Config rather than process.env, so an unset and an empty value both keep the development default
  • e2e tests run through the effect native harness and own their project directory with makeTempDirectoryScoped, so an interrupted run cleans up after itself
  • integration tests keep all twenty eight scenarios and add five that pin the stdout and file bytes and the injected SUPABASE_ENV dotenv pick, fixtures go through FileSystem and cause assertions use Cause.pretty

ref:

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

@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

The refactor has two confirmed low-severity concerns. An injected ConfigProvider can make the dotenv loading phases disagree about SUPABASE_ENV; the live provider reads process.env, so this does not affect the normal CLI runtime. The signing-key wiring test no longer uses the production gen parent, although the E2E tests still exercise the production command route.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/gen/gen.signing-keys-config.ts:334 correctness codex An injected ConfigProvider can make the new skipEnvLocal decision disagree with the later process.env-based dotenv resolution.
⚪ NIT apps/cli/src/commands/gen/signing-key/signing-key.integration.test.ts:147 test-coverage claude The command-wiring integration test constructs its own gen parent, so that test no longer exercises the production gen command tree.

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/gen.signing-keys-config.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.

Nice work on this one, and thanks for picking up the ConfigProvider point from the bot so quickly. I diffed the old JSON.stringify output against the new Schema encoding on real RSA/EC/Ed25519 keys plus a pile of weird inputs (undefined, NaN, U+2028, numeric keys) and it's byte-identical, trailing newline included. SUPABASE_ENV behaves the same for every value I tried as well

Approving, with one ask inline around test coverage for the env fix, and a smaller one on the same JSON.parse wrapper pattern as #6764

Comment thread apps/cli/src/commands/gen/gen.signing-keys-config.ts
Comment thread apps/cli/src/commands/gen/gen.signing-keys-config.ts
@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 due to failed status checks Sep 24, 2026
Base automatically changed from 7ttp/cli-2410-gen-family-coverage-bearer-jwt to develop September 24, 2026 14:18
@7ttp
7ttp force-pushed the 7ttp/cli-2410-gen-family-coverage-signing-key branch from e7eba52 to 895d6b4 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 e5a1116 Sep 24, 2026
21 checks passed
@7ttp
7ttp deleted the 7ttp/cli-2410-gen-family-coverage-signing-key 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