test(embedder): isolate Ark factory tests from optional SDK - #2215
Conversation
🤖 Open Code ReviewTarget: PR #2215 ✅ OpenCodeReview: No comments generated. Looks good to me. Generated by cloud-assistant via Open Code Review. |
✅ Automated Test Results: PASSEDAll tests passed (2/2 executed). memos_python_core/changed-repo-python: 2/2. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-6ae0aeed3ed9721c-20260805142200: 37/38 passed, 1 failed — these do NOT affect the PR verdict; review the branch manually. Branch: |
✅ Automated Test Results: PASSEDAll tests passed (2/2 executed). memos_python_core/changed-repo-python: 2/2. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-06ac3544c9fffab3-20260813171211: 55/55 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
Description
The Ark factory unit tests mock
ArkEmbedder.embed, but constructing the embedder still executes the optionalvolcenginesdkarkruntimedependency guard. As a result, these factory tests fail in a normal core/test environment even though they never exercise the Ark SDK.This change mocks the constructor boundary as well as
embed, keeping the tests focused on factory selection and single/batch forwarding. Production dependency validation remains covered by the real constructor.Related Issue (Required): N/A — test isolation regression found on current
main.Type of change
How Has This Been Tested?
pytest tests/configs tests/embedders tests/multi_mem_cube -qfailed both Ark tests without the optional SDK..venv/bin/pytest tests/embedders/test_ark.py -q(2 passed)..venv/bin/ruff check tests/embedders/test_ark.py.venv/bin/ruff format --check tests/embedders/test_ark.pyChecklist