From 9b5e1473e6fc9a236319ea201bc15c182b7f1040 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 2 Mar 2026 23:32:47 -0600 Subject: [PATCH] =?UTF-8?q?store:=20PR=20review:=20cognitive-memory#7=20?= =?UTF-8?q?=E2=80=94=20decay=20filter=20in=20semantic=5Frecall()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-decay-filter-in-semantic-recall-1af571.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 graph/workflows/pr-review-cognitive-memory7-decay-filter-in-semantic-recall-1af571.md diff --git a/graph/workflows/pr-review-cognitive-memory7-decay-filter-in-semantic-recall-1af571.md b/graph/workflows/pr-review-cognitive-memory7-decay-filter-in-semantic-recall-1af571.md new file mode 100644 index 00000000000..f938fa68ebf --- /dev/null +++ b/graph/workflows/pr-review-cognitive-memory7-decay-filter-in-semantic-recall-1af571.md @@ -0,0 +1,25 @@ +--- +id: 1af571c5-cf7a-4e40-b324-6973b56f2502 +type: workflow +title: "PR review: cognitive-memory#7 — decay filter in semantic_recall()" +tags: [pr-reviewer, cognitive-memory, python, decay, embeddings, semantic-recall, approved] +importance: 0.4 +confidence: 0.8 +created: "2026-03-03T05:32:47.623228+00:00" +updated: "2026-03-03T05:32:47.623228+00:00" +--- + +Reviewed PR #7 in cal/cognitive-memory: "fix: filter archived/dormant memories from semantic_recall() (#3)". + +**Verdict**: APPROVED (could not post — Gitea blocks self-review) + +**Files reviewed**: `embeddings.py` + +**Summary**: Added `THRESHOLD_DORMANT` guard to `semantic_recall()` to skip dormant memories (decay_score < 0.05) before cosine similarity scoring. Mirrors the existing guard in `recall()` keyword path exactly. + +**Key findings**: +- Correct: filter logic, default value (0.5), and placement (before loop) all match the keyword recall path +- `_load_state()` called once outside the loop — efficient +- Safe fallback: missing state entries default to 0.5 (active), not filtered +- No security issues; no style concerns +- Clean, minimal, well-targeted fix