Context
PR #465 introduced tests/test_batch_add_tag_isolation.py which redefines the _isolate_memtomem_env + _StubCtx + integration_components fixture trio that already exists almost verbatim in tests/test_multi_agent_integration.py:56–127.
Both fixtures share the same intent: real BM25-only component stack on a tmp DB, hermetic against ~/.memtomem/config.json and MEMTOMEM_* env vars. Two callers is tolerable; a third would push it over the threshold for extraction.
Scope
Move into tests/conftest.py:
_MEMTOMEM_ENV_VARS constant
_isolate_memtomem_env(monkeypatch) helper
_StubCtx class
integration_components fixture (rename to make its scope clear, e.g. bm25_only_components)
Then drop the local copies from both files. No behavior change.
Why not in #465
PR #465 was a focused 24-line removal + 170-line test addition for the broadcast-tag bug. Pulling fixture extraction into the same PR would have been scope creep (feedback_one_change_per_pr.md). Tracked here so the next caller doesn't grow a third copy.
Reference
Context
PR #465 introduced
tests/test_batch_add_tag_isolation.pywhich redefines the_isolate_memtomem_env+_StubCtx+integration_componentsfixture trio that already exists almost verbatim intests/test_multi_agent_integration.py:56–127.Both fixtures share the same intent: real BM25-only component stack on a tmp DB, hermetic against
~/.memtomem/config.jsonandMEMTOMEM_*env vars. Two callers is tolerable; a third would push it over the threshold for extraction.Scope
Move into
tests/conftest.py:_MEMTOMEM_ENV_VARSconstant_isolate_memtomem_env(monkeypatch)helper_StubCtxclassintegration_componentsfixture (rename to make its scope clear, e.g.bm25_only_components)Then drop the local copies from both files. No behavior change.
Why not in #465
PR #465 was a focused 24-line removal + 170-line test addition for the broadcast-tag bug. Pulling fixture extraction into the same PR would have been scope creep (
feedback_one_change_per_pr.md). Tracked here so the next caller doesn't grow a third copy.Reference
feedback_refactor_axis.md: "중복이 semantic coupling 이면 추출"