refactor(cli): cover bootstrap with effect lint (CLI-2439) - #6636
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🤖 AI Review
Codex reported no findings. Of Claude's eight findings, six are confirmed and two refuted. Confirmed issues comprise one untyped template-decoding defect, two test-coverage gaps, one test-isolation concern, one misleading comment, and one non-total Effect thunk. No critical or major defects were verified.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | apps/cli/src/commands/bootstrap/bootstrap.templates.ts:138 |
error-handling |
claude | The samples codec accepts any JSON value, after which property access on null can throw an untyped defect instead of BootstrapTemplateListError. |
| 🟡 MINOR | apps/cli/src/commands/bootstrap/bootstrap.templates.ts:78 |
test-coverage |
claude | The settings-sourced authorization header and schema-based samples decoding have no direct service-level tests. |
| 🟡 MINOR | apps/cli/src/commands/bootstrap/bootstrap.workdir-cache.integration.test.ts:232 |
test-isolation |
claude | The test constructs the real command settings layer without fully isolating process environment variables, allowing ambient profile or credential values to leak into it. |
| 🟡 MINOR | apps/cli/src/commands/bootstrap/bootstrap.handler.ts:155 |
effect-idiom |
claude | process.chdir is a throwing operation wrapped in Effect.sync, so a filesystem race or permission failure becomes a defect rather than a typed bootstrap failure. |
| ⚪ NIT | apps/cli/src/commands/bootstrap/bootstrap.integration.test.ts:346 |
documentation |
claude | The comment incorrectly attributes prompting to explicitWorkdir, although the handler does not consult that field. |
| ⚪ NIT | apps/cli/src/commands/bootstrap/bootstrap.integration.test.ts:355 |
test-coverage |
claude | The test named as using SUPABASE_WORKDIR without prompting does not assert that no prompt occurred. |
Findings outside the diff
- 🟡 MINOR
apps/cli/src/commands/bootstrap/bootstrap.handler.ts:155—process.chdiris a throwing operation wrapped inEffect.sync, so a filesystem race or permission failure becomes a defect rather than a typed bootstrap failure.
Refuted findings (kept for transparency, not posted as review comments)
apps/cli/src/config/command-settings.layer.ts:147(consistency): Capturing DB and GitHub credentials inCommandSettingsconflicts with remaining lazy environment reads and creates contradictory sources of truth.
Refuted: The code defines distinct lifecycles rather than contradictory sources: bootstrap consumes captured settings, while db-config intentionally performs per-invocation resolution. During bootstrap,resolveLinkedConnreceivesOption.some(created.dbPassword), so its ambient fallback cannot override the captured/created password.apps/cli/src/commands/bootstrap/bootstrap.suggest.ts:1(style): Usingimport { type Path }creates an inappropriate value import and violates an established repository convention requiringimport type.
Refuted: The inlinetypemodifier makesPathtype-only and produces no runtime value import. Other files' use ofimport typedoes not establish a documented rule against this semantically equivalent syntax.
Stats
Claude findings: 8 · Codex findings: 0 · Confirmed: 6 · Refuted: 2 · 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.
…otstrap-family-coverage # Conflicts: # apps/cli/src/auth/command-platform-api.layer.unit.test.ts # apps/cli/src/command-internal/edge-runtime-script.layer.integration.test.ts # apps/cli/src/commands/services/services.integration.test.ts # apps/cli/src/config/command-settings.layer.ts # apps/cli/src/config/command-settings.layer.unit.test.ts # apps/cli/src/config/project-ref.layer.unit.test.ts # apps/cli/tests/helpers/command-mocks.ts # apps/cli/tests/helpers/compute.ts
Coly010
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
brings the
supabase bootstrapcommand family under the effect lintwhats introduced?
effect lint applied to
bootstrap:.oxlintrc.effect.jsonSUPABASE_DB_PASSWORDandGITHUB_TOKENreads move ontoCommandSettingsas redacted optional fields, and the rawSUPABASE_WORKDIRvalue rides along verbatim, all captured the same way as the access token.env.exampleparse failure becomes a typed error with its telemetry tag registeredref: