test(ET-001): test report — PASS
All checks were successful
All checks were successful
All 8 pytest cases pass, ruff clean on src/ and tests/. 5/5 test plan TCs covered (TC-001..TC-005). No P0/P1/P2 bugs. Verdict: PASS → stage:ready-to-deploy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
143
docs/work-items/ET-001/13-test-report.md
Normal file
143
docs/work-items/ET-001/13-test-report.md
Normal file
@@ -0,0 +1,143 @@
|
||||
---
|
||||
type: test-report
|
||||
work_item_id: ET-001
|
||||
version: 1
|
||||
status: pass
|
||||
tester: "agent:tester"
|
||||
date: 2026-05-15
|
||||
commit_tested: d171629
|
||||
verdict: PASS
|
||||
---
|
||||
|
||||
# Test Report — ET-001
|
||||
|
||||
## Verdict: **PASS** → `stage:ready-to-deploy`
|
||||
|
||||
Все 8 тестов прошли, lint чистый, тест-окружение (test) отвечает 200.
|
||||
Все 5 тест-кейсов из `04-test-plan.yaml` покрыты автоматизированными
|
||||
тестами и прошли успешно. Блокирующих багов (P0/P1) не найдено.
|
||||
|
||||
## Окружение
|
||||
|
||||
- **Дата прогона:** 2026-05-15
|
||||
- **Ветка:** `feature/ET-001-barriers-footways`
|
||||
- **Коммит:** `d171629` (review(ET-001): code review — APPROVED)
|
||||
- **Python:** 3.10.12
|
||||
- **pytest:** 9.0.3 (plugins: anyio-4.13.0, asyncio-1.3.0)
|
||||
- **ruff:** через `python3 -m ruff`
|
||||
- **test-env:** https://openclaw.mva154.duckdns.org/enduro/ → HTTP 200
|
||||
|
||||
## Healthcheck
|
||||
|
||||
| Среда | URL | Код |
|
||||
|---|---|---|
|
||||
| local dev | http://localhost:5556/health | connection refused (dev не поднят — ОК, прогон оффлайн) |
|
||||
| test | https://openclaw.mva154.duckdns.org/enduro/ | 200 |
|
||||
|
||||
## Команды запуска
|
||||
|
||||
```bash
|
||||
# Unit + integration
|
||||
python3 -m pytest tests/ -v
|
||||
|
||||
# Lint
|
||||
python3 -m ruff check src/
|
||||
python3 -m ruff check tests/
|
||||
```
|
||||
|
||||
## Результаты pytest
|
||||
|
||||
`python3 -m pytest tests/ -v` → **8 passed, 1 warning in 0.64s**
|
||||
|
||||
| # | Тест | Тип | Результат |
|
||||
|---|---|---|---|
|
||||
| 1 | `tests/integration/test_routing_barriers.py::test_lua_syntax` | unit (структурная проверка lua) | **PASS** |
|
||||
| 2 | `tests/integration/test_routing_barriers.py::test_blocked_barriers_match_trz` | static AC | **PASS** |
|
||||
| 3 | `tests/integration/test_routing_barriers.py::test_excluded_highways_match_trz` | static AC | **PASS** |
|
||||
| 4 | `tests/integration/test_routing_barriers.py::test_route_avoids_barrier` | integration | **PASS** |
|
||||
| 5 | `tests/integration/test_routing_barriers.py::test_route_no_footway` | integration | **PASS** |
|
||||
| 6 | `tests/integration/test_routing_barriers.py::test_route_allows_cattle_grid` | integration | **PASS** |
|
||||
| 7 | `tests/integration/test_routing_barriers.py::test_existing_route_works` | regression | **PASS** |
|
||||
| 8 | `tests/unit/test_health.py::test_health_endpoint` | unit | **PASS** |
|
||||
|
||||
Предупреждение: `PendingDeprecationWarning: Please use 'import python_multipart' instead`
|
||||
из `starlette/formparsers.py` — внешняя зависимость, к ET-001 отношения не имеет, не блокирует.
|
||||
|
||||
## Результаты lint
|
||||
|
||||
| Команда | Результат |
|
||||
|---|---|
|
||||
| `python3 -m ruff check src/` | **All checks passed!** |
|
||||
| `python3 -m ruff check tests/` | **All checks passed!** |
|
||||
|
||||
## Покрытие тест-плана (04-test-plan.yaml)
|
||||
|
||||
| TC | Title | Покрывающий тест | Тип | Статус |
|
||||
|---|---|---|---|---|
|
||||
| **TC-001** | Маршрут обходит шлагбаум | `test_route_avoids_barrier` | integration | **PASS** |
|
||||
| **TC-002** | Маршрут не идёт по тротуару | `test_route_no_footway` | integration | **PASS** |
|
||||
| **TC-003** | cattle_grid не блокирует маршрут | `test_route_allows_cattle_grid` | integration | **PASS** |
|
||||
| **TC-004** | Lua профиль — синтаксис | `test_lua_syntax` (структурная проверка, `luac` в окружении отсутствует) | unit | **PASS** |
|
||||
| **TC-005** | Существующий маршрут не сломан | `test_existing_route_works` | regression | **PASS** |
|
||||
|
||||
**Покрытие: 5/5 (100%)**
|
||||
|
||||
Дополнительно прогнаны два статических AC-теста
|
||||
(`test_blocked_barriers_match_trz`, `test_excluded_highways_match_trz`),
|
||||
сверяющих состав таблиц `blocked_barriers` / `excluded_highways` с ТЗ
|
||||
(AC-1 / AC-2). Оба — PASS.
|
||||
|
||||
## Соответствие Acceptance Criteria
|
||||
|
||||
| AC | Описание | Источник проверки | Статус |
|
||||
|---|---|---|---|
|
||||
| AC-1 | Шлагбаумы заблокированы (`mode.inaccessible`) | `test_blocked_barriers_match_trz` + integration | **PASS** |
|
||||
| AC-2 | Тротуары исключены из графа | `test_excluded_highways_match_trz` + `test_route_no_footway` | **PASS** |
|
||||
| AC-3 | Скрипт пересборки `scripts/rebuild-osrm.sh` | проверено reviewer'ом в 12-review.md | **PASS** |
|
||||
| AC-4 | ≥3 integration тестов, pytest green | прогон pytest (4 интеграционных + регрессия) | **PASS** |
|
||||
| AC-5 | `ruff check` 0 ошибок, Lua синтаксически корректен | `ruff check src/`, `ruff check tests/`, структурная Lua-проверка | **PASS** (с оговоркой: `luac -p` в окружении тестера не установлен — финальная проверка в CI) |
|
||||
| AC-6 | Обратная совместимость | `test_existing_route_works` | **PASS** |
|
||||
|
||||
## Найденные баги
|
||||
|
||||
### P0 (блокирующие)
|
||||
Нет.
|
||||
|
||||
### P1 (критические)
|
||||
Нет.
|
||||
|
||||
### P2 (важные)
|
||||
Нет.
|
||||
|
||||
### P3 (косметика)
|
||||
Зафиксированы reviewer'ом в `12-review.md` (раздел «Замечания»):
|
||||
|
||||
1. В `tests/integration/test_routing_barriers.py:47–50` — `BARRIER_NODE`
|
||||
собирается через `float(os.environ.get(..., "0")) or None`: легитимный
|
||||
ввод `"0"` превратится в `None`. Защищено явной проверкой ниже,
|
||||
функционально безопасно — но косметически некорректно. **Не блокирует.**
|
||||
2. `test_route_no_footway` использует слабую эвристику по подстроке в
|
||||
`step.name` — TC-002 на уровне маршрута проверяется тонко, но на уровне
|
||||
графа footway уже выкинут (AC-2 закрыт статически). **Не блокирует.**
|
||||
3. `infra/osrm/enduro.lua:9` — `api_version = 4` без `local` (требование
|
||||
OSRM API, не баг). **Не блокирует.**
|
||||
|
||||
## Замечания тестера
|
||||
|
||||
- Полный `luac -p infra/osrm/enduro.lua` (TC-004 буквально из плана) —
|
||||
не запущен: `luac` в окружении тестера отсутствует. Использована
|
||||
структурная проверка из `test_lua_syntax`, она проходит. Финальная
|
||||
бинарная проверка синтаксиса будет выполнена в CI с установленным
|
||||
lua-runtime, а также фактически валидируется OSRM при `osrm-extract`
|
||||
на mva154 во время пересборки графа (`scripts/rebuild-osrm.sh`).
|
||||
Риск — низкий: код проверен reviewer'ом, структура корректна.
|
||||
- Прогон выполнен против локального репозитория без поднятого dev-сервера.
|
||||
Интеграционные тесты использовали реальный OSRM по адресам из env —
|
||||
все 4 фактически выполнились (статус PASSED, а не SKIPPED), что
|
||||
подтверждено также в 12-review.md.
|
||||
|
||||
## Итог
|
||||
|
||||
**Verdict: PASS.** Готово к деплою. Следующий шаг — `stage:ready-to-deploy`
|
||||
и ручная пересборка OSRM-графа на mva154 согласно
|
||||
`07-infra-requirements.md`.
|
||||
Reference in New Issue
Block a user