Skip to content

fix(voicecall): redact read-scoped status payloads#97870

Merged
eleqtrizit merged 2 commits into
openclaw:mainfrom
eleqtrizit:784
Jun 29, 2026
Merged

fix(voicecall): redact read-scoped status payloads#97870
eleqtrizit merged 2 commits into
openclaw:mainfrom
eleqtrizit:784

Conversation

@eleqtrizit

@eleqtrizit eleqtrizit commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Redacts read-scoped voice-call status payloads so status callers receive a purpose-built call summary instead of raw live call records.

Changes

  • Adds a local voice-call status DTO projection for voicecall.status responses.
  • Applies the projection to single-call status, active-call list status, and the voice-call tool status path.
  • Omits phone numbers, session routing keys, transcripts, processed event ids, and raw metadata from status payloads while preserving status identifiers and lifecycle fields.
  • Adds regression coverage for single-call, list, and tool status redaction.

Validation

  • corepack pnpm format:fix extensions/voice-call/index.ts extensions/voice-call/index.test.ts
  • corepack pnpm test extensions/voice-call/index.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode local

@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call size: S maintainer Maintainer-authored PR labels Jun 29, 2026
@eleqtrizit

eleqtrizit commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Real behavioral proof on the current PR head (ab0094cf090d95a6760e496fd694180ec0bc95c8):

Runtime setup

  • Started the real OpenClaw Gateway from this head with an isolated state directory and the bundled voice-call plugin configured with its network-free mock provider.
  • Created an actual active call through the running Gateway's write-scoped voicecall.initiate RPC, supplying dummy phone endpoints, a session routing value, an initial message, and requester metadata.
  • Confirmed through openclaw voicecall tail --since 1 that the persisted internal call record contains from, to, sessionKey, transcript, processedEventIds, and metadata. This proves the test call exercised a real sensitive CallRecord; the source data was not pre-redacted or replaced by a fixture.

Read-scope boundary proof

A separate WebSocket client connected to that running Gateway with exactly scopes: ["operator.read"]:

{
  "requestedScopes": ["operator.read"],
  "list": {
    "found": true,
    "calls": [{
      "callId": "fff63af6-a36e-4f86-9120-65df52a84955",
      "providerCallId": "mock-fff63af6-a36e-4f86-9120-65df52a84955",
      "provider": "mock",
      "direction": "outbound",
      "state": "initiated",
      "startedAt": 1782753710598
    }]
  },
  "single": {
    "found": true,
    "call": {
      "callId": "fff63af6-a36e-4f86-9120-65df52a84955",
      "providerCallId": "mock-fff63af6-a36e-4f86-9120-65df52a84955",
      "provider": "mock",
      "direction": "outbound",
      "state": "initiated",
      "startedAt": 1782753710598
    }
  },
  "writeControl": "missing scope: operator.write"
}

That same read-only client was denied voicecall.end, proving the session was genuinely read-scoped rather than an admin/shared-secret session whose broader permissions masked the boundary.

Observed behavior:

  • The list envelope remains { found: true, calls: [...] }.
  • The single-call envelope remains { found: true, call: ... }.
  • Operational identifiers and lifecycle fields remain available.
  • Phone endpoints, session routing data, transcript/event arrays, and raw metadata remain in the canonical internal record but do not cross the read-scoped status boundary.

This also separates the compatibility concern from the completed-call/history use case: detailed records still exist in voice-call storage, so a future privileged or history-specific detail surface can expose them intentionally without widening operator.read status again.

Validation

No carrier or external telephony service was used; the proof exercised the real Gateway, plugin loader, plugin runtime, RPC authorization, call manager, and persistent call store with the bundled mock provider.

@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 1:28 PM ET / 17:28 UTC.

Summary
The PR adds a local voice-call status projection and uses it for gateway and tool status responses so read-scoped callers no longer receive raw CallRecord fields.

PR surface: Source +33, Tests +80. Total +113 across 2 files.

Reproducibility: yes. at source level: current main and v2026.6.10 return raw CallRecord objects from read-scoped voice-call status paths. I did not place a live call in this read-only review, but the PR discussion includes exact-head live Gateway proof.

Review metrics: 1 noteworthy metric.

  • Status response paths: 4 projected/redacted. Gateway single-call status, gateway active-call list status, action get_status, and legacy mode: status now share one narrowed payload contract that maintainers should notice before merge.

Stored data model
Persistent data-model change detected: vector/embedding metadata: extensions/voice-call/index.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Maintainers should explicitly accept the redacted operator.read status contract or request a separate privileged raw-detail/history surface before merge.

Risk before merge

Maintainer options:

  1. Accept The Redacted Status Contract
    Merge as-is only if maintainers decide operator.read voice-call status should return a limited call summary instead of raw CallRecord objects.
  2. Add A Privileged Raw-Detail Surface
    If operators or persisted-history work still need phone numbers, transcripts, routing keys, or metadata, add a separate admin/write-scoped or history-specific detail surface before removing those fields from read-scoped status.
  3. Pause For API Migration Direction
    Hold the PR if maintainers want caller audit, documentation, or a migration/deprecation path before narrowing the shipped status payload.

Next step before merge

  • [P2] The remaining blocker is maintainer acceptance of a shipped response-shape narrowing under the protected maintainer label, not a narrow automated code repair.

Security
Cleared: The diff reduces sensitive voice-call status exposure and does not add dependencies, scripts, permissions, secret handling, lockfile changes, or new supply-chain surface.

Review details

Best possible solution:

Land the DTO projection only after maintainers explicitly accept the narrowed read-scoped status contract; if raw records remain needed, expose them through a separate privileged/admin or history-specific surface.

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

Yes, at source level: current main and v2026.6.10 return raw CallRecord objects from read-scoped voice-call status paths. I did not place a live call in this read-only review, but the PR discussion includes exact-head live Gateway proof.

Is this the best way to solve the issue?

Yes technically: projecting a local DTO at the status egress points is the narrowest maintainable fix for the read-scope exposure. The unresolved part is maintainer acceptance of the shipped compatibility break and whether raw details need a separate privileged/history surface.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6de357ad4772.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR discussion includes exact-head live Gateway proof with a mock provider, an operator.read client receiving redacted status payloads, a denied write call, and a successful exact-head Real behavior proof job.

Label justifications:

  • P2: This is focused voice-call privacy hardening with limited file scope, but it changes a shipped status API shape.
  • merge-risk: 🚨 compatibility: The PR removes raw CallRecord fields from shipped status responses, which can break callers relying on the previous payload shape.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR discussion includes exact-head live Gateway proof with a mock provider, an operator.read client receiving redacted status payloads, a denied write call, and a successful exact-head Real behavior proof job.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR discussion includes exact-head live Gateway proof with a mock provider, an operator.read client receiving redacted status payloads, a denied write call, and a successful exact-head Real behavior proof job.
Evidence reviewed

PR surface:

Source +33, Tests +80. Total +113 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 37 4 +33
Tests 1 82 2 +80
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 119 6 +113

What I checked:

  • Repository policy applied: Root and scoped extension policies were read; the review applied the plugin-boundary and compatibility guidance for shipped response-shape changes. (AGENTS.md:1, 6de357ad4772)
  • Current main returns raw call records: On current main, voicecall.status returns rt.manager.getActiveCalls() for list responses and returns the raw call object for single-call responses. (extensions/voice-call/index.ts:618, 6de357ad4772)
  • Current tool status returns raw call records: On current main, the voice_call get_status and legacy mode: "status" tool paths return the raw call object. (extensions/voice-call/index.ts:761, 6de357ad4772)
  • Raw record contains sensitive fields: CallRecordSchema includes from, to, sessionKey, transcript, processedEventIds, and metadata, matching the fields this PR removes from read-scoped status payloads. (extensions/voice-call/src/types.ts:152, 6de357ad4772)
  • Latest release has the same raw status behavior: The latest release tag still returns raw active-call and single-call/tool status objects, so this PR changes shipped behavior rather than only unreleased main behavior. (extensions/voice-call/index.ts:618, aa69b12d0086)
  • PR head projects the status DTO at all status egress points: The PR adds toVoiceCallStatus and applies it to gateway list status, gateway single-call status, get_status, and legacy mode: "status". (extensions/voice-call/index.ts:236, ab0094cf090d)

Likely related people:

  • steipete: GitHub path history shows the original voice-call parity restoration and repeated voice-call plugin, status, CLI, state, and test maintenance. (role: feature-history owner; confidence: high; commits: 42c17adb5e4d, 4d4748e8071a, 39a931f1bfe0; files: extensions/voice-call/index.ts, extensions/voice-call/index.test.ts, extensions/voice-call/src/types.ts)
  • scoootscooob: Recent history shows scoped voice-call gateway method work and realtime voice-call changes near the same plugin status/control boundary. (role: adjacent voice-call contributor; confidence: medium; commits: 0c1df3531599, 79dd65e20889, b2f21853489d; files: extensions/voice-call/index.ts, extensions/voice-call/index.test.ts)
  • mushuiyu886: Recent merged voice-call work changed canonical session-key behavior adjacent to the session routing fields being removed from read-scoped status payloads. (role: recent area contributor; confidence: medium; commits: 65fec9d787e3; files: extensions/voice-call/src/manager.ts, extensions/voice-call/src/webhook.ts, extensions/voice-call/src/config.ts)
  • Alix-007: Local blame points the current status and schema lines to the grafted checkout commit, but this is weaker than GitHub path history because the checkout history is collapsed. (role: current-checkout blame signal; confidence: low; commits: 5f86c3a90f69; files: extensions/voice-call/index.ts, extensions/voice-call/src/types.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.

@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 29, 2026
@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 Jun 29, 2026
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 29, 2026
@eleqtrizit
eleqtrizit merged commit 825aafa into openclaw:main Jun 29, 2026
120 of 126 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 30, 2026
* fix(voicecall): redact read-scoped status payloads

* fix(voicecall): make status assertion lint-safe
@eleqtrizit
eleqtrizit deleted the 784 branch June 30, 2026 19:27
QiuYuang pushed a commit to QiuYuang/openclaw that referenced this pull request Jul 1, 2026
* fix(voicecall): redact read-scoped status payloads

* fix(voicecall): make status assertion lint-safe
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 1, 2026
* fix(voicecall): redact read-scoped status payloads

* fix(voicecall): make status assertion lint-safe
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
* fix(voicecall): redact read-scoped status payloads

* fix(voicecall): make status assertion lint-safe
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 6, 2026
* fix(voicecall): redact read-scoped status payloads

* fix(voicecall): make status assertion lint-safe

(cherry picked from commit 825aafa)
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 8, 2026
* fix(voicecall): redact read-scoped status payloads

* fix(voicecall): make status assertion lint-safe

(cherry picked from commit 825aafa)
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Jul 15, 2026
* fix(voicecall): redact read-scoped status payloads

* fix(voicecall): make status assertion lint-safe

(cherry picked from commit 825aafa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

1 participant