Skip to content

semantic-cache tests patch pmoves.services.semantic_cache, an alias the services shim never defines (11 test_cache ERRORs; test_cipher_layer and test_proxy never measured) #3529

Backlog

Description

@POWERFULMOVES

Measured 2026-11-25 while landing #3517 (Merge Gate python-tests ratchet, pytest 9.2.0, Python 3.12, .github/requirements-tests.txt).

What fails. All three files under pmoves/services/semantic-cache/tests/ import or patch pmoves.services.semantic_cache.<module>:

  • test_cache.py:57-60 patches pmoves.services.semantic_cache.cache_store.AsyncPostgrestClient
  • test_cipher_layer.py:68-71 patches pmoves.services.semantic_cache.cipher_layer.httpx.AsyncClient
  • test_proxy.py:131-150 patches five pmoves.services.semantic_cache.main.* targets

pmoves/services/__init__.py resolves snake_case names for kebab-case folders only through its _ALIASES table, and that table has three entries: publisher, publisher_discord, pmoves_yt. There is no semantic_cache. So every fixture fails at setup:

AttributeError: module 'pmoves.services' has no attribute 'semantic_cache'. Did you mean: 'semantic-cache'?

Why only 11 of them are in the baseline. The 11 test_cache.py errors are in pmoves/configs/pytest_ratchet/_known_failures.yaml. test_cipher_layer.py (9 failures locally) and test_proxy.py (8 errors locally) are not, because they sat in ratchet chunk pmoves [4], which pmoves/tools/test_all_tts_engines.py aborted at collection with sys.exit(1) on every run on record. #3517 fixes the abort and the ratchet's handling of it, so these will surface as NEW findings there and be baselined with a note. This issue is the real fix.

Also: cache_store.py:52 does from postgrest import AsyncPostgrestClient, and postgrest is not in .github/requirements-tests.txt, so even with the alias the test_cache fixtures need either the package in the CI union or the import stubbed.

Options (owner's call). Add semantic_cache (and its submodules) to the _ALIASES loader, or change the three test files to load the modules by path with the shared load_service_module fixture as other kebab-case services do. Tests only either way.

Filed by 5090-CLAUDE.

🤖 Generated with Claude Code

https://claude.ai/code/session_016aNs4q8tajdg1rcgaacrWS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions