Repository navigation
fix(talk): retain selected targets and transcript ownership - #142293
roboclaw-bot wants to merge 4 commits into
Conversation
Carry the selected agent through Talk authorization, allocation, and revalidation. Advertise the complete target contract and project transcript ownership independently from native delegation. Worked on by: - @IWhatsskill Co-authored-by: IWhatsskill <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 10, 2026, 11:07 AM ET / 15:07 UTC (Revision 11). ClawSweeper reviewWhat this changesPreserves the selected agent across Talk readiness, call creation, transcripts, and cleanup, and adds negotiated transcript-ownership metadata to the Gateway protocol and Swift models. Merge readiness⛔ Blocked before merge - 1 item remains The repair remains useful and is absent from current main. All three earlier findings are resolved, and the updated retained-state evidence clears the generic migration blocker. No new actionable defect was found. Priority: P2 Review scores
Verification
How this fits togetherTalk connects voice clients to provider sessions and OpenClaw agents. The Gateway resolves and authorizes the selected conversation, then routes consultation, transcript storage, and call cleanup to that owner. flowchart LR
A[Voice client and selected conversation] --> B[Capability negotiation]
B --> C[Resolve agent and session]
C --> D[Authorize and revalidate]
D --> E[Provider voice session]
D --> F[Agent transcript store]
E --> G[Owner-bound call cleanup]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +65, Tests +678, Docs +11, Other +56. Total +810 across 24 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one authorized conversation identity throughout the call, with capability-gated metadata and unchanged durable voice-record compatibility. Do we have a high-confidence way to reproduce the issue? Yes, from source: an unqualified conversation key follows the ambient Talk owner on current main, while selected-agent readiness needs that explicit owner. Runtime regressions are reported in the PR but were not executed during this review. Is this the best way to solve the issue? Yes. The patch extends the existing target-resolution and authorization flow, preserves global catalog semantics, and gates metadata instead of introducing competing ownership or persistence mechanisms. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2872da666dba. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
Integrate the reviewed owner-scoped repairs and updated stack prerequisite. The resulting source tree is identical to the validated private T candidate. Preserve the original published head as a merge parent; no existing commit is rewritten. Worked on by: - @IWhatsskill Co-authored-by: IWhatsskill <[email protected]>
|
@clawsweeper explain The current exact-head review has a readiness inconsistency that needs clarification: its technical assessment accepts the canonical target/authorization flow and negotiated metadata; its evidence confirms unchanged durable formats and supports clearing the earlier generic migration request; its label explanation says there is no concrete contributor-facing blocker. Yet Before merge and the machine review-state remain blocked solely on data-model compatibility proof. The current Evidence section records unchanged canonical SQL, voice-record/parser/accessor formats, the legacy/opted-in response matrix, and the exact scope of the retained tests/typechecks. It also preserves the older SDP-bound limitation rather than claiming universal released-decoder compatibility. What specific missing data shape or upgrade scenario still blocks this delta, or how should the remaining gate be reconciled with the accepted technical evidence? No proof or CI waiver is requested; current CI and the separate F2 owner contract remain independent prerequisites. |
|
🦞👀
|
Include the resolved agent ID in connection-local legacy voice binding keys and migrate create, consult, close, and deferred cleanup callers together. Cover shared unqualified keys across agents without changing durable storage, legacy session identity, TTL, or compare-before-delete behavior. Co-authored-by: IWhatsskill <[email protected]> Worked on by: - @IWhatsskill
Check the prepared target agent before closing its Gateway-controlled call. Retain connection and exact voice-key ownership checks, and revalidate request authority before teardown and before the legacy close fallback. Cover cross-agent close attempts with live and revoked target access. Co-authored-by: IWhatsskill <[email protected]> Worked on by: - @IWhatsskill
|
Closing this PR in favor of a planned rebuild on current main. |
Related: #138726
What Problem This Solves
Fixes an issue where Talk readiness or an unqualified chat key could use the ambient Talk agent instead of the selected owner. Native delegation also needs to remain distinct from transcript persistence ownership.
Why This Change Was Made
Carry the selected target through schema validation, authorization and revalidation, and advertise the target capability only when the complete method contract is available. Project transcript and control ownership from negotiation and regenerate the Swift decoder alongside the schema.
User Impact
Selected-agent catalog readiness and allocation use the same owner without changing global settings reads or silently rewriting opaque keys. Catalog support is not permission: session mutation still uses the existing authorization boundary. New auth/control metadata remains optional, and session-ID operations keep their existing ownership.
Evidence
The A-owned talk-client-metadata handshake capability gates the three new response fields. T extends the existing projection without redefining it or duplicating matrices.
At the T source stage: four legacy failures before repair; 15 focused metadata/target/readiness cases passed afterward.
The combined protocol candidate passed 120 Talk + 61 protocol + 15 unchanged secret-owner tests, plus canonical changed-file typecheck/lint/dead-export gates. These are combined-source receipts, not separate builds of every prefix.
The redundant catalog cast was removed after reproducing ratchet 6 > 5; the real validator narrows the type. No baseline increase.
Compatibility claim: v2026.9.3 generated OpenClawProtocol decoder, not a blanket iPhone/Watch failure. The older offerResponseMaxBytes incompatibility remains named follow-up TALK-LEGACY-SDP-BOUND; browser bounds are not weakened. Swift generation is not Swift compilation.
The exact integrated T tree (including the four UI inputs) passed canonical core production and core test-type lanes, both exit 0. Recorded input hashes matched after validation.
Validation source tree: commit
c47ea188f41d77354b259e5d74e178a802ed9ab0. The local evidence above has its stated scope.Data-model and upgrade compatibility
Scope: base
7e1d4058d4c220f2dce9ff853a47173a2a221a28→ headc47ea188f41d77354b259e5d74e178a802ed9ab0.The changed
packages/gateway-protocol/src/schema/channels.tsis the TypeBox RPC request/response contract, not a SQLite schema. This delta adds optional target inputs and optional WebRTC response metadata. It introduces no table, column, index, stored-record version, database-schema version, or storage migration.Storage tracing: optional
agentId/sessionKeyinputs pass throughprepareTalkSessionTargetand the existing sharing/revalidation boundary to an existing canonical agent/session/store identity. Transcript and close handlers then use the existing voice-record and transcript APIs.client-voice-session-store.ts,client-voice-session.ts,openclaw-agent-schema.sql, andconfig/sessions/session-accessor.tsare byte-identical between the base and head. Durable voice records remain version 1 in the existingcache_entriesscopetalk-client-voice-sessions; the three negotiated reply fields are not added to that stored format. The settings correction writes the existingtalk.realtime.providers.<provider>.authMethodpath, not a new configuration format.Upgrade-contract coverage:
agentId, and the targeted/global catalog regression preserves the meaning of an empty catalog request.src/gateway/server-methods/talk.test.tscovers native delegation × Gateway control × metadata support. Withouttalk-client-metadata, it checks the legacy response-key contract and omitsauthMethod,controlSource, andtranscriptOwner. With the capability, it checks the expected metadata and validates the response with the current protocol validator. Both branches preserveclientControland provider-owned authentication facts.1391f7cd2d40ab5bbcf2f5f831d3a64f520e72d7was inspected: it explicitly rejects unknown keys. Four legacy cases failed before the T repair; the repaired T stage passed all 15 focused metadata/target/readiness cases. The published head has the same Gateway/protocol inputs. Both canonical core production and core test-type lanes passed on its identical full treedb220862d4fd8525391e89d2a98a7f1590a0fcde. The combined 196-test receipt remains supporting combined-source evidence, not a separate exact-T full-suite run.The earlier evidence above is wire-upgrade contract proof, not an executed released Swift binary or native-device/live-provider test. The new exact-head database reopen/restart evidence is recorded below. It does not claim a new client can send unsupported target fields to an older Gateway; explicit targeting has the separately advertised
talk-session-target-v1server contract.Known pre-existing limitation: real OpenAI descriptors can still include
offerResponseMaxBytes, which the released generated decoder also rejects. That remains the namedTALK-LEGACY-SDP-BOUNDfollow-up. Removing it here would weaken existing browser SDP-bound behavior. The compatibility claim is that this PR's new metadata regression is fixed—not that every real OpenAI descriptor works with the old decoder.Controlled-close authorization follow-up
Fix 108dc7c checks the already-authorized agent before controlled-owner teardown. Connection/key checks and legacy revalidation remain.
Exact-head retained-state compatibility — September 10, 2026
Source: T 108dc7c; base P 32cbef2; released v2026.9.3 at 1391f7c.
All 847 materialized source files and dependency-manifest bindings were independently checked against the pinned revisions. The durable store/schema implementations are unchanged; the connection-local binding-key change is not a persisted database format.
Limits remain explicit: an initially broader response probe failed on offerResponseMaxBytes. Follow-up characterization reproduced that strict-schema rejection on release, P and T: the existing TALK-LEGACY-SDP-BOUND limitation, not a new all-descriptor compatibility claim. Both legacy response shapes remain accepted. Optional new response metadata still requires the handshake capability described above. These probes did not execute a released Swift binary, physical-device/live-provider session, or fresh GitHub CI.
Worked on by: