Skip to content

fix(onboarding): write-only-selected providers + always provision bedrock (#455) - #589

Merged
aarontrowbridge merged 1 commit into
mainfrom
455-bug-onboarding-writes-phantom-provider-entries-opencode-zen-anthropic-without-user-selection-2
Aug 27, 2026
Merged

aarontrowbridge merged 1 commit into
mainfrom
455-bug-onboarding-writes-phantom-provider-entries-opencode-zen-anthropic-without-user-selection-2

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Fixes #455 — phantom provider entries (OpenCode Zen, Anthropic placeholder) are no longer written unless user explicitly selects them. Bedrock infra is always provisioned.

Changes

  • credential_scanner.ts: writeBatchConfig now always adds amazon-bedrock with service credential (AMICO_BEDROCK_KEY or ABSK- placeholder) and rejects placeholder keys via isValidApiKey; added bedrock to PROVIDER_ENV_VAR map.
  • onboarding_panel.ts: writeOnboardingConfig always provisions bedrock (even on invalid-key early return); confirm-import handler is now pure opt-in (empty includedProviders => empty set) and always calls writeBatchConfig so bedrock lands even with zero user providers.
  • onboarding_webview.ts: on test pass, no longer auto-checks checkbox — checkboxes stay opt-in, only radio enabled; user must explicitly check.
  • credential_scanner.test.ts: updated redo test to expect bedrock still present; added 5 regression tests verifying only-selected+bedrock, empty selection, placeholder rejection, manual path.

Verification

  • pnpm typecheck green
  • pnpm --filter ./packages/extension test : 1592 passed, 3 pre-existing failures (chat_bridge, terminal) unchanged; 88/88 onboarding+scanner tests green

AC coverage

  • manual path only selected + bedrock
  • auto-import only checked + bedrock
  • checkboxes default unchecked (opt-in)
  • Zen only if selected
  • placeholder keys never written
  • bedrock always present
  • providers not in config not shown as connected

Related: #449

…rock (#455)

- credential_scanner: add bedrock service credential helper and
  unconditional bedrock infra entry in writeBatchConfig (with placeholder
  rejection via isValidApiKey already present); provider map now
  includes amazon-bedrock env var
- onboarding_panel: writeOnboardingConfig always provisions bedrock
  (even on placeholder/invalid key early return); confirm-import
  handler now opt-in (empty includedProviders defaults to empty set)
  and always calls writeBatchConfig so bedrock is provisioned even
  with zero user providers
- onboarding_webview: remove auto-check on test pass — checkboxes stay
  opt-in, only enable radio; user must explicitly check to import
- tests: update redo-overwrite test to expect bedrock infra still present;
  add phantom-provider regression tests for batch + manual paths
  (only selected + bedrock, empty selection, placeholder rejection)
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c5945b0-5277-4017-ac84-14d4680dce14


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review August 27, 2026 11:59
@aarontrowbridge
aarontrowbridge merged commit dd12756 into main Aug 27, 2026
8 checks passed
@aarontrowbridge
aarontrowbridge deleted the 455-bug-onboarding-writes-phantom-provider-entries-opencode-zen-anthropic-without-user-selection-2 branch August 27, 2026 11:59
jeonghun-jj-lee added a commit that referenced this pull request Aug 27, 2026
…ted entries (#602)

The always-written amazon-bedrock config entry (#455 as implemented in
#589) shipped an unauthenticated placeholder key. Because a config-
declared key outranks the auth-store key in the provider loader, the
placeholder masked users' working Bedrock credentials — every prompt
failed with 'Invalid API Key format: Base64 decoding failed'.

- writeBatchConfig / writeOnboardingConfig: bedrock is written only
  when the user selects it with a valid key; always-write retired
- writeOnboardingConfig: heal planted placeholder entries on next
  write (exact-match on the planted constant; real keys, including
  internal env-override entries, are never healed)
- getBedrockServiceKey and its env override removed
- #455 suites flipped from 'bedrock always present' to 'bedrock
  absent unless selected' + heal/preserve cases
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.

BUG: Onboarding writes phantom provider entries (OpenCode Zen, Anthropic) without user selection

1 participant