Skip to content

fix(google): honor Cloud SDK ADC ownership and Vertex billing projects - #118745

Merged
steipete merged 2 commits into
mainfrom
codex/qa0803-google-vertex-adc-quota
Aug 3, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qa0803-google-vertex-adc-quota

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Discover Google Vertex credentials from the actual Cloud SDK configuration directory.
  • Preserve the official ADC ownership rule: an explicitly selected Cloud SDK directory never falls back to stale credentials from another account.
  • Send the correct Vertex quota/billing project header with explicit environment overrides taking precedence.

Dependency-backed root cause

The Google plugin's Vertex ADC owner and manifest discovery knew only GOOGLE_APPLICATION_CREDENTIALS, HOME, and APPDATA. The installed official google-auth-library 10.9.1, however, treats CLOUDSDK_CONFIG as an exclusive directory override. If its ADC file is missing, the library returns null; it never silently selects a stale HOME credential. Google also honors GOOGLE_CLOUD_QUOTA_PROJECT over the ADC quota_project_id and emits x-goog-user-project, while the plugin previously dropped that billing header.

The Google owner and manifest now follow the real SDK's explicit credential precedence. The existing generic provider-auth evidence seam resolves safe environment path placeholders generically; a selected nonplatform override is authoritative and fails closed, while normal HOME/APPDATA fallbacks retain their existing behavior. Both Vertex authorization paths emit the correct billing header.

Proof and independent review disposition

  • Nine genuine owner/manifest/transport failures were reproduced initially; three additional stale-HOME/wrong-account failures were added after direct SDK inspection.
  • 183 focused Google and generic secret-evidence tests pass. Synthetic ADC/token/HTTP fixtures never use real credentials or external network.
  • Installed dependency directly inspected: google-auth-library/build/src/auth/googleauth.js:336-365 proves CLOUDSDK_CONFIG exclusive selection, :287-291 proves billing override; authclient.js:145-151 proves x-goog-user-project.
  • The final independent review surfaced one model claim that GoogleAuth ignores CLOUDSDK_CONFIG. Rejected as conclusively false: both the writer, independent reviewer, and maintainer personally inspected the installed source quoted above; it explicitly reads CLOUDSDK_CONFIG and consults HOME/APPDATA only when the override is absent. The added stale-HOME regressions verify the actual dependency behavior. Independent final confidence: 0.99; zero accepted findings.
  • Production +30 lines across the existing generic evidence owner and Google plugin owner/manifest; no config schema or credential logging changes.

Maintainer disposition: authoritative Cloud SDK credential evidence

The PR author is the project owner/administrator, and the current source contains exactly one manifest producer of these authoritative credential-directory placeholders: Google. Previously documented generic placeholder support covered only HOME/APPDATA; no existing supported provider fallback changes. The additive generic fail-closed owner boundary is intentional: Cloud SDK ADC provenance and quota headers must agree between control-plane discovery and actual Vertex runtime authentication. The reported P2 is therefore accepted as owner-approved policy, not an unhandled compatibility regression.

Direct installed google-auth-library 10.9.1 source verifies exclusive CLOUDSDK_CONFIG lookup and x-goog-user-project precedence. 183 real owner/dependency-path regressions and all exact-head CI/type/security gates pass. No live Google Cloud credentials or external provider request were available; that optional proof gap is explicitly disclosed.

@steipete
steipete requested a review from a team as a code owner August 3, 2026 16:01
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 1:09 PM ET / 17:09 UTC.

ClawSweeper review

What this changes

The branch makes Google Vertex honor a selected Cloud SDK ADC directory, prevents fallback to stale home-directory credentials, and sends the resolved quota project in Vertex requests.

Merge readiness

⛔ Blocked until real behavior proof is added - 6 items remain

Keep this protected PR open. The Google-specific repair is focused, but the branch leaves the prior ownership concern unresolved by making every non-platform manifest placeholder an implicit fail-closed credential owner; it also lacks inspectable real after-fix Cloud SDK/Vertex proof.

Priority: P2
Reviewed head: 870faf8ba0273e321fb6544c960331bc01cc7c25
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The source-level repair and fixture coverage are useful, but the unresolved manifest contract, unavailable dependency verification, and missing real behavior proof keep this below merge-ready.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR reports synthetic fixture tests but provides no inspectable redacted after-fix Cloud SDK/Vertex run; add terminal output, logs, or a recording without credentials, private endpoints, or project identifiers. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR reports synthetic fixture tests but provides no inspectable redacted after-fix Cloud SDK/Vertex run; add terminal output, logs, or a recording without credentials, private endpoints, or project identifiers. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current main does not contain this repair: No relevant Google ADC, manifest, or provider-auth-evidence path changed from the PR base commit to current main, so the reported Cloud SDK ownership and billing-header behavior is still not implemented on main.
Implicit generic ownership rule: The proposed parser marks every placeholder other than HOME and APPDATA as an explicit override, and the subsequent fallback loop returns false when that selected path is absent. This is a broader manifest policy than the Google-specific case.
Public manifest contract is narrower: Current plugin documentation says fallbackPaths supports only ${HOME} and ${APPDATA}; it does not define arbitrary interpolation or authoritative-directory semantics.
Findings 1 actionable finding [P2] Make credential-directory ownership declarative
Security None None.

How this fits together

The Google provider plugin discovers local Application Default Credentials for Vertex authentication, while core reads provider-manifest evidence to report whether setup can use local credentials. The selected credentials produce bearer and billing-project headers that the Google transport merges into Vertex streaming calls.

flowchart LR
  A[Environment and plugin manifest] --> B[Credential evidence discovery]
  A --> C[Vertex ADC resolver]
  B --> D[Provider setup status]
  C --> E[Access token and quota project]
  E --> F[Vertex streaming request]
  F --> G[Google Vertex response]
Loading

Decision needed

Question Recommendation
Should provider auth-evidence gain a documented generic authoritative-directory contract, or should the Cloud SDK-exclusive fallback rule remain Google-specific until that plugin API is designed? Make ownership explicit: Add and document a typed or declarative authoritative-directory mechanism, then use it for Cloud SDK ADC.

Why: The branch extends core interpretation of plugin metadata beyond the currently documented placeholder set and makes an ownership policy implicit; maintainers need to choose the enduring plugin contract.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR reports synthetic fixture tests but provides no inspectable redacted after-fix Cloud SDK/Vertex run; add terminal output, logs, or a recording without credentials, private endpoints, or project identifiers. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Make credential-directory ownership declarative (P2) - fallbackPaths is documented as supporting only ${HOME} and ${APPDATA}, but this makes every other placeholder authoritative and stops all later fallbacks when its file is absent. That is an implicit new plugin-manifest policy rather than a Google-specific dependency rule; add an explicit documented ownership mechanism or keep the fail-closed behavior in the Google provider.
  • Resolve merge risk (P1) - The generic provider-manifest parser now treats any non-platform placeholder as an exclusive credential-directory override, although the documented contract only supports ${HOME} and ${APPDATA}.
  • Resolve merge risk (P1) - Google-auth-library source was unavailable locally and the network lookup failed, so the claimed Cloud SDK precedence still needs direct dependency confirmation before merge.
  • Resolve merge risk (P1) - The PR has no inspectable redacted after-fix Cloud SDK/Vertex run; fixture tests and CI are supplemental evidence only.

Findings

  • [P2] Make credential-directory ownership declarative — src/secrets/provider-auth-evidence.ts:41-42
Agent review details

Security

None.

PR surface

Source +30, Tests +388. Total +418 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 3 56 26 +30
Tests 4 390 2 +388
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 446 28 +418

Review metrics

Metric Value Why it matters
Production versus test delta production +56, tests +388 The production change broadens provider-auth metadata behavior; its ownership semantics need a named, documented contract.

Stored data model

Persistent data-model change detected: serialized state: extensions/google/index.test.ts, serialized state: extensions/google/transport-stream.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Declare credential ownership (recommended)
    Add explicit manifest semantics for authoritative credential directories and document fallback behavior before merging.
  2. Avoid a generic API extension
    Keep the Cloud SDK-exclusive rule within the Google provider if maintainers do not want broader manifest semantics.

Technical review

Best possible solution:

Define and document an explicit provider auth-evidence mechanism for authoritative credential directories, have Google Vertex opt into it, verify the behavior against the installed Google auth library, and attach redacted runtime proof before merge.

Do we have a high-confidence way to reproduce the issue?

No live current-main reproduction was established in this read-only review. The current source and the added fixtures define a source-reproducible Cloud SDK-versus-stale-home path for an implementation worker.

Is this the best way to solve the issue?

No. Matching Cloud SDK ownership is a plausible goal, but making every non-platform manifest placeholder implicitly authoritative is not the narrowest durable solution, and the direct dependency contract could not be inspected in this environment.

Full review comments:

  • [P2] Make credential-directory ownership declarative — src/secrets/provider-auth-evidence.ts:41-42
    fallbackPaths is documented as supporting only ${HOME} and ${APPDATA}, but this makes every other placeholder authoritative and stops all later fallbacks when its file is absent. That is an implicit new plugin-manifest policy rather than a Google-specific dependency rule; add an explicit documented ownership mechanism or keep the fail-closed behavior in the Google provider.
    Confidence: 0.92

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 94f431417b25.

Labels

Label justifications:

  • P2: This is a bounded provider-auth compatibility decision with a focused repair path, not an urgent default-path outage.
  • merge-risk: 🚨 compatibility: Core parsing changes the meaning of provider manifest fallback paths and can create future plugin fallback incompatibilities.
  • merge-risk: 🚨 auth-provider: The branch changes which local ADC identity is selected and which project is billed for Vertex requests.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports synthetic fixture tests but provides no inspectable redacted after-fix Cloud SDK/Vertex run; add terminal output, logs, or a recording without credentials, private endpoints, or project identifiers. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current main does not contain this repair: No relevant Google ADC, manifest, or provider-auth-evidence path changed from the PR base commit to current main, so the reported Cloud SDK ownership and billing-header behavior is still not implemented on main. (extensions/google/vertex-adc.ts:132, 94f431417b25)
  • Implicit generic ownership rule: The proposed parser marks every placeholder other than HOME and APPDATA as an explicit override, and the subsequent fallback loop returns false when that selected path is absent. This is a broader manifest policy than the Google-specific case. (src/secrets/provider-auth-evidence.ts:41, 3422bbadf2d7)
  • Public manifest contract is narrower: Current plugin documentation says fallbackPaths supports only ${HOME} and ${APPDATA}; it does not define arbitrary interpolation or authoritative-directory semantics. Public docs: docs/plugins/manifest.md. (docs/plugins/manifest.md:581, 94f431417b25)
  • Prior review finding remains on the current patch: The current head is a merge commit whose first parent is the originally reviewed implementation commit. Blame attributes the new interpolation and explicitOverride logic to that reviewed commit, so the earlier request to make exclusive fallback ownership explicit remains applicable. (src/secrets/provider-auth-evidence.ts:42, 3422bbadf2d7)
  • Dependency source was unavailable for independent verification: The checkout has no installed google-auth-library source, and GitHub/DNS access failed during this read-only review. The PR body’s dependency claims therefore remain unverified here rather than being treated as independent contract proof. (extensions/google/package.json:10, 94f431417b25)

Likely related people:

  • steipete: The proposed commit and several recent Google Vertex ADC owner fixes are concentrated in this path’s history. (role: recent area contributor; confidence: high; commits: 3422bbadf2d7, e5259fa8bb4c, 0b59964ec945; files: extensions/google/vertex-adc.ts, src/secrets/provider-auth-evidence.ts)
  • Damian Finol: The production ADC-mode support commit is a central predecessor of the current Vertex credential-owner implementation. (role: feature introducer; confidence: medium; commits: f09b4ebe314e; files: extensions/google/vertex-adc.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add redacted real after-fix evidence showing the selected Cloud SDK ADC path and resulting Vertex request behavior.
  • Resolve the documented provider-manifest ownership contract before retaining generic non-platform placeholder support.
  • Verify the installed Google auth library behavior against the exact dependency version before approving the precedence rule.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-03T16:07:36.985Z sha 3422bba :: needs real behavior proof before merge. :: [P2] Make exclusive fallback ownership explicit

@steipete
steipete merged commit 8eaf917 into main Aug 3, 2026
126 checks passed
@steipete
steipete deleted the codex/qa0803-google-vertex-adc-quota branch August 3, 2026 17:47
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main: (25 commits)
  test(qa): cover plugin authoring contracts (#118821)
  fix(parallels): keep provider keys out of POSIX job logs (#118840)
  improve: reduce redundant Code Mode test work (#118815)
  fix(models): report primary OpenRouter limits in scans (#110855)
  test: speed up setup inference fixtures (#118811)
  fix(auto-reply): enforce canonical reset authorization (#118580)
  docs(gateway): fix invalid heartbeat visibility examples (#118827)
  fix(plugins): unify HTTP route conflict handling (#118203)
  test(agents): use prepared auth fixtures (#118816)
  fix(lmstudio): resolve JIT embedding variants
  fix(lmstudio): preserve embedding preload and model identity
  fix(ai): reject binary Codex websocket frames (#111138)
  fix(deps): bump brace-expansion override to 5.0.9 for HIGH advisory 1130705 (#118804)
  feat(cli): add session archive and delete commands (#118791)
  fix(openai): commit eligible final realtime transcription audio safely (#118782)
  fix(reef): restrict management commands to owners [AI] (#118578)
  fix(google): honor Cloud SDK credential location and Vertex billing project (#118745)
  fix(bedrock): preserve private embedding endpoints and AWS routing policy (#118744)
  fix(voice): make signed callback replay reservations durable and retryable (#118754)
  fix(openrouter): isolate custom proxy credentials and transport security (#118773)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: google maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant