Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.2] - 2026-07-07

### Fixed

- **Agent-track search broken by `deprecated_by IS NULL` filter** —
`compile_filters()` unconditionally appended a `deprecated_by IS NULL`
clause to every LanceDB query, but only `episode` and `atomic_fact`
tables have this column. Agent-track search (`agent_case`,
`agent_skill`) failed on any method. The clause is now conditional on
`owner_type == "user"`.

## [1.1.1] - 2026-07-06

### Added
Expand Down Expand Up @@ -215,7 +226,8 @@ for AI agents.
- **Decoupled algorithms** — memory extraction algorithms live in the standalone
`everalgo-*` libraries published on PyPI.

[Unreleased]: https://github.com/EverMind-AI/everos/compare/v1.1.1...HEAD
[Unreleased]: https://github.com/EverMind-AI/everos/compare/v1.1.2...HEAD
[1.1.2]: https://github.com/EverMind-AI/everos/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/EverMind-AI/everos/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/EverMind-AI/everos/compare/v1.0.1...v1.1.0
[1.0.1]: https://github.com/EverMind-AI/everos/releases/tag/v1.0.1
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "everos",
"description": "md-first memory extraction framework",
"version": "1.1.1"
"version": "1.1.2"
},
"paths": {
"/health": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "everos"
version = "1.1.1"
version = "1.1.2"
description = "EverOS — local-first markdown memory framework for AI agents and user chats; lightweight, dev-friendly, small-team"
license = {text = "Apache-2.0"}
readme = "README.md"
Expand Down
5 changes: 4 additions & 1 deletion src/everos/memory/search/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ def compile_filters(
f"owner_type = '{owner_type}'",
f"app_id = '{_escape_str(app_id)}'",
f"project_id = '{_escape_str(project_id)}'",
"deprecated_by IS NULL",
]
# Only episode / atomic_fact tables carry the ``deprecated_by`` column
# (Reflection V1 marks superseded entries). Agent tables don't have it.
if owner_type == "user":
base.append("deprecated_by IS NULL")
if node is None:
return " AND ".join(base)
compiled = _compile_node(node.model_dump(exclude_none=True))
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_memory/test_get/test_filters_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def test_no_filters_emits_base_clause() -> None:
)


def test_no_filters_agent_omits_deprecated_by() -> None:
"""Agent tables lack ``deprecated_by`` — clause must be absent."""
where = compile_filters_for_get(None, owner_id="bot", owner_type="agent")
assert "deprecated_by" not in where


def test_owner_id_quote_is_escaped() -> None:
"""SQL-standard double-quote escape on ``owner_id``."""
where = compile_filters_for_get(None, owner_id="o'reilly", owner_type="user")
Expand Down
16 changes: 15 additions & 1 deletion tests/unit/test_memory/test_search/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ def test_no_filters_emits_base_clause() -> None:
)


def test_no_filters_agent_omits_deprecated_by() -> None:
where = compile_filters(None, owner_id="bot_42", owner_type="agent")
assert "deprecated_by" not in where
assert where == (
"owner_id = 'bot_42' AND owner_type = 'agent' "
"AND app_id = 'default' AND project_id = 'default'"
)


def test_owner_type_agent_pinned() -> None:
where = compile_filters(None, owner_id="alice", owner_type="agent")
assert "owner_type = 'agent'" in where
Expand Down Expand Up @@ -249,6 +258,11 @@ def test_empty_and_array_skips_combinator() -> None:
# ── Deprecated exclusion ──────────────────────────────────────────────


def test_compile_filters_excludes_deprecated_by_default() -> None:
def test_compile_filters_excludes_deprecated_by_for_user() -> None:
result = compile_filters(None, owner_id="u_a", owner_type="user")
assert "deprecated_by IS NULL" in result


def test_compile_filters_omits_deprecated_by_for_agent() -> None:
result = compile_filters(None, owner_id="agent_1", owner_type="agent")
assert "deprecated_by" not in result
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading