Files
hermes-agent/tests/persistence_sqlite
kshitijk4poor 8f239226bc fix(plugins): plugin writes refuse a deleted or renamed profile home
A session still bound to profile b survives `hermes profile delete b` and
`hermes profile rename b c`. Its next plugin write recreated profiles/b
through a raw mkdir, and nothing raised.

Seven plugin state writers now create their directories through
mkdir_under_hermes_home, which refuses a missing or tombstoned named home
with its existing FileNotFoundError: plugin_data_dir (and the
hermes-achievements fallback that duplicates it), the CLI plugins dir,
the update-check markers, disk-cleanup state, the Discord recovery ledger,
the Weixin account dir and the A2A audit log.

Callers that already catch keep skipping the write (Discord recovery,
the update-check writers, the disk-cleanup session-end hook and audit log,
the A2A audit). The disk-cleanup slash commands reply that the profile no
longer exists instead of raising. plugin_data_dir documents the refusal.
2026-11-22 02:17:23 +05:30
..