Commit Graph

478 Commits

Author SHA1 Message Date
d5f4d76cd6 docs: init ORCH-088 business request
All checks were successful
CI / test (push) Successful in 28s
2026-06-09 10:31:10 +03:00
a23d4c0971 Merge pull request 'fix(notifications): tracker orphan cleanup + effort + honest done-time (ORCH-087)' (#87) from feature/ORCH-087-orch-87-to-analyse-bump into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-09 10:12:06 +03:00
deploy-finalizer
49fad5e458 deploy(ORCH-036): finalize SUCCESS for ORCH-087
All checks were successful
CI / test (push) Successful in 28s
CI / test (pull_request) Successful in 28s
2026-06-09 10:12:05 +03:00
d9bb8d5fe3 tester(ET): auto-commit from tester run_id=433
All checks were successful
CI / test (push) Successful in 32s
CI / test (pull_request) Successful in 30s
2026-06-09 10:06:17 +03:00
32cc965f84 reviewer(ET): auto-commit from reviewer run_id=432 2026-06-09 10:06:17 +03:00
81fc2df8a8 fix(launcher): runs log dir from settings, not hardcoded /app (CI fix)
test_spawn_stamps_resolved_effort упал в CI с PermissionError на '/app':
launcher._spawn хардкодил output_path='/app/data/runs/{run_id}.log' и
os.makedirs('/app/data/runs'). В контейнере /app есть, на CI-хосте
(act_runner hostexecutor) — нет, makedirs бросает -> красный CI.

Фикс корня (не только теста): базовый каталог per-run логов вынесен в
Settings.runs_dir (env ORCH_RUNS_DIR, дефолт '/app/data/runs' = прод 1:1).
Новый хелпер _run_log_path(run_id) — единый источник пути, использован в
_spawn + три прежних inline-строки логов/алертов. Тест monkeypatch-ит
settings.runs_dir на tmp_path -> окружение-независим (проверено прогоном
с принудительно недоступным /app). pytest tests/ -q: 1090 passed.

STAGE_TRANSITIONS/QG_CHECKS/схема БД не тронуты. Docs: README env-таблица,
CHANGELOG.

Refs: ORCH-087
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 10:06:17 +03:00
a7b27f2235 fix(notifications): tracker orphan cleanup + effort-in-line + honest done-time (ORCH-087)
Устраняет «замёрзшие» осиротевшие карточки live-трекера и доделывает строку
стадии/итоговое время.

G1 — зачистка сирот: аддитивный леджер tracker_messages(task_id, message_id,
created_at, deleted_at) + хелперы add/get_open/mark_deleted в src/db.py. bump
теперь удаляет ВСЕ незакрытые mid задачи (а не только скаляр
tasks.tracker_message_id, сохранён как BC-указатель). Новый mid в леджер только
при успешном send (BR-6); transient-delete остаётся для ретрая; «already
gone»/>48ч закрывается. Корень бага — скалярный учёт, терявший ссылку при
гонке/delete-fail+send-ok (ADR-001 G0).

G3 — deploy-цикл: ключ confirm_deploy в _LIVE_BRANCH_LABELS (без base-alias).

BR-EFF — эффорт в строке: колонка agent_runs.effort (_ensure_column,
идемпотентно), стамп фактического resolve_agent_effort в launcher._spawn в
момент запуска; рендер `· {model} · {effort}`, пустой → суффикс опускается.

BR-G5 — честное время: done-строка `⏱️ Агенты Σ · твоё {review~cap} · общее с
ожиданием {wall}` — три независимых подписанных метрики; кап
tracker_brd_review_cap_s (ORCH_TRACKER_BRD_REVIEW_CAP_S, дефолт 2ч, маркер ~).

Инварианты: STAGE_TRANSITIONS/QG_CHECKS/стадии без изменений; миграции
аддитивны/идемпотентны (enduro не трогается); never-raise,
disable_notification, plane_issue_link (ORCH-067), disable_web_page_preview
(ORCH-080) сохранены; src/reconciler.py не эродирован (ORCH-086 на месте).

Тесты: tests/test_notifications_orphans.py (TC-01..05 + never-raise),
tests/test_tracker_effort_time.py (TC-06/11..15 + confirm_deploy),
tests/test_launcher.py::TestEffortStamp (TC-09/10). Доки: CLAUDE.md
(§Нотификации), docs/architecture/README.md (Notifications), CHANGELOG.md.

Refs: ORCH-087

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 10:06:17 +03:00
36c7a68722 architect(ET): auto-commit from architect run_id=429 2026-06-09 10:06:17 +03:00
18fb2eb17d analyst(ET): auto-commit from analyst run_id=428 2026-06-09 10:06:17 +03:00
c86dc3ca95 docs: init ORCH-087 business request 2026-06-09 10:06:17 +03:00
77714aa318 docs(ORCH-087): staging gate SUCCESS — 15-staging-log.md
Staging check suite passed (8/10 PASS, exit 0). C9a/C9b waived as
sandbox-infra (ORCH-061); all REAL checks green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 10:05:45 +03:00
493b9be9c4 Merge pull request 'fix(reconciler): terminal-skip + state_uuid dedup on F-1 path (ORCH-086)' (#86) from feature/ORCH-086-orch-86-reconciler-telegram-et into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-09 05:00:12 +03:00
deploy-finalizer
1b095282bf deploy(ORCH-036): finalize SUCCESS for ORCH-086
All checks were successful
CI / test (push) Successful in 26s
CI / test (pull_request) Successful in 26s
2026-06-09 05:00:11 +03:00
9c19588bcd tester(ET): auto-commit from tester run_id=424
All checks were successful
CI / test (push) Successful in 28s
CI / test (pull_request) Successful in 30s
2026-06-09 02:26:49 +03:00
fe3f1658ba reviewer(ET): auto-commit from reviewer run_id=423 2026-06-09 02:26:49 +03:00
595c382ac7 fix(reconciler): terminal-skip + state_uuid dedup on F-1 path
Закрывает F-1-пробел ORCH-068: терминал-исключение и in-memory dedup
(изначально только F-2) распространены на gate-side путь реконсилятора,
устраняя ложное «🔧 reconciler: ET-002 done разблокирована (потерян
webhook)» (особенно после рестарта).

- D1: новый _resolve_issue_status — один сетевой резолв Plane-статуса
  задачи за тик (states, groups, state_uuid) после дешёвых локальных
  гардов; never-raise -> ({}, {}, None) при сбое.
- D2: безусловный терминал-скип ДО Guard 2 (группа Plane completed/
  cancelled, fallback на логические ключи done/cancelled, либо стадия в
  БД орка ∈ {done, cancelled}); skipped_terminal_total++, не подчинён
  reconcile_skip_blocked_enabled.
- D3: _is_blocked_or_needs_input переиспользует резолв D1 (опц. аргументы,
  _UNSET -> самостоятельный резолв для прямых/легаси-вызовов; 1:1).
- D4: вызов _note_unblock на F-1 теперь передаёт state_uuid -> dedup
  работает на обоих путях (deduped_total++ на повторе).

Анти-регресс: легитимный unblock не-терминальной застрявшей задачи
по-прежнему advance + один Telegram. STAGE_TRANSITIONS / QG_CHECKS /
схема БД / сигнатуры advance_*/_note_unblock / форма status() / новые
флаги — без изменений; never-raise сохранён.

Тесты: tests/test_reconciler.py TC-86-01..09/11,
tests/test_reconciler_plane.py TC-86-10. Полный прогон зелёный (1069).

Refs: ORCH-086
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 02:26:49 +03:00
aa488edddf architect(ET): auto-commit from architect run_id=421 2026-06-09 02:26:49 +03:00
f2161451a0 analyst(ET): auto-commit from analyst run_id=419 2026-06-09 02:26:49 +03:00
0e7d608fc0 docs: init ORCH-086 business request 2026-06-09 02:26:49 +03:00
fb9390e216 docs(ORCH-086): staging gate log — SUCCESS (infra-waived C9a/C9b)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 02:26:25 +03:00
92817889c4 Merge pull request 'fix: disable Telegram link-preview in tracker notifications (ORCH-080)' (#85) from feature/ORCH-080-orch-52g-telegram-link-preview into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-09 01:38:16 +03:00
deploy-finalizer
baf7860822 deploy(ORCH-036): finalize SUCCESS for ORCH-080
All checks were successful
CI / test (push) Successful in 24s
CI / test (pull_request) Successful in 24s
2026-06-09 01:38:15 +03:00
2cf40c1af9 tester(ET): auto-commit from tester run_id=417
All checks were successful
CI / test (push) Successful in 28s
CI / test (pull_request) Successful in 25s
2026-06-09 01:32:53 +03:00
44ef0bb570 reviewer(ET): auto-commit from reviewer run_id=416 2026-06-09 01:32:53 +03:00
d826eacfcf fix: disable Telegram link-preview in tracker notifications (ORCH-080)
Add "disable_web_page_preview": True to the JSON payload of both
low-level Telegram primitives — send_telegram (POST /sendMessage) and
edit_telegram (POST /editMessageText). Telegram no longer expands the
Plane "Modern project management" link-preview banner under every
tracker card (bump/edit) and notify/alert message, which the default
bump mode (ORCH-067) was duplicating on each transition.

Single-point fix at the primitive level — all consumers
(update_task_tracker, notify_approve_requested, notify_error, stage
alerts from launcher/stage_engine) inherit it without code changes.
parse_mode: HTML is preserved so the ORCH-NNN issue link stays
clickable; disable_notification, bump/edit logic, the one-card-per-task
invariant, return contracts and never-raise are untouched. Unconditional,
no kill-switch (ADR-001).

Tests: tests/test_link_preview_disabled.py (TC-01..06). Docs: CHANGELOG,
CLAUDE.md, docs/architecture/README.md (Notifications component).

Refs: ORCH-080
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 01:32:53 +03:00
a482b36dae architect(ET): auto-commit from architect run_id=414 2026-06-09 01:32:53 +03:00
f452626bb8 analyst(ET): auto-commit from analyst run_id=413 2026-06-09 01:32:53 +03:00
b46fc6e51b docs: init ORCH-080 business request 2026-06-09 01:32:53 +03:00
140827f4da docs(ORCH-080): merge staging gate log (staging_status: SUCCESS)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 01:32:32 +03:00
fc29ba76ec Merge pull request 'feat(merge-verify): guarantee idempotent open code-PR before merge_pr (ORCH-082)' (#82) from feature/ORCH-082-orch-81-pr-merge-verify-hold into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-09 01:06:25 +03:00
deploy-finalizer
9834dae108 deploy(ORCH-036): finalize SUCCESS for ORCH-082
All checks were successful
CI / test (push) Successful in 24s
CI / test (pull_request) Successful in 24s
2026-06-09 01:01:56 +03:00
039322001a tester(ET): auto-commit from tester run_id=411
All checks were successful
CI / test (push) Successful in 27s
CI / test (pull_request) Successful in 25s
2026-06-09 00:57:08 +03:00
1997376eb5 reviewer(ET): auto-commit from reviewer run_id=410 2026-06-09 00:57:08 +03:00
0ab6a33ef5 feat(merge-verify): guarantee idempotent open code-PR before merge_pr (ORCH-082)
Close the missing invariant "by merge-verify time the branch has an open
code-PR". The pipeline created a PR only on the developer path with a fresh
worktree commit (launcher._ensure_pr), so a branch (e.g. after a manual main
restore) could reach the deploy->done merge-verify under-gate PR-less ->
merge_pr returned "no open PR" -> a FALSE HOLD (ORCH-074 incident).

- merge_gate.ensure_open_pr(repo, branch) -> (status, detail): idempotent
  leaf-actor (never-raise). GET open PRs filtered head==branch AND base==main
  (identical to merge_pr/ORCH-073 FR-3 — auto docs-PR is not a code-PR) ->
  existed; else POST -> created; 409/422 race -> re-GET -> existed (no dup);
  any other error -> failed.
- stage_engine._handle_merge_verify: врезка after validated_revision and
  BEFORE merge_pr. created|existed -> proceed; failed -> honest HOLD via new
  _hold_pr_create_failed (note "pr-create-failed-hold", text distinguishable
  from the not-merged HOLD; task stays on deploy, NO rollback).
- launcher._ensure_pr delegated to ensure_open_pr (single PR-creation path,
  shared head==branch & base==main filter); the developer-only trigger is
  unchanged.
- ORCH-073 protection untouched & authoritative: merge is confirmed ONLY by
  verify_merged_to_main (SHA-in-main) + check_main_regression. Real un-merged
  code still HOLDs.
- Kill-switch ORCH_MERGE_VERIFY_AUTOCREATE_PR_ENABLED (default true); scope =
  merge_verify_applies (self-hosting / merge_verify_repos); non-self -> no-op;
  false -> ORCH-074 behaviour 1:1. No DB migration; main never push/force-push.
- Append ORCH-082 marker to MAIN_REGRESSION_MARKERS (append-only convention).
- conftest defaults the autocreate flag OFF (mirrors merge_verify_enabled) so
  unrelated deploy->done tests stay 1:1 (no network).

Tests: tests/test_orch082_ensure_pr.py (TC-01..05),
tests/test_orch082_merge_verify_autocreate.py (TC-06..12). Docs: README
merge-verify block (ORCH-082), CHANGELOG, .env.example.

Refs: ORCH-082

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 00:57:08 +03:00
74269b467c architect(ET): auto-commit from architect run_id=408 2026-06-09 00:57:08 +03:00
781f9df26c analyst(ET): auto-commit from analyst run_id=407 2026-06-09 00:57:08 +03:00
c0715ad55b docs: init ORCH-082 business request 2026-06-09 00:57:08 +03:00
7ee528ad7b Merge pull request 'docs(ORCH-082): staging gate log — SUCCESS' (#83) from docs/ORCH-082-staging-log into main 2026-06-09 00:56:37 +03:00
2861dea613 docs(ORCH-082): staging gate log — SUCCESS (8/10, C9a/C9b infra-waived)
All checks were successful
CI / test (pull_request) Successful in 24s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 00:56:25 +03:00
50434fc2b1 Merge pull request 'fix(effort): per-role floor for --effort + developer→xhigh (ORCH-081)' (#80) from feature/ORCH-081-orch-52h-env-config into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-08 22:57:11 +03:00
deploy-finalizer
6eb9992585 deploy(ORCH-036): finalize SUCCESS for ORCH-081
All checks were successful
CI / test (push) Successful in 24s
CI / test (pull_request) Successful in 24s
2026-06-08 22:55:37 +03:00
e9b23d3c04 tester(ET): auto-commit from tester run_id=403
All checks were successful
CI / test (push) Successful in 26s
CI / test (pull_request) Successful in 27s
2026-06-08 22:50:47 +03:00
e3c3292ec7 reviewer(ET): auto-commit from reviewer run_id=402 2026-06-08 22:50:47 +03:00
1ada41f272 fix(effort): per-role floor for --effort resolution + developer→xhigh
resolve_agent_effort returned '' for all agents in prod because empty
ORCH_AGENT_EFFORT_*= env vars clobber pydantic class-defaults, leaving no
non-empty floor to fall back to -> --effort never reached the Claude CLI.

Add a level-4 per-role floor in resolve_agent_effort (src/agents/launcher.py):
_agent_effort_floor reads the declared class-default of agent_effort_<agent>
(model_fields[...].default), which a present-but-empty env cannot override.
Floor applies only when levels 1-3 are empty and BEFORE validation, so a typo
(non-empty) still drops to '' (never-break ORCH-41) and explicit env/override
still wins (priority preserved). config.py: agent_effort_developer high->xhigh
(single source of truth; floor follows automatically).

Refs: ORCH-081

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 22:50:47 +03:00
62b4d1f7d1 architect(ET): auto-commit from architect run_id=400 2026-06-08 22:50:47 +03:00
c5007e6c90 analyst(ET): auto-commit from analyst run_id=399 2026-06-08 22:50:47 +03:00
10510ac48c docs: init ORCH-081 business request 2026-06-08 22:50:47 +03:00
8ccd17e199 Merge pull request 'docs(ORCH-081): staging gate log — SUCCESS (8/10, C9a/C9b infra-waived)' (#81) from docs/ORCH-081-staging-log into main 2026-06-08 22:50:26 +03:00
30d9effea1 docs(ORCH-081): staging gate log — SUCCESS (8/10, C9a/C9b infra-waived)
All checks were successful
CI / test (pull_request) Successful in 28s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 22:50:14 +03:00
a091a2d999 Merge pull request 'feat(launcher): ORCH-074 drop dead frontmatter model + validate model name (never-break)' (#79) from feature/ORCH-074-orch-52a-frontmatter-routing-e into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-08 22:11:20 +03:00