github chandra447/pi-hermes-memory v0.8.0
v0.8.0 — Security hardening, race fixes, and runaway process protection

latest releases: v0.11.0, v0.10.0, v0.9.11...
4 months ago

Six issues closed, seven pull requests merged — auth-adapter isolation, argv privacy, corrupt-DB recovery, memory-mutation races, orphaned search rows, unbounded session-search output, and runaway child process trees. Plus two gaps found and fixed during post-merge verification.

Big thanks to @robinbraemer for #100, #101, #102, #103, and #106, and to @paxcalpt and @overpod for the underlying fixes in #97/#99 that were folded into the merged stack. Also thanks to @Akshay-patel7, @flumignano, @niksite, and @gsumo for the detailed bug reports that made these fixes possible.

Fixed

  • --no-extensions silently stripped provider auth adapters from child subprocesses (#94): child pi -p invocations pass --no-extensions, which also dropped OAuth billing adapters (e.g. pi-claude-oauth-adapter) — causing Claude Pro/Max subscription requests from consolidation/flush/correction/review subprocesses to silently rebill as paid "extra usage". Sibling packages matching the *-oauth-adapter/*-auth-adapter naming convention are now auto-detected via their package.json pi.extensions manifest and re-added automatically — no hardcoded adapter list, so future adapters need zero code changes. A new childExtensionPaths config option lets users explicitly re-add any other extension.
  • Sensitive prompt payload leaked via argv (#95): child pi -p subprocess invocations now write the review/flush/consolidation prompt to a private temp file (0600) and pass it via @<path> instead of embedding it on the command line — prevents capture by AV/EDR command-line logging (e.g. Windows Defender Protection History) or ps-style process listings.
  • Corrupt-DB recovery fork-storm (#96): DatabaseManager corruption recovery is now gated behind a cross-process advisory lock with a circuit breaker after repeated failures and bounded backup retention. A lock held by an alive-but-wedged process is now reclaimable once its lease goes stale, with lease-fencing on the destructive rebuild rename to prevent races.
  • Duplicate consolidation subprocesses and unserialized memory mutations (#97, #99): concurrent writers to the same Markdown target are now serialized through a token-owned lock, with a content-fingerprint check before every publish to safely retry around external/concurrent edits instead of overwriting them.
  • Orphaned SQLite search rows never self-heal (#98): the SQLite memory_search mirror now reconciles against Markdown on every mutation, pruning rows for removed/deduplicated/rewritten entries — including whole scopes whose Markdown file was deleted entirely.
  • Unbounded session_search output could blow the model's context window (#100): legacy session_search snippets are now bounded to 1,200 characters by default (configurable 100–4,000 via snippetChars), with a hard 50 KiB aggregate ceiling on every response path, including zero-result responses.
  • Runaway child pi process trees could hang indefinitely (#105, #106): every non-interactive child pi invocation now runs behind a process-tree watchdog that enforces the timeout independently and escalates from graceful SIGTERM to a hard, whole-tree SIGKILL (POSIX process groups; taskkill /T /F on Windows) — closing the gap where a child that traps/ignores SIGTERM could run forever.
  • Background review silently dropped a turn on a transient direct-transport failure: found during post-merge verification — background review now catches exceptions from the in-process direct completion path and falls back to subprocess, matching flush/correction/consolidation.
  • session_search's snippetChars argument accepted non-finite input: found during post-merge verification — snippetChars: NaN now clamps to the default instead of silently producing an empty snippet.

Changed

  • In-process direct transport extended to flush, correction save, and consolidation: these now try the same in-process completeSimple() transport background review already used, falling back to a pi -p subprocess only on failure — structurally sidesteps both the argv-leak and auth-adapter-stripping issues on the common path since there's no subprocess involved at all.

Full diff: v0.7.23...v0.8.0

Don't miss a new pi-hermes-memory release

NewReleases is sending notifications on new releases.