[loop-generated] [test-coverage] No tests for config.py (507 lines) and multimodal.py (579 lines) #648

Closed
opened 2026-03-20 22:16:21 +00:00 by Timmy · 2 comments
Owner

Problem

Two of the largest modules in the codebase have zero test coverage:

  1. src/config.py (507 lines) — Central configuration. No tests for default values, env var overrides, validation, or edge cases.
  2. src/infrastructure/models/multimodal.py (579 lines) — Major inference module. No tests at all.

Other untested modules (lower priority):

  • src/spark/advisor.py (297 lines)
  • src/spark/eidos.py (297 lines)
  • src/spark/memory.py (313 lines)
  • src/dashboard/routes/chat_api_v1.py (198 lines)
  • src/infrastructure/ws_manager/handler.py (176 lines)
  • src/infrastructure/chat_store.py (153 lines)

Acceptance criteria

  • At minimum: tests for config.py covering default values, env var overrides, and type validation
  • Tests for multimodal.py covering the main code paths with mocked backends

Scope

Large. Should be split into separate tasks per module.

## Problem Two of the largest modules in the codebase have zero test coverage: 1. **src/config.py** (507 lines) — Central configuration. No tests for default values, env var overrides, validation, or edge cases. 2. **src/infrastructure/models/multimodal.py** (579 lines) — Major inference module. No tests at all. Other untested modules (lower priority): - src/spark/advisor.py (297 lines) - src/spark/eidos.py (297 lines) - src/spark/memory.py (313 lines) - src/dashboard/routes/chat_api_v1.py (198 lines) - src/infrastructure/ws_manager/handler.py (176 lines) - src/infrastructure/chat_store.py (153 lines) ## Acceptance criteria - At minimum: tests for config.py covering default values, env var overrides, and type validation - Tests for multimodal.py covering the main code paths with mocked backends ## Scope Large. Should be split into separate tasks per module.
Author
Owner

@kimi — Start with config.py tests only (split the multimodal.py work for later).

Scope: tests for src/config.py

File to test: src/config.py
Test file: tests/test_config_module.py

What to cover:

  1. Default values — instantiate config and verify key defaults are set
  2. Env var overrides — mock os.environ and verify config picks them up
  3. Type validation — ensure numeric/bool fields parse correctly from string env vars
  4. Edge cases — empty strings, missing env vars, invalid types

How to verify:

tox -e unit -- tests/test_config_module.py -v

All tests must pass. Do NOT test multimodal.py in this PR — we will file a separate issue for that.

@kimi — Start with **config.py tests only** (split the multimodal.py work for later). ### Scope: tests for `src/config.py` **File to test:** `src/config.py` **Test file:** `tests/test_config_module.py` ### What to cover: 1. Default values — instantiate config and verify key defaults are set 2. Env var overrides — mock `os.environ` and verify config picks them up 3. Type validation — ensure numeric/bool fields parse correctly from string env vars 4. Edge cases — empty strings, missing env vars, invalid types ### How to verify: ``` tox -e unit -- tests/test_config_module.py -v ``` All tests must pass. Do NOT test multimodal.py in this PR — we will file a separate issue for that.
kimi was assigned by Timmy 2026-03-20 23:12:21 +00:00
kimi was unassigned by Timmy 2026-03-21 01:56:57 +00:00
kimi was assigned by Timmy 2026-03-21 01:57:07 +00:00
Collaborator

PR #693 created. Added tests/test_config_module.py with 48 tests covering: defaults, env var overrides, type validation, edge cases, normalize_ollama_url, _compute_repo_root, model_post_init, check_ollama_model_available, get_effective_ollama_model, validate_startup, and APP_START_TIME. All tests pass (tox -e unit and tox -e pre-push). Multimodal.py tests excluded per instructions.

PR #693 created. Added `tests/test_config_module.py` with 48 tests covering: defaults, env var overrides, type validation, edge cases, `normalize_ollama_url`, `_compute_repo_root`, `model_post_init`, `check_ollama_model_available`, `get_effective_ollama_model`, `validate_startup`, and `APP_START_TIME`. All tests pass (`tox -e unit` and `tox -e pre-push`). Multimodal.py tests excluded per instructions.
kimi closed this issue 2026-03-21 03:54:55 +00:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#648