tester(ET): auto-commit from tester run_id=606
This commit is contained in:
88
docs/work-items/ORCH-101/13-test-report.md
Normal file
88
docs/work-items/ORCH-101/13-test-report.md
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
result: PASS # PASS | FAIL — машинный вердикт, UPPERCASE
|
||||
work_item: ORCH-101
|
||||
stage: testing
|
||||
author_agent: tester
|
||||
status: pass
|
||||
created_at: 2026-06-10
|
||||
model_used: claude-opus-4-8
|
||||
type: test-report
|
||||
work_item_id: ORCH-101
|
||||
---
|
||||
|
||||
# Test Report — ORCH-101 — ORCH-10-common: расхардкод + секреты + smoke (фундамент тиража)
|
||||
|
||||
## Окружение
|
||||
- Python: 3.12.13
|
||||
- pytest: 8.3.3 (plugins: cov-5.0.0, anyio-4.13.0, asyncio-0.23.8)
|
||||
- Дата: 2026-06-10
|
||||
- Worktree: `/repos/_wt/orchestrator/feature_ORCH-101-orch-10-common-smoke`
|
||||
- Ветка: `feature/ORCH-101-orch-10-common-smoke` (HEAD `26fe4cd`, код задачи — `f1635dd`)
|
||||
- Прогон выполнен в worktree ветки задачи (не в общем `/repos/orchestrator`).
|
||||
- Вердикт ревью (`12-review.md`): **APPROVED**.
|
||||
|
||||
## Smoke API (read-only)
|
||||
| Проверка | Результат |
|
||||
|----------|-----------|
|
||||
| `GET /health` | PASS — `{"status":"ok","service":"orchestrator"}` |
|
||||
| `GET /status` | PASS — активная задача ORCH-101 на стадии `testing` |
|
||||
| `GET /queue` | PASS — отдаёт полезную нагрузку |
|
||||
| Блок `serial_gate` в `/queue` (ORCH-088) | PASS — присутствует; `orchestrator.active_task = ORCH-101 (testing)`, не заморожен |
|
||||
| Блок `auto_labels` в `/queue` (ORCH-089) | PASS — присутствует (`enabled`, `autoApprove`/`autoDeploy`) |
|
||||
| `GET /metrics` | PASS — `schema_version:1`, стадия ORCH-101 видна |
|
||||
|
||||
## Smoke-процедура тиража (AC-3 / FR-5)
|
||||
Воспроизводимость smoke-runbook подтверждена на текущей инфре (read-only, без переноса данных):
|
||||
| Шаг | Результат |
|
||||
|-----|-----------|
|
||||
| `docs/operations/REPLICATION.md` существует (runbook с PASS/FAIL) | PASS (13 КБ) |
|
||||
| `scripts/gen_secrets.py` запускается в безопасном (print) режиме | PASS — exit 0, файлы не тронуты |
|
||||
| Webhook-секреты крипто-случайны (64 hex = 32 байта) | PASS — `ORCH_PLANE_WEBHOOK_SECRET`/`ORCH_GITEA_WEBHOOK_SECRET` |
|
||||
| Внешние токены — только плейсхолдеры (пустые) | PASS |
|
||||
| Инстанс поднят и health-check зелёный (см. Smoke API) | PASS |
|
||||
|
||||
## Результаты (покрытие TC из `04-test-plan.yaml`)
|
||||
|
||||
| TC ID | Описание | Покрывающие тесты | Результат |
|
||||
|-------|----------|-------------------|-----------|
|
||||
| TC-01 | Анти-регресс скан: нет запрещённых литералов в исполняемом коде `src/**`+`watchdog/**` (AC-1, AC-7) | `test_no_host_hardcodes::test_no_host_hardcodes_in_executable_code`, `test_scan_zone_is_nonempty`, `test_allowlist_is_empty_at_acceptance` | PASS |
|
||||
| TC-02 | Негативная самопроверка сканера: подсаженный литерал детектируется (AC-7) | `test_scanner_catches_planted_literal_in_code`/`_in_env_dict`/`_in_fstring`, `test_scanner_ignores_comments_and_docstrings` | PASS |
|
||||
| TC-03 | `plane_sync.notify_stage_change` строит ссылки из `gitea_public_url`(fallback `gitea_url`)+`gitea_owner`; литералы удалены (AC-1/FR-1 A1) | `test_host_config_keys::test_stage_change_link_uses_public_url_and_owner`/`_falls_back_to_gitea_url`/`_hardcoded_base_removed_from_source` | PASS |
|
||||
| TC-04 | Env агент-процесса (launcher ×2): HOME+git-идентичность из settings, дефолты прежние (AC-1/AC-2/FR-1 A2) | `test_host_config_keys::test_agent_git_env_reads_settings`/`_default_identity_matches_previous_hardcode`/`_preserves_ambient_environ`/`test_both_launcher_sites_use_the_helper` | PASS |
|
||||
| TC-05 | Env `self_deploy`/`post_deploy`: HOME+идентичность из settings, литералы удалены (AC-1/AC-2/FR-1 A3–A4) | `test_host_config_keys::test_system_actor_envs_read_settings` | PASS |
|
||||
| TC-06 | Структурная проверка `docker-compose.yml`: интерполяция `${VAR:-default}`, `group_add` ×3 (ORCH-040) (AC-2/AC-6) | `test_infra_parametrization::test_compose_interpolation_defaults_match_production_values`/`_group_add_docker_gid_on_all_three_services`/`_uid_gid_home_move_as_one_group`/`_ports_parametrised`/`_container_layout_paths_stay_constant`/`_no_raw_host_paths` | PASS |
|
||||
| TC-07 | `Dockerfile`: uid/gid/username/home через `ARG`; CMD-порт по ADR (AC-2/AC-6) | `test_infra_parametrization::test_dockerfile_useradd_parametrised_via_args`/`test_dockerfile_cmd_stays_exec_form_8500` | PASS |
|
||||
| TC-08 | Полнота `.env.example`: все новые ключи, секреты — плейсхолдеры; deploy-hook `REPO` env-override (AC-5/AC-6) | `test_infra_parametrization::test_env_example_contains_all_new_keys`/`_contains_start_mandatory_keys`/`_secrets_are_placeholders_only`/`test_deploy_hook_repo_is_env_overridable` | PASS |
|
||||
| TC-09 | Генератор секретов: разные значения, ≥32 байта, не затирает `.env` молча (AC-5/FR-4/NFR-3) | `test_secrets_gen::test_secret_is_cryptorandom_64_hex`/`test_two_runs_give_different_values`/`test_write_refuses_existing_file_without_force`/`test_write_creates_new_file_and_force_overwrites`/`test_output_keys_consistent_with_env_example`/`test_default_mode_prints_and_touches_no_files`/`test_no_real_secret_committed_anywhere_near` | PASS |
|
||||
| TC-10 | Smoke-док + обвязка: `REPLICATION.md` с PASS/FAIL, INFRA.md дополнен, CHANGELOG (AC-3/AC-4/FR-5/FR-7) | `test_replication_smoke::test_replication_doc_has_smoke_procedure_with_pass_fail`/`_covers_secrets_checklist`/`_has_env_map_and_boundaries`/`_is_stateless`/`test_infra_env_map_extended`/`test_changelog_has_orch_101_entry`/`test_gen_secrets_runs_in_safe_mode` | PASS |
|
||||
| TC-11 | Инвариант ORCH-058 (A-1): `staging_port` дефолт 8501, guard «≠ прод-порт» (AC-8/FR-1 A5) | `test_host_config_keys::test_staging_port_guard_refuses_prod_port`/`test_staging_port_default_passes_guard`/`test_self_hosting_repo_is_platform_constant` | PASS |
|
||||
| TC-12 | Полный регресс `pytest tests/` зелёный на дефолтной конфигурации (AC-2/BR-5) | весь набор — **1764 passed** | PASS |
|
||||
|
||||
Соответствие критериям `03-acceptance-criteria.md`: AC-1 (TC-01/02/03/04/05), AC-2 (TC-04/05/06/07/12),
|
||||
AC-3 (TC-10 + smoke-прогон выше), AC-4 (TC-10), AC-5 (TC-08/09), AC-6 (TC-06/07/08),
|
||||
AC-7 (TC-01/02), AC-8 (TC-11) — все покрыты и зелёные.
|
||||
|
||||
## Вывод pytest
|
||||
```
|
||||
============================= test session starts ==============================
|
||||
platform linux -- Python 3.12.13, pytest-8.3.3, pluggy-1.6.0
|
||||
rootdir: /repos/_wt/orchestrator/feature_ORCH-101-orch-10-common-smoke
|
||||
configfile: pytest.ini
|
||||
plugins: cov-5.0.0, anyio-4.13.0, asyncio-0.23.8
|
||||
...
|
||||
================== 1764 passed, 1 warning in 72.41s (0:01:12) ==================
|
||||
```
|
||||
(единственный warning — PydanticDeprecatedSince20 в `src/config.py:8`, предсуществующий, не связан с задачей.)
|
||||
|
||||
Целевые модули задачи (отдельный прогон):
|
||||
```
|
||||
tests/test_no_host_hardcodes.py tests/test_host_config_keys.py
|
||||
tests/test_infra_parametrization.py tests/test_secrets_gen.py tests/test_replication_smoke.py
|
||||
======================== 51 passed, 1 warning in 0.73s =========================
|
||||
```
|
||||
|
||||
## Итог
|
||||
**PASS** — полный регресс зелёный (1764 passed), все 12 TC из `04-test-plan.yaml` выполнены и
|
||||
сопоставлены с критериями `03-acceptance-criteria.md`, smoke API read-only (включая блоки
|
||||
`serial_gate` и `auto_labels` в `/queue`) и smoke-процедура тиража (AC-3: `REPLICATION.md` +
|
||||
безопасный прогон `gen_secrets.py`) зелёные. Задача переходит на `deploy-staging`.
|
||||
Reference in New Issue
Block a user