PII check on document namespace/key floods Sentry with 915+ events
Summary
The PII detection in the memory/document pipeline rejects document namespace/keys containing personal identifiers and fires a Sentry error event on every rejection — 915 events and escalating.
Problem
What happened: The document storage layer validates that namespace/keys don't contain personal identifiers. When they do, it raises an error that gets reported to Sentry. With 915 events in ~5 hours, this is either:
- A false-positive PII check that's too aggressive on valid keys (e.g. channel names, usernames used as namespaces)
- A legitimate check but the error is being reported at the wrong severity (should be warn/info, not error)
Expected: Either the PII check should be relaxed for valid use cases, or the error should be downgraded from Sentry-reported error to a warning log.
Impact: 915 events in Sentry (TAURI-RUST-54T), escalating. Single user on Windows 10. Flooding Sentry quota.
Version / Platform: [email protected], Windows 10.0.26200, rustc 1.93.0
Solution (optional)
Investigate the PII check in the document/memory pipeline:
- Find where "document namespace/key cannot contain personal identifiers" is generated
- Determine if the check is too aggressive (false positives) or if it's catching real PII
- If false positives: relax the check or add exceptions for valid namespaces (channel IDs, etc.)
- If real PII but expected: downgrade from error to warning, suppress from Sentry
Acceptance criteria
- [ ] Repro gone — No more Sentry flooding from document namespace PII checks.
- [ ] Regression safety — Unit test for the adjusted PII check behavior.
- [ ] Diff coverage >= 80%
Related
- Sentry: https://sentry.tinyhumans.ai/organizations/tinyhumans/issues/5862/
Reopening — PR #2850 demoted the Sentry classification but did not address the underlying false-positive that still rejects every openhuman.memory_doc_ingest namespace/key carrying a phone-shaped digit run. Root-cause confirmed: safety::pii::PHONE_NANP_RE (NANP with optional separators) and PHONE_E164_RE (literal +) sit in has_likely_pii's strict set, so scanner-built keys like the WhatsApp group JID <phone>-<unix>@g.us, US-prefixed 1:1 JID [email protected], broadcast <phone>@broadcast, and Telegram numeric peer IDs are rejected even though they're not literal personal identifiers. Sentry TAURI-RUST-54T continues to fire on shipped 0.56.0 (4046 events / single Windows-10 user). Real fix PR coming.