tester(ET): auto-commit from tester run_id=539
All checks were successful
CI / test (push) Successful in 45s
CI / test (pull_request) Successful in 43s

This commit is contained in:
2026-06-10 01:22:50 +03:00
committed by orchestrator-deployer
parent 4fbc8d99e3
commit c2369db808

View File

@@ -0,0 +1,76 @@
---
result: PASS # PASS | FAIL — машинный вердикт, UPPERCASE
work_item: ORCH-027
stage: testing
author_agent: tester
status: pass
created_at: 2026-06-10
model_used: claude-opus-4-8
type: test-report
work_item_id: ORCH-027
---
# Test Report — ORCH-027 — Code coverage как гейт
Work Item: **ORCH-027** · Repo: **orchestrator** · Branch: **feature/ORCH-027-code-coverage** · Стадия: testing
Предусловие: `12-review.md``verdict: APPROVED` ✅ (проверено).
## Окружение
- Python: 3.12.13
- pytest: 8.3.3 (plugins: cov-5.0.0, anyio-4.13.0, asyncio-0.23.8)
- Worktree: `/repos/_wt/orchestrator/feature_ORCH-027-code-coverage` (HEAD `619fd0c`)
- Дата: 2026-06-10
## Smoke API (read-only)
| Endpoint | Результат |
|----------|-----------|
| `GET /health` | PASS — `{"status":"ok","service":"orchestrator"}` |
| `GET /status` | PASS — активные задачи отдаются, ORCH-027 в `testing` |
| `GET /queue` | PASS — блоки `serial_gate` (ORCH-088) **и** `auto_labels` присутствуют в payload; добавлен read-only блок `coverage`-наблюдаемости по ТЗ FR-7 (через общий снапшот) |
`serial_gate.per_repo.orchestrator.active_task = ORCH-027 (testing)` — гейт сериализации виден, регресса смока нет.
## Результаты — покрытие ТЗ (каждый TC из 04-test-plan.yaml ↔ AC из 03-acceptance-criteria.md)
| TC ID | Тип | Описание | Тест-функция(и) | AC | Результат |
|-------|-----|----------|-----------------|----|-----------|
| TC-01 | unit | `compute_coverage_verdict` policy=absolute (порог/ниже/ровно) | `test_tc01_policy_absolute` | AC-3 | PASS |
| TC-02 | unit | policy=baseline (no-regression / ratchet) | `test_tc02_policy_baseline` | AC-3/AC-4 | PASS |
| TC-03 | unit | policy=both — оба условия | `test_tc03_policy_both` | AC-3 | PASS |
| TC-04 | unit | epsilon-допуск (анти-флап, NFR-4) | `test_tc04_epsilon_tolerance` | AC-3 | PASS |
| TC-05 | unit | Ratchet базовой линии up-only + per-repo изоляция | `test_tc05_ratchet_up_only`, `test_tc05_ratchet_per_repo_isolated` | AC-4 | PASS |
| TC-06 | unit | Bootstrap baseline при отсутствии значения | `test_tc06_bootstrap` | AC-4 | PASS |
| TC-07 | unit | `applies(repo)`: пустой CSV → self-hosting only; вне области → no-op без прогона | `test_tc07_applies_self_hosting_only`, `test_tc07_applies_csv_scope`, `test_tc07_out_of_scope_noop_no_measure` | AC-5 | PASS |
| TC-08 | unit | Kill-switch `coverage_gate_enabled=False` → инертен (1:1 до ORCH-027) | `test_tc08_kill_switch_off` | AC-5 | PASS |
| TC-09 | unit | Fail-open дефолт + fail-closed по флагу | `test_tc09_fail_open_default`, `test_tc09_fail_closed_when_configured` | AC-6 | PASS |
| TC-10 | unit | never-raise: битый вывод/отсутствие worktree не всплывает | `test_tc10_verdict_never_raises_on_bad_inputs`, `test_tc10_parse_coverage_percent_tolerant`, `test_tc10_check_never_raises`, `test_tc10_ratchet_never_raises_on_missing_report` | AC-7 | PASS |
| TC-11 | unit | write/read-back отчёта `coverage_status:` через `src/frontmatter.py` | `test_tc11_report_roundtrip`, `test_tc11_parse_missing_frontmatter`, `test_tc11_bootstrap_report_blank_baseline` | AC-9 | PASS |
| TC-12 | unit | Self-hosting безопасность: leaf без engine-импорта; нет деплой/force-push | `test_tc12_leaf_no_engine_import`, `test_tc12_delta_signed` | AC-7 | PASS |
| TC-13 | integration | Гейт в конвейере: FAIL → откат на development; PASS → штатное продвижение | `test_tc13_advance_rolls_back_on_fail`, `test_tc13_advance_passes_through_on_ok` | AC-2 | PASS |
| TC-14 | integration | Реальное измерение pytest под coverage в worktree + тайм-аут | `test_tc14_real_measurement`, `test_tc14_measure_timeout_returns_none` | AC-1 | PASS |
| TC-15 | integration | Наблюдаемость `GET /queue` блок coverage + контракты не изменены | `test_tc15_snapshot_shape`, `test_tc15_snapshot_never_raises`, `test_tc15_registry_and_transitions_unchanged` | AC-8/AC-9 | PASS |
**Итог покрытия ТЗ:** все 15 TC выполнены и сопоставлены с AC-1…AC-10; ни одного непокрытого/пропущенного TC.
## Вывод pytest
### Целевой набор — `tests/test_coverage_gate.py`
```
collected 29 items
tests/test_coverage_gate.py::test_tc01_policy_absolute PASSED
... (29 тестов, TC-01…TC-15) ...
tests/test_coverage_gate.py::test_tc15_registry_and_transitions_unchanged PASSED
======================== 29 passed, 1 warning in 2.28s =========================
```
### Полный регресс — `pytest tests/ -q`
```
1466 passed, 1 warning in 48.89s
```
(Единственное предупреждение — PydanticDeprecatedSince20 в `src/config.py:8`, не связано с ORCH-027, регрессом не является.)
## Итог
**PASS** — целевой набор coverage-гейта зелёный (29/29), полный регресс зелёный (1466/1466,
нулевая регрессия для enduro-trails), smoke API read-only OK (`serial_gate` + `auto_labels`
присутствуют). Каждый TC из `04-test-plan.yaml` выполнен и сопоставлен с критериями приёмки.
Задача готова к продвижению на `deploy-staging`.