Skip to content

fix(voice): Workspace read-aloud sends unscrubbed text to TTS, and the direct-call scrub is not pinned by the parity guard #4359

Closed

Description

@AndriiPasternak31

Problem

#4228 (PR #4356) made both channel voice sends remove staged credential values (the ent#279 scrub seam, services/runtime_secret_scrub) before synthesis, and pinned them in the parity guard. Two other synthesis sites are left:

  1. Workspace read-aloud does not scrub. client_portal/service.py::synthesize_portal_tts passes the text the client sends straight to tts_service.synthesize_mp3(body, voice_id) (~L1678). The reply was scrubbed when it was saved, so the person already sees the text they ask to hear. The gap is the request to the TTS provider: a value staged after the reply was saved, or text that never went through a scrubbed save, reaches the third-party provider unscrubbed.
  2. The direct voice call's scrub is not pinned. direct_voice_service._speak_sentence scrubs before synthesize_stream (~L373-375), but tests/unit/test_ent279_scrub_parity.py::_REQUIRED_SCRUBBERS does not list it. Removing that scrub turns nothing red.

Two docs are also stale:

  • docs/memory/feature-flows/runtime-secret-scrub.md (~L141-144) lists the scrub sites without the voice sends or the direct call.
  • The "behaviour-neutral for OSS" docstring in services/runtime_secret_scrub.py no longer holds: the Workspace chat credential field (ent#1066) stages values on OSS too.

Acceptance criteria

  • synthesize_portal_tts scrubs the text before synthesis, the same way send_message and the voice sends do (fail-open on a store outage). The shared cost cap judges the scrubbed text.
  • A test stages a value with no credential-pattern shape and asserts that what synthesize_mp3 receives holds the marker, not the value.
  • _REQUIRED_SCRUBBERS lists synthesize_portal_tts and direct_voice_service._speak_sentence, and removing either scrub turns the guard red.
  • runtime-secret-scrub.md lists every scrub site, and the stale docstring is corrected.

Context

Activity

  1. added
    priority-p2
    type-bug
    theme-security
    complexity-low
    status-in-progress
    on Nov 7, 2026
  2. vybe commented on Nov 11, 2026

    @vybe
    Contributor

    Product ruling, merge-train Gate 1, 2026-11-11.

    Question (the audio half of the merge-train finding on #4356): should Workspace read-aloud skip the staged-secret scrub for client-supplied text, or keep scrubbing it?

    Answer: keep scrubbing, as #4361 ships it. Provider safety wins over the membership bit: a correct guess is spoken as "redacted", which the same Workspace principal can already observe on the saved voice turn. The status-code half is closed by the raw-text cap. The residual is documented in the runtime-secret-scrub feature flow.

  3. added
    status-in-dev
    and removed
    status-in-progress
    on Nov 11, 2026
  4. removed
    status-in-dev
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

complexity-lowpriority-p2theme-securitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions