Commit Graph

369 Commits

Author SHA1 Message Date
8759cb7df8 feat(disk-watchdog): host-FS fill heartbeat + Telegram alert at >=85% (ORCH-063)
Adds src/disk_watchdog.py — a background daemon thread modelled on
reconciler/job_reaper that measures host-FS fill via the mounted bind-paths
(/repos, /app/data) with shutil.disk_usage and Telegram-alerts the operator at
>= threshold (default 85%). The missing proactive signal: on 07.06.2026 the
mva154 host disk silently hit 100% and stalled the whole self-hosting pipeline.

- Pure decide_action(used_pct, threshold, prev, now, realert_s): alert on
  crossing up, cooldown re-alert, single recovery below threshold (unit-tested
  without a thread/timer; clock injected).
- measure_paths: shutil.disk_usage per path, dedup by st_dev, per-path
  never-raise (a broken path never fails the tick).
- Config flags ORCH_DISK_MONITOR_* with defensive validation (threshold 1..100,
  positive intervals -> default + warning). Kill-switch -> daemon does not start.
- Additive disk_monitor block in GET /queue; start/stop in main.lifespan.
- never-raise (per-path/per-tick/per-send); STAGE_TRANSITIONS/QG_CHECKS/check_*/
  DB schema untouched, no migration (anti-spam state in-memory).

Tests: tests/test_disk_watchdog.py (TC-01..TC-12, 18 cases); full suite green
(1296). Docs: INFRA.md, .env.example, CHANGELOG.md (architecture/README.md +
ADRs authored at architecture stage).

Refs: ORCH-063
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 19:04:36 +03:00
4d9251c698 architect(ET): auto-commit from architect run_id=484 2026-06-09 19:04:36 +03:00
8ace9f880d analyst(ET): auto-commit from analyst run_id=483 2026-06-09 19:04:36 +03:00
8c97a6ab1c docs: init ORCH-063 business request 2026-06-09 19:04:36 +03:00
a499ee8e42 docs(ORCH-063): staging gate log — SUCCESS (8/10, C9a/C9b infra-waived)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 19:04:16 +03:00
deploy-finalizer
2265cb4a93 deploy(ORCH-036): finalize SUCCESS for ORCH-092
All checks were successful
CI / test (push) Successful in 30s
CI / test (pull_request) Successful in 29s
2026-06-09 17:50:41 +03:00
caea18577a tester(ET): auto-commit from tester run_id=481
All checks were successful
CI / test (push) Successful in 37s
CI / test (pull_request) Successful in 33s
2026-06-09 17:46:27 +03:00
ef43e4a48c reviewer(ET): auto-commit from reviewer run_id=480 2026-06-09 17:46:27 +03:00
6cae171745 docs(prompts): ORCH-092 — аудит 6 агент-промптов (расхардкод, escalation, чистка)
Эпилог эпика ORCH-52. Docs/prompts-only: src/**, STAGE_TRANSITIONS, QG_CHECKS,
machine-verdict ключи и схема БД не тронуты; frontmatter_validation_strict=False.

- FR-1/FR-2: копируемые frontmatter-примеры всех 6 промптов расхардкожены
  (created_at: <YYYY-MM-DD> / model_used: <resolve ORCH-41> + врезка «не копируй
  буквально, подставь date +%F и модель из конфига»); литерал claude-opus-4-8 —
  только справка в таблице полей.
- FR-3: имена check_* в промптах сверены с QG_CHECKS — несовпадений нет
  (закреплено интеграционным тестом TC-03).
- FR-4: developer «PR>1500 → разбивай» переформулирован в эскалацию на уровне задач.
- FR-5: секция <escalation> у developer/reviewer/tester (после </success_criteria>):
  back-to:analysis / back-to:dev / REQUEST_CHANGES.
- FR-6: deployer — критичные self-hosting-запреты в видной рамке в начале <context>.
- FR-7: tester обогащён worktree-путём, smoke serial_gate (ORCH-088), покрытием TC.
- FR-8: из reviewer удалена мёртвая строка «тот же экземпляр Developer».
- FR-9 (ADR-001 D1): убран ручной git rebase origin/main — свежесть базы держит
  движок (serial-gate ORCH-088 + auto_rebase_onto_main под merge-lease).
- FR-10 (ADR-001 D2): deployer.md оставлен на английском как нормативное исключение.
- FR-11: расширен tests/test_agent_prompts_canon.py (ORCH-092 TC-01…TC-08);
  канон 52d и test_agent_frontmatter_no_model.py зелёные; полный регресс 1278 зелёный.

Документация: 6 промптов, CLAUDE.md, docs/architecture/README.md, CHANGELOG.md.

Refs: ORCH-092

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 17:46:27 +03:00
f61d963f9b architect(ET): auto-commit from architect run_id=478 2026-06-09 17:46:27 +03:00
484069851e analyst(ET): auto-commit from analyst run_id=477 2026-06-09 17:46:27 +03:00
334b8dd8fd docs: init ORCH-092 business request 2026-06-09 17:46:27 +03:00
d0b2208087 docs(ORCH-092): staging gate log — SUCCESS (8/10, C9a/C9b infra-waived)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 17:46:08 +03:00
deploy-finalizer
99db59a277 deploy(ORCH-036): finalize SUCCESS for ORCH-079
All checks were successful
CI / test (push) Successful in 35s
2026-06-09 16:37:43 +03:00
991443b215 tester(ET): auto-commit from tester run_id=475
All checks were successful
CI / test (push) Successful in 34s
CI / test (pull_request) Successful in 34s
2026-06-09 16:33:33 +03:00
499a040ee6 reviewer(ET): auto-commit from reviewer run_id=474 2026-06-09 16:33:33 +03:00
07a2d6ad1e architect(ET): auto-commit from architect run_id=472 2026-06-09 16:33:33 +03:00
7d1346d90f analyst(ET): auto-commit from analyst run_id=471 2026-06-09 16:33:33 +03:00
4a2a50c12b docs: init ORCH-079 business request 2026-06-09 16:33:33 +03:00
0d4f579c3f docs(ORCH-079): staging gate log — SUCCESS (8/10, C9a/C9b infra-waived)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 16:32:52 +03:00
deploy-finalizer
8e2179a890 deploy(ORCH-036): finalize SUCCESS for ORCH-078
All checks were successful
CI / test (push) Successful in 30s
2026-06-09 15:52:56 +03:00
da709895f9 tester(ET): auto-commit from tester run_id=469
All checks were successful
CI / test (push) Successful in 35s
CI / test (pull_request) Successful in 33s
2026-06-09 15:48:43 +03:00
fb9c133ef9 reviewer(ET): auto-commit from reviewer run_id=468 2026-06-09 15:48:43 +03:00
572b3172cd docs(ORCH-078): ORCH-52e — стандарт трассировки ORCH-NNN + правило чтения ADR
Слой 4 (трассировка) эпика ORCH-52, замыкающий цепочку 52b/52c/52d.
Docs + prompts-only: src/**, STAGE_TRANSITIONS, QG_CHECKS, src/frontmatter.py,
схема БД — не тронуты; новый QG не вводится; ретро-фит 51 маркера вне объёма.

- Новый нормативный стандарт docs/_standards/TRACEABILITY.md: формат маркера,
  правило размещения, чтение истории с реальным проверяемым примером
  (src/serial_gate.py → ORCH-088 → ADR-001-serial-gate.md), fallback-доступ
  (git show origin/main:...), анти-археология (3+ → сводный сквозной ADR),
  каноничный текст правила чтения (единый источник).
- Точечные аддитивные врезки в промпты (52d-канон не переписан): developer.md
  (правило чтения чужого маркера + fallback, « X →  Y»), architect.md
  (правило чтения + анти-археология), reviewer.md (усиление оси «Соответствие
  ADR» под-пунктом: слом маркированного инварианта → finding ≥P1). Все три
  ссылаются на единый текст в TRACEABILITY.md, не копируют (анти-дубль BR-6).
- Сопутствующе: CLAUDE.md, docs/architecture/README.md (слой 4 эпика 52),
  CHANGELOG.md.
- Анти-регресс: расширен tests/test_agent_prompts_canon.py (9 новых проверок);
  проверки 52d и test_agent_frontmatter_no_model.py зелёные;
  полный pytest tests/ -q зелёный (1253 passed), src/ не изменён.

Refs: ORCH-078

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 15:48:43 +03:00
14f037a8a9 architect(ET): auto-commit from architect run_id=466 2026-06-09 15:48:43 +03:00
8064ae2c5d analyst(ET): auto-commit from analyst run_id=465 2026-06-09 15:48:43 +03:00
5349a41182 docs: init ORCH-078 business request 2026-06-09 15:48:43 +03:00
e8523ac116 docs(ORCH-078): staging gate log — deploy-staging SUCCESS
Staging suite passed inside orchestrator-staging (exit 0); C9a/C9b waived (ORCH-061).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 15:48:16 +03:00
deploy-finalizer
9fd99cb67a deploy(ORCH-036): finalize SUCCESS for ORCH-077
All checks were successful
CI / test (push) Successful in 31s
2026-06-09 15:12:39 +03:00
7619f12169 tester(ET): auto-commit from tester run_id=463
All checks were successful
CI / test (push) Successful in 35s
CI / test (pull_request) Successful in 30s
2026-06-09 15:08:27 +03:00
93d5c9c296 reviewer(ET): auto-commit from reviewer run_id=462 2026-06-09 15:08:27 +03:00
b21e9d8898 architect(ET): auto-commit from architect run_id=460 2026-06-09 15:08:27 +03:00
bd5d681083 analyst(ET): auto-commit from analyst run_id=459 2026-06-09 15:08:27 +03:00
9deff540f5 docs: init ORCH-077 business request 2026-06-09 15:08:27 +03:00
8455e31dae deploy-staging(ORCH-077): staging gate SUCCESS
Staging check suite exit 0 (8/10 REAL green; C9a/C9b infra-waived per ORCH-061).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 15:08:02 +03:00
deploy-finalizer
2e27f68958 deploy(ORCH-036): finalize SUCCESS for ORCH-076
All checks were successful
CI / test (push) Successful in 31s
2026-06-09 14:18:42 +03:00
cb9bfcff12 tester(ET): auto-commit from tester run_id=457
All checks were successful
CI / test (push) Successful in 36s
CI / test (pull_request) Successful in 31s
2026-06-09 14:14:30 +03:00
d846910ca6 reviewer(ET): auto-commit from reviewer run_id=456 2026-06-09 14:14:30 +03:00
92961d1d32 refactor(frontmatter): unified frontmatter contract + handoff spec (ORCH-52c)
src/frontmatter.py grows from a single-key reader into the full machine
contract: reader (read_frontmatter_value, unchanged), one parse primitive
(parse_frontmatter), writer (render/write_frontmatter), schema validator
(validate_schema/REQUIRED_FIELDS, warning-only by default) and a shared
strip_frontmatter helper. The five verdict gates (check_reviewer_verdict,
_parse_tests_verdict, _parse_deploy_status, _parse_staging_status,
parse_security_status) now read through the single parse_frontmatter point
instead of duplicated ad-hoc YAML logic; review_parse._strip_frontmatter and
security_gate.extract_security_findings reuse the shared helper.

Strictly backward compatible + never-raise: STAGE_TRANSITIONS, the QG_CHECKS
composition, verdict semantics (incl. ORCH-047 three-field tester + negative
token priority), reason-strings and worktree->origin/main fallback are 1:1.
The schema validator never influences a gate verdict by default; hard-fail is
reserved behind the frontmatter_validation_strict kill-switch (default False).

New formal handoff spec docs/_standards/HANDOFF_PROTOCOL.md ("stage -> required
output" + required frontmatter schema), aligned 1:1 with PIPELINE_DOCS.md.

Tests: test_frontmatter.py (TC-01..07), test_qg_verdicts.py (TC-08..15),
test_security_gate.py (TC-12), test_stages_invariants.py (TC-16). Full
tests/ green (1212).

Refs: ORCH-076

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 14:14:30 +03:00
2030d1627a architect(ET): auto-commit from architect run_id=454 2026-06-09 14:14:30 +03:00
98c50a094b analyst(ET): auto-commit from analyst run_id=453 2026-06-09 14:14:30 +03:00
561f58abe0 docs: init ORCH-076 business request 2026-06-09 14:14:30 +03:00
6868e34d1f docs(ORCH-076): staging gate log — staging_status SUCCESS
All checks were successful
CI / test (pull_request) Successful in 32s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 14:13:42 +03:00
deploy-finalizer
da3e6e8acd deploy(ORCH-036): finalize SUCCESS for ORCH-075
All checks were successful
CI / test (push) Successful in 31s
2026-06-09 13:31:17 +03:00
119b8f2bec tester(ET): auto-commit from tester run_id=451
All checks were successful
CI / test (push) Successful in 36s
CI / test (pull_request) Successful in 32s
2026-06-09 13:25:39 +03:00
138092e040 reviewer(ET): auto-commit from reviewer run_id=450 2026-06-09 13:25:39 +03:00
5e60543232 docs(standards): pipeline docs standard — manifest + templates + ADR-naming
Создан golden source структуры номерных документов work item (ORCH-52b, слой 1
эпика ORCH-52). Docs-only: STAGE_TRANSITIONS / QG_CHECKS / check_* / схема БД не
трогаются (AC-6).

- docs/_standards/PIPELINE_DOCS.md — манифест «стадия→агент→документ→категория→
  гейт→frontmatter machine-key» (сверен с src/stages.py и src/qg/checks.py) +
  раздел ADR-naming. Манифест документирует поведение гейтов, источник истины
  остаётся код (ADR-001 §D2); честно различает machine-verdict (12/13/14/15/17)
  и информационные (00/08/10/16) доки; под-гейты ребра deploy-staging→deploy
  отмечены как врезки в advance_stage.
- docs/_templates/* — 15 копируемых скелетов; машинные доки несут точный
  frontmatter-ключ из _parse_* (verdict/result/deploy_status/staging_status/
  security_status/post_deploy_status).
- Точки-ссылки: CLAUDE.md, docs/architecture/README.md; запись CHANGELOG.
- tests/test_orch_52b_docs_standard.py — TC-01..TC-20 структурные проверки;
  полный pytest tests/ зелёный (1177 passed).

Refs: ORCH-075

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 13:25:39 +03:00
3251c8c4ed architect(ET): auto-commit from architect run_id=448 2026-06-09 13:25:39 +03:00
6511ddadbb analyst(ET): auto-commit from analyst run_id=447 2026-06-09 13:25:39 +03:00
18e98945dd docs: init ORCH-075 business request 2026-06-09 13:25:39 +03:00