Skip to content

fix(#980 Bug 5): isConfigured false for empty cloud-provider keys#988

Merged
joelteply merged 1 commit into
canaryfrom
fix/980-bug5-empty-secret-isconfigured
May 1, 2026
Merged

fix(#980 Bug 5): isConfigured false for empty cloud-provider keys#988
joelteply merged 1 commit into
canaryfrom
fix/980-bug5-empty-secret-isconfigured

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

`SecretManager.has(key)` returns true when the key NAME is present in config.env even if its VALUE is empty. Fresh `~/.continuum/config.env` ships `ANTHROPIC_API_KEY=`, `OPENAI_API_KEY=`, `DEEPSEEK_API_KEY=` as empty placeholders → every fresh install reports `isConfigured: true` for all three cloud providers → Carl tries chat → opaque 401.

Check actual value length instead. Empty/missing key = not configured. Matches the user's mental model.

The existing `local` short-circuit (Candle) is preserved unchanged — that's a separate categorization issue tracked as #980 Bug 6.

Why not change SecretManager.has

`has` legitimately means "is this key NAME present in the namespace" — there are config keys where empty-string is a valid disable signal. Changing the call-site contract preserves that for other callers.

Test plan

  • TypeScript compile passes (pre-commit hook ran)
  • Manually verify on fresh `~/.continuum/config.env` with empty cloud keys: `isConfigured` should be `false` for ANTHROPIC/OPENAI/DEEPSEEK, `true` for Candle (local)
  • After setting `ANTHROPIC_API_KEY=sk-ant-…`, `isConfigured` for Anthropic flips to `true`

Closes #980 Bug 5.

🤖 Generated with Claude Code

SecretManager.has(key) returns true when the key NAME is present in
config.env even if its VALUE is empty. Fresh ~/.continuum/config.env
ships ANTHROPIC_API_KEY=, OPENAI_API_KEY=, DEEPSEEK_API_KEY= as empty
placeholders, so every fresh install reported isConfigured=true for
all three cloud providers — Carl tries chat → opaque 401.

Check the actual value length: a missing-or-empty key counts as not
configured, matching the user's mental model. The existing 'local'
short-circuit (Candle) is preserved unchanged; that's a separate
(mis-)categorization issue tracked as Bug 6.

Pulling rawKey unconditionally for non-local providers also lets the
maskedKey path keep using the same value rather than calling get()
twice.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joelteply joelteply force-pushed the fix/980-bug5-empty-secret-isconfigured branch from 0c46869 to bf30a91 Compare May 1, 2026 23:42
@joelteply joelteply merged commit 61f5e24 into canary May 1, 2026
3 checks passed
@joelteply joelteply deleted the fix/980-bug5-empty-secret-isconfigured branch May 1, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant