test-case: :remember + restart persistence #40

Closed
opened 2026-05-13 08:21:39 +00:00 by claude-noether · 1 comment
Collaborator

Steps

  1. Boot aish (clean — no memory.jsonl yet).
  2. :remember User prefers terse responses.
  3. :remember Default :model deep for code reasoning.
  4. :memory add context aish is a LuaJIT REPL with MCP tools.
  5. :memory list — verify 3 items.
  6. :quit.
  7. Boot aish again.

Expected

  • Step 7 startup banner includes [aish] memory: 3 items injected.
  • :memory list shows the same 3 items.
  • :history shows the empty in-memory context (memory items live in the system prompt, not in turns).
  • Next AI query: the model has access to the memory via the [background] block.

What this exercises

  • history.open_memory create-empty path (file written with meta header)
  • handle:add for all three kinds (fact, pref, context)
  • flock release on :quit so the second boot can acquire
  • Startup inject_memory loads items into ctx.memory_items
  • to_messages composes the [background] block

Likely failure modes

  • Second boot fails with memory.jsonl held by another aish process → first boot didn't close cleanly (shutdown_session race).
  • Items not visible to the model → ctx.memory_items populated but to_messages doesn't render (check context.lua compose_background).
## Steps 1. Boot aish (clean — no memory.jsonl yet). 2. `:remember User prefers terse responses.` 3. `:remember Default :model deep for code reasoning.` 4. `:memory add context aish is a LuaJIT REPL with MCP tools.` 5. `:memory list` — verify 3 items. 6. `:quit`. 7. Boot aish again. ## Expected - Step 7 startup banner includes `[aish] memory: 3 items injected`. - `:memory list` shows the same 3 items. - `:history` shows the empty in-memory context (memory items live in the system prompt, not in turns). - Next AI query: the model has access to the memory via the [background] block. ## What this exercises - history.open_memory create-empty path (file written with meta header) - handle:add for all three kinds (fact, pref, context) - flock release on `:quit` so the second boot can acquire - Startup inject_memory loads items into ctx.memory_items - to_messages composes the [background] block ## Likely failure modes - Second boot fails with `memory.jsonl held by another aish process` → first boot didn't close cleanly (shutdown_session race). - Items not visible to the model → ctx.memory_items populated but to_messages doesn't render (check context.lua compose_background).
claude-noether added the test-case label 2026-05-13 08:21:39 +00:00
Author
Collaborator

PASS (autonomous run, 2026-05-13). Boot 1: :remember × 2 + :memory add context → 3 items, all visible in :memory list. Boot 2: startup banner memory: 3 items injected; :memory list shows the same 3. Persistence works across restarts; flock released cleanly on :quit. Closing.

**PASS** (autonomous run, 2026-05-13). Boot 1: `:remember` × 2 + `:memory add context` → 3 items, all visible in `:memory list`. Boot 2: startup banner `memory: 3 items injected`; `:memory list` shows the same 3. Persistence works across restarts; flock released cleanly on `:quit`. Closing.
Sign in to join this conversation.