v0.2.31 — 8 issues resolved (registry, client API, snapshot diagnostics, ingest rollback, exit_code, read_list, sliding TTL)
8 issues resolved — MemNet core reliability pass
All changes preserve public API compatibility. Core test suites pass.
Fixed
- #1 registry naming —
get/remove→get_entry/remove_entry(avoids builtin shadowing). - #2 client surface —
serve_client.dispatchis now the documented canonical entry point; low-level TCP helpers inserveare explicitly internal. - #3 remote snapshot diagnostics —
session_load/load_snapshotnow emitsnapshot_not_found|<path>|serve_cwd=<...>onFileNotFoundError, making cross-host path mismatches obvious. - #4 ingest rollback cost — replaced full-store
to_jsonl_rowssnapshot with O(batch) incremental journal (added ids + replaced Records). Rollback is now proportional to batch size, not store size (estimated 50–500× win on large stores). - #5 exit_code on per-line errors — both inline (
_run_inline) and TCP serve (_handle_request) paths now capture theapp(...)return value fortyper.Exit, ensuringexit_codeis non-zero when any line is rejected (FIELD_COUNT, unknown_tag, etc.). - #7 enumeration path — added
read_listMCP tool (and documentedread list --tag) as the supported way to list rows by tag without prior IDs.query_walkdocstrings redirect to it. - #8 TTL expiry —
get_sessionimplements sliding TTL: every successful access extendsexpires_atby the originalttl_minutes. Long-lived sessions (novel-rpg world state) no longer expire silently.
Changed (by design)
- #6 TagMap immutability — confirmed: schema is fixed at session open. Runtime mutation is unsupported and dangerous (desync risk with parser/emitter, snapshot ambiguity). Closed with rationale; the hand-edit workaround remains unsupported.
Install
pip install -U memnet-llm==0.2.31