Skip to content

Rename paste diagnostics key so the local sanitizer stops blanking it - #1706

Merged
r3dbars merged 1 commit into
mainfrom
claude/admiring-hamilton-49e38a
Aug 25, 2026
Merged

Rename paste diagnostics key so the local sanitizer stops blanking it#1706
r3dbars merged 1 commit into
mainfrom
claude/admiring-hamilton-49e38a

Conversation

@r3dbars

@r3dbars r3dbars commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Why

The dictation paste-confirmation diagnostics key target_text_observable is a pure boolean, but it showed up as [redacted-sensitive-value] in local events.jsonl: LocalObservabilityPayloadSanitizer drops any context key matching PayloadSanitizationCore.baseSensitiveKeyFragments, and the key name contains the fragment text. That blinded a real investigation into dictation_paste_confirmation_diagnostics events.

Product Impact

  • Affects: dictation
  • Lane: dictation reliability
  • Why this matters: paste-confirmation failures can only be debugged from the local event log; a redacted boolean removes the one signal that says whether the target's AX value was even observable.

What changed

  • Renamed the key to target_value_observable (it reports whether kAXValueAttribute was readable, so the new name is also more accurate) in both emit sites in Sources/Support/ClipboardRestoringTextPaster.swift: the real FocusedTextPasteConfirmation.diagnosticsContext(...) and the fallback literal dict on the unconfirmed-paste path.
  • Added a short comment stating the constraint: diagnostics keys must avoid PayloadSanitizationCore sensitive fragments or the local sanitizer blanks their values.
  • Updated the SyntheticPasteTargetAdapter test fake to match, and added a regression suite that drives a real unconfirmed paste, then asserts every emitted diagnostics key passes the local sanitizer's shouldDrop predicate and survives an end-to-end LocalObservabilityPayloadSanitizer.sanitize unredacted.

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
  • Selected checks from .agents/test-matrix.yml for the files changed (python3 scripts/dev/check-build-source-lists.py, bash run-slow-pasteback-smoke.sh — both pass)
  • bash build.sh --no-open
  • bash run-tests.sh (12215 tests, all pass, new regression suite confirmed running)
  • Performance budget passed (bash build.sh --no-open bundle gate)
  • bash run-integration-smoke.sh if I touched Sources/Meeting/ or Sources/TranscriptedCore/ — not touched
  • swift test if I touched Package.swift, Sources/TranscriptedCore/, or the public core seam — not touched
  • Manual check: repo-wide grep confirms no remaining reference to the old key outside the regression comment

Risk Review

  • Privacy / local-first behavior reviewed — the event is local-only (dictation_paste_confirmation_diagnostics appears in no Sentry allowlist and no analytics PSV); the new key clears all three sanitizers' fragment lists, including Sentry's extra context/identifier fragments
  • Storage path or migration impact reviewed — none
  • Public-facing copy stays concrete and matches current product scope — no copy changes
  • Release/update impact reviewed — none
  • Agent PRs link the issue/workpad and stay draft until human review
  • UI changes include sanitized .agent-review/visuals/ evidence — no UI changes
  • No private transcripts, audio, tokens, personal paths, or customer data are included

Notes

Only pastes logged after a restart on the new build carry the renamed key; historical events.jsonl lines 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

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>
@r3dbars
r3dbars marked this pull request as ready for review August 25, 2026 01:58
@r3dbars
r3dbars merged commit f153bc3 into main Aug 25, 2026
7 checks passed
@r3dbars
r3dbars deleted the claude/admiring-hamilton-49e38a branch August 25, 2026 02:02
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