openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

PII check on document namespace/key floods Sentry with 915+ events

Open graycyrus opened this issue 6 months ago • 1 comments

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:

  1. A false-positive PII check that's too aggressive on valid keys (e.g. channel names, usernames used as namespaces)
  2. 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:

  1. Find where "document namespace/key cannot contain personal identifiers" is generated
  2. Determine if the check is too aggressive (false positives) or if it's catching real PII
  3. If false positives: relax the check or add exceptions for valid namespaces (channel IDs, etc.)
  4. 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/

graycyrus avatar May 28 '26 12:05 graycyrus

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.

oxoxDev avatar May 30 '26 15:05 oxoxDev