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.
25 lines
579 B
Python
25 lines
579 B
Python
from __future__ import annotations
|
|
|
|
from typing import Protocol
|
|
|
|
import structlog
|
|
|
|
from everos.infra.ome.context import StrategyContext
|
|
|
|
|
|
def test_strategy_context_is_protocol() -> None:
|
|
assert issubclass(StrategyContext, Protocol) # type: ignore[arg-type]
|
|
|
|
|
|
def test_strategy_context_runtime_attributes() -> None:
|
|
class _Impl:
|
|
run_id = "r1"
|
|
logger = structlog.get_logger("test")
|
|
|
|
async def emit(self, event: object) -> None:
|
|
return None
|
|
|
|
ctx: StrategyContext = _Impl()
|
|
assert ctx.run_id == "r1"
|
|
assert callable(ctx.emit)
|