Closed
Labels
kind/bugBug or incorrect behavior
Description
Existing issue search
Checked existing issues for Memoria purge and memory recall; no matching report found.
Version and environment
Reproduced against Astra commit 2873a950f2c9fea00343757933e96070d1631596 (0.2.11), using deterministic in-process Memoria fixtures. No production data is required.
Actual behavior
- Session-end governance can purge working memories after its final snapshot read fails. The snapshot loader collapses read errors to
None, and governance leavessafe_to_purge_workingenabled. With default session facts, no episode is stored, but purge still runs. - Session-start recall caps profile/episode candidates before validating the typed prompt-memory protocol. Three high-scoring invalid rows can displace a fourth valid row, producing no prompt evidence.
Expected behavior
- Distinguish a successful empty snapshot read from failed or denied reads. Failed reads must retain working memories and must not permit destructive cleanup.
- Validate prompt eligibility before applying each recall bucket's cap. Keep the existing ownership, consent, protocol validation, ranking and latency boundaries.
Steps to reproduce
- Use a MemoriaPort whose snapshot read returns
Failed, whose writes are admitted, and whose purge succeeds. Invokerun_session_end_governancewith default SessionFacts. Observe zero episode writes and one purge call. - Return four profile rows from the session-start query: three higher-scoring unstructured rows followed by a valid tagged preference. Observe zero admitted entries despite the valid candidate.
Proposed scope
Fix the canonical snapshot read/governance path and recall admission order; add deterministic regressions for failed/denied reads, successful empty reads, and mixed valid/invalid recall results. No deployment, database-schema or credential changes.
Metadata
Metadata
Assignees
Labels
kind/bugBug or incorrect behavior
Activity
fix(memory): preserve working state on failed reads and admit valid r…