Files
orchestrator/docs/work-items/ORCH-120/04-test-plan.yaml
claude-bot 432da2c4ed
All checks were successful
CI / test (push) Successful in 1m13s
analyst(ET): auto-commit from analyst run_id=777
2026-06-17 12:45:52 +03:00

89 lines
5.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
work_item: ORCH-120
stage: analysis
author_agent: analyst
status: ready-for-review
created_at: 2026-06-17
model_used: claude-opus-4-8
title: "Аналитик: открытые вопросы → Needs Input (приоритет, неблокирование serial-gate, resume)"
framework: pytest
scope: >
Покрывает поток «блокирующие открытые вопросы аналитика → Needs Input»:
приоритет ветки вопросов над «файлы готовы» (_handle_analysis_approved_flow),
неблокирование per-repo serial-gate (ось паузы ORCH-124), resume+unpark,
гигиена устаревшего 01-questions.md, контракт промпта и канон артефакта,
never-raise и нулевая регрессия. Вне покрытия: расширение Needs Input на
других агентов, новые QG/рёбра STAGE_TRANSITIONS, авто-ответ на вопросы.
notes: >
TC-01 — ОБЯЗАТЕЛЬНЫЙ регресс-тест: красный на коде ДО фикса (ветка files_ok
побеждает → In Review), зелёный ПОСЛЕ. Тесты движка прогоняют
_handle_analysis_approved_flow напрямую (launcher-путь), мокая plane_sync-
сеттеры и используя временный worktree (паттерн tests/test_analyst_status_only_regression.py
и tests/test_auto_approve_brd.py). Полный регресс pytest tests/ остаётся зелёным.
tests:
- id: TC-01
type: unit
description: "РЕГРЕСС: 4 файла + активный 01-questions.md одновременно -> set_issue_needs_input вызван, note=='analysis-needs-input', set_issue_in_review НЕ вызван (приоритет вопросов, AC-1). Красный до фикса."
module: tests/test_orch120_analyst_needs_input.py
expected: PASS
- id: TC-02
type: unit
description: "01-questions.md есть, 4 файлов нет -> Needs Input, текст вопросов в Plane-комментарии и Telegram (AC-2, сохранение существующего поведения)."
module: tests/test_orch120_analyst_needs_input.py
expected: PASS
- id: TC-03
type: unit
description: "Happy-path: нет 01-questions.md, 4 файла на месте -> set_issue_in_review, note=='analysis-in-review', запрос статуса Approved (AC-3, нет регресса)."
module: tests/test_orch120_analyst_needs_input.py
expected: PASS
- id: TC-04
type: integration
description: "Задача A в analysis переведена в Needs Input (paused_at NOT NULL) -> serial_gate исключает её из активного предиката; задача B того же репо может войти в analysis (AC-4, неблокирование FIFO)."
module: tests/test_orch120_serial_gate_needs_input.py
expected: PASS
- id: TC-05
type: integration
description: "Resume: возврат issue в рабочий статус на analysis при отсутствии активного job -> handle_status_start снимает паузу (paused_at->NULL) и enqueue'ит analyst-job; relaunch-guard ORCH-090 (только analysis) соблюдён (AC-5)."
module: tests/test_orch120_resume_unpark.py
expected: PASS
- id: TC-06
type: unit
description: "Гигиена устаревания: перезапущенный аналитик выпустил полный валидный пакет без свежих вопросов -> In Review, НЕ повторный Needs Input; supersede-правило детерминировано и offline (AC-6)."
module: tests/test_orch120_analyst_needs_input.py
expected: PASS
- id: TC-07
type: unit
description: "Анти-дрейф промпта: .openclaw/agents/analyst.md документирует канал 01-questions.md (блокирующие вопросы -> Needs Input, не фабриковать deliverables) и сохраняет канон 52d (5 секций, 6 полей, без model:) (AC-7)."
module: tests/test_agent_prompts_canon.py
expected: PASS
- id: TC-08
type: unit
description: "Канон артефакта: docs/_templates/01-questions.md существует и docs/_standards/PIPELINE_DOCS.md содержит строку манифеста для 01-questions.md (владелец analyst, when-applicable, не machine-verdict) (AC-8)."
module: tests/test_orch120_questions_artifact_canon.py
expected: PASS
- id: TC-09
type: unit
description: "never-raise: сбой новой логики (ошибка чтения 01-questions.md / park-вызова) не роняет advance_stage, деградирует к безопасному прежнему поведению + WARNING (AC-10)."
module: tests/test_orch120_analyst_needs_input.py
expected: PASS
- id: TC-10
type: unit
description: "Обратимость: kill-switch выключен ИЛИ репо вне self-hosting (enduro-trails) -> ветвление _handle_analysis_approved_flow и serial-gate байт-в-байт как до ORCH-120 (AC-9)."
module: tests/test_orch120_analyst_needs_input.py
expected: PASS
- id: TC-11
type: integration
description: "Полный регресс pytest tests/ зелёный; STAGE_TRANSITIONS/QG_CHECKS/check_* снапшот не изменён (AC-11, NFR-2)."
module: tests/test_stage_transitions_snapshot.py
expected: PASS