Files
hermes-agent/tests/plugins/platforms
kshitijk4poor 4fc866bae7 fix(profiles): platform adapters never recreate a deleted profile home
Eight writers in gateway platform plugins still created their directory with a
raw mkdir(parents=True) under the active profile home. An adapter bound to a
named profile that was deleted or renamed meanwhile brought profiles/<name>/
back on its next write (tracker #155595 U3, part 2 of #9).

They now go through mkdir_under_hermes_home; each keeps its existing handling:
- Google Chat thread-count store: skipped, counts stay in memory;
- Feishu comment pairing: raises, so an approval is never reported saved;
- Matrix crypto store (connect and E2EE setup) and recovery-key target and
  write: refused through the existing reason / warning / abort paths;
  line-neutral (the adapter is over the 2000-line cap);
- the auth.json lock helper (_file_lock): raises before a lock file is created;
  Photon's stores take it before writing, so the lock recreated a renamed home
  first. Line-neutral (auth.py is over the cap);
- Photon auth.json: raises to the auth caller;
- Photon sidecar mirror: falls back to the source dir like a read-only one;
- WhatsApp secondary bridge-port record: raises into connect's existing
  OSError handling;
- WhatsApp Cloud inbound media cache: the media is dropped like a failed
  write.

Each gets a delete+rename regression that fails on main and on a raw-mkdir
mutant.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-24 03:03:06 +05:30
..
…