From e57b05405462b405d0b57b2354a96536b22a85d5 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Mon, 15 Jun 2026 21:46:07 -0700 Subject: [PATCH] =?UTF-8?q?memory:=20snapshot=20=E2=80=94=20memory=20plane?= =?UTF-8?q?=20shipped=20(v0.17.3),=20canonical=20sync=20+=20#3/#4=20refres?= =?UTF-8?q?h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- persistent-memory.md | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/persistent-memory.md b/persistent-memory.md index 9e491ad..ea07c54 100644 --- a/persistent-memory.md +++ b/persistent-memory.md @@ -56,13 +56,18 @@ background shell (`ratatoskr-provider`, `0.0.0.0:8390`, env-sourced from Worldtree **v0.35.2** (`10.250.50.152`): handshake 200 + `affect.emit` 200 → durable row persisted, opacity held. -**MEMORY plane: contract done, TDD next.** -`docs/contracts/bifrost_memory_provider.contract.md` v1.1 (Heid-panel-reviewed, -committed `1f94e5f`). NEXT (fresh session): add `sqlite-vec` to the `provider` -extra → TDD (tracer `basic_upsert` → search/scope-isolation/optimistic-lock/ -conflict → #195 parity vs `InMemoryMemoryStore`) → `/heid-code-review` → ship a -`ratatoskr-memory-provider` dev shell. Worldtree v0.35.3 already negotiates the -basic memory plane — the memory server is the only missing piece. +**MEMORY plane: SHIPPED** (v0.17.3, commit `cd12951`). SQLite+sqlite-vec store +(`src/ratatoskr/provider/memory_store.py`) + dev shell (`serve_memory.py`, +`ratatoskr-memory-provider`, port 8391, env `RATATOSKR_MEMORY_DB` / +`RATATOSKR_MEMORY_EMBEDDING_DIM`). All 7 contract blocks; 26 store + 4 serve +tests; **#195 parity** (upsert / search / expected_revisions) vs +`InMemoryMemoryStore` through the real `dispatch_memory_call`; heid-code-reviewed +(panel Gróa/Hulda/Regin — zero true drift). NEXT (the affect-parallel +**live-proven** milestone): smoke `ratatoskr-memory-provider` against personal +Worldtree **v0.35.3** — needs the real `PINNED_EMBEDDER_DIM` +(`RATATOSKR_MEMORY_EMBEDDING_DIM`, required, no default — a wrong dim silently +breaks vec search) + a heimdall key (broker via infra-ops) + `provider.env`. +That smoke is what earns a possible minor bump + worldtree-dev announce. **Sindra:** a REGISTERED Tier-3 agent (`ratatoskr:sindra`, was model `artemis-31b-v1i`) — registration is REQUIRED to use a Tier-3 character (a @@ -78,9 +83,10 @@ registration. `~/.config/ratatoskr/provider.env` (mode 600, nh3-dev) — `consumer="ratatoskr"`, HS256 = the API-key STRING utf-8-encoded; rotate via infra-ops. -**Unpushed:** `main` is 3 commits ahead of origin (origin at `d90a58d`/v0.17.1; -local at `1f94e5f`) — `bcdcd71` (v0.17.2), `eebab46`, `1f94e5f` + the local -`v0.17.2` tag are unpushed. Push is the operator's call. +**Unpushed:** `main` is 5 commits ahead of origin (origin at `5cdb69a`) — +`d85ab43` (canonical sync), `335c835` (contract refresh), `e9434b9` (sindra), +`cf411cb` (graph report), `cd12951` (memory plane v0.17.3) + the local `v0.17.3` +tag are unpushed. Push is the operator's call. **Still standing from before:** Worldtree spec pin v0.29.0 (`562001a`) for the conversation-API/TUI surface (untouched by the Bifrost work). Codex-first pilot @@ -170,3 +176,6 @@ defense against re-attempting the same cul-de-sac. - `[2026-06-15]` **"Sindra hasn't been registered" was an under-verified inference — WRONG.** Concluded it from grepping ratatoskr's CODE (`sindra` absent from `src/`), but Tier-3 registration is SERVER-SIDE (`POST /agents/define` on the Worldtree instance) — a code grep structurally can't see it. Registration IS required to use a Tier-3 character (a session against an unregistered `agent_id` 404s), so since Sindra has been used, she WAS registered (`ratatoskr:sindra`). **Rule: to check whether a Tier-3 agent exists, query the Worldtree instance's `GET /agents`, never the consumer repo's code.** (Residual: the v0.35.2 personal rebuild may have wiped her — re-verify.) - `[2026-06-14]` **Artifact-only contract review can't validate against a dependency's ACTUAL behavior.** `/heid-contract-review` sees only the contract, never the external library (bifrost) — so "the consumer under-built against bifrost's real semantics" is invisible to it by construction (the affect idempotency model shipped wrong because of this). Real-lib TDD against the shipped library + the executable reference store + the #195 parity test are the gate for any consumer plane with non-trivial state semantics. Don't treat a clean contract review as evidence the code matches the dependency. - `[2026-06-15]` **"byte-equal" round-trip slip propagated affect→memory via copy-paste.** The affect contract's byte-identical→semantic fix reappeared in the memory contract's INV-001 (sibling copy). Only an INDEPENDENT `/heid-contract-review` of the memory contract re-caught it. **Paraphrase every sibling contract fresh — don't amortize one review across a family; copies carry the parent's slips.** (also a feedback auto-memory) +- `[2026-06-15]` **Canonical sync retired the issue-scoped parser staleness** (predicted by the 2026-05-21 entry's "until canonical bumps"). `contract_parser.py` synced to v2.1 (`f1fdfdb6→e10a4460`, commit `d85ab43`): now validates issue-scoped frontmatter (`target_module`/`scope`/`prd`) + four v2.1 test categories (scenario/trace/adversarial/property). Issues #3/#4 went FAIL→WARN (0 errors). The old "treat parser ERROR-on-issue-scoped as expected" note no longer applies. +- `[2026-06-15]` **Refreshed #3/#4 presenter contracts to the shipped TUI model** (commit `335c835`). Both still described the abandoned single-`RichLog` double-display model; rewrote to the 4-pane live-Markdown reality (v0.5.0–v0.14.0 + Worldtree #201/#204) across INV-005, the `[performance]` constraint, the COMPOSE sketch, the `CLASS TuiPresenterState` block, both `render`/`_stream_turn_worker` blocks, and the `_cancel_via_sse` call site — plus the STEPS the v2.1 parser flagged missing. Code unchanged; contract-truth catching up to shipped code. Scope ballooned one-block→contract-wide mid-task; surfaced to operator before rewriting the INV-005 trade-off invariant. +- `[2026-06-15]` **Memory plane TDD'd + shipped** (commit `cd12951`, v0.17.3). Impl decisions worth keeping: vec0 `distance_metric=cosine` set at table creation (`score = 1 − distance`); `search` over-fetches ALL candidates by cosine then scope-filters in Python so `top_k` counts IN-SCOPE hits (INV-005, contract STEP 2 `indicative`); idempotency_id = reference 4-tuple `("default",verb,_ctx_actor(ctx),key)` pipe-joined as the SQLite PK, digest = sha256 canonical-JSON; `_ctx_actor` = `job_id|jwt_sub|session_id` (memory reference's 3-level, vs affect's 2-level). **heid-code-review panel returned zero true drift**; adopted 5 cheap contract-anchored fixups (scope_filter dict guard, `top_k≤0→[]`, stronger scope-isolation / delete-hit-search / handshake-POST tests), accepted 6 with reasoning. **Partial-map optimistic-lock semantics pinned to the reference via an `expected_revisions` parity test** — resolved a Hulda finding deterministically (the affect-plane lesson: TDD against the shipped lib is the gate, not judgment).