Repository navigation
fix(google): stop scraping Gemini CLI OAuth credentials - #117167
Conversation
8e4a534 to
e8618cb
Compare
|
Codex review: needs changes before merge. Reviewed July 31, 2026, 11:26 PM ET / August 1, 2026, 03:26 UTC. ClawSweeper reviewWhat this changesThe PR stops OpenClaw from scraping Gemini CLI OAuth client credentials, forwards selected OAuth profile fields to the CLI for CLI-owned refresh, and removes the retired OpenClaw OAuth and usage-refresh implementation. Merge readinessKeep this maintainer-owned PR open for one mechanical correction before merge: it removes the Gemini CLI usage hooks but still advertises Priority: P2 Review scores
Verification
How this fits togetherThe Google bundled plugin registers the Gemini CLI model provider and declares its static capabilities in its manifest. Agent CLI preparation selects an auth profile, optionally refreshes it according to backend policy, and hands credentials to the Gemini CLI execution adapter. flowchart LR
A[Selected auth profile] --> B[CLI preparation]
B --> C[Refresh ownership policy]
C -->|Gemini CLI owns OAuth refresh| D[Gemini CLI execution]
E[Google plugin manifest] --> F[Usage capability discovery]
F --> G[Provider usage status]
H[Gemini CLI provider hooks] --> G
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -1222, Tests -1787, Other -1. Total -3010 across 23 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Remove Do we have a high-confidence way to reproduce the issue? Yes, from source: register the PR-head Google plugin and inspect the static manifest; Is this the best way to solve the issue? No, not yet: delegating OAuth refresh to the CLI is aligned with the accepted ownership boundary, but leaving the manifest’s complete-usage-lifecycle declaration behind is not the narrowest coherent implementation of the telemetry retirement. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 065d39067e1f. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review The previous P1 is addressed on |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision: accept the scoped retirement of Exact-head CI passed on |
|
Merged via squash.
|
* origin/main: fix(onboard): stop a full reset from resetting the default workspace when the config is unreadable (openclaw#114110) refactor(i18n): remove unused Apple contradiction report (openclaw#117182) fix(google): stop scraping Gemini CLI OAuth credentials (openclaw#117167) perf: count large histories before Gateway prewarm (openclaw#117118) fix(signal): restore provider-safe original attachment filenames (openclaw#115107) refactor(channels): unify setup ownership across bundled channels (openclaw#117188) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) fix(tlon): wire autoDiscoverChannels through the settings-store round-trip (openclaw#114949) fix(gateway): yield before post-ready background work (openclaw#117083) test(google): cover live transcript overflow fix(google): bound live transcript accumulation
* commit '441d6ab254df14fb6939a8a261f474904ff9c500': (388 commits) fix(qqbot): ignore blank app id fallbacks (openclaw#109460) fix(feishu): consume implicit reply targets across media delivery (openclaw#117196) fix(exec): preserve approved command output when sessions resume (openclaw#117177) fix(qa): use public subagent fanout evidence (openclaw#116832) fix(googlechat): cancel unread auth response bodies before release (openclaw#115873) fix(queue): prevent cron saturation from starving hook dispatch (openclaw#116666) fix(gateway): sessions.steer retry no longer interrupts an active run when replaying a cached idempotency key (openclaw#116969) fix(irc): config validation rejects documented channels.irc.configWrites key (openclaw#112392) fix(mistral): keep terminal error branch lint-clean fix(onboard): stop a full reset from resetting the default workspace when the config is unreadable (openclaw#114110) refactor(i18n): remove unused Apple contradiction report (openclaw#117182) fix(google): stop scraping Gemini CLI OAuth credentials (openclaw#117167) perf: count large histories before Gateway prewarm (openclaw#117118) fix(signal): restore provider-safe original attachment filenames (openclaw#115107) refactor(channels): unify setup ownership across bundled channels (openclaw#117188) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) ...
* origin/main: fix(onboard): stop a full reset from resetting the default workspace when the config is unreadable (openclaw#114110) refactor(i18n): remove unused Apple contradiction report (openclaw#117182) fix(google): stop scraping Gemini CLI OAuth credentials (openclaw#117167) perf: count large histories before Gateway prewarm (openclaw#117118) fix(signal): restore provider-safe original attachment filenames (openclaw#115107) refactor(channels): unify setup ownership across bundled channels (openclaw#117188) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) fix(tlon): wire autoDiscoverChannels through the settings-store round-trip (openclaw#114949) fix(gateway): yield before post-ready background work (openclaw#117083) test(google): cover live transcript overflow fix(google): bound live transcript accumulation
* commit 'ae4e662145b6aa162777cdb1c011b3f04ddd230d': (388 commits) fix(qqbot): ignore blank app id fallbacks (openclaw#109460) fix(feishu): consume implicit reply targets across media delivery (openclaw#117196) fix(exec): preserve approved command output when sessions resume (openclaw#117177) fix(qa): use public subagent fanout evidence (openclaw#116832) fix(googlechat): cancel unread auth response bodies before release (openclaw#115873) fix(queue): prevent cron saturation from starving hook dispatch (openclaw#116666) fix(gateway): sessions.steer retry no longer interrupts an active run when replaying a cached idempotency key (openclaw#116969) fix(irc): config validation rejects documented channels.irc.configWrites key (openclaw#112392) fix(mistral): keep terminal error branch lint-clean fix(onboard): stop a full reset from resetting the default workspace when the config is unreadable (openclaw#114110) refactor(i18n): remove unused Apple contradiction report (openclaw#117182) fix(google): stop scraping Gemini CLI OAuth credentials (openclaw#117167) perf: count large histories before Gateway prewarm (openclaw#117118) fix(signal): restore provider-safe original attachment filenames (openclaw#115107) refactor(channels): unify setup ownership across bundled channels (openclaw#117188) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) ...
Closes #54289
What Problem This Solves
Fixes an issue where users running legacy imported Gemini CLI OAuth profiles caused OpenClaw to inspect the installed Gemini CLI bundle for Google OAuth application credentials. That behavior was brittle, depended on private bundle structure, and crossed the CLI ownership boundary.
Why This Change Was Made
OpenClaw now stages the selected profile's OAuth fields and lets Gemini CLI perform its own refresh. Core still materializes API-key and token profiles, while the retired OpenClaw-owned Gemini OAuth setup, refresh, HTTP, credential-extraction, and usage-refresh stack is removed. This does not add a new Gemini login flow.
Gemini CLI exposes refresh through its own core authentication flow, but it does not expose a stable refresh-only CLI command. Homebrew's bundled installation also does not provide a stable importable
@google/gemini-cli-corepackage boundary. Depending on either internal config APIs or bundle layout would recreate the same ownership problem in a different form.User Impact
Existing refreshable Gemini CLI OAuth profiles continue through the supported CLI execution path without OpenClaw borrowing or extracting Google's OAuth client credentials. API-key profiles continue to work as before.
OpenClaw no longer advertises provider-usage telemetry for
google-gemini-cli. That telemetry depended on the unsafe OpenClaw-owned refresh path and could not be preserved without another private Gemini coupling. Direct Google and Vertex usage providers are unchanged.Evidence
oxfmt --check: passedf47d6c6f7a13(0.55 nightly package metadata)The deletion-only credential extractor file triggers autoreview's credential-shaped-content guard by design; the other 12 retired files pass its isolated validator.