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:
@@ -13,7 +13,13 @@ workflows:
|
||||
tasks:
|
||||
- name: check
|
||||
cubes:
|
||||
# The API doesn't tell which commit a run is for — the bot reads it from this log (ADR-014). Keep it first.
|
||||
- name: meta
|
||||
image: ghcr.io/astral-sh/uv:0.8-python3.12-bookworm-slim
|
||||
script:
|
||||
- echo "TGIT_COMMIT_SHA=$SOURCECRAFT_COMMIT_SHA"
|
||||
- name: compile
|
||||
needs: ["-"]
|
||||
image: ghcr.io/astral-sh/uv:0.8-python3.12-bookworm-slim
|
||||
script:
|
||||
- python -m compileall -q -x '(^|/)\.' .
|
||||
|
||||
Reference in New Issue
Block a user