docs: record the passing CI run on the Gitea runner

- run 325 on 5e791a6: every step of the application job exits 0
  (make check, test, validate, student_test, test-persistence,
  test-failover stop and kill); link it in REPORT.md and the evidence
  table, note that the runner had the stand images cached by then

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 18:54:32 +03:00
co-authored by Claude Opus 5.5
parent 5e791a6fea
commit e30b6496f1
2 changed files with 75 additions and 6 deletions
+13 -6
View File
@@ -207,11 +207,18 @@ job оставил бы стенд на общем хосте раннера, а
test_isolated`, `make failure_checks` и замеров: им нужны порты хоста и
отдельные проекты, их вывод — в `evidence/`.
Шаги workflow как есть прошли в той же схеме локально: контейнер образа
раннера с сокетом Docker, файлы скопированы внутрь. Все шаги — код 0 за
~2,5 мин со сборкой из кэша: `make test` — `PASS`, `make student_test` —
198 passed, `make test-persistence` и оба `make test-failover` — `PASS`
(`evidence/tests/ci-application.md`).
На раннере job прошёл целиком на `5e791a6`
([`run 325`](https://gitea.privcloud.tech/ricoroma/mtusi2026lab4-safronov/actions/runs/325),
2026-10-29, ~5 мин). Все шаги — код 0:
- `make check`, `make test`, `make validate` — `PASS`;
- анонимный GET в S3 — 403;
- `make student_test` — 198 passed;
- `make test-persistence` — `PASS`;
- `make test-failover` `stop` и `kill` — `PASS`, `failed_attempts` 0.
Первые два прогона упали: на checkout по внутреннему адресу и на
дефекте restart hook (оба — выше). До push те же шаги прошли локально в
контейнере образа раннера (`evidence/tests/ci-application.md`).
### Сценарий защиты
@@ -1252,7 +1259,7 @@ student_test` через LB после замены реплик. После п
| --- | --- | --- | --- |
| Публичный smoke | `make test` (через LB и в `make test_isolated`), в том числе из чистого clone на `de98d77` | `PASS: lab4 public API scenario` — загрузка fixture, сообщение с `attachment_ids`, SHA-256 скачанного оригинала, 404 постороннему | `evidence/attachments/smoke.md`, `evidence/tests/clean-clone-final.md`, `evidence/tests/test-isolated-s3-cleanup.md` (раздел 0) |
| Стенд собирается и проходит проверки из чистого clone | `git clone` во временный каталог, последовательность раздела «Запуск из чистого clone» (`de98d77`, 2026-10-29) | все шаги — код 0: `make check`, `make validate`, `make test`, `make instances` (2 реплики), `make s3_check` (70), `make test-persistence`, `make test-failover` × 2, `attachment-failover`, `attachment-storage`, `make student_test` (198), `make reconcile` (`found {}`), `make test_isolated` (193 + 5), `make failure_checks` (56, `crash markers 0`); секретов `.env` в журнале — 0 | `evidence/tests/clean-clone-final.md` |
| CI: сборка, стенд и `make test` в отдельном job (`CONTRIBUTING.md`, «CI») | `.github/workflows/application.yml` на раннере Gitea; шаги workflow в контейнере образа раннера с сокетом Docker, файлы скопированы внутрь | стенд с конфигами из `configs` и без портов хоста, обе реплики в LB; `make check`, `make test` — `PASS`; аноним в S3 — 403; `make student_test` — 198 passed (тесты реплик выполнены); `make test-persistence`, `make test-failover` `stop` и `kill` — `PASS`, `failed_attempts` 0; после уборки ни контейнеров, ни volumes, ни образа прогона | `evidence/tests/ci-application.md` |
| CI: сборка, стенд и `make test` в отдельном job (`CONTRIBUTING.md`, «CI») | `.github/workflows/application.yml` на раннере Gitea (`run 325`, `5e791a6`); до push — шаги workflow в контейнере образа раннера с сокетом Docker, затем на отдельном демоне Docker 29.2.1 с пустым кэшем и Compose 5.4.0 | `run 325` — success: стенд с конфигами из `configs` и без портов хоста, обе реплики в LB; `make check`, `make test`, `make validate` — `PASS`; аноним в S3 — 403; `make student_test` — 198 passed (тесты реплик выполнены); `make test-persistence`, `make test-failover` `stop` и `kill` — `PASS`, `failed_attempts` 0; уборка стенда и volumes. Найден и исправлен дефект restart hook (`--no-recreate`): контроль без правки падает так же, как `run 321` | `evidence/tests/ci-application.md` |
| «3»: метаданные в PostgreSQL, байты в приватном bucket, не в БД и не на диске API | `driver.py --port 8080 attachment-storage` | из `bytea` только `sha256` (32 байта), `object_key` = `messenger/attachments/<id>/original` без `filename`, объект в bucket 111 817 байт, анонимный GET ключа — 403, `docker diff` реплик — только `config.toml`; открыли bucket анониму — код 1 «anonymous GET … got 200», bootstrap закрыл — код 0 | `evidence/attachments/storage.md` |
| «3»: POST вложения → 201 `ready` после сохранения; оригинал побайтно; `attachment_ids` читают участники; посторонний — 404 | `make test`; `driver.py upload` Алисой, `download` Бобом и Евой | 201 `status=ready`, `variants=[]`, `sha256` 99ea7533…; Боб — 200 `image/png`, 111 817 байт, тот же SHA-256 (отдала другая реплика); Ева — 404 на метаданные и байты | `evidence/attachments/smoke.md` |
| «3»: реальные PNG/JPEG ≤10 MiB и ≤40 млн пикселей, MIME по содержимому, опасные `filename`, лимиты до чтения и распаковки | `make student_test` через LB (`test_attachments.py`, 33 теста) | 10 485 760 байт — 201, +1 — 413; 30 MiB с `Content-Length` и частями — 413; 8000 × 5000 — 201, 40 000 001+ — 413; «бомба» — 415 (распаковано не больше ожидаемого объёма + 1 байт); текст, GIF, пустое тело, подмена MIME — 415; `filename` с `/`, `\`, NUL, `\n`, DEL, U+0085, пустой, 256 — 400; `a%FFb.png`, `a%C3.png`, `a%ED%A0%80b.png` — 400; U+202E, U+2066, U+2028 — 201 как есть | `evidence/tests/student-test-lb.md` |
+62
View File
@@ -304,3 +304,65 @@ validate` — `PASS`, `make student_test` — `198 passed, 56 deselected in
восстановление 0,94 с; `kill`: `failed_attempts` 0, 0,22 с. Уборка — 16
с. После обоих прогонов на демоне нет ни контейнеров, ни volumes; демон
удалён.
## Третий прогон на раннере: все шаги — код 0
Push `5e791a6`, [`run 325`](https://gitea.privcloud.tech/ricoroma/mtusi2026lab4-safronov/actions/runs/325)
(2026-10-29, 18:43–18:47 MSK), статус `success`. Раннер — тот же:
`docker 29.2.1, linux/x86_64, 8 CPU`, Compose `5.4.0-2`, Python 3.12.3.
Образы стенда уже были в кэше хоста раннера после `run 321` (сборка и
стенд — 21 с), поэтому путь «образ скачивается при `up`» этот прогон не
повторяет. С правкой его проверяет прогон `dind1` выше.
| Шаг | Статус | Длительность | Итог |
|---|---|---|---|
| Checkout | success | 1 с | `5e791a6 fix: keep the same storage containers in the restart hook` |
| Runner | success | 0 с | |
| Remove stands of interrupted runs | success | 0 с | хвостов нет |
| Build and start the stand | success | 21 с | `LB ready: 3a88b938858a 58027b7f41c4`, сервисы ниже |
| make check and make test | success | 1 с | оба `PASS` |
| Bucket is closed to anonymous requests | success | 1 с | три анонимных GET — 403 |
| Install uv | success | 39 с | |
| make validate | success | 5 с | `PASS: full OpenAPI 3.1 and JSON Schema validation` |
| make student_test | success | 1 мин 40 с | `198 passed, 56 deselected in 99.00s` |
| make test-persistence | success | 30 с | `PASS`, затем обе реплики в LB |
| make test-failover, stop and kill | success | 42 с | 2 × `PASS`, `failed_attempts` 0 |
| Stand logs | skipped | | |
| Remove the stand | success | 18 с | volumes `…-ci-325_postgres_data`, `…-ci-325_s3_data` и сеть удалены |
```text
SERVICE STATUS
api Up 5 seconds (healthy)
api Up 4 seconds (healthy)
cleaner Up 5 seconds
haproxy Up 4 seconds (healthy)
migrate Exited (0) 5 seconds ago
postgres Up 14 seconds (healthy)
s3 Up 14 seconds (healthy)
s3-bootstrap Exited (0) 5 seconds ago
valkey Up 14 seconds (healthy)
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
python3 tests/smoke.py --base-url "http://haproxy:8080"
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
anonymous GET http://s3:8333/ -> 403
anonymous GET http://s3:8333/messenger -> 403
anonymous GET http://s3:8333/messenger?list-type=2 -> 403
.venv/bin/python scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
coverage: 252 scenarios in 13 specs, 235 tested (70 by make failure_checks), 17 excluded
================ 198 passed, 56 deselected in 99.00s (0:01:38) =================
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
{"observed_instances_before": 2, "successful_writes": 116, "failed_attempts": 0, "first_recovery_seconds": 1.811}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 0, "first_recovery_seconds": 0.861}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
2026-10-29T15:46:18Z TARGET_INSTANCE_ID=3a88b938858a container=3a88b938858ac7a3e9ecb1668f43c33051060b0bfeb2c7ab950e881a80707eac mode=stop
2026-10-29T15:46:38Z TARGET_INSTANCE_ID=3a88b938858a container=3a88b938858ac7a3e9ecb1668f43c33051060b0bfeb2c7ab950e881a80707eac mode=kill
```
`contracts.yml` skeleton на том же commit
([`run 326`](https://gitea.privcloud.tech/ricoroma/mtusi2026lab4-safronov/actions/runs/326))
падает на `actions/checkout`, как в первом прогоне: внутренний адрес
Gitea не резолвится.