Skip to content

feat(memory): add optional subtype filtering#58

Merged
ramonlimaramos merged 2 commits into
mainfrom
codex/memory-subtype
Jun 14, 2026
Merged

feat(memory): add optional subtype filtering#58
ramonlimaramos merged 2 commits into
mainfrom
codex/memory-subtype

Conversation

@ramonlimaramos

@ramonlimaramos ramonlimaramos commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • add nullable memories.subtype plus tenant/subtype index via migration 004
  • let remember(..., subtype=...) store optional free-form subcategories
  • let recall(..., subtype=...), hybrid_search, and vector_search filter by subtype with parameterized SQL
  • share subtype/depth filter construction through a single helper to avoid duplicated search logic
  • include subtype in retrieval formatting, export/import JSON, README guidance, and MCP tool descriptions
  • add tests for persistence, recall forwarding, subtype search filters, injection safety, and tool metadata

Release plan

Review follow-up

  • Resolved Clean Code finding from review by extracting duplicate memory filter construction into _build_memory_filters(...).
  • Performance note: subtype filtering remains parameterized and O(1) to build in Python; DB-side behavior depends on planner/index selectivity and should be validated with EXPLAIN ANALYZE once representative memory volume exists.

Validation

  • git diff --check
  • uv run pytest tests/unit/test_migrations.py tests/unit/test_search_and_graph.py tests/unit/test_memory_retrieval_tools.py tests/unit/test_tool_metadata.py -q (70 passed)
  • uv run pytest tests/unit/test_search_and_graph.py -q (21 passed after review follow-up)
  • uv run pytest tests/unit -q (242 passed after review follow-up)
  • uv run ruff check src/synapto/search/hybrid.py tests/unit/test_search_and_graph.py
  • uv run ruff check src/ tests/
  • GitHub CI run 27515871845: lint, security, test 3.11, test 3.12, test 3.13 all passed

@ramonlimaramos ramonlimaramos force-pushed the codex/automatic-memory-capture branch 2 times, most recently from cdbda77 to 48f26c1 Compare June 14, 2026 23:24
@ramonlimaramos ramonlimaramos changed the base branch from codex/automatic-memory-capture to main June 14, 2026 23:28
@ramonlimaramos ramonlimaramos merged commit 3d05f55 into main Jun 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More granular memory_type subcategories with autocompleted enums

1 participant