Contents

v0.2.16: Atomic Runtime Memory Capacity Maintenance

View source on GitHub

v0.2.16 makes Runtime Memory capacity recovery complete and atomic. An overflow caused by add, replace, or remove can now archive or locally compact the reviewed entries and apply the requested mutation without exposing a partial result or accepting an unverified archive.

Fixed

  • Capacity maintenance now supports all three existing runtime mutation actions. MEMORY.md uses the archive worker with a 32,768-token budget, while USER.md remains a strictly local compaction path and is never sent to a Memory Space.
  • The Host prepares a plan from an exact file revision, then commits compaction and the original mutation together under one file lock. A concurrent write, an invalid result, or a final capacity overflow leaves the Runtime JSON, MEMORY.md, and USER.md byte-identical to their pre-operation state.
  • A replace or remove plan excludes the matched obsolete entry before archival and compaction. A pending add or replacement is protected from compaction, so stale content cannot be archived or reintroduced and the new content cannot be duplicated.
  • MEMORY.md migration must map every one-based committed source entry exactly once to a destination, and the destination set must match the reported Memory Space ids. Each destination must be active, backed by an enabled remember-capable Provider, and supported by a successful mnemon_remember receipt or actual mnemon_recall evidence.
  • Failed, pending, queued, or otherwise provisional Provider receipts are rejected. Results emitted inside Code Mode count only after the enclosing run succeeds.

Compatibility and data safety

  • No persistence format, RPC authority, credential handling, public tool schema, or external mutation action changes. planMaintenance and compactAndMutate are Host-only coordination methods; public runtime actions remain add, replace, and remove.
  • Existing schema-version-1 runtime files and Memory Spaces require no migration. Upgrade dsh-mnemon and restart the affected DSH profile; a package downgrade requires no data rollback.
  • This closes the data-loss window where a preliminary compaction could persist before a stale mutation retry failed, including a replacement whose oldText disappeared during compaction.

Verification

  • The complete pnpm run verify chain passes 393 tests; one Windows-only smoke test is skipped only in local non-Windows runs. The same release tree passes on Node.js 22.19, 24, and 25.
  • Regression coverage includes real-controller overflow recovery for add, replace, and remove; legacy over-capacity removal; obsolete-entry exclusion; USER.md privacy; exact migration coverage; invalid, inactive, disabled, and non-writable destinations; fake or provisional receipts; duplicate and reintroduced compaction output; cross-controller revision conflicts; final overflow; and byte-identical files after every rejected transaction.
  • Deterministic double builds match across 65 generated files. Isolated Headless activation exposes 35 total tools, including all five representative Mnemon tools. Package validation reports 72 files; publint strict and attw pass.
  • GitHub CI passes on Ubuntu with Node.js 22.19 and 24, and on Windows with Node.js 24, including the Mnemon release download and default-discovery smoke tests.

The original capacity fix was contributed by Zn-Dk in PR #67 and was merged together with the maintainer's atomicity and evidence-validation hardening while preserving both commits.

See the v0.2.15 release notes for the previous patch release.