Skip to content

fix(talk): honor explicit OpenAI authentication choices - #138726

Closed
roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/talk-oauth-android-implementation-20260904
Closed

roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/talk-oauth-android-implementation-20260904

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #115021 — earlier OpenAI realtime OAuth fallback discussion.

What Problem This Solves

Fixes an issue where an explicit OpenAI Talk credential choice could fall through to another authentication source, or an unused saved API-key reference could make OAuth unavailable.

Why This Change Was Made

Keep credential activity, provider normalization, session admission and the safe capability catalog on one policy. OAuth-only and Platform-key-only choices exclude the other source; Automatic retains the existing provider-owned precedence.

User Impact

Operators can select the intended credential source without changing the model or transport. Unavailable credentials fail visibly, while cold Talk owners still expose safe static authentication choices.

Evidence

  • The cold-catalog boundary failure was reproduced and fixed in the existing test/helpers owner: 10 boundary tests passed; credential traps and zero-operation assertions are retained.

  • Source-bound historical runtime proof: 53 fresh/retained-key cases with 82 observations across 15 matching pinned non-UI inputs. These assert headers/broker credentials at synthetic transport seams, not live provider entitlement. The separate 52-case routing run is historical; its test source was not separately pinned. Three older UI-reload cases are excluded because that test source differs from this head.

  • The A-owned metadata capability reproduced two legacy failures; six focused repaired A cases passed. Provider-owned authentication facts remain unchanged.

  • This is local runtime-refresh proof, not live OAuth/provider or one RPC/file-watcher/restart E2E. Listed Secret-owner participation in the collector integration and the current-main conflict remain unresolved; requesting Secops review is not approval.

  • Exact repaired A source tree passed canonical core production and core test-type lanes, both exit 0, with checkout-local dependencies.

  • Maintainer product decision (September 9, 2026): the authentication modes and bundled-only pre-credential activity hook were accepted (no credential access/egress; absent means active). Listed Secops participation in collector integration, validation and formal reviews remain required.

Validation source tree: commit f868fae5d06072a8dfcc57535a3a41c8b1beb1ec. The local evidence above has its stated scope.

Related changes

Review order for the Android realtime Talk stack:

  1. fix(talk): honor explicit OpenAI authentication choices #138726 — honor explicit OpenAI authentication choices
  2. feat(talk): choose authentication from settings #142292 — choose authentication from settings
  3. fix(talk): retain selected targets and transcript ownership #142293 — retain selected targets and transcript ownership
  4. fix(talk): align relay readiness with call admission #142294 — align relay readiness with call admission
  5. fix(i18n): separate native UI call discovery by platform #142295 — separate native UI call discovery by platform
  6. feat(android): add native WebRTC media transport #142296 — add native WebRTC media transport
  7. feat(android): coordinate realtime response and transcript state #142297 — coordinate realtime response and transcript state
  8. feat(android): retain realtime calls through cleanup #142298 — retain realtime calls through cleanup
  9. feat(android): activate target-bound realtime Talk #142299 — activate target-bound realtime Talk
  10. feat(android): attach current camera snapshots to Talk #142300 — attach current camera snapshots to Talk

Worked on by:

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime extensions: openai size: XL maintainer Maintainer-authored PR labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 9, 2026, 4:50 PM ET / 20:50 UTC (Revision 26).

ClawSweeper review

What this changes

The branch enforces explicit OpenAI Talk credential choices, skips inactive API-key references, exposes authentication choices in the catalog, and negotiates session metadata with clients.

Merge readiness

⛔ Blocked before merge - 4 items remain

This PR remains useful: current main does not enforce explicit authentication choices. No blocking code defect was identified in the pinned diff; the recorded Secret-owner integration and validation requirements remain unresolved.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused implementation has useful boundary coverage and no identified blocking defect; pending owner participation does not reduce patch quality.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary contributor proof gate is exempt for this bot/member PR. Captured evidence exercises credential selection and runtime refresh at synthetic transport seams, plus metadata compatibility; it does not establish live-provider acceptance or the unresolved current-main integration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary contributor proof gate is exempt for this bot/member PR. Captured evidence exercises credential selection and runtime refresh at synthetic transport seams, plus metadata compatibility; it does not establish live-provider acceptance or the unresolved current-main integration.
Evidence reviewed 9 items Current main still lacks explicit selection enforcement: At the fetched main revision, normalization does not retain authMethod and the released-route resolver still selects OAuth before Platform credentials without an explicit-mode branch. The latest supplied release has the same normalization behavior.
Release comparison: The v2026.9.3 provider normalizer reads the saved API key without considering authMethod; this release does not establish that the proposed behavior has shipped.
Credential exclusion belongs to the provider: The introduced normalizer omits the saved Platform key for explicit OAuth. The broker resolver selects Platform immediately for api-key and rejects unavailable OAuth before reaching Platform fallback. Automatic retains its existing branches.
Findings None None.
Security None None.

How this fits together

Talk connects OpenClaw voice clients to realtime providers through the Gateway. Provider configuration and prepared credentials determine session admission, while negotiated responses tell clients how to establish their connection.

flowchart TD
  A[Talk configuration] --> B[Secret preparation]
  B --> C[OpenAI authentication policy]
  D[Client capabilities] --> E[Gateway session admission]
  C --> E
  E --> F[Provider voice session]
  F --> G[Compatible client response]
Loading

Decision needed

Question Recommendation
Will a listed Secret owner explicitly request or co-review the collector integration that combines the accepted activity hook with main's shared request-secret collector? Co-review the bounded integration: A listed Secret owner participates in the collector resolution while preserving both existing behaviors, followed by refreshed integration validation.

Why: The discussion expressly leaves this protected-path participation unresolved; product acceptance and a requested review do not supply it.

Before merge

  • Resolve merge risk (P1) - A previously ignored saved authentication choice can now stop calls when its selected credential is unavailable; recovery requires restoring that credential or choosing Automatic.
  • Resolve merge risk (P1) - Historical credential and legacy-client checks do not establish the behavior of the unresolved integration with current main's shared request-secret collector.
  • Complete next step (P2) - Obtain listed Secret-owner participation in the collector conflict resolution, then refresh credential-transition and legacy-client validation on the integrated source.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +117, Tests +199, Docs +6, Other +6. Total +328 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 12 153 36 +117
Tests 5 212 13 +199
Docs 2 16 10 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 1 7 1 +6
Total 20 388 60 +328

Review metrics

Metric Value Why it matters
Authentication contract 2 explicit modes; Automatic precedence retained Explicit selection now excludes the other credential source, making saved choices operationally significant.
Client negotiation 1 capability; 4 authentication-response cases Optional negotiation protects strict released decoders from the added authentication metadata.

Merge-risk options

Maintainer options:

  1. Validate the owner-reviewed integration (recommended)
    After listed-owner participation, refresh Automatic and explicit-mode checks with fresh and retained keys, inactive SecretRefs, and legacy clients on the resolved source.
  2. Keep the authentication foundation pending
    Pause landing while collector ownership or integrated upgrade behavior remains unresolved.

Technical review

Best possible solution:

Retain provider-owned credential exclusion and negotiated metadata, with Secret-owner-approved integration that preserves Automatic behavior and demonstrates fresh and retained-configuration compatibility.

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

Not applicable as a strict existing-contract bug: the branch adds enforced authentication modes. Source inspection confirms that current main ignores this field, while supplied historical checks exercise the proposed behavior.

Is this the best way to solve the issue?

Yes, the provider-owned policy and additive response negotiation are a coherent approach; the outstanding concern is integration and upgrade validation, not a competing implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b1aa4805a6c4.

Labels

Label justifications:

  • P2: This is a bounded Talk credential-selection improvement with no demonstrated urgent outage.
  • merge-risk: 🚨 compatibility: Honoring previously ignored saved choices can intentionally stop existing calls, and integrated upgrade validation remains pending.
  • merge-risk: 🚨 auth-provider: The patch changes credential eligibility across secret preparation and session admission, which must remain consistent after integration.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The ordinary contributor proof gate is exempt for this bot/member PR. Captured evidence exercises credential selection and runtime refresh at synthetic transport seams, plus metadata compatibility; it does not establish live-provider acceptance or the unresolved current-main integration.

Evidence

What I checked:

  • Current main still lacks explicit selection enforcement: At the fetched main revision, normalization does not retain authMethod and the released-route resolver still selects OAuth before Platform credentials without an explicit-mode branch. The latest supplied release has the same normalization behavior. (extensions/openai/realtime-voice-session-policy.ts:235, b1aa4805a6c4)
  • Release comparison: The v2026.9.3 provider normalizer reads the saved API key without considering authMethod; this release does not establish that the proposed behavior has shipped. (extensions/openai/realtime-voice-session-policy.ts:235, 1391f7cd2d40)
  • Credential exclusion belongs to the provider: The introduced normalizer omits the saved Platform key for explicit OAuth. The broker resolver selects Platform immediately for api-key and rejects unavailable OAuth before reaching Platform fallback. Automatic retains its existing branches. (extensions/openai/realtime-voice-session-policy.ts:243, f868fae5d060)
  • Protected collector integration: The collector invokes a bundled-only activity hook before resolving Talk API-key references, defaults absent hooks to active, and retains the existing owner contract. CODEOWNERS assigns src/secrets/ to @openclaw/openclaw-secops. (src/secrets/runtime-config-collectors-core.ts:245, f868fae5d060)
  • Recorded decision and remaining ownership requirement: The captured body and fix(talk): honor explicit OpenAI authentication choices #138726 (comment) record acceptance of the authentication modes and bounded hook, while explicitly leaving listed Secret-owner participation and integrated validation pending. A live REST read still identifies vincentkoc as the requested reviewer; the reviews endpoint returned no reviews.
  • Legacy response compatibility: The introduced response projection strips authMethod unless the connection advertises talk-client-metadata, without changing the provider session. The added four-case matrix covers both authentication values with and without negotiation and checks legacy response keys. (src/gateway/server-methods/talk-client-create.ts:409, f868fae5d060)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • openclaw/openclaw-secops: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Refresh fresh/retained-key authentication and legacy-client compatibility validation after owner-reviewed conflict resolution.

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 (25 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-08T13:19:06.676Z sha 6b8b86d :: blocked before merge. :: none
  • reviewed 2026-09-08T13:28:49.414Z sha 6b8b86d :: blocked before merge. :: none
  • reviewed 2026-09-08T16:14:50.106Z sha 5a54420 :: blocked before merge. :: none
  • reviewed 2026-09-08T16:53:14.902Z sha 5a54420 :: blocked before merge. :: none
  • reviewed 2026-09-08T19:45:35.959Z sha f868fae :: blocked before merge. :: none
  • reviewed 2026-09-09T07:48:08.311Z sha f868fae :: blocked before merge. :: none
  • reviewed 2026-09-09T08:47:46.456Z sha f868fae :: blocked before merge. :: none
  • reviewed 2026-09-09T09:44:58.357Z sha f868fae :: blocked before merge. :: none

@roboclaw-bot
roboclaw-bot force-pushed the openclaw/talk-oauth-android-implementation-20260904 branch from b8ea249 to 4c28169 Compare September 5, 2026 12:49
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 5, 2026 13:00
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 5, 2026
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/talk-oauth-android-implementation-20260904 branch from 61832ea to b7611d2 Compare September 5, 2026 15:13
@clawsweeper clawsweeper Bot removed the proof: 🎥 video Contributor real behavior proof includes video or recording evidence. label Sep 8, 2026
Restore Main client admission without claiming forced consultation on WebRTC.
Correct auth selection and target normalization; retain validated lifecycle behavior.
Include the checked native and test formatting corrections.

Worked on by:
- @IWhatsskill

Co-authored-by: IWhatsskill <[email protected]>
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 8, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 8, 2026 12:55
@roboclaw-bot
roboclaw-bot requested a review from a team as a code owner September 8, 2026 12:55
@roboclaw-bot roboclaw-bot changed the title feat(talk): honor selected auth and add Android realtime calls feat(talk): add Android realtime calls and authentication selection Sep 8, 2026
Keep explicit credential selection and inactive saved-key handling consistent with the safe static capability catalog. OAuth-only and Platform-key-only choices never fall through to the other credential source.

Worked on by:
- @IWhatsskill

Co-authored-by: IWhatsskill <[email protected]>
roboclaw-bot and others added 2 commits September 8, 2026 17:09
Keep real manifest-owned catalog construction and all credential/session operation traps in the shared fixture boundary. Preserve Gateway cold-owner assertions without importing a bundled-plugin loader from core tests.

Worked on by:
- @IWhatsskill

Co-authored-by: IWhatsskill <[email protected]>
Project authentication metadata only for opted-in clients. Preserve provider-owned authentication facts and released decoder behavior.

Worked on by:
- @IWhatsskill

Co-authored-by: IWhatsskill <[email protected]>
@roboclaw-bot

roboclaw-bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator Author

@openclaw/openclaw-secops — please explicitly request or co-review the scoped collector integration below.

Integration refresh — September 10, 2026

The public stack remains based on unchanged A f868fae. Its prepared nonrestricted resolutions are being refreshed against pinned Main a4ad6f3.

The Main-side collector blob is still 2b888cacffe3e5b9119c76defa341bfb0d75d6e5, byte-identical to the earlier fe79d36 input. The import-union proposal below is therefore unchanged in scope. Any additional protected change discovered during the refresh will remain unapplied.

Please explicitly request or actively co-review that restricted import union. Manual CI run 34503641105 also identifies canonical-formatting failures in runtime-config-collectors-core.ts and runtime-talk-secret-owners.test.ts. Please include the formatter-only updates to those two files in the scoped request/co-review; no new hook or test behavior is proposed.

All six Android lanes passed in that run, but the complete gate failed. Neither this evidence nor the existing review request is integrated-Main proof or a waiver of ownership, CI, or enforced reviews.

Maintainer decisions recorded on September 9, 2026:

  • Automatic unchanged; OAuth-only/API-key-only (Platform-key-only) never cross-fallback; incompatible combinations visibly unavailable.
  • The bundled-only isRealtimeVoiceApiKeyActive(providerConfig) hook before credential resolution: no credential access or egress; absent means active. Preserve SecretRef ownership/reload semantics.

The earlier prepared integration inputs were pinned: A f868fae and Main fe79d36. The earlier nonrestricted conflict resolutions were prepared; current-pin refresh and full integrated runtime validation remain pending.
The remaining protected change is one import union in src/secrets/runtime-config-collectors-core.ts. Please explicitly request this resolution or actively co-review the collector integration:

import { resolveBundledProviderPolicySurface } from "../plugins/provider-public-artifacts.js";
import { getPath } from "./path-utils.js";
import { PROVIDER_REQUEST_SECRET_FIELD_GROUPS } from "./provider-request-secret-fields.js";

Retain Main's shared request-secret collector and A's existing bundled-provider activity check. No new hook, collector logic, test behavior, or policy exception is proposed. Canonical formatting only reorders imports and wraps existing expressions. The protected runtime-talk-secret-owners.test.ts was conflict-free in that earlier inventory.
A listed owner's explicit request/co-review covers this pinned integration only; CI and enforced GitHub approvals remain required.

The PR evidence records 53 historical synthetic runtime-transition cases (82 observations) with 15 matching pinned non-UI inputs, separately qualified historical routing coverage and negotiated legacy-response checks. The three older UI-reload cases are excluded from A-head evidence because their test source differs. These are not resolved-Main or live-provider acceptance. No approval or CI waiver is inferred from the existing review request.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Closing this PR in favor of a planned rebuild on current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation extensions: openai gateway Gateway runtime 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants