Files
hermes-agent/hermes_cli
teknium1 a2c0af430c fix(state): per-profile store housekeeping under one multiplexed process
Three silent data-correctness bugs on a host where ONE process serves every
profile:

- The gateway constructor ran auto-archive and auto-prune/VACUUM once, on a
  handle pinned to the construction-time launch home, so a served secondary
  profile's state.db was never pruned or vacuumed by anybody. Both now run per
  SERVED profile, inside that profile's runtime scope, against its own
  SessionDB, its own `sessions:` config and its own transcript dir.
- The dashboard/`hermes serve` auto-archive sweep archived an arbitrary
  profile's store but read the config through the PROCESS HERMES_HOME, so one
  profile's sessions.auto_archive_days governed every other profile's
  retention. It now loads the config of the home whose store it sweeps.
- Auto-VACUUM admission read "no FOREIGN holder" as "the store is quiet", but
  the /proc scan skips our own pid by design. VACUUM plus its TRUNCATE
  checkpoint therefore retired a WAL generation another live SessionDB in THIS
  process still held. The path-keyed registry now answers the in-process half.

Also: argv naming only the install root no longer dismisses a multiplexer as
"another instance" when the store is a profile store beneath that root — under
one-process-per-host that argv is exactly what the holder looks like.
2026-09-21 02:56:31 -07:00
..
…
…
…
…