Skip to content

tech-debt(backend): ConfigManager.get_section AttributeError breaks 6 config/multimodal integration tests #12722

Closed

Description

@mrveiss

What

Discovered while verifying PR #12721 (issue #12714, torch-loader
unification) — pre-existing, unrelated to that change (confirmed via
`git diff origin/Dev_new_gui` showing 0 changes to any of these test
files or to `config/manager.py`).

6 tests in `autobot-backend/config/config_migration_integration_test.py`
fail locally:

```
FAILED ...::test_config_environment_variable_priorities - AssertionError: assert None == 'autobot_value'
FAILED ...::test_unified_multimodal_processor_config_usage - AttributeError: 'ConfigManager' object has no attribute 'get_section'
FAILED ...::test_config_section_completeness - AttributeError: 'ConfigManager' object has no attribute 'get_section'
FAILED ...::test_config_type_consistency - AssertionError: assert None is not None (path: 'multimodal.vision.enabled')
FAILED ...::test_config_migration_backward_compatibility - ModuleNotFoundError: No module named 'utils.config_manager'
FAILED ...::test_config_default_value_handling - AssertionError: assert None in ['ollama', 'openai']
```

Plus the same `ConfigManager` object has no attribute `get_section``
failure recurs in:

  • `autobot-backend/multimodal_processor/multimodal_system_integration_test.py`
    (7 errors — `VisionProcessor()` setup calls `get_config_section`, which
    the test's mock wires to `mock_config.get_section`, but the fixture's
    `ConfigManager` instance has no such method)
  • `autobot-backend/system_benchmarks_performance_test.py` (multiple
    failures downstream of the same fixture pattern)

Likely root cause

`get_section` exists on `config.registry.ConfigRegistry`
(`autobot-backend/config/registry.py:161`), not on
`config.manager.ConfigManager`. These test fixtures appear to predate a
`ConfigManager`/`ConfigRegistry` split (or a naming-cleanup pass) and
were never updated to call the right class, or `ConfigManager` is
missing a `get_section` passthrough it's expected to have.

`test_config_migration_backward_compatibility` additionally imports
`utils.config_manager`, a module that no longer exists.

Reproduce

```
cd autobot-backend
python3 -m pytest config/config_migration_integration_test.py multimodal_processor/multimodal_system_integration_test.py system_benchmarks_performance_test.py -q
```

Scope

Out of scope for #12714/PR #12721 (pure config-subsystem test drift, no
relation to the torch lazy-loader unification). Needs its own
investigation: either add `ConfigManager.get_section` as a real method/
passthrough to `ConfigRegistry.get_section`, or fix the test fixtures to
call the correct class, plus remove/redirect the dead
`utils.config_manager` import.

Activity

  1. mrveiss commented on Jul 27, 2026

    @mrveiss
    OwnerAuthor

    Already fixed — duplicate scope with #12774, resolved by PR #12821 (d6627213e). No further change needed.

    Verified on current Dev_new_gui:

    $ python3 -m pytest config/config_migration_integration_test.py -q -p no:randomly
    10 passed
    

    All six tests named here now pass. For the record, get_section was only one of four distinct causes behind them:

    • get_section → renamed get_config_section
    • ConfigManager.get() / .set() are flat dict operations (config/sync_ops.py) — they resolve neither dotted paths nor env vars, so dotted lookups needed get_nested() and nested writes set_nested(). That last one is why the multimodal test saw 0.7 instead of the 0.9 it had "set".
    • utils.config_manager no longer exists; from config import config yields the SSOT _ConfigProxy, which has neither .get nor .config. The legacy wrapper is config.compat.Config.
    • "llm" is not a top-level section (LLM config lives under backend.llm), and llm.orchestrator_llm / llm.ollama.port exist nowhere — so the old backward-compat assertion compared None to None and was vacuously true.

    The wider suite went from 9 failed / 93 passed to 102 passed.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions