Skip to content

Commit 04d136f

Browse files
author
Harsh Patadia
committed
ci: add coverage gates (backend pytest-cov + frontend vitest thresholds)
Backend: pytest-cov with --cov-fail-under=40 ratchet (currently 43%; drag is the untested Flask API + network-heavy llm/swarm_runner). Frontend: vitest v8 coverage thresholds (stmts 65 / lines 68 / branches 55 / funcs 50) over the unit-tested surface — Result.vue excluded (unmountable; its helpers are mirror-tested in ResultHelpers.test.js). Both wired into CI + ci-local. Also corrected tech_debt: utils/retry.py is NOT dead (imported by utils/llm.py).
1 parent 1f26c4d commit 04d136f

6 files changed

Lines changed: 280 additions & 2060 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
- name: Lint (eslint)
6666
run: npm run lint
6767

68-
- name: Tests
69-
run: npm run test:run
68+
- name: Tests + coverage
69+
run: npm run coverage
7070

7171
- name: Build
7272
run: npm run build

backend/pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ dependencies = [
3333
dev = [
3434
"pytest>=8.0.0",
3535
"pytest-asyncio>=0.23.0",
36+
"pytest-cov>=5.0.0",
3637
"pipreqs>=0.5.0",
3738
]
3839

@@ -44,8 +45,13 @@ build-backend = "hatchling.build"
4445
dev = [
4546
"pytest>=8.0.0",
4647
"pytest-asyncio>=0.23.0",
48+
"pytest-cov>=5.0.0",
4749
]
4850

51+
[tool.pytest.ini_options]
52+
# Coverage is a ratchet floor (current ~43%): prevents regression, raise over time.
53+
addopts = "--cov=app --cov-report=term-missing --cov-fail-under=40"
54+
4955
[tool.hatch.build.targets.wheel]
5056
packages = ["app"]
5157

0 commit comments

Comments
 (0)