110 lines
4.3 KiB
YAML
110 lines
4.3 KiB
YAML
work_item: ORCH-059
|
||
title: Approve прод-деплоя через выделенный статус «Confirm Deploy»
|
||
repo: orchestrator
|
||
stage: analysis
|
||
|
||
# Контракт-тесты: триггер прод-деплоя смещается с перегруженного `Approved`
|
||
# на выделенный статус `Confirm Deploy`. Деплой и сетевые вызовы мокаются.
|
||
tests:
|
||
- id: TC-01
|
||
type: unit
|
||
description: "_PLANE_NAME_TO_KEY содержит маппинг 'Confirm Deploy' -> 'confirm_deploy'"
|
||
module: tests/test_plane_states.py
|
||
expected: PASS
|
||
|
||
- id: TC-02
|
||
type: unit
|
||
description: >-
|
||
get_project_states для проекта ORCH (мок API со статусом 'Confirm Deploy')
|
||
возвращает непустой UUID под ключом 'confirm_deploy', отличный от 'approved'
|
||
module: tests/test_plane_states.py
|
||
expected: PASS
|
||
|
||
- id: TC-03
|
||
type: unit
|
||
description: >-
|
||
Fail-closed: при отсутствии статуса 'Confirm Deploy' (fallback _DEFAULT_STATES /
|
||
недоступный API) доступ к ключу confirm_deploy не выбрасывает исключение
|
||
и не активирует ветку confirm-deploy
|
||
module: tests/test_plane_states.py
|
||
expected: PASS
|
||
|
||
- id: TC-04
|
||
type: unit
|
||
description: >-
|
||
handle_issue_updated: статус 'Confirm Deploy' на задаче стадии deploy
|
||
маршрутизируется на путь Фазы B (а не на обычный approve/advance)
|
||
module: tests/test_plane_confirm_deploy.py
|
||
expected: PASS
|
||
|
||
- id: TC-05
|
||
type: unit
|
||
description: >-
|
||
handle_verdict/Approved на стадии deploy НЕ вызывает self_deploy.initiate_deploy
|
||
(initiate_deploy замокан и не должен быть вызван)
|
||
module: tests/test_plane_confirm_deploy.py
|
||
expected: PASS
|
||
|
||
- id: TC-06
|
||
type: unit
|
||
description: >-
|
||
Approved на стадии analysis по-прежнему продвигает analysis -> architecture
|
||
(approved-via-status, регрессия гейта check_analysis_approved)
|
||
module: tests/test_plane_confirm_deploy.py
|
||
expected: PASS
|
||
|
||
- id: TC-07
|
||
type: unit
|
||
description: >-
|
||
stage_engine: блок Фазы B (current_stage==deploy, finished_agent is None)
|
||
инициирует deploy ТОЛЬКО по сигналу confirm-deploy; Approved-сигнал -> no-op
|
||
module: tests/test_stage_engine_phase_b.py
|
||
expected: PASS
|
||
|
||
- id: TC-08
|
||
type: unit
|
||
description: >-
|
||
Идемпотентность: при существующем маркере 'initiated' повторный
|
||
Confirm Deploy не вызывает initiate_deploy (self-deploy-already-initiated)
|
||
module: tests/test_stage_engine_phase_b.py
|
||
expected: PASS
|
||
|
||
- id: TC-09
|
||
type: unit
|
||
description: >-
|
||
CTA Фазы A (_handle_self_deploy_phase_a): текст Plane-комментария и Telegram
|
||
содержат 'Confirm Deploy' и не предлагают 'Approved' как триггер деплоя
|
||
module: tests/test_stage_engine_phase_a_cta.py
|
||
expected: PASS
|
||
|
||
- id: TC-10
|
||
type: integration
|
||
description: >-
|
||
E2E (мок Plane API + self_deploy): задача на deploy -> webhook Confirm Deploy
|
||
-> initiate_deploy вызван, deploy-finalizer поставлен, маркер initiated записан
|
||
module: tests/test_confirm_deploy_integration.py
|
||
expected: PASS
|
||
|
||
- id: TC-11
|
||
type: integration
|
||
description: >-
|
||
E2E: задача на deploy -> webhook Approved -> прод-деплой НЕ инициирован,
|
||
задача остаётся на deploy (нет отката, нет advance в done)
|
||
module: tests/test_confirm_deploy_integration.py
|
||
expected: PASS
|
||
|
||
- id: TC-12
|
||
type: integration
|
||
description: >-
|
||
Условность: для не-self репозитория verdict-статусы на deploy не меняют
|
||
поведение деплоя (self_deploy_applies == False)
|
||
module: tests/test_confirm_deploy_integration.py
|
||
expected: PASS
|
||
|
||
regression:
|
||
- id: RG-01
|
||
type: integration
|
||
description: "pytest tests/ -q зелёный; STAGE_TRANSITIONS и QG_CHECKS без изменений"
|
||
module: tests/
|
||
expected: PASS
|