发布

  • test(memory): cover remember and recall in library flow (#2769)

    frostbyte_neo 发布于 2026-05-16 18:47:02 +00:00

    Summary

    • Add functional coverage for top-level cognee.remember and
      cognee.recall in cognee/tests/test_library.py
    • Store a real memory entry through the high-level API and recall it
      from the same dataset using chunk retrieval

    Tests

    • uv run ruff check cognee/tests/test_library.py
      cognee/api/v1/recall/recall.py
      cognee/tests/unit/modules/memify_tasks/test_sync_graph_to_session.py
      cognee/tests/unit/api/v1/test_public_memory_api.py
    • uv run ruff format --check cognee/tests/test_library.py
      cognee/api/v1/recall/recall.py
      cognee/tests/unit/modules/memify_tasks/test_sync_graph_to_session.py
      cognee/tests/unit/api/v1/test_public_memory_api.py
    • TELEMETRY_DISABLED=1 uv run --extra dev python -m pytest
      cognee/tests/unit/api/v1/test_public_memory_api.py
      cognee/tests/unit/modules/memify_tasks/test_sync_graph_to_session.py -q

    Note: cognee/tests/test_library.py is the existing e2e/high-level API
    script run in CI, so the new remember/recall assertions are covered
    there rather than only as mocked unit tests.

    Summary by CodeRabbit

    • New Features
    • Remember and Cognify endpoints accept optional chunking and related
      execution options, which are forwarded for remote runs.
    • Tests
    • Added coverage for remember/recall flow and improved API test mocking.
    • Added test ensuring cached filesystem data is closed and cleared
      during data pruning.
    • Chores
      • CI matrix now includes Python 3.14.
      • CI examples job updated to run the Ladybug DB example.
    • Chore/Infrastructure
      • Ensure cache engine is closed before pruning data.
    下载附件