Files
thedotmack__claude-mem/tests
Alex Newman dd68d21353 feat(observations): add "sensitive" type with Telegram notification (#3468)
Adds a ninth observation type to the code mode: `sensitive` — information
that isn't quite private, but that you wouldn't want leaking into further
content development in the wrong context (internal URLs, unreleased plans,
personal details, business metrics, client or partner names). These fire a
Telegram notification by default, alongside security_alert.

The notifier already matched obs.type against CLAUDE_MEM_TELEGRAM_TRIGGER_TYPES,
so wiring notifications needed only the new type in the default trigger set
plus its own emoji.

- plugin/modes/code.json: new `sensitive` type. Also fixes pre-existing
  staleness in type_guidance, which still said "6 options" and never listed
  the security types from #2084 — that comment is the only type prose the
  observer agent sees, so a type missing from it is invisible to the model.
- SettingsDefaultsManager: default trigger types now security_alert,sensitive,
  plus a migration for the legacy persisted value. A fresh settings.json is
  seeded with every default and persisted values win on load, so installs
  created after #2084 had "security_alert" frozen on disk and could never
  receive the new default — the feature would have been dead on arrival for
  them. Only the exact legacy value is rewritten; customized lists are left
  alone. (Greptile P1.)
- TelegramNotifier: sensitive observations post with their own emoji
- bmp-safe: astral fallback for the new emoji (issue #2787 failure class)
- CorpusRoutes: allow the new type in knowledge-corpus filters
- openclaw feed + weekly-digests legend: recognize the new type

Parser validation, the observer prompt type enum, context legends, and the
viewer all derive from the mode file, so they pick this up with no change.

Regression coverage for the migration: legacy-default migration, write-back
with unrelated keys preserved, customized list preserved, superset list
preserved, empty opt-out preserved, idempotency across repeated loads.
2026-08-02 10:11:25 -07:00
..
2026-07-22 23:49:48 -07:00