Skip to content

fix(onboarding): retire always-written Bedrock placeholder, heal planted entries - #604

Merged
jeonghun-jj-lee merged 1 commit into
mainfrom
602-fixextension-onboarding-writes-unauthenticated-bedrock-placeholder-that-masks-real-credentials
Aug 27, 2026
Merged

jeonghun-jj-lee merged 1 commit into
mainfrom
602-fixextension-onboarding-writes-unauthenticated-bedrock-placeholder-that-masks-real-credentials

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes #602

Summary

Retires the always-written amazon-bedrock config entry (#455 as implemented in #589), whose placeholder key masked users' working Bedrock credentials behind Forbidden: Invalid API Key format: Base64 decoding failed.

What changed

  • Both write paths (writeBatchConfig, writeOnboardingConfig): Bedrock is written only when the user explicitly selects it with a valid key. The always-write behavior and the getBedrockServiceKey helper (both copies) are removed.
  • Heal-on-next-write (writeOnboardingConfig, the merge path): a planted placeholder entry is dropped during the merge — exact-match on the planted constant, so entries written via the retired internal env override (real keys) are never healed. The batch path heals via its existing replace-on-redo semantics.
  • Discovery-preservation invariant (from the issue): the write path never clobbers a credential the scanner discovered — the incident's root cause.

Verification

  • Fast suite: 116 files, 1671 passed (29 documented opt-in skips)
  • typecheck: clean
  • Helper/env-var removal: repo-wide grep clean
  • test:smoke fails identically on main (pre-existing local port/auth collision, unrelated — documented here so it isn't attributed to this diff)

Test plan

…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
@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: c243e653-cf52-4863-9eb6-b050083af710


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.

@jeonghun-jj-lee
jeonghun-jj-lee marked this pull request as ready for review August 27, 2026 16:11
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 6b6cce4 into main Aug 27, 2026
8 checks passed
@jeonghun-jj-lee
jeonghun-jj-lee deleted the 602-fixextension-onboarding-writes-unauthenticated-bedrock-placeholder-that-masks-real-credentials branch August 27, 2026 16:31
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.

fix(extension): onboarding writes unauthenticated Bedrock placeholder that masks real credentials

1 participant