Decompose: Break down #28 into implementable work units #29
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:preflight
blocked:verify-failed
bug
feature-request
in-progress
lint-cleanup
ops-task
quickfix
security/high
security/medium
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/vllm_mm#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
Lint errors could not be fully resolved. A new lint-fix tracking issue has been opened: #34
blocked:lint-failed — pre-existing lint errors. Lint-fix issue filed: vllm_mm#34.