Decompose: Break down #28 into implementable work units #29

Closed
opened 2026-05-15 20:44:54 +00:00 by Mark · 2 comments
Owner

Decomposition of #28: [smoke-test] Test coverage review: 132 source files, 17 test files (12.9%)

This issue decomposes the parent feature into independently implementable phases.


P1: Test infrastructure: Install Vitest + React Testing Library + MSW for frontend, pytest + httpx + pytest-asyncio for backend. Add vitest.config.ts, tsconfig references, npm scripts (test, test:watch, test:coverage), CI step. Create shared mocks (vLLM types, Docker SDK stub, Radix UI wrappers).

Files: vitest.config.ts, package.json, tsconfig.json, src/test/setup.ts, src/test/mocks/docker.ts, backend/pytest.ini, backend/requirements-dev.txt

P2: Core domain logic tests: Test model type validation (vllm.ts), Zod validation schemas (model.test.ts — expand coverage), tag/hook logic (useTags, useModels — cover edge cases and error states). These are pure-logic tests needing no browser environment.

Files: src/types/vllm.test.ts, src/lib/validations/model.test.ts, src/hooks/useTags.test.tsx, src/hooks/useModels.test.ts
Depends on: P1

P3: Backend API route tests: FastAPI TestClient tests for models CRUD, container lifecycle endpoints, and metrics SSE endpoint with mocked Docker and database. Cover error paths (404, 409, Docker timeout).

Files: backend/tests/test_models_api.py, backend/tests/test_containers_api.py, backend/tests/test_metrics_api.py, backend/tests/conftest.py
Depends on: P1

P4: Backend service layer tests: docker_manager.py with mocked Docker SDK (test start/stop/restart/logs, error propagation, container state transitions). metrics_collector.py with mocked nvidia-smi subprocess.

Files: backend/tests/test_docker_manager.py, backend/tests/test_metrics_collector.py, backend/tests/test_database.py
Depends on: P2

P5: Critical frontend component tests: Test dialog flows (create/edit model), model-list rendering and filtering, sidebar navigation, SSE-based live status badge. Use MSW to mock backend API. Cover loading, empty, error states.

Files: src/components/dialogs/create-model-dialog.test.tsx, src/components/model-list/model-card.test.tsx, src/components/sidebar/sidebar.test.tsx, src/App.test.tsx
Depends on: P2, P3

P6: Coverage gap fill & CI: Run coverage report, identify remaining uncovered critical paths, add targeted tests to hit 50% threshold. Wire into CI pipeline (Forgejo Actions or whatever CI exists).

Files: vitest.config.ts, .github/workflows/test.yml, backend/conftest.py
Depends on: P5, P4


Post-completion: When each phase is complete, comment on #28 with a summary of what was implemented.

## Decomposition of #28: [smoke-test] Test coverage review: 132 source files, 17 test files (12.9%) This issue decomposes the parent feature into independently implementable phases. --- ### P1: Test infrastructure: Install Vitest + React Testing Library + MSW for frontend, pytest + httpx + pytest-asyncio for backend. Add vitest.config.ts, tsconfig references, npm scripts (test, test:watch, test:coverage), CI step. Create shared mocks (vLLM types, Docker SDK stub, Radix UI wrappers). **Files:** vitest.config.ts, package.json, tsconfig.json, src/test/setup.ts, src/test/mocks/docker.ts, backend/pytest.ini, backend/requirements-dev.txt ### P2: Core domain logic tests: Test model type validation (vllm.ts), Zod validation schemas (model.test.ts — expand coverage), tag/hook logic (useTags, useModels — cover edge cases and error states). These are pure-logic tests needing no browser environment. **Files:** src/types/vllm.test.ts, src/lib/validations/model.test.ts, src/hooks/useTags.test.tsx, src/hooks/useModels.test.ts **Depends on:** P1 ### P3: Backend API route tests: FastAPI TestClient tests for models CRUD, container lifecycle endpoints, and metrics SSE endpoint with mocked Docker and database. Cover error paths (404, 409, Docker timeout). **Files:** backend/tests/test_models_api.py, backend/tests/test_containers_api.py, backend/tests/test_metrics_api.py, backend/tests/conftest.py **Depends on:** P1 ### P4: Backend service layer tests: docker_manager.py with mocked Docker SDK (test start/stop/restart/logs, error propagation, container state transitions). metrics_collector.py with mocked nvidia-smi subprocess. **Files:** backend/tests/test_docker_manager.py, backend/tests/test_metrics_collector.py, backend/tests/test_database.py **Depends on:** P2 ### P5: Critical frontend component tests: Test dialog flows (create/edit model), model-list rendering and filtering, sidebar navigation, SSE-based live status badge. Use MSW to mock backend API. Cover loading, empty, error states. **Files:** src/components/dialogs/create-model-dialog.test.tsx, src/components/model-list/model-card.test.tsx, src/components/sidebar/sidebar.test.tsx, src/App.test.tsx **Depends on:** P2, P3 ### P6: Coverage gap fill & CI: Run coverage report, identify remaining uncovered critical paths, add targeted tests to hit 50% threshold. Wire into CI pipeline (Forgejo Actions or whatever CI exists). **Files:** vitest.config.ts, .github/workflows/test.yml, backend/conftest.py **Depends on:** P5, P4 --- **Post-completion:** When each phase is complete, comment on #28 with a summary of what was implemented.
Author
Owner

Lint errors could not be fully resolved. A new lint-fix tracking issue has been opened: #34

Lint errors could not be fully resolved. A new lint-fix tracking issue has been opened: #34
Mark closed this issue 2026-05-20 19:54:37 +00:00
Author
Owner

blocked:lint-failed — pre-existing lint errors. Lint-fix issue filed: vllm_mm#34.

blocked:lint-failed — pre-existing lint errors. Lint-fix issue filed: vllm_mm#34.
Sign in to join this conversation.
No description provided.