Skip to content

fix(dream): keep person voice data out of every model-facing view - #24309

Merged
Git-on-my-level merged 9 commits into
mainfrom
lane/dream-voice-narrow
Nov 1, 2026
Merged

Git-on-my-level merged 9 commits into
mainfrom
lane/dream-voice-narrow

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Why

Dream's main loop could put a person's voice data in front of a model. A review of the state pass (#24293) found these paths. The state pass doesn't use them; the live main loop does.

A person record read in full includes speaker_embedding, the speech sample fields (paths and transcripts) and the nested person_voice_base and person_voice_confirmations. All of it stayed on the reserved Gemini model and in the owner's scope, but the model has no need for it.

How often this happened in prod is not measured.

What

model_view in agent_capabilities/evidence.py gives a model only an allowlist of person fields, plus has_voice_profile: true when real voice data exists. A voice field added to person rows later stays out by default. It now covers every path below:

  • Read tool: Session.read returns the model view. The read budget charges what the model sees.
  • Seed prompt: a dirty person record placed in the seed reaches the prompt as the model view.
  • Previous notes: see Behaviour change.
  • Question quotes: a question citing a person must quote text from the model view, so it can't carry hidden voice text to a verifier.
  • Verifier evidence: dream_verify.minimal_context uses the same function, replacing the copy from fix(dream): keep voice fields out of verifier evidence and run the state pass in shadow #24293.

The session keeps the full row in Session.records. Staging and the protection checks (require_unprotected_person) read that, so a person with voice data stays protected. Session is shared, so this applies to every authority it serves, not only Dream.

Depends on #24293, whose commits appear in this diff until it merges. The lead has it queued.

Behaviour change

  • No user-visible change expected.
  • A model can no longer read a person's sample transcripts. Nothing in Dream's instructions relies on them, but a pass that used those words as context loses them.
  • Old notes dropped once: notes a model wrote before this deploy could contain words copied from a sample transcript, and a model could carry them forward. New runs mark their notes (notes_voice_free), and dream_seed.load ignores unmarked notes, so each owner's next pass after deploy starts without its previous notes, once.
  • Person rows are smaller, so reads cost slightly less of the byte budget.
  • Spend: none added, reserved capacity only.

Rollout

The voice narrowing has no flag, because it only narrows what a model sees; rollback is reverting the PR. Until #24293 merges, this PR's diff also contains that PR's DREAM_STATE_PASS_MODE=shadow rollout, which has its own ramp plan and rollback. Merge #24293 first.

Metric that must stay clean: applied edits per complete pass and the second-check agreement rate, with no rise in dream_lever_error or failed passes. The Dream owner reads back after the train.

David has not ruled on this. The rollout lead ruled to proceed without waiting because it only narrows data (bus, 21:17Z); David was told.

Product invariants affected

Review

Luna R1 returned BLOCK on old notes carrying voice text. Luna R2 showed my first answer, that the path drains by itself, was wrong, because a model can copy notes forward. Fixed in code as above. Luna R3 cleared the code and returned BLOCK only on this PR body's rollout wording, corrected above.

Tests

New tests/unit/test_dream_voice_narrow.py, 8 tests, plus one in test_dream_verify_hold.py. Reverting each of the read output, seed prompt, read charge, quote, notes marker and notes filter changes fails its matching test. All test_dream*.py, test_agent_tool_rules.py and test_review_stale_answers.py pass under test.sh via omi-heavy.

Failure-Class: none

Line-Count-Exception: backend/utils/dream_agent.py | 1606 -> 1607 | one field marking notes beside the notes it describes; splitting the pass loop is out of scope for this fix

🤖 Generated with Claude Code

Git-on-my-level and others added 7 commits November 2, 2026 03:02
Sets DREAM_STATE_PASS_MODE=shadow on backend-sync and backend-sync-backfill.
Shadow stages, verifies and renders only, on reserved capacity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A person cited only as evidence sent speaker_embedding and speech sample
fields to the verifiers. Strip them in minimal_context, after staging has
judged protection, and pass has_voice_profile instead.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A prefix filter missed the nested person_voice_base and
person_voice_confirmations, which hold embeddings, sample paths and
transcripts. An allowlist also keeps later voice fields out by default.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The read tool, seed records and question quotes could all carry a person's
embeddings and sample transcripts to a model. Give models an allowlisted
view; the session keeps the full row for protection checks.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-01T21:42:11.938673Z
We couldn’t complete this review. Comment @codex review to try again.
447024a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 10 files

Confidence score: 3/5

  • The prod overlay enables the state pass for backend-sync-backfill, though the rollout admits only backend-sync; planner/verifier work could run on a service outside the rollout. Remove the backfill binding.
  • In evidence.py, model_view misses auto-enroll-backed voice profiles, so those people are scrubbed without the promised has_voice_profile signal. Include speaker_auto_enroll_pool and equivalent stored voice-profile markers.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="backend/utils/agent_capabilities/evidence.py">

<violation number="1" location="backend/utils/agent_capabilities/evidence.py:39">
P2: `model_view` misses auto-enroll-backed voice profiles, so those people are scrubbed without the promised `has_voice_profile` signal. Include `speaker_auto_enroll_pool` (and any equivalent stored voice-profile marker) when deriving the indicator.</violation>
</file>

<file name="backend/deploy/runtime_env/prod.overlay.yaml">

<violation number="1" location="backend/deploy/runtime_env/prod.overlay.yaml:1006">
P2: This also enables the state pass on `backend-sync-backfill`, although the rollout plan admits only `backend-sync`. Remove the backfill binding so the weekly planner/verifier work cannot run on an unadmitted service.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

'created_at',
'updated_at',
)
VOICE_MARKERS = ('speaker_embedding', 'speech_samples', 'person_voice_base', 'person_voice_confirmations')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: model_view misses auto-enroll-backed voice profiles, so those people are scrubbed without the promised has_voice_profile signal. Include speaker_auto_enroll_pool (and any equivalent stored voice-profile marker) when deriving the indicator.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/agent_capabilities/evidence.py, line 39:

<comment>`model_view` misses auto-enroll-backed voice profiles, so those people are scrubbed without the promised `has_voice_profile` signal. Include `speaker_auto_enroll_pool` (and any equivalent stored voice-profile marker) when deriving the indicator.</comment>

<file context>
@@ -7,3 +7,43 @@ class EvidenceRecords(dict):
+    'created_at',
+    'updated_at',
+)
+VOICE_MARKERS = ('speaker_embedding', 'speech_samples', 'person_voice_base', 'person_voice_confirmations')
+
+
</file context>
Suggested change
VOICE_MARKERS = ('speaker_embedding', 'speech_samples', 'person_voice_base', 'person_voice_confirmations')
VOICE_MARKERS = (
'speaker_embedding',
'speech_samples',
'person_voice_base',
'person_voice_confirmations',
'speaker_auto_enroll_pool',
)

DREAM_AGENT_PASSES_PER_DAY:
value: '48'
category: rollout
DREAM_STATE_PASS_MODE:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This also enables the state pass on backend-sync-backfill, although the rollout plan admits only backend-sync. Remove the backfill binding so the weekly planner/verifier work cannot run on an unadmitted service.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/deploy/runtime_env/prod.overlay.yaml, line 1006:

<comment>This also enables the state pass on `backend-sync-backfill`, although the rollout plan admits only `backend-sync`. Remove the backfill binding so the weekly planner/verifier work cannot run on an unadmitted service.</comment>

<file context>
@@ -1003,6 +1003,9 @@ overlay:
           DREAM_AGENT_PASSES_PER_DAY:
             value: '48'
             category: rollout
+          DREAM_STATE_PASS_MODE:
+            value: shadow
+            category: rollout
</file context>

A model could have copied sample transcript words into its notes and keep
carrying them forward. Mark new notes and ignore unmarked ones.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 7dfcd0c into main Nov 1, 2026
72 of 73 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/dream-voice-narrow branch November 1, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant