Make memory fail open #42

Merged
lost-rob0t merged 3 commits from fix/zara-009-memory-fallback into fix/zara-008-multi-tool-history 2026-07-19 01:34:44 +00:00
lost-rob0t commented 2026-07-18 22:45:50 +00:00 (Migrated from github.com)

What

  • fail over to process-local memory when Chroma, ONNX, Ollama, or persistence operations fail
  • expose deterministic disabled, persistent, and local_fallback health states with the backend error
  • inject recalled memory only for the active model call and remove it from persisted conversation history
  • store raw session captures as bounded transcripts and caller-provided summaries as bounded summaries

Why

Optional memory initialization and runtime failures could abort Zara, while recalled context accumulated as mid-history system messages. Raw transcripts were also mislabeled as summaries and grew without a configured bound.

Impact

Memory remains optional and fail-open, provider histories retain one leading persisted system prompt, and session records respect [memory].summary_max_chars. These changes remain in memory/agent infrastructure and do not move application logic out of Prolog.

Validation

  • nix develop -c scripts/test-memory.sh
  • nix develop -c bash -c 'pytest && for test_script in scripts/test-*.sh; do bash "$test_script"; done'

Closes #10

## What - fail over to process-local memory when Chroma, ONNX, Ollama, or persistence operations fail - expose deterministic `disabled`, `persistent`, and `local_fallback` health states with the backend error - inject recalled memory only for the active model call and remove it from persisted conversation history - store raw session captures as bounded transcripts and caller-provided summaries as bounded summaries ## Why Optional memory initialization and runtime failures could abort Zara, while recalled context accumulated as mid-history system messages. Raw transcripts were also mislabeled as summaries and grew without a configured bound. ## Impact Memory remains optional and fail-open, provider histories retain one leading persisted system prompt, and session records respect `[memory].summary_max_chars`. These changes remain in memory/agent infrastructure and do not move application logic out of Prolog. ## Validation - `nix develop -c scripts/test-memory.sh` - `nix develop -c bash -c 'pytest && for test_script in scripts/test-*.sh; do bash "$test_script"; done'` Closes #10
Sign in to join this conversation.
No description provided.