Skip to content

refactor(cli): resolve local config values through effect (CLI-2837) - #7301

Open
7ttp wants to merge 4 commits into
7ttp/cli-2837-rest-of-command-internal-coverage-prepfrom
7ttp/cli-2837-rest-of-command-internal-coverage-config
Open

7ttp wants to merge 4 commits into
7ttp/cli-2837-rest-of-command-internal-coverage-prepfrom
7ttp/cli-2837-rest-of-command-internal-coverage-config

Conversation

@7ttp

@7ttp 7ttp commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

TL;DR

local config values, config validation and path containment run through effect, so the effect lint now covers apps/cli/src

whats improved/fixed?

  • they read env through Config and files through FileSystem, and fail with typed errors instead of throwing
  • the config value tests pin env through a config provider instead of editing process.env, so a shell override can no longer skew them
  • the effect lint allow list swaps its per-file command-internal entries for one !apps/cli/src/** entry

how?

  • start, status, stop, services, notebooks, config push and stack start
    yield the converted helpers and map failures with the same messages they used to catch
  • the error classes keep their names, so error codes and telemetry fingerprints match develop.
  • SIDE_EFFECTS.md notes now say fs.realPath where they said realpathSync

Note

(same here) nothing changes for users,
every command prints the same output and exits with the same codes and errors.

local-db-running stays excluded, it talks to the docker socket or named pipe over node http and needs a windows check first.

ref:

@7ttp 7ttp self-assigned this Oct 23, 2026
@7ttp
7ttp requested a review from a team as a code owner October 23, 2026 12:15
@7ttp
7ttp added this pull request to stack #7302 October 23, 2026 12:15

@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

Verified all three Claude findings against the checked-out code and trusted conventions; all are confirmed as minor concerns. The passkey defect and direct environment access predate this migration and remain present. The symlink permission test leaves the new successful-parent-probe case unverified in Linux CI. Codex reported no findings. Verification was static; dependencies were unavailable for running tests.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/command-internal/stack-config.ts:1045 error-handling claude When an auth.passkey section exists, an invalid SUPABASE_AUTH_PASSKEY_ENABLED override or unparseable raw enabled value becomes a defect through Effect.orDie instead of a typed StackConfigError. This preserves a pre-existing error-handling gap.
🟡 MINOR apps/cli/src/command-internal/local-config-values.ts:473 consistency claude decryptAuthSecret bypasses ConfigProvider by collecting DOTENV_PRIVATE_KEY* values directly from process.env. Consequently, the new isolated ConfigProvider does not isolate encrypted-secret tests, whose helper clears only the unsuffixed DOTENV_PRIVATE_KEY.
🟡 MINOR apps/cli/src/command-internal/config-validate.unit.test.ts:270 test-coverage claude The test for a symlink whose own permissions deny readLink returns without assertions on Linux, leaving the new PermissionDenied-with-searchable-parent case without Linux CI coverage.

Stats

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


Models: claude-opus-5-5 + gpt-6.1-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/command-internal/stack-config.ts
Comment thread apps/cli/src/command-internal/local-config-values.ts
Comment thread apps/cli/src/command-internal/config-validate.unit.test.ts

This branch has not been deployed

No deployments
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.

1 participant