Skip to content

test(embedder): isolate Ark factory tests from optional SDK - #2215

Open
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:test/ark-factory-optional-sdk
Open

test(embedder): isolate Ark factory tests from optional SDK#2215
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:test/ark-factory-optional-sdk

Conversation

@RerankerGuo

Copy link
Copy Markdown
Contributor

Description

The Ark factory unit tests mock ArkEmbedder.embed, but constructing the embedder still executes the optional volcenginesdkarkruntime dependency 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

  • Bug fix (test-suite reliability)

How Has This Been Tested?

  • Before: pytest tests/configs tests/embedders tests/multi_mem_cube -q failed both Ark tests without the optional SDK.
  • After: .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.py

Checklist

  • Self-reviewed
  • Tests prove the regression is fixed
  • No production code or dependency metadata changed

@Memtensor-AI Memtensor-AI added area:model llm + embedder + reranker status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 labels Aug 5, 2026
@Memtensor-AI
Memtensor-AI requested a review from endxxxx August 5, 2026 05:49
@Memtensor-AI

Copy link
Copy Markdown
Collaborator

🤖 Open Code Review

Target: PR #2215
Task: 6ae0aeed3ed9721c
Base: main
Head: test/ark-factory-optional-sdk

OpenCodeReview: No comments generated. Looks good to me.

Generated by cloud-assistant via Open Code Review.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

✅ Automated Test Results: PASSED

All 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: test/ark-factory-optional-sdk

@Memtensor-AI Memtensor-AI added status:ready Ready for implementation; waiting for assignee or AI dispatch | 可进入实现,等待认领或派发 and removed status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:model llm + embedder + reranker status:ready Ready for implementation; waiting for assignee or AI dispatch | 可进入实现,等待认领或派发

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants