chore: initialize EverOS 1.0.0
md-first memory extraction framework for AI agents. Markdown is the single source of truth; SQLite holds state and LanceDB provides the rebuildable vector + BM25 + scalar index. The codebase follows a single-direction DDD layering (entrypoints -> service -> memory -> infra, with component / core / config cross-cutting) enforced by import-linter. Engineering surface: - Coding conventions in .claude/rules/ (path-scoped) and workflows in .claude/skills/ (/commit, /new-branch, /pr). - GitHub Actions CI runs make lint + test + integration; pre-commit mirrors the gates locally (ruff, hygiene hooks, gitlint commit-msg). - Commit messages follow Conventional Commits, enforced by gitlint. - make lint also enforces datetime two-zone discipline and OpenAPI drift.
This commit is contained in:
56
tests/unit/test_memory/test_strategies/test_registration.py
Normal file
56
tests/unit/test_memory/test_strategies/test_registration.py
Normal file
@ -0,0 +1,56 @@
|
||||
"""Test strategy package exports and OME engine registration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from everos.memory.strategies import (
|
||||
extract_agent_case,
|
||||
extract_agent_skill,
|
||||
extract_atomic_facts,
|
||||
extract_foresight,
|
||||
extract_user_profile,
|
||||
trigger_profile_clustering,
|
||||
trigger_skill_clustering,
|
||||
)
|
||||
|
||||
|
||||
def test_strategies_are_re_exported_from_package() -> None:
|
||||
for fn, name in [
|
||||
(extract_atomic_facts, "extract_atomic_facts"),
|
||||
(extract_foresight, "extract_foresight"),
|
||||
(extract_agent_case, "extract_agent_case"),
|
||||
(trigger_skill_clustering, "trigger_skill_clustering"),
|
||||
(extract_agent_skill, "extract_agent_skill"),
|
||||
(trigger_profile_clustering, "trigger_profile_clustering"),
|
||||
(extract_user_profile, "extract_user_profile"),
|
||||
]:
|
||||
assert fn._ome_strategy_meta.name == name # type: ignore[attr-defined]
|
||||
|
||||
|
||||
async def test_get_engine_registers_all_strategies(
|
||||
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
from everos.core.persistence import MemoryRoot
|
||||
|
||||
svc = importlib.import_module("everos.service.memorize")
|
||||
|
||||
monkeypatch.setattr(
|
||||
MemoryRoot, "default", classmethod(lambda cls: MemoryRoot(root=tmp_path))
|
||||
)
|
||||
monkeypatch.setattr(svc, "_ome_engine", None, raising=False)
|
||||
|
||||
engine = svc._get_engine()
|
||||
names = {m.name for m in engine._registry.all()} # noqa: SLF001 — test introspection
|
||||
assert names == {
|
||||
"extract_atomic_facts",
|
||||
"extract_foresight",
|
||||
"extract_agent_case",
|
||||
"trigger_skill_clustering",
|
||||
"extract_agent_skill",
|
||||
"trigger_profile_clustering",
|
||||
"extract_user_profile",
|
||||
}
|
||||
Reference in New Issue
Block a user