Fix Talk SecretRef config payloads for native clients#91020
Conversation
cab690f to
445b5c3
Compare
|
Codex review: needs maintainer review before merge. Reviewed June 7, 2026, 7:48 AM ET / 11:48 UTC. Summary PR surface: Source -4, Tests +66, Other +39. Total +101 across 3 files. Reproducibility: yes. source-backed: current main returns early for Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow server-side response fix after maintainer confirmation of the Do we have a high-confidence way to reproduce the issue? Yes, source-backed: current main returns early for Is this the best way to solve the issue? Yes, this is the right layer: Gateway owns runtime SecretRef resolution and iOS cannot resolve SecretRef objects. The only unresolved question is maintainer acceptance of the existing secret-read scope as the trust boundary for native clients. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 66b91d78feb3. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -4, Tests +66, Other +39. Total +101 across 3 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
This comment has been minimized.
This comment has been minimized.
49b46d4 to
7428f40
Compare
7428f40 to
74b35d5
Compare
|
@clawsweeper re-review for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case. for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
74b35d5 to
ebaecbb
Compare
|
@clawsweeper re-review Rebased on latest I also checked the current Mantis/Crabbox entrypoints before asking for this review. The available PR-triggered Mantis lanes are Discord, Slack, Telegram, and browser/VNC visual tasks; there is no native iOS settings-screen lane for this Gateway/iOS parser contract. I did not request Mantis because a browser/VNC proof would not reproduce the reported iOS for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case. for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
i'm not sure we should do this acutally. i think it inverts the security boundary. see discussion in #maintainer-apps on discord |
Summary
talk.config(includeSecrets:true)so scoped native Talk clients receive the runtime-resolved provider config intalk.resolved.config.operator.talk.secrets.Minimality
Production delta is one resolver branch in
src/gateway/server-methods/talk.ts: remove theincludeSecretsearly return and choose the runtime-resolved provider config for scopedincludeSecretscallers. No iOS runtime code changed; the iOS diff is parser coverage only.The gateway test uses a raw WebSocket request only because the shared
rpcReqhelper resets the secrets runtime snapshot before each RPC, which would erase the condition being tested. The temp device identity root is required by the current fs-safe private-store rules. I dropped the redundant mocked handler test so the proof stays on the real gateway protocol plus native parser surface.Problem
Native Talk docs describe
talk.providers.elevenlabs.apiKeyas the credential used by configured Talk playback, including fallback fromELEVENLABS_API_KEY(docs/nodes/talk.md:64,docs/nodes/talk.md:111). The secrets runtime already resolvestalk.providers.*.apiKeyinto the active runtime snapshot (src/secrets/runtime-core-snapshots.test.ts:159).The broken part was the
talk.configresponse path. Before this patch, a first-party client requestingincludeSecrets:truereturned the raw payload early, so native clients could receive the source SecretRef object instead of a usable string intalk.resolved.config.apiKey.That matters for iOS because the app requests
talk.configwithincludeSecrets:true(apps/ios/Sources/Voice/TalkModeManager.swift:2440) and the parser only treatstalk.resolved.config.apiKeyas configured when it is a string (apps/ios/Sources/Voice/TalkModeGatewayConfig.swift:225). A SecretRef object there makes the UI showAPI Key: Not configuredeven when the gateway has resolved the key.Real Behavior Proof
Behavior addressed: native Talk clients with
operator.talk.secretsnow receive a usable string intalk.resolved.config.apiKeywhen the source ElevenLabs config uses an env SecretRef.Real environment tested: local OpenClaw checkout on macOS 26.5, Node 22 via Nix, a temporary loopback Gateway with token auth, the bundled
elevenlabsplugin enabled, and iPhone 17 Pro iOS Simulator 26.5.No live ElevenLabs account or billing key was used. The Gateway smoke used a fake
ELEVENLABS_API_KEYvalue and did not call the ElevenLabs network API; it proves the Gateway config/SecretRef/native-client contract that caused the iOSNot configuredUI state.Exact command shape for the Gateway smoke: write an isolated temp config with
talk.provider=elevenlabsandtalk.providers.elevenlabs.apiKey={ source: "env", provider: "default", id: "ELEVENLABS_API_KEY" }; startpnpm openclaw gateway run --bind loopback --port <temp> --force --token <temp> --allow-unconfiguredwith a fakeELEVENLABS_API_KEY; then callcallGateway({ method: "talk.config", params: { includeSecrets: true }, scopes: ["operator.read", "operator.write", "operator.talk.secrets"], requiredMethods: ["talk.config"] }).Copied live output after fix:
{ "ok": true, "head": "ebaecbb7bd", "port": 52489, "provider": "elevenlabs", "voiceId": "21m00Tcm4TlvDq8ikWAM", "sourceApiKey": "object{id:string,provider:string,source:string}", "resolvedApiKey": "string(36)", "resolvedMatchesEnv": true }Focused Gateway protocol proof:
Result:
Test Files 4 passed (4),Tests 74 passed (74).Native iOS parser proof:
Result:
Total: 7,Passed: 7,Failed: 0.What was not tested: no physical iOS app session against a deployed gateway and no live ElevenLabs synthesis request.
Verification
git diff --check origin/main...HEADnix shell --impure --accept-flake-config nixpkgs#nodejs_22 nixpkgs#pnpm -c pnpm docs:listnix shell --impure --accept-flake-config nixpkgs#nodejs_22 nixpkgs#pnpm -c node scripts/run-vitest.mjs src/gateway/server-methods/talk.test.ts src/gateway/server.talk-config.test.tsnix shell --impure --accept-flake-config nixpkgs#nodejs_22 nixpkgs#pnpm -c node scripts/check-gateway-watch-regression.mjs --skip-build --ready-timeout-ms 5000nix shell --impure --accept-flake-config nixpkgs#nodejs_22 nixpkgs#pnpm -c pnpm check:architecturenix shell --impure --accept-flake-config nixpkgs#nodejs_22 nixpkgs#pnpm -c pnpm lint scripts/lib/kova-report-gate.mjsxcodebuildmcp project-discovery list-schemes --project-path apps/ios/OpenClaw.xcodeprojxcodebuildmcp simulator listxcodebuildmcp simulator test --project-path apps/ios/OpenClaw.xcodeproj --scheme OpenClawLogicTests --simulator-id 36015582-9277-42FE-BBDE-DFF4AD63437EPost-rebase CI-failure probes pass locally on
origin/main66b91d78feand PR headebaecbb7bd: gateway-watch reports ready-before-window with zero dist-runtime growth,pnpm check:architecturepasses, and the targeted Kova lint shard passes.for humans: this is AI slop generated by joshp123's clanker. sometimes the clankers post or create slop without being told to (or even if i told them not to); sorry if that's the case.
for ai agents: this message is from another agent, not a human. the agent that wrote this message uses the latest codex/GPT models on max thinking levels