116 lines
6.5 KiB
YAML
116 lines
6.5 KiB
YAML
work_item: ORCH-087
|
||
description: >
|
||
Тест-план для багфикса live-трекера (сироты/заголовок/deploy-цикл),
|
||
эффорта-в-карточке, честного итогового времени. Юнит-тесты — pytest,
|
||
изоляция Telegram через monkeypatch (send/edit/delete не ходят в сеть).
|
||
Интеграция/воспроизведение — на staging (8501). Контракт never-raise
|
||
проверяется отдельными negative-тестами.
|
||
|
||
tests:
|
||
# ---------------- G1: зачистка сирот ----------------
|
||
- id: TC-01
|
||
type: unit
|
||
description: "bump удаляет ВСЕ известные незакрытые message_id задачи, не только последний (мок delete/send)"
|
||
module: tests/test_notifications_orphans.py
|
||
expected: PASS
|
||
- id: TC-02
|
||
type: unit
|
||
description: "send вернул None (нет креды/transient) → учёт прежних message_id не теряется, mid не обнуляется (BR-6 + R-3)"
|
||
module: tests/test_notifications_orphans.py
|
||
expected: PASS
|
||
- id: TC-03
|
||
type: unit
|
||
description: "delete вернул False (transient, >48ч) → message_id остаётся в учёте для повторной попытки; 'already gone' (_DELETE_GONE_MARKERS) → исключается из учёта"
|
||
module: tests/test_notifications_orphans.py
|
||
expected: PASS
|
||
- id: TC-04
|
||
type: unit
|
||
description: "повторные вызовы update_task_tracker подряд (быстрые стадии/гонка) → ровно одна живая карточка, ≤1 send за вызов, без дублей (AC-X.1)"
|
||
module: tests/test_notifications_orphans.py
|
||
expected: PASS
|
||
- id: TC-05
|
||
type: unit
|
||
description: "учёт message_id переживает 'рестарт' (читается из БД) → старые карточки подчищаются при следующем bump (AC-1.3)"
|
||
module: tests/test_notifications_orphans.py
|
||
expected: PASS
|
||
|
||
# ---------------- G2/G3: заголовок и deploy-цикл ----------------
|
||
- id: TC-06
|
||
type: unit
|
||
description: "plane_status_label детерминированно даёт корректный лейбл для всех stage created..done; deploy → 'Awaiting Deploy' (AC-2.2, AC-3.1)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
- id: TC-07
|
||
type: unit
|
||
description: "render_task_tracker: заголовок/статус-строка соответствуют tasks.stage на каждой стадии (нет застывшего To Analyse) (AC-2.1)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
- id: TC-08
|
||
type: unit
|
||
description: "live-overlay рисует Deploying/Monitoring при наличии соответствующего Plane-UUID; деградирует на offline-label при ошибке/выкл. kill-switch (AC-3.2)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
|
||
# ---------------- BR-EFF: эффорт в карточке ----------------
|
||
- id: TC-09
|
||
type: unit
|
||
description: "миграция agent_runs.effort идемпотентна (_ensure_column дважды — без ошибки) (AC-E.1)"
|
||
module: tests/test_db.py
|
||
expected: PASS
|
||
- id: TC-10
|
||
type: unit
|
||
description: "launcher стампит resolve_agent_effort(agent) в agent_runs.effort в момент запуска; значение = фактический --effort (AC-E.1)"
|
||
module: tests/test_launcher.py
|
||
expected: PASS
|
||
- id: TC-11
|
||
type: unit
|
||
description: "строка стадии рендерит эффорт рядом с моделью в выбранном формате; developer=xhigh, tester/deployer=medium, прочие=high (AC-E.2, AC-E.3)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
- id: TC-12
|
||
type: unit
|
||
description: "пустой/неизвестный effort → суффикс эффорта опускается, рендер не падает (AC-E.4)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
|
||
# ---------------- BR-G5: честное время ----------------
|
||
- id: TC-13
|
||
type: unit
|
||
description: "brd_review-окно ~6ч (искусственный застой) → итоговое 'твоё время' НЕ показывает ~6ч (отсечка/активные окна) (AC-5.1)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
- id: TC-14
|
||
type: unit
|
||
description: "agent-время = Σ _duration_seconds(agent_runs) точно; 💰-итоги без регресса (AC-5.2)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
- id: TC-15
|
||
type: unit
|
||
description: "итоговая строка done: wall помечен как 'общее (с ожиданием)' ИЛИ wall сходится с Σ(стадии)+Σ(паузы); числа согласованы (AC-5.3)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
|
||
# ---------------- never-raise / сквозные ----------------
|
||
- id: TC-16
|
||
type: unit
|
||
description: "update_task_tracker / render_task_tracker никогда не поднимают исключение при ошибке Telegram/БД (моки бросают) (AC-X.2)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
- id: TC-17
|
||
type: unit
|
||
description: "ссылки ORCH-067 (plane_issue_link кликабельный номер) и disable_web_page_preview (ORCH-080) сохранены в payload (AC-X.4)"
|
||
module: tests/test_notifications.py
|
||
expected: PASS
|
||
|
||
# ---------------- интеграция / воспроизведение ----------------
|
||
- id: TC-18
|
||
type: integration
|
||
description: "staging-прогон задачи (8501): на каждой стадии зафиксировать (заголовок+тело в Telegram) vs (stage в БД); в чате остаётся одна актуальная карточка без сирот (G0 воспроизведение, AC-0.2, AC-1.1)"
|
||
module: docs/work-items/ORCH-087/06-adr # фиксируется в ADR как таблица воспроизведения
|
||
expected: PASS
|
||
- id: TC-19
|
||
type: integration
|
||
description: "merge-gate: ветка поверх origin/main с ORCH-86; reconciler.py не эродирован (маркеры ORCH-086 на месте), pytest tests/ -q зелёный (AC-6.1, AC-6.2, AC-X.2)"
|
||
module: tests/
|
||
expected: PASS
|