Skip to content

refactor(cli): cover login, logout, feedback and test with effect lint (CLI-2430) - #6605

Open
7ttp wants to merge 4 commits into
7ttp/cli-2429-hosted-project-families-coveragefrom
7ttp/cli-2430-account-dev-loop-families-coverage
Open

refactor(cli): cover login, logout, feedback and test with effect lint (CLI-2430)#6605
7ttp wants to merge 4 commits into
7ttp/cli-2429-hosted-project-families-coveragefrom
7ttp/cli-2430-account-dev-loop-families-coverage

Conversation

@7ttp

@7ttp 7ttp commented Sep 14, 2026

Copy link
Copy Markdown
Member

TL;DR

brings the account and a few smol command families under the effect lint, coverage goes from 381 to 424 files.

whats introduced?

effect lint applied to login, logout, feedback and test:

  • one allow list entry per family in .oxlintrc.effect.json
  • the only handler logic touched is login: the SUPABASE_PROFILE read stays a live process.env read behind a short alias, now pinned by a test; everything else is Effect.fail unwraps to yieldable errors, behavior identical
  • cause assertions move to Cause.pretty, env tests onto the shared withEnvVar helper, and the profile persistence tests unset SUPABASE_HOME so an ambient value cannot write outside the temp root
  • redaction scans keep their full json surface and gain a positive anchor, and the feedback delete gates pin their exact remediation text
  • e2e files move onto the effect native harness with a shared scoped temp home, the live round trip teardown moves under Effect.ensuring, and test new moves onto the FileSystem/Path services

ref:

  • closes: CLI-2430

@7ttp 7ttp self-assigned this Sep 14, 2026
@7ttp
7ttp added this pull request to stack #6606 September 14, 2026 14:54
@7ttp
7ttp requested a review from a team as a code owner September 14, 2026 14:54
@7ttp 7ttp changed the title refactor(cli): cover the account families with effect lint (CLI-2430) refactor(cli): cover login, logout, feedback and test with effect lint (CLI-2430) Sep 14, 2026

@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

Only Claude's independent review was available; the Codex review did not complete. All four reported findings were verified and confirmed, with two minor quality concerns and two nits. No user-facing correctness defect was identified.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/login/login.handler.ts:51 maintainability claude The environment alias deliberately bypasses process-env-in-effect, so adding the login family to Effect lint does not enforce that rule for this read.
🟡 MINOR apps/cli/src/commands/login/login.integration.test.ts:324 test-isolation claude SUPABASE_HOME isolation is limited to the profile-persistence tests, leaving earlier successful tests able to persist an ambient SUPABASE_PROFILE outside their per-test temporary root.
⚪ NIT apps/cli/src/commands/logout/logout.e2e.test.ts:69 test-quality claude The logout E2E tests isolate ambient SUPABASE_ACCESS_TOKEN inconsistently, and the line-69 comment incorrectly says its absence is needed to produce the not-logged-in result.
⚪ NIT apps/cli/src/commands/feedback/feedback.layers.unit.test.ts:55 test-coverage claude No test now exercises feedbackFetch with an undefined init argument because the default-GET test passes { signal }.

Findings outside the diff

  • 🟡 MINOR apps/cli/src/commands/login/login.integration.test.ts:324 — SUPABASE_HOME isolation is limited to the profile-persistence tests, leaving earlier successful tests able to persist an ambient SUPABASE_PROFILE outside their per-test temporary root.

Stats

Claude findings: 4 · Codex findings: 0 · Confirmed: 4 · Refuted: 0 · 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/login/login.handler.ts Outdated
Comment thread apps/cli/src/commands/logout/logout.e2e.test.ts Outdated
Comment thread apps/cli/src/commands/feedback/feedback.layers.unit.test.ts Outdated

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

Please address the Effect lint bypass in login and make the new temp-home cleanup failure policy explicit. The two inline findings concern Effect migration discipline; no production behavior regression was demonstrated.

Comment thread apps/cli/src/commands/login/login.handler.ts Outdated
Comment thread apps/cli/tests/helpers/cli.ts Outdated
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