zara-memory: enforce fact cardinality on backend recall evidence #113

Closed
opened 2026-09-08 02:03:00 +00:00 by nsaspy · 0 comments
Owner

Problem

MemoryService caps caller-authored facts at 64, but _validate_memory() accepts an unbounded backend facts list. A recall backend can therefore return one memory carrying arbitrarily many symbolic facts and bypass the service's collection bound.

Slice

  • deterministic RED coverage for a backend memory with 65 facts;
  • enforce MAX_FACTS on backend-returned memory evidence before validating each fact;
  • preserve existing scope/schema/provenance checks;
  • full exact-head compatibility, registry, plugin and Nix gates before merge.

Dependency-ready correctness slice within #7; no substitute backend or missing search/forget implementation.

## Problem `MemoryService` caps caller-authored facts at 64, but `_validate_memory()` accepts an unbounded backend `facts` list. A recall backend can therefore return one memory carrying arbitrarily many symbolic facts and bypass the service's collection bound. ## Slice - deterministic RED coverage for a backend memory with 65 facts; - enforce `MAX_FACTS` on backend-returned memory evidence before validating each fact; - preserve existing scope/schema/provenance checks; - full exact-head compatibility, registry, plugin and Nix gates before merge. Dependency-ready correctness slice within #7; no substitute backend or missing search/forget implementation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#113
No description provided.