feat(bot): клиент SourceCraft API — прогоны, логи кубов, sha коммита, ретраи

- SourceCraftClient (httpx): list_runs, get_run, get_cube_logs (постранично), run_commit_sha;
  ретраи на сетевые ошибки и 5xx с экспоненциальной задержкой, 4xx — SourceCraftError без повторов
- модели: RunStatus/EventType из swagger, «1970-01-01» = не задано, failed_cubes без служебных #-кубов
- у прогона в API нет sha → куб check/meta в tgit-uploads печатает TGIT_COMMIT_SHA (ADR-014)
- CLI: python -m app.sourcecraft.cli runs
- тесты на реальных ответах API (фикстуры), порог покрытия 45 → 80

Refs #10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 18:45:42 +03:00
co-authored by Claude Opus 5.5
parent 282920e06b
commit 25735fee96
18 changed files with 1433 additions and 4 deletions
+1 -1
View File
@@ -63,4 +63,4 @@ omit = ["app/__main__.py"]
show_missing = true
skip_covered = true
# Ratchet: raise as code lands, never lower. Target by M4 — 70 (SPEC §5.2).
fail_under = 45
fail_under = 80