Skip to content

Commit b121ab1

Browse files
author
MSCodeBase Agent
committed
ci: pip cache + coverage reporting (baseline 41%)
- ci.yml: cache: pip on both setup-python steps (test + clean-state) - test job: pytest --cov=src --cov-report=term-missing (informational, no fail-under threshold yet — don't break CI on first run) - pyproject dev extras: pytest-cov>=7.1.0 (verified installed with pytest 9.0.3) - CircuitBreaker 'dead registration' audit claim refuted: wired directly to embedder (di_container.py:337-345, remote_embedder:483-492)
1 parent 7c5abf5 commit b121ab1

4 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- uses: actions/setup-python@v5
2828
with:
2929
python-version: ${{ matrix.python-version }}
30+
cache: pip
3031

3132
- name: Install system dependencies (Linux)
3233
if: runner.os == 'Linux'
@@ -47,7 +48,7 @@ jobs:
4748
run: python scripts/bump_version.py --check
4849

4950
- name: Full test suite (no filters)
50-
run: python -m pytest tests/ -q --tb=short -m 'not slow and not benchmark'
51+
run: python -m pytest tests/ -q --tb=short -m 'not slow and not benchmark' --cov=src --cov-report=term-missing
5152
timeout-minutes: 10
5253

5354
clean-state:
@@ -57,6 +58,7 @@ jobs:
5758
- uses: actions/setup-python@v5
5859
with:
5960
python-version: "3.12"
61+
cache: pip
6062
- name: Verify clean state (no self-clone)
6163
run: bash scripts/verify_clean_state.sh --no-clone "${{ github.repository }}"
6264
timeout-minutes: 15

AGENT_DIARY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212

1313
---
1414

15+
## [2026-08-04 23:59] — CI: кэш pip + coverage 41% (FIXED)
16+
17+
**Status:** ✅ Fixed (коммит в этой сессии)
18+
**Root Cause:** Next Action #9-#10: CircuitBreaker «dead» — ❌ REFUTED (подключён к embedder напрямую, di_container:337-345); coverage отсутствовал.
19+
**Fix:** ci.yml cache: pip (оба jobs) + --cov=src в test job; pytest-cov>=7.1.0 в dev extras. Baseline 41% (761 passed). Порог не ставил — информационный отчёт.
20+
**Guard:** YAML валиден; pre-commit зелёный; bandit/xdist — defer.
21+
**verified_from_clean_state:** ✅ да — pytest с --cov: 761 passed, 41%.
22+
1523
## [2026-08-04 23:59] — Триаж bare-except: 4 рискованных silent-блока залогированы (PARTIAL)
1624

1725
**Status:** 🟡 partial (коммит в этой сессии)

KNOWN_ISSUES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212

1313
---
1414

15+
## 2026-08-04 — CI: кэш pip + coverage отчёт (baseline 41%) (FIXED)
16+
17+
**Symptom:** нет кэша зависимостей (pip install каждый прогон), нет coverage в CI, нет bandit.
18+
**Verdict:** CircuitBreaker — ❌ REFUTED dead (di_container.py:337-345 подключает breaker к embedder напрямую, remote_embedder:483-492 использует).
19+
**Fix:** ci.yml — `cache: pip` в обоих setup-python (test + clean-state); test job — `--cov=src --cov-report=term-missing`; pyproject dev — `pytest-cov>=7.1.0` (проверено: установлен, работает с pytest 9.0.3). Baseline покрытия: 41% (22437 строк, 761 passed). Порог fail-under не ставился (информационный отчёт, чтобы не сломать CI).
20+
**Status:** ✅ Fixed (коммит в этой сессии) | **Guard:** YAML валиден; bandit/pytest-xdist — defer (шум на 626 except'ах).
21+
1522
## 2026-08-04 — Триаж bare-except: 4 рискованных silent-блока получили логирование (PARTIAL)
1623

1724
**Symptom:** аудит: «107 bare except pass скрывают ошибки».

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ dependencies = [
8585
dev = [
8686
"pytest>=7.4.0",
8787
"pytest-asyncio>=0.21.0",
88+
"pytest-cov>=7.1.0", # CI coverage reporting (проверено: 7.1.0 + pytest 9.0.3)
8889
"ruff>=0.5.0",
8990
"black",
9091
"isort",

0 commit comments

Comments
 (0)