deployer(ORCH-016): staging gate SUCCESS (10/10 checks PASS)
Ran scripts/staging_check.py --base-url http://localhost:8501 --mode stub against the live orchestrator-staging instance. All blocks green: - SMOKE (A1-A3): health, queue, ORCH_STAGING=true - ACCESS (B4-B6): Plane sandbox, Gitea sandbox, registry isolation - E2E (C7-C9b): webhook -> branch -> analyst job enqueued - CLEANUP: branch + Plane issue deleted, no leftover task rows Verdict (machine-readable, YAML frontmatter): staging_status: SUCCESS Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
97
docs/work-items/ORCH-016/15-staging-log.md
Normal file
97
docs/work-items/ORCH-016/15-staging-log.md
Normal file
@@ -0,0 +1,97 @@
|
||||
---
|
||||
staging_status: SUCCESS
|
||||
timestamp: 2026-06-05T12:47:48Z
|
||||
base_url: http://localhost:8501
|
||||
work_item: ORCH-016
|
||||
branch: feature/ORCH-016-plane
|
||||
mode: stub
|
||||
---
|
||||
|
||||
# Staging Gate Log — ORCH-016
|
||||
|
||||
## Verdict
|
||||
|
||||
**`staging_status: SUCCESS`** — staging test suite completed, all 10/10 checks PASS.
|
||||
|
||||
## Окружение
|
||||
|
||||
- **Base URL:** `http://localhost:8501` (orchestrator-staging)
|
||||
- **Mode:** `stub` (без LLM-spend; проверяет ранние артефакты pipeline — branch + queued analyst job)
|
||||
- **Suite:** `scripts/staging_check.py` (ORCH-33)
|
||||
- **Sandbox project:** `8c5a3025-4f9d-4190-b79f-fa06276bb27e` (ORCH Sandbox)
|
||||
- **Repo под тест:** `orchestrator-sandbox`
|
||||
|
||||
## Результаты (10/10 PASS)
|
||||
|
||||
### Block A — SMOKE
|
||||
| ID | Проверка | Результат |
|
||||
|----|----------|-----------|
|
||||
| A1 | `GET /health` → 200, `status=ok` | ✓ PASS |
|
||||
| A2 | `GET /queue` → 200, ключи `counts/max_concurrency/resilience` | ✓ PASS |
|
||||
| A3 | `ORCH_STAGING=true` (защита от прод-окружения) | ✓ PASS |
|
||||
|
||||
### Block B — ACCESS
|
||||
| ID | Проверка | Результат |
|
||||
|----|----------|-----------|
|
||||
| B4 | Plane: sandbox project accessible (5 projects, sandbox=YES) | ✓ PASS |
|
||||
| B5 | Gitea: `orchestrator-sandbox` доступен, `push=true` | ✓ PASS |
|
||||
| B6 | Registry: sandbox в known IDs, prod ET/ORCH отсутствуют | ✓ PASS |
|
||||
|
||||
### Block C — E2E (mode=stub)
|
||||
| ID | Проверка | Результат |
|
||||
|----|----------|-----------|
|
||||
| C7 | Create issue in Plane SANDBOX → HTTP 201, `issue_id=37d91fba-5ac1-460b-ab06-a13f963911bc` | ✓ PASS |
|
||||
| C8 | Trigger pipeline via `POST /webhook/plane` (с HMAC) → HTTP 200, `status=accepted` | ✓ PASS |
|
||||
| C9a | Branch появилась в `orchestrator-sandbox` → `feature/SANDBOX-009-staging-check-e2e-20260605t124` | ✓ PASS |
|
||||
| C9b | Analyst job в очереди staging (`/queue` → recent) → `job_id=5, status=queued, agent=analyst` | ✓ PASS |
|
||||
|
||||
### Cleanup
|
||||
- Удалена тестовая ветка в Gitea (HTTP 204).
|
||||
- Удалён тестовый Plane issue (HTTP 204).
|
||||
- DB-cleanup: task row отсутствовал (нормально для stub-mode), dedup-таблица отсутствует (некритично).
|
||||
|
||||
## Что значит "SUCCESS" для ORCH-016
|
||||
|
||||
ORCH-016 — это унификация финальных коммент-логов агентов (`usage.build_status_comment` + длительность). Изменения затрагивают:
|
||||
- `src/usage.py` — расширен билдер коммента (длительность, defensive формат).
|
||||
- `src/agents/launcher.py` — пробрасывает `duration_s` из `_monitor_agent` в `_post_usage_comments`.
|
||||
- `src/stage_engine.py` — для analyst-стадии использует DB-fallback `usage.get_agent_duration(task_id, agent)`.
|
||||
- `src/frontmatter.py` — defensive `read_frontmatter_value(...)`.
|
||||
|
||||
Staging-стенд (orchestrator-staging) поднят на актуальном образе и:
|
||||
1. Принимает Plane-webhook (HMAC OK).
|
||||
2. Корректно фильтрует проекты через registry (B6 — sandbox разрешён, прод ET/ORCH отрезаны).
|
||||
3. Дотягивает pipeline до постановки analyst job в персистентную очередь (ORCH-1) и создания ветки в Gitea.
|
||||
|
||||
Поведение коммент-логов в реальном e2e (mode=full-real) НЕ проверялось — это требует LLM-spend и реального запуска агентов. В рамках staging-gate для ORCH-016 это считается достаточным: финальный коммент строится из артефактов (`12-review.md`, `13-test-report.md`, ...) и uses-данных из `agent_runs`, которые уже покрыты unit-тестами в `tests/`.
|
||||
|
||||
## Откат не требуется
|
||||
|
||||
Все 10 проверок зелёные → переход на стадию `deploy` разрешён. Прод-контейнер `orchestrator` (8500) в рамках этой стадии НЕ перезапускался (правило self-hosting, `CLAUDE.md`).
|
||||
|
||||
## Команда запуска (для воспроизведения)
|
||||
|
||||
```bash
|
||||
# Загрузить .env.staging БЕЗ shell-source (JSON-значения ломают bash):
|
||||
python3 -c "
|
||||
import os, subprocess
|
||||
env = dict(os.environ)
|
||||
with open('/repos/orchestrator/.env.staging') as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if not line or line.startswith('#') or '=' not in line:
|
||||
continue
|
||||
k, _, v = line.partition('=')
|
||||
env[k.strip()] = v.strip()
|
||||
r = subprocess.run(
|
||||
['python3', 'scripts/staging_check.py',
|
||||
'--base-url', 'http://localhost:8501', '--mode', 'stub'],
|
||||
env=env,
|
||||
)
|
||||
exit(r.returncode)
|
||||
"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
*Stage: `deploy-staging` → `deploy`. Quality Gate `check_staging_status` ожидает `staging_status: SUCCESS` в frontmatter этого файла.*
|
||||
Reference in New Issue
Block a user