Skip to content

feat(keys): store Vertex project and region in the vault - #50

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-49-vertex-vault
Nov 8, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-49-vertex-vault

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

This stores the Vertex GCP project and region in the vault beside the access token and wires them into the probe, so a saved Vertex key can validate through the Keys step. Bedrock can also probe without a vault key, since it reads the AWS env chain.

Closes #49
Refs #15

Verification

  • mise run ci:app passed in this worktree (catalog check, typecheck, lint, unit tests including the new secret id and probe context cases, and the full build).
  • mise run ci:cli passed (typecheck and compiled CLI build). The CLI is untouched in this PR, because cli/src/lib/probes.ts is a separate implementation and CLI parity stays a follow-up in the independent CLI flow.
  • The new tests first failed against the pre-change build with secretIdForProviderConfig is not a function and dist/main/probes/context.js missing, then passed after the implementation and rebuild.

Proof is from a logic-only slice with no live provider keys. The Electron app was not launched for a screenshot in this headless run, so the proof below is the unit test output that runs under npm test.

  ✓ vertex project secret id
  ✓ vertex region secret id
  ✓ parse vertex project config id
  ✓ parse vertex region config id
  ✓ api_key is not a config id
  ✓ config id does not parse as api_key
  ✓ stored project is used when explicit is missing
  ✓ stored region is used when explicit is missing
  ✓ explicit project wins over stored
  ✓ explicit region wins over stored
  ✓ blank explicit project falls back to trimmed stored
  ✓ blank stored project becomes undefined
  ✓ aws probe does not require a vault api key
  ✓ gcp probe requires a token

all secrets cases passed
all probe context cases passed
all cloud probe cases passed

Reviewer notes

  • No live Bedrock or Vertex call was made. Confirming a Vertex probe against a real GCP project still needs a real access token from ADC, a real project id and a real region.
  • Vertex config lives in sibling vault entries provider:vertex:project and provider:vertex:region. They use the same safeStorage backend as the API key, they never render as key rows, and deleting the Vertex key deletes them too.
  • Bedrock keeps using the AWS env chain. This slice only removes the vault key requirement in front of its probe, it does not add Bedrock credential fields to the renderer.
  • The parent issue Probe Bedrock and Vertex provider keys (ADR-0003 follow-up) #15 stays open. CLI probe parity and any live-key check remain for later runs.

Add provider config secret ids (provider:vertex:project and provider:vertex:region) beside the api_key id, a pure buildProbeContext helper that prefers explicit probe fields over stored vault values, and IPC wiring that passes stored project and region into runProbe. Bedrock (probeKind aws) no longer needs a vault key to probe, since it reads the AWS env chain. The renderer Keys step now lists Vertex in Add key, asks for project id, region and access token before Save, writes the sibling secrets on save, deletes them with the key, and never renders config entries as key rows.

Co-authored-by: Muse Code <muse-code@meta.com>
@johnnyhuy
johnnyhuy merged commit 479c07f into main Nov 8, 2026
7 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-49-vertex-vault branch November 8, 2026 11:44
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.

Vault and renderer: Vertex project/region storage and cloud probe wiring

1 participant