6.1 KiB
type, work_item_id, result
| type | work_item_id | result |
|---|---|---|
| test-report | ORCH-040 | PASS |
Test Report — ORCH-040
Тема: agent-файлы конвейера создаются под uid хоста (1000:1000, slin),
а не root:root. Реализация — Вариант 1 (user: "1000:1000" в обоих
compose-сервисах), правка только в docker-compose.yml + тесты.
Окружение
- Python: 3.12.13
- pytest: 8.3.3
- Сервис (prod 8500):
/health→ 200{"status":"ok"}; preflight_ok=true (2.1.142 (Claude Code)) - Дата: 2026-06-06T15:06:25Z
- Ветка: feature/ORCH-040-root-git
Smoke test API (read-only GET, прод-контейнер не трогался)
| Endpoint | Результат |
|---|---|
| GET /health | 200 — {"status":"ok","service":"orchestrator"} |
| GET /status | 200 — активная задача ORCH-040 (stage=testing) |
| GET /queue | 200 — counts ok, max_concurrency=1, breaker=closed, preflight_ok=true |
curl в окружении тестера отсутствует; smoke выполнен эквивалентным запросом через
python -m urllib.request(только GET, без побочных эффектов).
Результаты (по 04-test-plan.yaml)
| TC ID | Описание | Тип | Результат |
|---|---|---|---|
| TC-01 | compose: оба сервиса user: "1000:1000" (Вариант 1) |
unit | PASS |
| TC-02 | compose: оба сервиса сохраняют group_add: ["999"] (МИНА 1, docker.sock) |
unit | PASS |
| TC-03 | compose: SSH-маунт target под /home/slin/.ssh, согласован с HOME |
unit | PASS |
| TC-04 | launcher: форсимый HOME совместим с claude/SSH-маунтами (/home/slin) |
unit | PASS |
| TC-05 | полный регресс pytest tests/ зелёный (нет регресса конвейера/launcher) |
unit | PASS (501 passed) |
| TC-06 | staging E2E: артефакты worktree/docs создаются 1000:1000 (AC-1) |
integration | DEFERRED → deploy-staging |
| TC-07 | хост под slin: git pull/status/reset без Permission denied (AC-2) |
integration | DEFERRED → deploy-staging |
| TC-08 | claude preflight/auth под uid 1000, агент exit_code=0 (AC-3, МИНА 2) | integration | DEFERRED → deploy-staging |
| TC-09 | docker.sock + ssh-деплой под uid 1000 (AC-4, AC-5) | integration | DEFERRED → deploy-staging |
О TC-06…TC-09: по дизайну test-plan'а это ops/integration-проверки на
staging (8501) и хосте, касающиеся прав ФС хоста и docker-рантайма. Они
относятся к стадии deploy-staging (их PASS фиксируется в 15-staging-log.md,
staging_status:) и не воспроизводимы в окружении стадии testing без
рестарта контейнера под новым uid. Это совпадает с замечанием ревью
(12-review.md, P3): runtime/host-критерии AC-1…AC-5 подтверждаются на
deploy-staging, а не при тестировании кода. Запуск деструктивных операций /
рестарт self в рамках стадии testing запрещён (CLAUDE.md, self-hosting).
Покрытие критериев приёмки (03-acceptance-criteria.md)
| AC | Статус на стадии testing |
|---|---|
| AC-1 (артефакты под uid хоста) | runtime — проверяется на deploy-staging |
| AC-2 (git под slin) | runtime — проверяется на deploy-staging |
| AC-3 (claude preflight ok) | preflight_ok=true в /queue; полное E2E — deploy-staging |
| AC-4 (docker.sock доступен) | конфиг подтверждён TC-02; runtime — deploy-staging |
| AC-5 (SSH-деплой) | конфиг подтверждён TC-03; runtime — deploy-staging |
| AC-6 (конвейер без регресса, pytest зелёный) | PASS — 501 passed |
| AC-7 (проверено на staging до прода) | стадия deploy-staging |
| AC-8 (документация/ADR обновлены) | PASS — подтверждено ревью (APPROVED) |
| AC-9 (прод не уронен вне окна тишины) | стадия deploy/окно тишины |
| AC-10 (host-prerequisites зафиксированы) | PASS — P-1…P-4 в ADR/INFRA |
Вывод pytest
$ python -m pytest tests/ -v --tb=short
platform linux -- Python 3.12.13, pytest-8.3.3, pluggy-1.6.0
configfile: pytest.ini
plugins: anyio-4.13.0, asyncio-0.23.8
...
======================== 501 passed, 1 warning in 8.54s ========================
$ python -m pytest tests/test_orch040_compose.py -v
tests/test_orch040_compose.py::test_tc01_service_runs_as_host_uid[orchestrator] PASSED
tests/test_orch040_compose.py::test_tc01_service_runs_as_host_uid[orchestrator-staging] PASSED
tests/test_orch040_compose.py::test_tc02_group_add_keeps_docker_gid[orchestrator] PASSED
tests/test_orch040_compose.py::test_tc02_group_add_keeps_docker_gid[orchestrator-staging] PASSED
tests/test_orch040_compose.py::test_tc03_ssh_mount_under_home[orchestrator] PASSED
tests/test_orch040_compose.py::test_tc03_ssh_mount_under_home[orchestrator-staging] PASSED
tests/test_orch040_compose.py::test_tc04_launcher_home_matches_mounts PASSED
========================= 7 passed, 1 warning in 0.31s =========================
(1 warning — Pydantic V2 deprecation в src/config.py, не относится к ORCH-040.)
Итог
PASS — все автоматизируемые тесты (TC-01…TC-05) зелёные, полный регресс
501 passed, smoke API ok, документация/ADR подтверждены ревью. Runtime/host
критерии (TC-06…TC-09, AC-1…AC-5/7/9) корректно отложены на обязательную
стадию deploy-staging (8501) — страховку self-hosting перед прод-деплоем.
Задача переходит на стадию deploy-staging.