Skip to content

fix(tests): repoint stale singleton/subpackage imports in dead test collectors (Category B+D) - #12452

Merged
mrveiss merged 5 commits into
Dev_new_guifrom
issue-12438-catB
Jul 25, 2026
Merged

mrveiss merged 5 commits into
Dev_new_guifrom
issue-12438-catB

Conversation

@mrveiss

@mrveiss mrveiss commented Jul 25, 2026 •

Copy link
Copy Markdown
Owner

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-stub tools.parallel, real-load code_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-load llm_shared.pricing; fixed 2 pre-existing test bugs incl. a recursive self-patch INFINITE HANG.

Verification

Model Used

Opus 4.8 (implementation + review).

mrveiss added 5 commits July 25, 2026 14:43
…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.
@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant