Repository navigation
fix(tests): repoint stale singleton/subpackage imports in dead test collectors (Category B+D) - #12452
Merged
Merged
Conversation
…on.diff (#12438) tools.parallel / tools.parallel.executor were unconditionally stubbed with an empty __path__ package, masking the real module for tools/parallel/executor_artifacts_test.py (ModuleNotFoundError: No module named 'tools.parallel.types'). The only reason the real executor.py couldn't load was code_intelligence.code_generation.diff (self-contained, stdlib difflib only) sitting behind the broken code_intelligence/__init__.py. Real-load that one leaf submodule and drop tools.parallel from the stub list.
…system singleton imports (#12438) multimodal_processor's package __init__ renamed its singleton export from multimodal_processor to processor (Issue #10666 prefix-strip), and voice_processing_system.py's facade now exports the lazy_singleton factory get_voice_processing_system() instead of a bare instance. Both dead test collectors still imported the old names. Repoint to the current exports (aliasing processor as multimodal_processor; invoking the factory once for voice_processing_system) so collection succeeds and the historical attribute access in the test bodies keeps working.
…ton imports (#12438) Both modules replaced their bare-instance exports with lazy_singleton factories (get_desktop_streaming(), get_takeover_manager()); the dead test collector still imported the old names.
…mport (#12438) workflow_scheduler.py exports the lazy_singleton factory get_workflow_scheduler(); the dead e2e test collector still imported the old bare-instance name.
…tch targets (#12438) llm_shared.pricing (sources/redis_store/per-provider sources) was neither stubbed nor real-loaded, so its colocated services/pricing_refresh_test.py couldn't even collect (ModuleNotFoundError: No module named 'llm_shared.pricing'). Real-load the whole subpackage following the established llm_shared real-load pattern, with an explicit parent-attribute bind afterwards (the submodules load before the package __init__ exists in sys.modules, so _real_load_and_bind's own parent bind is a no-op for them). Once collectible, the test had two pre-existing runtime bugs that had never been caught because the file never ran: patch("services.pricing_refresh. PricingRedisStore") targeted a name that only exists as a function-local lazy import (retarget to llm_shared.pricing.redis_store.PricingRedisStore), and test_cost_tracker_uses_redis_pricing_when_available patched _store_usage_record with a callback that recursively re-entered _build_and_persist_record, hanging the test indefinitely. Simplified to a single direct call. All 11 tests in the file now pass.
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
This was referenced Jul 25, 2026
Closed
Closed
This was referenced Jul 25, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12456
Refs #12438
Thinking Path
After #12441, remaining collectors failed on moved/renamed symbols and stub-masked namespaces. Repointed each to the current symbol; real-loaded deps the stub was masking.
What Changed
tools/parallel/executor_artifacts_test.py: un-stubtools.parallel, real-loadcode_intelligence.code_generation.diff.computer_vision/multimodal_ai_test.py+multimodal_processor/multimodal_integration_test.py:multimodal_processor->processor(Umbrella: canonical-naming — eliminate Enhanced/Unified/Consolidated/V2 prefixes repo-wide #10666);voice_processing_system->get_voice_processing_system().control_panel_test.py:get_desktop_streaming()/get_takeover_manager()factories.workflow_scheduler_e2e_test.py:get_workflow_scheduler().services/pricing_refresh_test.py+ conftest: real-loadllm_shared.pricing; fixed 2 pre-existing test bugs incl. a recursive self-patch INFINITE HANG.Verification
llm_shared/full suite 549 passed (no regression). black/flake8 clean.Model Used
Opus 4.8 (implementation + review).