Skip to content

kioku-mesh v0.5.0

Choose a tag to compare

@h-wata h-wata released this 12 Jun 00:38
· 23 commits to main since this release
b2b3790

v0.5.0 — Visibility-tiered namespace readers (ADR-0019 Phase A)

This release prepares every reader in the mesh for visibility-tiered
replication
(ADR-0019): alongside the legacy mem/obs/... namespace, all
read paths now also understand the upcoming mem/mesh/...,
mem/user/{user_id}/... and mem/team/{team_id}/... key shapes. Nothing
writes those keys yet — that lands in Phase B — so this release is fully
backward compatible. Upgrade every host in your mesh to 0.5.x before any
host starts writing tiered keys
: that ordering is the whole point of
shipping readers first (the rolling-upgrade lesson from #75 / ADR-0012).

Highlights

  • Readers cover legacy + tiered namespaces (ADR-0019 Phase A). The
    replication subscriber, the startup index rebuild, the legacy fallback
    search / find-by-id, and the shadow-sweep re-verify all use broadened
    selectors (mem/**/obs/** — Zenoh's ** matches zero or more chunks, so
    one selector covers every shape). A new keyspace module is the single
    home for the key vocabulary.

  • Canonical-key gate on every index-mutating read path. Found in an
    external (Codex) review of the Phase A diff: the broadened selectors also
    match key shapes outside the spec, and a well-formed Observation payload
    under such a key could pollute the local index. Every ingest point now
    requires the key to parse as a canonical kioku-mesh key and the payload
    id to match the key's trailing id — including the shadow-revive path, so a
    forged payload can no longer resurrect a shadowed row.

  • Session-scoped save nudge in get_memory_status (#158). The status
    tool now reports session_age, this_session_saves and
    this_session_last_save_age, and emits a machine-readable nudge when a
    session has gone 10+ minutes without a save (or 20+ minutes since the last
    one). Counts come from the store itself, so they survive MCP server
    restarts. Server instructions also re-define the save triggers as
    language-agnostic semantic acts (EN/JA/ZH/KO anchors), and an optional
    Claude Code hook script (scripts/hooks/check-unsaved-decisions.sh) can
    remind about unsaved decisions before compaction / /clear.

  • store.py split into focused modules (#167). The 1,600-line monolith
    is now transport.py (session lifecycle, retry, health), pending_queue.py
    (failed-put queue + drain), replication.py (rebuild policy, key parsing,
    subscriber), purge.py (retention GC, shadow sweep, bulk purge) and a
    ~430-line store.py core. store.<name> keeps working for every public
    symbol via re-exports; if you monkeypatch internals in tests, patch the
    owning module (see the patching rule in store.py's docstring, #172).

Upgrade notes

  • No breaking changes. On-disk schema, env vars, CLI and the wire format
    are unchanged; writes still emit legacy keys only.
  • Roll out 0.5.x to all mesh hosts before a future Phase B release
    starts writing tiered keys.
  • New ADRs since 0.4.1: ADR-0017 (dual-hub), ADR-0018 (save-recall
    instructions), ADR-0019 (visibility tiers, revised to user/team/mesh),
    ADR-0020 (skills-mesh, Proposed), ADR-0021 (FTS5 + supersedes search,
    Proposed).