zara-memory: reject malformed memory-type selectors with structured errors #127

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

Problem

MemoryService._schema() currently calls self._schemas.get(memory_type) without validating that memory_type is text. Unhashable inputs such as lists can leak raw TypeError, and malformed scalar selectors do not consistently stay inside the plugin's structured MemoryError boundary.

Required behavior

  • remember() and typed recall() reject non-text/blank memory type selectors before backend dispatch;
  • no raw dict-key/hash exceptions escape;
  • errors use deterministic MemoryError diagnostics;
  • tests prove backend methods are not called for malformed selectors;
  • existing schema/scope/provenance isolation semantics remain unchanged;
  • full compatibility/registry/plugin/Nix package gates stay green.

Tracks local schema-boundary hardening under #7.

## Problem `MemoryService._schema()` currently calls `self._schemas.get(memory_type)` without validating that `memory_type` is text. Unhashable inputs such as lists can leak raw `TypeError`, and malformed scalar selectors do not consistently stay inside the plugin's structured `MemoryError` boundary. ## Required behavior - `remember()` and typed `recall()` reject non-text/blank memory type selectors before backend dispatch; - no raw dict-key/hash exceptions escape; - errors use deterministic `MemoryError` diagnostics; - tests prove backend methods are not called for malformed selectors; - existing schema/scope/provenance isolation semantics remain unchanged; - full compatibility/registry/plugin/Nix package gates stay green. Tracks local schema-boundary hardening under #7.
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#127
No description provided.