claude-memory/graph/insights/auto-edge-implementation-design-analysis-findings-and-fixes-ab3ffc.md
2026-02-28 22:13:13 -06:00

44 lines
1.8 KiB
Markdown

---
id: ab3ffc18-1707-42ff-ad7e-bffb16f6fdef
type: insight
title: "Auto-edge implementation: design analysis findings and fixes"
tags: [cognitive-memory, edges, code-review, design-patterns, mcp-server, auto-edges]
importance: 0.7
confidence: 0.8
created: "2026-03-01T04:12:45.563773+00:00"
updated: "2026-03-01T04:13:13.331186+00:00"
relations:
- target: ee85bf89-93f0-48e4-b911-7ddc18a735b5
type: RELATED_TO
direction: outgoing
strength: 0.9
edge_id: 34ca4c9a-5f16-4e37-b333-5ac7921bdb1a
- target: 9ea72015-0b85-4a42-9ae1-144866f8d86f
type: BUILDS_ON
direction: outgoing
strength: 0.75
edge_id: 13e98a58-b81d-49b0-89b9-0f23d3d24657
- target: 9eb16f9f-c825-4233-b64f-d0acd140374a
type: FOLLOWS
direction: outgoing
strength: 0.65
edge_id: ed1f50e9-eec3-491a-9e41-097f567ee28d
---
# Auto-edge Implementation: Design Analysis Findings and Fixes
## Issues Found and Fixed
1. **Similarity threshold bypass** — keyword-only results lack a `"similarity"` key, so `if similarity is not None` always short-circuited the threshold check. Fixed by requiring tag overlap for the keyword-only path instead.
2. **Backwards description arrow** — The `→` in the edge description could point the wrong direction when a heuristic reversed from/to. Fixed by building the description string after direction resolution.
3. **Wasted slice slots**`[:AUTO_EDGE_MAX]` slice happened before threshold filtering, consuming slots on results that would later be rejected. Fixed by filter-then-slice ordering.
4. **Weak recall query** — Title-only recall gave weak signal. Fixed by concatenating tags into the query string.
## Deferred Issues (Not Fixed This Session)
- Git commit batching in `relate()` (issue #2)
- Semantic recall surfacing dormant memories (issue #3)