Rename paste diagnostics key so the local sanitizer stops blanking it - #1706
Merged
Conversation
target_text_observable contained the sensitive-key fragment "text", so LocalObservabilityPayloadSanitizer redacted the pure boolean to "[redacted-sensitive-value]" in events.jsonl and blinded a real dictation_paste_confirmation_diagnostics investigation. Rename it to target_value_observable (it reports whether kAXValueAttribute was readable) in both emit sites and the test fake, and add a regression suite that drives an unconfirmed paste and asserts every emitted diagnostics key survives the local sanitizer unredacted. The event is local-only — it appears in no Sentry or analytics allowlist — and the new key clears all three sanitizers' fragment lists, Sentry's extra "context"/"identifier" fragments included. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The dictation paste-confirmation diagnostics key
target_text_observableis a pure boolean, but it showed up as[redacted-sensitive-value]in localevents.jsonl:LocalObservabilityPayloadSanitizerdrops any context key matchingPayloadSanitizationCore.baseSensitiveKeyFragments, and the key name contains the fragmenttext. That blinded a real investigation intodictation_paste_confirmation_diagnosticsevents.Product Impact
dictationdictation reliabilityWhat changed
target_value_observable(it reports whetherkAXValueAttributewas readable, so the new name is also more accurate) in both emit sites inSources/Support/ClipboardRestoringTextPaster.swift: the realFocusedTextPasteConfirmation.diagnosticsContext(...)and the fallback literal dict on the unconfirmed-paste path.PayloadSanitizationCoresensitive fragments or the local sanitizer blanks their values.SyntheticPasteTargetAdaptertest fake to match, and added a regression suite that drives a real unconfirmed paste, then asserts every emitted diagnostics key passes the local sanitizer'sshouldDroppredicate and survives an end-to-endLocalObservabilityPayloadSanitizer.sanitizeunredacted.Rename over a safe-key exemption: the local sanitizer has no exemption mechanism today, and adding one for a single boolean is more machinery than the rename.
How I checked it
scripts/dev/agent-preflight.sh.agents/test-matrix.ymlfor the files changed (python3 scripts/dev/check-build-source-lists.py,bash run-slow-pasteback-smoke.sh— both pass)bash build.sh --no-openbash run-tests.sh(12215 tests, all pass, new regression suite confirmed running)bash build.sh --no-openbundle gate)bash run-integration-smoke.shif I touchedSources/Meeting/orSources/TranscriptedCore/— not touchedswift testif I touchedPackage.swift,Sources/TranscriptedCore/, or the public core seam — not touchedRisk Review
dictation_paste_confirmation_diagnosticsappears in no Sentry allowlist and no analytics PSV); the new key clears all three sanitizers' fragment lists, including Sentry's extracontext/identifierfragments.agent-review/visuals/evidence — no UI changesNotes
Only pastes logged after a restart on the new build carry the renamed key; historical
events.jsonllines keep the redacted marker, so split any log analysis at the deploy date.Agent handoff
COORD_DONE: GREEN | PR URL below | renamed target_text_observable → target_value_observable + regression suite | none | none | build.sh, run-tests.sh, check-build-source-lists.py, run-slow-pasteback-smoke.sh | human review + merge🤖 Generated with Claude Code