Repository navigation
fix(voice-call): require recorded owners for restored calls - #163118
Conversation
|
🦞👀 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 October 2, 2026, 11:17 PM ET / October 3, 2026, 03:17 UTC (Revision 13). ClawSweeper reviewWhat this changesVoice Call requires each active call’s recorded agent owner for restoration and responses, while retaining unowned saved history. Merge readiness⛔ Blocked before merge - 2 items remain This remains useful: current main still permits configured-agent fallback for unowned calls. No introduced correctness defect was found; final-source startup and installed-upgrade evidence remains pending. Priority: P2 Review scores
Verification
How this fits togetherThe Voice Call plugin receives carrier callbacks and saved call records, then routes conversations to an OpenClaw agent. Recorded ownership determines the workspace, sessions, and tools used for responses. flowchart TD
A[Saved call records] --> B[Call restoration]
B --> C{Recorded owner present?}
C -->|No| D[Retain history without resuming]
C -->|Yes| E[Verify carrier status]
E --> F[Active call]
G[Carrier callbacks] --> F
F --> H[Recorded agent responses]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +120, Docs +6. Total +130 across 12 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep recorded ownership authoritative across restoration and responses, with saved history preserved and the accepted legacy-call refusal verified during upgrade. Do we have a high-confidence way to reproduce the issue? Yes, from source: restoring an unowned active record after changing the configured agent selects that new agent on current main. This review did not execute a runtime reproduction. Is this the best way to solve the issue? Yes. One strict resolver replaces configuration fallback across restoration, realtime registration, and classic responses without inventing ownership or rewriting retained records. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1b08795ae494. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat 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
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
e7feaa3 to
bf6991c
Compare
1c70de8 to
a35f588
Compare
a35f588 to
0324730
Compare
…#163118) * refactor(voice-call): retire old call state readers * test(voice-call): exercise missing owner in realtime callback * test(voice-call): reuse outbound direction fixture default * fix(voice-call): require recorded response owners * test(voice-call): record fast-context fixture owner
What Problem This Solves
Restored Voice Call records without an agent owner could inherit the current configured agent. After an operator changed configuration, an old call could use a different agent's workspace, session store, and tools.
Require the
agentIdrecorded when the call was created. Active-call restoration skips unowned records before provider verification; realtime registration, instructions, and classic response generation use the same strict owner resolver. Response generation requires an explicit owner. Current call producers already persist normalized ownership.User-visible behavior: old active calls without a recorded owner no longer resume automatically, even when their session key names an agent. Hang up any remaining call with the provider and start a new call. Saved rows and transcripts stay unchanged, completed history remains readable, and delayed callbacks do not readmit skipped calls. Changing configuration affects new calls.
Scope and overlap
Main's #162669 superseded this PR's original JSONL retirement. The conflict reconciliation preserves that retirement owner, SQLite schema migration, manifests, shared Doctor contracts, store declarations, and their tests unchanged. This PR now contains only the recorded-owner cutover and its regressions. The earlier
retiredStateFilesproposal is removed.Production changes from the complete paginated GitHub file comparison: +23 / -19 / net +4, six production files. Tests and test support are excluded. The JSONL deletion is already on main and is not counted again here.
Evidence
Candidate:
97a8faf3eee3532aca0a291d6fc33ee7e8c964c4, source tree10c919135488a4f98f76fc9b3934bfb0923899b1, based on conflict-reconciled main7f0410c2e66e912a524e72ca883deef2dca09d0f.Canonical SQLite call rows remain readable and are not rewritten by this change. Main owns the retired JSONL refusal and the instruction to run OpenClaw 2026.9.7 Doctor as an intermediate upgrade. This PR adds no importer or schema transform.
Independent Codex review through P2 is clean for the complete candidate. Formatting and
git diff --checkpass. Exact-head hosted CI 37091368873 passed, including the CI and security gates. No local build or tests were run on the loaded coordinator host.Final-source proof ran on Hetzner lease
cbx_0ddfa2afe062, runrun_a0307b7b301f8fe66b94000c6306a2cc, exact head and tree above. Frozen install took 8.90 s. The blank-owner negative control against pre-fixfd93734cebefae356501437f69ab53c23c83aed8failed for the expected resolved-instead-of-rejected assertion, with no unhandled or suite errors (44.28 s wall). The candidate response-generator suite passed all 35 cases (28.64 s wall); the restore/runtime/webhook sibling command passed all 67 cases (44.94 s wall), including the three corrected fast-memory cases.The supported installed-driver update cell passed: unmodified published
[email protected]and Voice Call 2026.9.7 imported the synthetic historical log through their Doctor, thenopenclaw updateinstalled this candidate in 460 s. Artifact identities, all 17 canonical call rows, historical timestamps, ownership, transcript bytes, preserved source backup, and Gateway health passed. Repeated candidate Doctor passed in 36 s and left those rows unchanged. The task-private fixture changed only package version/cohort metadata to2026.9.99-first-hop.0because source and published packages both declare 2026.9.7; executable members were verified unchanged. This is published-driver-to-candidate proof, not a publication or same-version replacement claim. No live telephony claim is made.A separate retired-log refusal cell exposed an inherited update gap and failed; the overall 2,035.042 s command is not reported as passing. Candidate admission and copied-state Doctor accepted, but live post-plugin Doctor rejected
calls.jsonlafter service replacement. Original JSONL bytes remained intact, yet the strict original Gateway/supervisor identity assertion correctly failed. The assertion remains unchanged. Published 2026.9.7 snapshots registered SQLite families, execution approvals, and plugin code but omits this JSONL source; the candidate admission owner has no plugin-owned retired-file preflight. The retirement contract and update owners are byte-identical to main7f0410c2e66e912a524e72ca883deef2dca09d0f(#162669), and this PR changes neither. The owning follow-up is candidate update admission plus plugin Doctor artifact/resource inspection on original live paths before snapshots/service replacement; it must reuse plugin-owned detection and preserve external artifact selection. The missing synthetic@openclaw/[email protected]warning was advisory; the recorded refusal explicitly names Voice Call's retired log. Canonical update and this PR's own owner regressions passed independently. No retired-log pre-stop success is claimed.Two earlier deterministic test defects were corrected: a missing-owner assertion was placed in a fixture without access to the realtime callback, and a redundant assignment grew an already capped webhook test. The regression now exercises the registered callback, and the shared fixture supplies its existing outbound default. Neither was a flake; no baseline increase or assertion weakening was used.
Preceding-head hosted run
37086435608tested merge83fd547a52c94a823fd966e358cbc61edd96c6c0(0324730b85dc6044acfac1ff7d090e27fc0828d0into main06ac4a4672ea5a9ac2bcef9c01e3e1121011ed24). The Voice shard passed 288 cases and failed three fast-memory cases in 22.53 s. Their shared fixture omitted the now-required recorded owner and failed at the owner guard before provider/cancellation assertions. A singleagentId: "main"fixture field repairs all three without changing production or assertions. This is a PR-caused deterministic fixture mismatch, not an inherited failure or flake. The blank-owner response regression passed in that run (2 ms test time). The final candidate runtime suite passed before packaging.