forked from mtusi2026/mtusi2026lab4
Verify and archive final lab3 fixes for lab4
This commit is contained in:
@@ -17,6 +17,12 @@
|
||||
Финально: check/validate/lint, 410 собственных тестов и smoke PASS;
|
||||
[все свои стенды остановлены, volumes сохранены](evidence/sqlalchemy-2026-11-06/track5/shutdown-state.txt).
|
||||
Публикация в этой фазе не выполняется.
|
||||
- Поздний перенос финальной ЛР3: source `ba78cf6da439a4ec60fd59389583b38285b0b2b1`,
|
||||
диапазон от `f591fa64e525679a31c9db7f942d36c789e1a12f`, код ЛР4
|
||||
`75b93bbba5f29575d3fca1d013cc7e0770d88082`. [Полный перечень и применимость evidence](evidence/forward-port.md).
|
||||
Результаты `sqlalchemy-2026-11-06/` сняты до этих исправлений сессий/валидации/LB;
|
||||
текущие проверки находятся отдельно в `evidence/forward-final-2026-11-06/`.
|
||||
Сохранённая стоимость reconciler относится к неизменённому механизму, а не новому SHA всего API.
|
||||
- Использованные источники, библиотеки и помощь ИИ: FastAPI, gunicorn + uvicorn-worker, dishka, pydantic,
|
||||
structlog, SQLAlchemy 2 async, Alembic, asyncpg (драйвер), argon2-cffi, redis-py, aiobotocore/botocore, Pillow, pytest, ruff, ty (версии —
|
||||
`evidence/environment.txt` и `uv.lock`); RustFS 1.0 и `rc` (IAM-политики, anonymous access, lifecycle), Amazon S3
|
||||
@@ -668,3 +674,21 @@ PostgreSQL); S3 о пользователях мессенджера ничег
|
||||
Proposal переноса `carry-over-lab3-review-fixes` ссылается на «пункт 4.1 (согласованные таймауты и `SIGTERM`)» —
|
||||
это нумерация рубрики лабы 3. В этом отчёте перенос закрывает строку 3.9 (минимум лабы 3), а таймауты и `SIGTERM`
|
||||
лабы 3 проверяются тестами стенда (`faults.txt`) и `make limits`; строка 4.1 здесь — тесты файлов.
|
||||
|
||||
Из позднего ревью источника сохранён **minor**: одиночный Unicode surrogate в `text`
|
||||
(`\ud800`/`\udfff`) принимается `CreateMessageRequest`, но `fingerprint()` вызывает
|
||||
`PydanticSerializationError` до доменной проверки. Локальное воспроизведение на текущем
|
||||
коде — [known-minor.txt](evidence/forward-final-2026-11-06/known-minor.txt);
|
||||
реальный HTTP возвращает 500 internal_error для обоих значений: [known-minor-http.txt](evidence/forward-final-2026-11-06/known-minor-http.txt).
|
||||
Место ошибки —
|
||||
`src/messenger/messaging/entrypoints/schemas.py:35`. Это ограничение обработки
|
||||
непарного surrogate, не доказательство полной Unicode-валидации; по актуальному правилу
|
||||
minor не исправляется и не блокирует этап. Стандартные NUL/non-ASCII Basic сценарии
|
||||
исправлены и проверяются отдельно.
|
||||
|
||||
После позднего переноса граничная серия с 40 клиентами и PNG около 10 MiB дала
|
||||
238/240 ответов 201, два ответа 503; максимум API 456,2 MiB при лимите 512 MiB, OOM 0.
|
||||
Причина двух 503 отдельно не локализована. Точка сохранена без повторения ради лучших чисел;
|
||||
100% успешность при такой параллельности не заявляется. Три прогона записи дали медиану
|
||||
1456,338 RPS с 0 ошибок, новый demo reconciler — 3364 upload без потери ready.
|
||||
Методика, сырые результаты и ограничения сравнения — [forward-port.md](evidence/forward-port.md).
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# Поздние исправления источника
|
||||
|
||||
После исходной SQLAlchemy-серии перенесён диапазон f591fa6→ba78cf6 финальной ЛР3.
|
||||
[Манифест, новые проверки и область повторного использования замеров](forward-port.md).
|
||||
|
||||
# Текущая серия SQLAlchemy
|
||||
|
||||
Новые результаты находятся в [sqlalchemy-2026-11-06](sqlalchemy-2026-11-06/).
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
date: 2026-11-06T09:10:22Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ sh scripts/failover-evidence.sh http://127.0.0.1:18084
|
||||
date: 2026-11-06T09:10:22Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
== before: api replicas (hostname = X-Instance-Id), state, StartedAt, FinishedAt
|
||||
d4c8d53d7433 running started=2026-11-06T09:10:18.309662551Z finished=2026-11-06T09:10:12.020503506Z
|
||||
da922ab2ea09 running started=2026-11-06T09:10:18.377623592Z finished=2026-11-06T09:10:12.004100798Z
|
||||
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18084"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 130, "failed_attempts": 0, "first_recovery_seconds": 2.883}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
== after: api replicas
|
||||
d4c8d53d7433 exited started=2026-11-06T09:10:18.309662551Z finished=2026-11-06T09:10:25.313223596Z
|
||||
da922ab2ea09 running started=2026-11-06T09:10:18.377623592Z finished=2026-11-06T09:10:12.004100798Z
|
||||
== stopped replica: d4c8d53d7433; shutdown: signal, drain window with readiness 503, close, exit
|
||||
{"event":"Handling signal: term","level":"info","ts":"2026-11-06T09:10:22.774795Z"}
|
||||
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-11-06T09:10:22.776559Z"}
|
||||
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-11-06T09:10:22.848442Z"}
|
||||
{"method":"GET","route":"/health/ready","status":503,"request_id":"c23539767f7c4ef5ba39f58a446754a2","duration_ms":1.481,"event":"request.handled","level":"info","ts":"2026-11-06T09:10:23.545632Z"}
|
||||
{"method":"GET","route":"/health/ready","status":503,"request_id":"60444a3eba784d839b8caccbaa24d1f2","duration_ms":0.278,"event":"request.handled","level":"info","ts":"2026-11-06T09:10:24.058530Z"}
|
||||
{"method":"GET","route":"/health/ready","status":503,"request_id":"5a247b2f9b304ff789354712b9c2d857","duration_ms":0.282,"event":"request.handled","level":"info","ts":"2026-11-06T09:10:24.545468Z"}
|
||||
{"event":"Shutting down","level":"info","ts":"2026-11-06T09:10:24.779511Z"}
|
||||
{"event":"Shutting down","level":"info","ts":"2026-11-06T09:10:24.852501Z"}
|
||||
{"event":"service.stopped","level":"info","ts":"2026-11-06T09:10:24.884399Z"}
|
||||
{"event":"Finished server process [19]","level":"info","ts":"2026-11-06T09:10:24.884667Z"}
|
||||
{"event":"service.stopped","level":"info","ts":"2026-11-06T09:10:24.959721Z"}
|
||||
{"event":"Finished server process [20]","level":"info","ts":"2026-11-06T09:10:24.959901Z"}
|
||||
{"event":"Worker (pid:19) was sent SIGTERM!","level":"info","ts":"2026-11-06T09:10:24.961675Z"}
|
||||
{"event":"Worker (pid:20) was sent SIGTERM!","level":"info","ts":"2026-11-06T09:10:25.072586Z"}
|
||||
{"event":"Shutting down: Master","level":"info","ts":"2026-11-06T09:10:25.178811Z"}
|
||||
$ scripts/restore.sh
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Running
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Healthy
|
||||
== after restore
|
||||
d4c8d53d7433 running started=2026-11-06T09:10:38.256484379Z finished=2026-11-06T09:10:25.313223596Z
|
||||
da922ab2ea09 running started=2026-11-06T09:10:18.377623592Z finished=2026-11-06T09:10:12.004100798Z
|
||||
exit_code: 0 elapsed_seconds: 19.912
|
||||
@@ -0,0 +1,39 @@
|
||||
date: 2026-11-06T09:10:22Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
== before: api replicas (hostname = X-Instance-Id), state, StartedAt, FinishedAt
|
||||
d4c8d53d7433 running started=2026-11-06T09:10:18.309662551Z finished=2026-11-06T09:10:12.020503506Z
|
||||
da922ab2ea09 running started=2026-11-06T09:10:18.377623592Z finished=2026-11-06T09:10:12.004100798Z
|
||||
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18084"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 130, "failed_attempts": 0, "first_recovery_seconds": 2.883}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
== after: api replicas
|
||||
d4c8d53d7433 exited started=2026-11-06T09:10:18.309662551Z finished=2026-11-06T09:10:25.313223596Z
|
||||
da922ab2ea09 running started=2026-11-06T09:10:18.377623592Z finished=2026-11-06T09:10:12.004100798Z
|
||||
== stopped replica: d4c8d53d7433; shutdown: signal, drain window with readiness 503, close, exit
|
||||
{"event":"Handling signal: term","level":"info","ts":"2026-11-06T09:10:22.774795Z"}
|
||||
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-11-06T09:10:22.776559Z"}
|
||||
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-11-06T09:10:22.848442Z"}
|
||||
{"method":"GET","route":"/health/ready","status":503,"request_id":"c23539767f7c4ef5ba39f58a446754a2","duration_ms":1.481,"event":"request.handled","level":"info","ts":"2026-11-06T09:10:23.545632Z"}
|
||||
{"method":"GET","route":"/health/ready","status":503,"request_id":"60444a3eba784d839b8caccbaa24d1f2","duration_ms":0.278,"event":"request.handled","level":"info","ts":"2026-11-06T09:10:24.058530Z"}
|
||||
{"method":"GET","route":"/health/ready","status":503,"request_id":"5a247b2f9b304ff789354712b9c2d857","duration_ms":0.282,"event":"request.handled","level":"info","ts":"2026-11-06T09:10:24.545468Z"}
|
||||
{"event":"Shutting down","level":"info","ts":"2026-11-06T09:10:24.779511Z"}
|
||||
{"event":"Shutting down","level":"info","ts":"2026-11-06T09:10:24.852501Z"}
|
||||
{"event":"service.stopped","level":"info","ts":"2026-11-06T09:10:24.884399Z"}
|
||||
{"event":"Finished server process [19]","level":"info","ts":"2026-11-06T09:10:24.884667Z"}
|
||||
{"event":"service.stopped","level":"info","ts":"2026-11-06T09:10:24.959721Z"}
|
||||
{"event":"Finished server process [20]","level":"info","ts":"2026-11-06T09:10:24.959901Z"}
|
||||
{"event":"Worker (pid:19) was sent SIGTERM!","level":"info","ts":"2026-11-06T09:10:24.961675Z"}
|
||||
{"event":"Worker (pid:20) was sent SIGTERM!","level":"info","ts":"2026-11-06T09:10:25.072586Z"}
|
||||
{"event":"Shutting down: Master","level":"info","ts":"2026-11-06T09:10:25.178811Z"}
|
||||
$ scripts/restore.sh
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Running
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Healthy
|
||||
== after restore
|
||||
d4c8d53d7433 running started=2026-11-06T09:10:38.256484379Z finished=2026-11-06T09:10:25.313223596Z
|
||||
da922ab2ea09 running started=2026-11-06T09:10:18.377623592Z finished=2026-11-06T09:10:12.004100798Z
|
||||
@@ -0,0 +1,33 @@
|
||||
date: 2026-11-06T09:13:29Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ python3 scripts/lab4_scenarios.py failover-upload --base-url http://127.0.0.1:18084 --output evidence/forward-final-2026-11-06/failover-upload.json
|
||||
{
|
||||
"ok": true,
|
||||
"date": "2026-11-06T09:13:29Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"scenario": "failover-upload",
|
||||
"upload_instance": "d4c8d53d7433",
|
||||
"download_instance": "da922ab2ea09",
|
||||
"sha256_equal": true,
|
||||
"hook_seconds": 2.734,
|
||||
"download_ok_after_seconds": 2.762,
|
||||
"replicas_at_download": [
|
||||
{
|
||||
"hostname": "d4c8d53d7433",
|
||||
"status": "exited",
|
||||
"exit_code": "0",
|
||||
"started_at": "2026-11-06T09:12:33.47280571Z",
|
||||
"finished_at": "2026-11-06T09:13:32.422358668Z"
|
||||
},
|
||||
{
|
||||
"hostname": "da922ab2ea09",
|
||||
"status": "running",
|
||||
"exit_code": "0",
|
||||
"started_at": "2026-11-06T09:12:33.439519377Z",
|
||||
"finished_at": "2026-11-06T09:12:33.358178252Z"
|
||||
}
|
||||
],
|
||||
"restored": false,
|
||||
"replicas_after_restore": null
|
||||
}
|
||||
exit_code: 0 elapsed_seconds: 3.177
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"ok": true,
|
||||
"date": "2026-11-06T09:13:29Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"scenario": "failover-upload",
|
||||
"upload_instance": "d4c8d53d7433",
|
||||
"download_instance": "da922ab2ea09",
|
||||
"sha256_equal": true,
|
||||
"hook_seconds": 2.734,
|
||||
"download_ok_after_seconds": 2.762,
|
||||
"replicas_at_download": [
|
||||
{
|
||||
"hostname": "d4c8d53d7433",
|
||||
"status": "exited",
|
||||
"exit_code": "0",
|
||||
"started_at": "2026-11-06T09:12:33.47280571Z",
|
||||
"finished_at": "2026-11-06T09:13:32.422358668Z"
|
||||
},
|
||||
{
|
||||
"hostname": "da922ab2ea09",
|
||||
"status": "running",
|
||||
"exit_code": "0",
|
||||
"started_at": "2026-11-06T09:12:33.439519377Z",
|
||||
"finished_at": "2026-11-06T09:12:33.358178252Z"
|
||||
}
|
||||
],
|
||||
"restored": false,
|
||||
"replicas_after_restore": null
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
date: 2026-11-06T09:31:35Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ sh -c 'make check && make validate && make lint && openspec validate --all --strict'
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
.venv/bin/ruff check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
All checks passed!
|
||||
.venv/bin/ruff format --check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
163 files already formatted
|
||||
.venv/bin/ty check src student-tests alembic
|
||||
All checks passed!
|
||||
- Validating...
|
||||
✓ change/forward-lab3-final-review-fixes
|
||||
✓ spec/lab1-event-publication
|
||||
✓ spec/lab1-messenger-chats
|
||||
✓ spec/lab1-messenger-history
|
||||
✓ spec/lab1-messenger-identity
|
||||
✓ spec/lab1-service-operability
|
||||
✓ spec/lab2-auth-sessions
|
||||
✓ spec/lab2-dependency-failures
|
||||
✓ spec/lab2-history-index
|
||||
✓ spec/lab2-persistent-storage
|
||||
✓ spec/lab2-session-cache
|
||||
✓ spec/lab3-failover-operations
|
||||
✓ spec/lab3-idempotent-messages
|
||||
✓ spec/lab3-load-balancing
|
||||
✓ spec/lab4-attachments
|
||||
✓ spec/lab4-evidence-runs
|
||||
✓ spec/lab4-object-storage
|
||||
✓ spec/lab4-storage-reconciler
|
||||
✓ spec/lab4-upload-resilience
|
||||
Totals: 19 passed, 0 failed (19 items)
|
||||
exit_code: 0 elapsed_seconds: 1.660
|
||||
@@ -0,0 +1,6 @@
|
||||
date: 2026-11-06T09:18:22Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ make test
|
||||
python3 tests/smoke.py --base-url "http://127.0.0.1:18084"
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit_code: 0 elapsed_seconds: 0.435
|
||||
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"severity": "minor",
|
||||
"file": "src/messenger/messaging/entrypoints/schemas.py:35",
|
||||
"problem": "Непарный Unicode surrogate U+D800/U+DFFF в text принимается схемой, fingerprint вызывает PydanticSerializationError; реальный HTTP возвращает 500 internal_error. Воспроизведено на 75b93bbba5f29575d3fca1d013cc7e0770d88082: evidence/forward-final-2026-11-06/known-minor-http.txt. Сохранено без исправления по правилу minor."
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,49 @@
|
||||
date: 2026-11-06T09:30:40Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ python3 -c 'import collections
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
source = Path("/Users/artemkostylev/projects/learning/HL/labs/.pipeline/.runs/labs/snapshots/lab3-ba78cf6da439a4ec60fd59389583b38285b0b2b1")
|
||||
manifest = json.loads(Path("evidence/forward-final-2026-11-06/source-manifest.json").read_text())
|
||||
def source_git(*args):
|
||||
return subprocess.check_output(["git", "-C", str(source), *args], text=True)
|
||||
assert source_git("rev-parse", "HEAD").strip() == manifest["source_to"]
|
||||
changed = dict(line.split("\t", 1)[::-1] for line in source_git("diff", "--name-status", manifest["source_from"], manifest["source_to"]).splitlines())
|
||||
assert changed == {row["file"]: row["status"] for row in manifest["files"]}
|
||||
blobs = {}
|
||||
for line in source_git("ls-tree", "-r", manifest["source_to"]).splitlines():
|
||||
meta, path = line.split("\t", 1)
|
||||
blobs[path] = meta.split()[2]
|
||||
merged = {"infra/haproxy/haproxy.cfg", "src/messenger/messaging/domain/values.py"}
|
||||
exact = 0
|
||||
for row in manifest["files"]:
|
||||
assert blobs[row["file"]] == row["source_blob"], row["file"]
|
||||
if row["action"] == "copied-source-archive" or (row["action"] == "ported" and row["file"] not in merged):
|
||||
assert Path(row["file"]).read_bytes() == (source / row["file"]).read_bytes(), row["file"]
|
||||
exact += 1
|
||||
print(json.dumps({"source_from":manifest["source_from"], "source_to":manifest["source_to"], "manifest_paths":len(changed), "decisions":dict(collections.Counter(row["action"] for row in manifest["files"])), "byte_exact_paths":exact, "manual_lab4_merges":sorted(merged)}, indent=2))
|
||||
subprocess.run(["git", "diff", "--exit-code", manifest["target_base"], "--", "contracts", "tests", "README.md", "COURSE.md"], check=True)
|
||||
subprocess.run(["git", "diff", "--exit-code", "75b93bbba5f29575d3fca1d013cc7e0770d88082", "--", "src", "student-tests", "infra", "scripts", "compose.yaml", "Dockerfile", "pyproject.toml", "uv.lock", "alembic"], check=True)
|
||||
print("PASS: complete immutable-source manifest, preserved normative files, runtime unchanged since measurements")
|
||||
'
|
||||
{
|
||||
"source_from": "f591fa64e525679a31c9db7f942d36c789e1a12f",
|
||||
"source_to": "ba78cf6da439a4ec60fd59389583b38285b0b2b1",
|
||||
"manifest_paths": 214,
|
||||
"decisions": {
|
||||
"adapted-context": 2,
|
||||
"not-copied": 169,
|
||||
"adapted-test-tool": 4,
|
||||
"ported": 14,
|
||||
"copied-source-archive": 19,
|
||||
"merged-via-local-change": 6
|
||||
},
|
||||
"byte_exact_paths": 31,
|
||||
"manual_lab4_merges": [
|
||||
"infra/haproxy/haproxy.cfg",
|
||||
"src/messenger/messaging/domain/values.py"
|
||||
]
|
||||
}
|
||||
PASS: complete immutable-source manifest, preserved normative files, runtime unchanged since measurements
|
||||
exit_code: 0 elapsed_seconds: 0.195
|
||||
@@ -0,0 +1,48 @@
|
||||
date: 2026-11-06T09:14:49Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:hlpipe-lab4-forward-final-20261106"}
|
||||
$ sh -c '
|
||||
set -e
|
||||
fixture_project=hlpipe-lab4-forward-lb-20261106
|
||||
fixture_file=student-tests/tools/lb_errors/compose.yaml
|
||||
trap '"'"'docker compose -p "$fixture_project" -f "$fixture_file" --profile probe down'"'"' EXIT
|
||||
docker compose -p "$fixture_project" -f "$fixture_file" up -d lb api
|
||||
docker compose -p "$fixture_project" -f "$fixture_file" run --rm --no-deps probe 502
|
||||
docker compose -p "$fixture_project" -f "$fixture_file" run --rm --no-deps probe 504
|
||||
docker compose -p "$fixture_project" -f "$fixture_file" stop api
|
||||
docker compose -p "$fixture_project" -f "$fixture_file" run --rm --no-deps probe 503
|
||||
'
|
||||
Network hlpipe-lab4-forward-lb-20261106_default Creating
|
||||
Network hlpipe-lab4-forward-lb-20261106_default Created
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Creating
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Creating
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Created
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Created
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Starting
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Starting
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Started
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Started
|
||||
{"status": 502, "request_id": "a\"b", "json_valid": true, "echo_matches": true, "seconds": 0.001}
|
||||
{"status": 502, "request_id": "a\\b", "json_valid": true, "echo_matches": true, "seconds": 0.001}
|
||||
{"status": 502, "request_id": "a\tb", "json_valid": true, "echo_matches": true, "seconds": 0.001}
|
||||
{"status": 502, "request_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "json_valid": true, "echo_matches": true, "seconds": 0.001}
|
||||
{"status": 504, "request_id": "a\"b", "json_valid": true, "echo_matches": true, "seconds": 10.024}
|
||||
{"status": 504, "request_id": "a\\b", "json_valid": true, "echo_matches": true, "seconds": 10.005}
|
||||
{"status": 504, "request_id": "a\tb", "json_valid": true, "echo_matches": true, "seconds": 10.022}
|
||||
{"status": 504, "request_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "json_valid": true, "echo_matches": true, "seconds": 10.007}
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Stopping
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Stopped
|
||||
{"status": 503, "request_id": "a\"b", "json_valid": true, "echo_matches": true, "seconds": 0.004}
|
||||
{"status": 503, "request_id": "a\\b", "json_valid": true, "echo_matches": true, "seconds": 0.0}
|
||||
{"status": 503, "request_id": "a\tb", "json_valid": true, "echo_matches": true, "seconds": 0.0}
|
||||
{"status": 503, "request_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "json_valid": true, "echo_matches": true, "seconds": 0.0}
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Stopping
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Stopping
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Stopped
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Removing
|
||||
Container hlpipe-lab4-forward-lb-20261106-api-1 Removed
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Stopped
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Removing
|
||||
Container hlpipe-lab4-forward-lb-20261106-lb-1 Removed
|
||||
Network hlpipe-lab4-forward-lb-20261106_default Removing
|
||||
Network hlpipe-lab4-forward-lb-20261106_default Removed
|
||||
exit_code: 0 elapsed_seconds: 52.831
|
||||
@@ -0,0 +1,24 @@
|
||||
date: 2026-11-06T09:15:37Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ python3 -c 'import base64,http.client,json,uuid
|
||||
conn=http.client.HTTPConnection("127.0.0.1",18084,timeout=10)
|
||||
name="surrogate_"+uuid.uuid4().hex[:12]
|
||||
password=uuid.uuid4().hex
|
||||
def request(method,path,body=None,headers=None):
|
||||
conn.request(method,path,None if body is None else json.dumps(body).encode(),{"Content-Type":"application/json",**(headers or {})})
|
||||
response=conn.getresponse()
|
||||
return response.status,json.loads(response.read() or "null")
|
||||
status,user=request("POST","/api/v1/users",{"username":name,"password":password,"display_name":"Synthetic"})
|
||||
assert status==201
|
||||
status,session=request("POST","/api/v1/auth/sessions",headers={"Authorization":"Basic "+base64.b64encode((name+":"+password).encode()).decode()})
|
||||
assert status==201
|
||||
headers={"Authorization":"Bearer "+session["token"]}
|
||||
status,chat=request("POST","/api/v1/chats",{"title":"Synthetic","member_ids":[user["id"]]},headers)
|
||||
assert status==201
|
||||
for value in [chr(0xd800),chr(0xdfff)]:
|
||||
status,data=request("POST","/api/v1/chats/"+chat["id"]+"/messages",{"text":value},{**headers,"Idempotency-Key":uuid.uuid4().hex})
|
||||
print(json.dumps({"codepoint":hex(ord(value)),"status":status,"error_code":data.get("error",{}).get("code")}))
|
||||
conn.close()'
|
||||
{"codepoint": "0xd800", "status": 500, "error_code": "internal_error"}
|
||||
{"codepoint": "0xdfff", "status": 500, "error_code": "internal_error"}
|
||||
exit_code: 0 elapsed_seconds: 0.114
|
||||
@@ -0,0 +1,15 @@
|
||||
date: 2026-11-06T09:09:38Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ .venv/bin/python -c 'import json
|
||||
from messenger.messaging.entrypoints.schemas import CreateMessageRequest
|
||||
for value in [chr(0xd800), chr(0xdfff)]:
|
||||
body = CreateMessageRequest(text=value)
|
||||
try:
|
||||
body.fingerprint()
|
||||
result = "accepted"
|
||||
except Exception as error:
|
||||
result = type(error).__name__
|
||||
print(json.dumps({"codepoint": hex(ord(value)), "schema_accepted": True, "fingerprint_result": result}))'
|
||||
{"codepoint": "0xd800", "schema_accepted": true, "fingerprint_result": "PydanticSerializationError"}
|
||||
{"codepoint": "0xdfff", "schema_accepted": true, "fingerprint_result": "PydanticSerializationError"}
|
||||
exit_code: 0 elapsed_seconds: 0.124
|
||||
@@ -0,0 +1,29 @@
|
||||
date: 2026-11-06T09:13:49Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ python3 scripts/limits.py
|
||||
date: 2026-11-06T09:13:49Z commit: 75b93bb
|
||||
$ docker compose --profile bench --profile tools --profile reconcile config --format json (declared)
|
||||
service cpus/mem ports secrets volumes networks ro user
|
||||
---------- ---------- ------------------------------- ------------------------------------------------------------------------------------------------------------------------------- ---------- ---------------------- ----- -----------
|
||||
api 1/512MiB - cache_url,cursor_secret,database_url,s3_access_key_id,s3_secret_access_key - backend(internal) true image
|
||||
k6 2/512MiB - - - edge false image
|
||||
lb 1/128MiB 127.0.0.1:18084,127.0.0.1:24844 - - backend(internal),edge true image
|
||||
migrate 0.5/256MiB - database_url - backend(internal) false image
|
||||
postgres 2/1024MiB - postgres_password pgdata backend(internal) false 70:70
|
||||
reconciler 1/256MiB - database_url,s3_reconciler_access_key_id,s3_reconciler_secret_access_key - backend(internal) true image
|
||||
s3 1/512MiB - s3_root_password,s3_root_user s3data backend(internal) true image
|
||||
s3-cli 0.5/64MiB - s3_access_key_id,s3_reconciler_access_key_id,s3_reconciler_secret_access_key,s3_root_password,s3_root_user,s3_secret_access_key - backend(internal) true 65534:65534
|
||||
s3-init 0.5/64MiB - s3_access_key_id,s3_reconciler_access_key_id,s3_reconciler_secret_access_key,s3_root_password,s3_root_user,s3_secret_access_key - backend(internal) true 65534:65534
|
||||
valkey 0.5/128MiB - valkey.conf valkeydata backend(internal) false 999:1000
|
||||
|
||||
$ docker inspect (running containers: hostname = X-Instance-Id, applied limits)
|
||||
service hostname cpus memory published
|
||||
-------- ------------ ---- ------- ---------------------------------------------------
|
||||
api da922ab2ea09 1 512MiB
|
||||
lb ea6930f64089 1 128MiB 127.0.0.1:18084->8080/tcp,127.0.0.1:24844->8404/tcp
|
||||
postgres 3f3a870d89c0 2 1024MiB
|
||||
s3 5921e788f03d 1 512MiB
|
||||
valkey 07ea16e2fcfe 0.5 128MiB
|
||||
|
||||
PASS: limits, ports, secrets, volumes and networks match the policy
|
||||
exit_code: 0 elapsed_seconds: 0.308
|
||||
@@ -0,0 +1,116 @@
|
||||
date: 2026-11-06T09:16:16Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ make load-evidence
|
||||
sh scripts/load-evidence.sh
|
||||
date: 2026-11-06T09:16:17Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082 network: hlpipe-lab4-forward-final-20261106_edge
|
||||
# make load-evidence (scripts/load-evidence.sh): закрытый контур tests/load.py, 64 потока, 8 с, все записи
|
||||
# прогона в один новый чат, 3 повтора с паузой 15 с; клиент — одноразовый контейнер в сети <проект>_edge
|
||||
# стенда (2 CPU, 512 MiB, базовый образ API по digest, tests/, contracts/ и lab.json только для чтения,
|
||||
# tcp_tw_reuse=1), адрес http://lb:8080. На 4-й секунде — docker stats; после прогона — request.handled реплик.
|
||||
$ docker ps --format '{{.Names}}' | grep -v '^hlpipe-lab4-forward-final-20261106-' # чужие контейнеры на VM во время серии
|
||||
$ client() { docker run --rm --name hlpipe-lab4-forward-final-20261106-load-client --network hlpipe-lab4-forward-final-20261106_edge --cpus 2 --memory 512m --sysctl net.ipv4.tcp_tw_reuse=1 -v "$PWD/tests:/w/tests:ro" -v "$PWD/contracts:/w/contracts:ro" -v "$PWD/lab.json:/w/lab.json:ro" -v "$PWD/evidence/forward-final-2026-11-06/load:/out" python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d python /w/tests/load.py "$@"; }
|
||||
$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run1.json
|
||||
exit 0
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.238,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 11768,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1428.577,
|
||||
"successful_latency_ms": {
|
||||
"p50": 40.163,
|
||||
"p95": 100.062,
|
||||
"p99": 141.558
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память
|
||||
api-1 93.26% 271.2MiB / 512MiB
|
||||
api-2 89.65% 307.4MiB / 512MiB
|
||||
lb-1 46.78% 30.14MiB / 128MiB
|
||||
load-client 60.53% 83.66MiB / 512MiB
|
||||
postgres-1 157.07% 151.1MiB / 1GiB
|
||||
s3-1 0.76% 69.52MiB / 512MiB
|
||||
valkey-1 3.81% 13.9MiB / 128MiB
|
||||
$ docker compose logs --since 2026-11-06T09:16:17Z api | request.handled: статус метод маршрут число
|
||||
200 GET /health/live 1
|
||||
200 GET /health/ready 22
|
||||
201 POST /api/v1/auth/sessions 3
|
||||
201 POST /api/v1/chats 1
|
||||
201 POST /api/v1/chats/{chat_id}/messages 11768
|
||||
201 POST /api/v1/users 3
|
||||
$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run2.json
|
||||
exit 0
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.229,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 11984,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1456.338,
|
||||
"successful_latency_ms": {
|
||||
"p50": 37.442,
|
||||
"p95": 98.948,
|
||||
"p99": 134.678
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память
|
||||
api-1 90.89% 272.5MiB / 512MiB
|
||||
api-2 75.30% 310.1MiB / 512MiB
|
||||
lb-1 39.94% 30.58MiB / 128MiB
|
||||
load-client 46.50% 83.65MiB / 512MiB
|
||||
postgres-1 121.64% 158.2MiB / 1GiB
|
||||
s3-1 0.77% 69.37MiB / 512MiB
|
||||
valkey-1 3.02% 13.87MiB / 128MiB
|
||||
$ docker compose logs --since 2026-11-06T09:16:41Z api | request.handled: статус метод маршрут число
|
||||
200 GET /health/live 1
|
||||
200 GET /health/ready 23
|
||||
201 POST /api/v1/auth/sessions 3
|
||||
201 POST /api/v1/chats 1
|
||||
201 POST /api/v1/chats/{chat_id}/messages 11984
|
||||
201 POST /api/v1/users 3
|
||||
$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run3.json
|
||||
exit 0
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.21,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 12555,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1529.32,
|
||||
"successful_latency_ms": {
|
||||
"p50": 33.478,
|
||||
"p95": 98.475,
|
||||
"p99": 138.028
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память
|
||||
api-1 100.60% 273.6MiB / 512MiB
|
||||
api-2 99.12% 310.2MiB / 512MiB
|
||||
lb-1 58.14% 30.39MiB / 128MiB
|
||||
load-client 66.66% 83.66MiB / 512MiB
|
||||
postgres-1 168.89% 167.2MiB / 1GiB
|
||||
s3-1 0.80% 71.19MiB / 512MiB
|
||||
valkey-1 4.31% 13.5MiB / 128MiB
|
||||
$ docker compose logs --since 2026-11-06T09:17:05Z api | request.handled: статус метод маршрут число
|
||||
200 GET /health/live 1
|
||||
200 GET /health/ready 24
|
||||
201 POST /api/v1/auth/sessions 3
|
||||
201 POST /api/v1/chats 1
|
||||
201 POST /api/v1/chats/{chat_id}/messages 12555
|
||||
201 POST /api/v1/users 3
|
||||
$ docker compose exec -T postgres psql -c 'SELECT count(*) FROM messages'
|
||||
36448
|
||||
exit_code: 0 elapsed_seconds: 57.764
|
||||
@@ -0,0 +1,111 @@
|
||||
date: 2026-11-06T09:16:17Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082 network: hlpipe-lab4-forward-final-20261106_edge
|
||||
# make load-evidence (scripts/load-evidence.sh): закрытый контур tests/load.py, 64 потока, 8 с, все записи
|
||||
# прогона в один новый чат, 3 повтора с паузой 15 с; клиент — одноразовый контейнер в сети <проект>_edge
|
||||
# стенда (2 CPU, 512 MiB, базовый образ API по digest, tests/, contracts/ и lab.json только для чтения,
|
||||
# tcp_tw_reuse=1), адрес http://lb:8080. На 4-й секунде — docker stats; после прогона — request.handled реплик.
|
||||
$ docker ps --format '{{.Names}}' | grep -v '^hlpipe-lab4-forward-final-20261106-' # чужие контейнеры на VM во время серии
|
||||
$ client() { docker run --rm --name hlpipe-lab4-forward-final-20261106-load-client --network hlpipe-lab4-forward-final-20261106_edge --cpus 2 --memory 512m --sysctl net.ipv4.tcp_tw_reuse=1 -v "$PWD/tests:/w/tests:ro" -v "$PWD/contracts:/w/contracts:ro" -v "$PWD/lab.json:/w/lab.json:ro" -v "$PWD/evidence/forward-final-2026-11-06/load:/out" python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d python /w/tests/load.py "$@"; }
|
||||
$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run1.json
|
||||
exit 0
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.238,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 11768,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1428.577,
|
||||
"successful_latency_ms": {
|
||||
"p50": 40.163,
|
||||
"p95": 100.062,
|
||||
"p99": 141.558
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память
|
||||
api-1 93.26% 271.2MiB / 512MiB
|
||||
api-2 89.65% 307.4MiB / 512MiB
|
||||
lb-1 46.78% 30.14MiB / 128MiB
|
||||
load-client 60.53% 83.66MiB / 512MiB
|
||||
postgres-1 157.07% 151.1MiB / 1GiB
|
||||
s3-1 0.76% 69.52MiB / 512MiB
|
||||
valkey-1 3.81% 13.9MiB / 128MiB
|
||||
$ docker compose logs --since 2026-11-06T09:16:17Z api | request.handled: статус метод маршрут число
|
||||
200 GET /health/live 1
|
||||
200 GET /health/ready 22
|
||||
201 POST /api/v1/auth/sessions 3
|
||||
201 POST /api/v1/chats 1
|
||||
201 POST /api/v1/chats/{chat_id}/messages 11768
|
||||
201 POST /api/v1/users 3
|
||||
$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run2.json
|
||||
exit 0
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.229,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 11984,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1456.338,
|
||||
"successful_latency_ms": {
|
||||
"p50": 37.442,
|
||||
"p95": 98.948,
|
||||
"p99": 134.678
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память
|
||||
api-1 90.89% 272.5MiB / 512MiB
|
||||
api-2 75.30% 310.1MiB / 512MiB
|
||||
lb-1 39.94% 30.58MiB / 128MiB
|
||||
load-client 46.50% 83.65MiB / 512MiB
|
||||
postgres-1 121.64% 158.2MiB / 1GiB
|
||||
s3-1 0.77% 69.37MiB / 512MiB
|
||||
valkey-1 3.02% 13.87MiB / 128MiB
|
||||
$ docker compose logs --since 2026-11-06T09:16:41Z api | request.handled: статус метод маршрут число
|
||||
200 GET /health/live 1
|
||||
200 GET /health/ready 23
|
||||
201 POST /api/v1/auth/sessions 3
|
||||
201 POST /api/v1/chats 1
|
||||
201 POST /api/v1/chats/{chat_id}/messages 11984
|
||||
201 POST /api/v1/users 3
|
||||
$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run3.json
|
||||
exit 0
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.21,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 12555,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1529.32,
|
||||
"successful_latency_ms": {
|
||||
"p50": 33.478,
|
||||
"p95": 98.475,
|
||||
"p99": 138.028
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память
|
||||
api-1 100.60% 273.6MiB / 512MiB
|
||||
api-2 99.12% 310.2MiB / 512MiB
|
||||
lb-1 58.14% 30.39MiB / 128MiB
|
||||
load-client 66.66% 83.66MiB / 512MiB
|
||||
postgres-1 168.89% 167.2MiB / 1GiB
|
||||
s3-1 0.80% 71.19MiB / 512MiB
|
||||
valkey-1 4.31% 13.5MiB / 128MiB
|
||||
$ docker compose logs --since 2026-11-06T09:17:05Z api | request.handled: статус метод маршрут число
|
||||
200 GET /health/live 1
|
||||
200 GET /health/ready 24
|
||||
201 POST /api/v1/auth/sessions 3
|
||||
201 POST /api/v1/chats 1
|
||||
201 POST /api/v1/chats/{chat_id}/messages 12555
|
||||
201 POST /api/v1/users 3
|
||||
$ docker compose exec -T postgres psql -c 'SELECT count(*) FROM messages'
|
||||
36448
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.238,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 11768,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1428.577,
|
||||
"successful_latency_ms": {
|
||||
"p50": 40.163,
|
||||
"p95": 100.062,
|
||||
"p99": 141.558
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.229,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 11984,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1456.338,
|
||||
"successful_latency_ms": {
|
||||
"p50": 37.442,
|
||||
"p95": 98.948,
|
||||
"p99": 134.678
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 8.0,
|
||||
"elapsed_seconds": 8.21,
|
||||
"concurrency": 64,
|
||||
"successful_requests": 12555,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1529.32,
|
||||
"successful_latency_ms": {
|
||||
"p50": 33.478,
|
||||
"p95": 98.475,
|
||||
"p99": 138.028
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
date: 2026-11-06T09:18:23Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ make down
|
||||
docker compose --profile bench --profile tools --profile reconcile down
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Removed
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Removed
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Removed
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Removed
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Removed
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Stopping
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Removed
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Stopped
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Removing
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Removed
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Removed
|
||||
Network hlpipe-lab4-forward-final-20261106_edge Removing
|
||||
Network hlpipe-lab4-forward-final-20261106_backend Removing
|
||||
Network hlpipe-lab4-forward-final-20261106_edge Removed
|
||||
Network hlpipe-lab4-forward-final-20261106_backend Removed
|
||||
exit_code: 0 elapsed_seconds: 3.283
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"load_rps": {
|
||||
"all": [
|
||||
1428.577,
|
||||
1456.338,
|
||||
1529.32
|
||||
],
|
||||
"median": 1456.338,
|
||||
"min": 1428.577,
|
||||
"max": 1529.32
|
||||
},
|
||||
"load_p95_ms": {
|
||||
"all": [
|
||||
100.062,
|
||||
98.948,
|
||||
98.475
|
||||
],
|
||||
"median": 98.948,
|
||||
"min": 98.475,
|
||||
"max": 100.062
|
||||
},
|
||||
"load_failed": 0,
|
||||
"memory_statuses": [
|
||||
{
|
||||
"201": 80
|
||||
},
|
||||
{
|
||||
"201": 80
|
||||
},
|
||||
{
|
||||
"201": 78,
|
||||
"503": 2
|
||||
}
|
||||
],
|
||||
"body_bytes": [
|
||||
10485256,
|
||||
10485256,
|
||||
10485256
|
||||
],
|
||||
"api_peak_mib": {
|
||||
"all": [
|
||||
456.2,
|
||||
438.1,
|
||||
450.4
|
||||
],
|
||||
"median": 450.4,
|
||||
"min": 438.1,
|
||||
"max": 456.2
|
||||
},
|
||||
"lb_peak_mib": {
|
||||
"all": [
|
||||
31.8,
|
||||
28.5,
|
||||
29.1
|
||||
],
|
||||
"median": 29.1,
|
||||
"min": 28.5,
|
||||
"max": 31.8
|
||||
},
|
||||
"upload_p95_ms": {
|
||||
"all": [
|
||||
3641.3,
|
||||
4755.0,
|
||||
8091.8
|
||||
],
|
||||
"median": 4755.0,
|
||||
"min": 3641.3,
|
||||
"max": 8091.8
|
||||
},
|
||||
"oom": 0
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
date: 2026-11-06T09:21:03Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ python3 -c 'import json,statistics,subprocess
|
||||
from pathlib import Path
|
||||
root=Path("evidence/forward-final-2026-11-06")
|
||||
loads=[json.loads(p.read_text()) for p in sorted((root/"load").glob("run*.json"))]
|
||||
memory=[json.loads(p.read_text()) for p in sorted((root/"memory").glob("run*/slots*.json"))]
|
||||
assert len(loads)==len(memory)==3
|
||||
assert all(r["failed_requests"]==0 for r in loads)
|
||||
assert all(r["count"]==80 and r["concurrency"]==40 and r["upload_concurrency"]==3 for r in memory)
|
||||
def stats(values):return {"all":values,"median":statistics.median(values),"min":min(values),"max":max(values)}
|
||||
result={"commit":subprocess.check_output(["git","rev-parse","HEAD"],text=True).strip(),"load_rps":stats([r["successful_rps"] for r in loads]),"load_p95_ms":stats([r["successful_latency_ms"]["p95"] for r in loads]),"load_failed":sum(r["failed_requests"] for r in loads),"memory_statuses":[r["status_codes"] for r in memory],"body_bytes":[r["body_bytes"] for r in memory],"api_peak_mib":stats([max(v["cgroup_memory_peak_mib"] for v in r["memory"].values()) for r in memory]),"lb_peak_mib":stats([r["lb"]["cgroup_memory_peak_mib"] for r in memory]),"upload_p95_ms":stats([r["latency_ms"]["p95"] for r in memory]),"oom":sum(sum(v["oom_kill"] for v in r["memory"].values())+r["lb"]["oom_kill"] for r in memory)}
|
||||
with (root/"measurement-summary.json").open("x") as stream:json.dump(result,stream,indent=2);stream.write("\n")
|
||||
print(json.dumps(result,indent=2))'
|
||||
{
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"load_rps": {
|
||||
"all": [
|
||||
1428.577,
|
||||
1456.338,
|
||||
1529.32
|
||||
],
|
||||
"median": 1456.338,
|
||||
"min": 1428.577,
|
||||
"max": 1529.32
|
||||
},
|
||||
"load_p95_ms": {
|
||||
"all": [
|
||||
100.062,
|
||||
98.948,
|
||||
98.475
|
||||
],
|
||||
"median": 98.948,
|
||||
"min": 98.475,
|
||||
"max": 100.062
|
||||
},
|
||||
"load_failed": 0,
|
||||
"memory_statuses": [
|
||||
{
|
||||
"201": 80
|
||||
},
|
||||
{
|
||||
"201": 80
|
||||
},
|
||||
{
|
||||
"201": 78,
|
||||
"503": 2
|
||||
}
|
||||
],
|
||||
"body_bytes": [
|
||||
10485256,
|
||||
10485256,
|
||||
10485256
|
||||
],
|
||||
"api_peak_mib": {
|
||||
"all": [
|
||||
456.2,
|
||||
438.1,
|
||||
450.4
|
||||
],
|
||||
"median": 450.4,
|
||||
"min": 438.1,
|
||||
"max": 456.2
|
||||
},
|
||||
"lb_peak_mib": {
|
||||
"all": [
|
||||
31.8,
|
||||
28.5,
|
||||
29.1
|
||||
],
|
||||
"median": 29.1,
|
||||
"min": 28.5,
|
||||
"max": 31.8
|
||||
},
|
||||
"upload_p95_ms": {
|
||||
"all": [
|
||||
3641.3,
|
||||
4755.0,
|
||||
8091.8
|
||||
],
|
||||
"median": 4755.0,
|
||||
"min": 3641.3,
|
||||
"max": 8091.8
|
||||
},
|
||||
"oom": 0
|
||||
}
|
||||
exit_code: 0 elapsed_seconds: 0.048
|
||||
@@ -0,0 +1,7 @@
|
||||
date: 2026-11-06T09:17:14Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ python3 scripts/upload_memory.py --base-url http://127.0.0.1:18084 --slots 3 --sizes 10485760 --levels 40 --out evidence/forward-final-2026-11-06/memory/run1
|
||||
# 2026-11-06T09:17:14Z commit 75b93bbba5f29575d3fca1d013cc7e0770d88082; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB
|
||||
slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom
|
||||
3 10.0M 40 201x80 2587.5 3641.3 233.2 456.2 0 31.8 0
|
||||
exit_code: 0 elapsed_seconds: 20.084
|
||||
@@ -0,0 +1,7 @@
|
||||
date: 2026-11-06T09:17:34Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ python3 scripts/upload_memory.py --base-url http://127.0.0.1:18084 --slots 3 --sizes 10485760 --levels 40 --out evidence/forward-final-2026-11-06/memory/run2
|
||||
# 2026-11-06T09:17:34Z commit 75b93bbba5f29575d3fca1d013cc7e0770d88082; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB
|
||||
slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom
|
||||
3 10.0M 40 201x80 2770.4 4755.0 231.3 438.1 0 28.5 0
|
||||
exit_code: 0 elapsed_seconds: 21.500
|
||||
@@ -0,0 +1,7 @@
|
||||
date: 2026-11-06T09:17:56Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ python3 scripts/upload_memory.py --base-url http://127.0.0.1:18084 --slots 3 --sizes 10485760 --levels 40 --out evidence/forward-final-2026-11-06/memory/run3
|
||||
# 2026-11-06T09:17:56Z commit 75b93bbba5f29575d3fca1d013cc7e0770d88082; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB
|
||||
slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom
|
||||
3 10.0M 40 201x78,503x2 3560.9 8091.8 231.7 450.4 0 29.1 0
|
||||
exit_code: 0 elapsed_seconds: 23.514
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"date": "2026-11-06T09:17:21Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"upload_concurrency": 3,
|
||||
"mode": "http",
|
||||
"count": 80,
|
||||
"concurrency": 40,
|
||||
"body_bytes": 10485256,
|
||||
"status_codes": {
|
||||
"201": 80
|
||||
},
|
||||
"instances": 2,
|
||||
"linked_in_messages": 0,
|
||||
"elapsed_seconds": 6.143,
|
||||
"successful_rps": 13.02,
|
||||
"latency_ms": {
|
||||
"p50": 2587.5,
|
||||
"p95": 3641.3,
|
||||
"p99": 4322.0,
|
||||
"max": 4322.0
|
||||
},
|
||||
"memory": {
|
||||
"35b198e7b5ca": {
|
||||
"idle_mib": 230.7,
|
||||
"docker_stats_peak_mib": 409.6,
|
||||
"cgroup_memory_peak_mib": 424.4,
|
||||
"oom_kill": 0
|
||||
},
|
||||
"93b12ae1c127": {
|
||||
"idle_mib": 233.2,
|
||||
"docker_stats_peak_mib": 419.5,
|
||||
"cgroup_memory_peak_mib": 456.2,
|
||||
"oom_kill": 0
|
||||
}
|
||||
},
|
||||
"lb": {
|
||||
"cgroup_memory_peak_mib": 31.8,
|
||||
"oom_kill": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# 2026-11-06T09:17:14Z commit 75b93bbba5f29575d3fca1d013cc7e0770d88082; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB
|
||||
slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom
|
||||
3 10.0M 40 201x80 2587.5 3641.3 233.2 456.2 0 31.8 0
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"date": "2026-11-06T09:17:40Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"upload_concurrency": 3,
|
||||
"mode": "http",
|
||||
"count": 80,
|
||||
"concurrency": 40,
|
||||
"body_bytes": 10485256,
|
||||
"status_codes": {
|
||||
"201": 80
|
||||
},
|
||||
"instances": 2,
|
||||
"linked_in_messages": 0,
|
||||
"elapsed_seconds": 8.053,
|
||||
"successful_rps": 9.93,
|
||||
"latency_ms": {
|
||||
"p50": 2770.4,
|
||||
"p95": 4755.0,
|
||||
"p99": 5507.3,
|
||||
"max": 5507.3
|
||||
},
|
||||
"memory": {
|
||||
"5df14feadc75": {
|
||||
"idle_mib": 230.1,
|
||||
"docker_stats_peak_mib": 411.6,
|
||||
"cgroup_memory_peak_mib": 438.1,
|
||||
"oom_kill": 0
|
||||
},
|
||||
"806f59cf0d4c": {
|
||||
"idle_mib": 231.3,
|
||||
"docker_stats_peak_mib": 401.0,
|
||||
"cgroup_memory_peak_mib": 425.7,
|
||||
"oom_kill": 0
|
||||
}
|
||||
},
|
||||
"lb": {
|
||||
"cgroup_memory_peak_mib": 28.5,
|
||||
"oom_kill": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# 2026-11-06T09:17:34Z commit 75b93bbba5f29575d3fca1d013cc7e0770d88082; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB
|
||||
slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom
|
||||
3 10.0M 40 201x80 2770.4 4755.0 231.3 438.1 0 28.5 0
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"date": "2026-11-06T09:18:02Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"upload_concurrency": 3,
|
||||
"mode": "http",
|
||||
"count": 80,
|
||||
"concurrency": 40,
|
||||
"body_bytes": 10485256,
|
||||
"status_codes": {
|
||||
"201": 78,
|
||||
"503": 2
|
||||
},
|
||||
"instances": 2,
|
||||
"linked_in_messages": 0,
|
||||
"elapsed_seconds": 9.545,
|
||||
"successful_rps": 8.17,
|
||||
"latency_ms": {
|
||||
"p50": 3560.9,
|
||||
"p95": 8091.8,
|
||||
"p99": 8772.2,
|
||||
"max": 8772.2
|
||||
},
|
||||
"memory": {
|
||||
"798d7474c368": {
|
||||
"idle_mib": 231.7,
|
||||
"docker_stats_peak_mib": 428.2,
|
||||
"cgroup_memory_peak_mib": 450.4,
|
||||
"oom_kill": 0
|
||||
},
|
||||
"0b9a4f6359fb": {
|
||||
"idle_mib": 179.4,
|
||||
"docker_stats_peak_mib": 410.0,
|
||||
"cgroup_memory_peak_mib": 430.7,
|
||||
"oom_kill": 0
|
||||
}
|
||||
},
|
||||
"lb": {
|
||||
"cgroup_memory_peak_mib": 29.1,
|
||||
"oom_kill": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# 2026-11-06T09:17:56Z commit 75b93bbba5f29575d3fca1d013cc7e0770d88082; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB
|
||||
slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom
|
||||
3 10.0M 40 201x78,503x2 3560.9 8091.8 231.7 450.4 0 29.1 0
|
||||
@@ -0,0 +1,154 @@
|
||||
date: 2026-11-06T09:10:41Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ .venv/bin/python student-tests/tools/forward_network.py
|
||||
{
|
||||
"checks": [
|
||||
{
|
||||
"case": "non_ascii_basic",
|
||||
"raw_hex": "42617369632080",
|
||||
"status": 401,
|
||||
"instance": "d4c8d53d7433"
|
||||
},
|
||||
{
|
||||
"case": "non_ascii_basic",
|
||||
"raw_hex": "426173696320ff",
|
||||
"status": 401,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
{
|
||||
"case": "non_ascii_basic",
|
||||
"raw_hex": "426173696320c3a9",
|
||||
"status": 401,
|
||||
"instance": "d4c8d53d7433"
|
||||
},
|
||||
{
|
||||
"case": "non_ascii_basic",
|
||||
"raw_hex": "42617369632059577870593255366332566a636d5630ff",
|
||||
"status": 401,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
{
|
||||
"case": "nul_basic_display_title",
|
||||
"position": "'\\x00'",
|
||||
"status": [
|
||||
401,
|
||||
400,
|
||||
201,
|
||||
400
|
||||
],
|
||||
"instance": "d4c8d53d7433"
|
||||
},
|
||||
{
|
||||
"case": "nul_basic_display_title",
|
||||
"position": "'\\x00abc'",
|
||||
"status": [
|
||||
401,
|
||||
400,
|
||||
201,
|
||||
400
|
||||
],
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
{
|
||||
"case": "nul_basic_display_title",
|
||||
"position": "'abc\\x00def'",
|
||||
"status": [
|
||||
401,
|
||||
400,
|
||||
201,
|
||||
400
|
||||
],
|
||||
"instance": "d4c8d53d7433"
|
||||
},
|
||||
{
|
||||
"case": "nul_basic_display_title",
|
||||
"position": "'abc\\x00'",
|
||||
"status": [
|
||||
401,
|
||||
400,
|
||||
201,
|
||||
400
|
||||
],
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
{
|
||||
"case": "nul_message_corrected_retry",
|
||||
"position": "'\\x00'",
|
||||
"instances": [
|
||||
"da922ab2ea09",
|
||||
"d4c8d53d7433"
|
||||
],
|
||||
"status": [
|
||||
400,
|
||||
201,
|
||||
201
|
||||
],
|
||||
"copies": 1
|
||||
},
|
||||
{
|
||||
"case": "nul_message_corrected_retry",
|
||||
"position": "'\\x00abc'",
|
||||
"instances": [
|
||||
"d4c8d53d7433",
|
||||
"da922ab2ea09"
|
||||
],
|
||||
"status": [
|
||||
400,
|
||||
201,
|
||||
201
|
||||
],
|
||||
"copies": 1
|
||||
},
|
||||
{
|
||||
"case": "nul_message_corrected_retry",
|
||||
"position": "'abc\\x00def'",
|
||||
"instances": [
|
||||
"da922ab2ea09",
|
||||
"d4c8d53d7433"
|
||||
],
|
||||
"status": [
|
||||
400,
|
||||
201,
|
||||
201
|
||||
],
|
||||
"copies": 1
|
||||
},
|
||||
{
|
||||
"case": "nul_message_corrected_retry",
|
||||
"position": "'abc\\x00'",
|
||||
"instances": [
|
||||
"d4c8d53d7433",
|
||||
"da922ab2ea09"
|
||||
],
|
||||
"status": [
|
||||
400,
|
||||
201,
|
||||
201
|
||||
],
|
||||
"copies": 1
|
||||
},
|
||||
{
|
||||
"case": "nul_access",
|
||||
"status": [
|
||||
404,
|
||||
404
|
||||
]
|
||||
},
|
||||
{
|
||||
"case": "logout_across_replicas",
|
||||
"status": [
|
||||
204,
|
||||
401,
|
||||
401,
|
||||
401,
|
||||
401
|
||||
]
|
||||
}
|
||||
],
|
||||
"instances": [
|
||||
"d4c8d53d7433",
|
||||
"da922ab2ea09"
|
||||
],
|
||||
"pass": true
|
||||
}
|
||||
exit_code: 0 elapsed_seconds: 0.403
|
||||
@@ -0,0 +1,64 @@
|
||||
date: 2026-11-06T09:07:00Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ sh -c 'make check && make validate && make lint && make student-test'
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
.venv/bin/ruff check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
All checks passed!
|
||||
.venv/bin/ruff format --check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
163 files already formatted
|
||||
.venv/bin/ty check src student-tests alembic
|
||||
All checks passed!
|
||||
.venv/bin/pytest
|
||||
============================= test session starts ==============================
|
||||
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0
|
||||
rootdir: <repo>
|
||||
configfile: pyproject.toml
|
||||
testpaths: student-tests
|
||||
plugins: asyncio-1.4.0, anyio-4.15.1
|
||||
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
|
||||
collected 511 items / 19 deselected / 492 selected
|
||||
|
||||
student-tests/adapters/test_s3_storage.py ... [ 0%]
|
||||
student-tests/api/test_access.py ......... [ 2%]
|
||||
student-tests/api/test_attachments.py .................................. [ 9%]
|
||||
.... [ 10%]
|
||||
student-tests/api/test_bounded_contexts.py ................... [ 14%]
|
||||
student-tests/api/test_cache.py ............ [ 16%]
|
||||
student-tests/api/test_concurrency.py .... [ 17%]
|
||||
student-tests/api/test_consistency.py ........ [ 18%]
|
||||
student-tests/api/test_drain.py .. [ 19%]
|
||||
student-tests/api/test_events.py ...... [ 20%]
|
||||
student-tests/api/test_idempotency.py ............... [ 23%]
|
||||
student-tests/api/test_instance.py .... [ 24%]
|
||||
student-tests/api/test_message_attachments.py ........... [ 26%]
|
||||
student-tests/api/test_migrations.py ................................ [ 33%]
|
||||
student-tests/api/test_negative.py ..................................... [ 40%]
|
||||
[ 40%]
|
||||
student-tests/api/test_nul_validation.py ................. [ 44%]
|
||||
student-tests/api/test_operability.py .............. [ 46%]
|
||||
student-tests/api/test_pagination.py .................. [ 50%]
|
||||
student-tests/api/test_pool.py ............ [ 53%]
|
||||
student-tests/api/test_reconciler.py .......... [ 55%]
|
||||
student-tests/api/test_sessions.py ...................... [ 59%]
|
||||
student-tests/api/test_timeout.py ........ [ 61%]
|
||||
student-tests/api/test_upload_consistency.py ......... [ 63%]
|
||||
student-tests/api/test_wire_format.py .. [ 63%]
|
||||
student-tests/unit/test_attachments_domain.py .......................... [ 68%]
|
||||
. [ 68%]
|
||||
student-tests/unit/test_authentication.py ............................. [ 74%]
|
||||
student-tests/unit/test_cursor.py ........... [ 77%]
|
||||
student-tests/unit/test_domain.py ...................................... [ 84%]
|
||||
.. [ 85%]
|
||||
student-tests/unit/test_haproxy_errors.py ............... [ 88%]
|
||||
student-tests/unit/test_nul_inputs.py ...................... [ 92%]
|
||||
student-tests/unit/test_probe.py .............. [ 95%]
|
||||
student-tests/unit/test_reconcile_measurements.py ...... [ 96%]
|
||||
student-tests/unit/test_scaling.py ..... [ 97%]
|
||||
student-tests/unit/test_session_cache.py .......... [ 99%]
|
||||
student-tests/unit/test_timeouts.py . [100%]
|
||||
|
||||
================ 492 passed, 19 deselected in 88.06s (0:01:28) =================
|
||||
exit_code: 0 elapsed_seconds: 90.288
|
||||
@@ -0,0 +1,36 @@
|
||||
date: 2026-11-06T09:06:38Z commit: f0fc084fbbc6a6084ac9526c50fcee45b2c9a277
|
||||
environment: {"NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ sh -c 'make check && make validate && make lint && make student-test'
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
.venv/bin/ruff check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
All checks passed!
|
||||
.venv/bin/ruff format --check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
163 files already formatted
|
||||
.venv/bin/ty check src student-tests alembic
|
||||
error[invalid-argument-type]: Argument to `HTTPConnection.__init__` is incorrect
|
||||
--> student-tests/tools/forward_network.py:16:39
|
||||
|
|
||||
16 | conn = http.client.HTTPConnection(base.hostname, base.port, timeout=12)
|
||||
| ^^^^^^^^^^^^^ Expected `str`, found `str | None`
|
||||
info: element `None` of union `str | None` is not assignable to `str`
|
||||
info: Method defined here
|
||||
--> stdlib/http/client.pyi:336:13
|
||||
|
|
||||
336 | def __init__(
|
||||
| ^^^^^^^^
|
||||
337 | self,
|
||||
338 | host: str,
|
||||
| --------- Parameter declared here
|
||||
|
||||
error[not-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
|
||||
--> student-tests/tools/forward_network.py:28:16
|
||||
|
|
||||
28 | assert result["error"]["request_id"] == request_id
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
Found 2 diagnostics
|
||||
make: *** [lint] Error 1
|
||||
exit_code: 2 elapsed_seconds: 0.678
|
||||
@@ -0,0 +1,7 @@
|
||||
date: 2026-11-06T09:32:35Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ openspec archive forward-lab3-final-review-fixes --yes --skip-specs
|
||||
Task status: ✓ Complete
|
||||
Skipping spec updates (--skip-specs flag provided).
|
||||
Change 'forward-lab3-final-review-fixes' archived as '2026-11-06-forward-lab3-final-review-fixes'.
|
||||
exit_code: 0 elapsed_seconds: 0.776
|
||||
@@ -0,0 +1,17 @@
|
||||
date: 2026-11-06T09:18:19Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ sh -c 'uptime; docker ps --format "{{.Names}} {{.Status}}"; docker stats --no-stream --format "{{.Name}} {{.CPUPerc}} {{.MemUsage}}"'
|
||||
12:18 up 37 days, 11:30, 6 users, load averages: 4.69 4.19 4.16
|
||||
hlpipe-lab4-forward-final-20261106-api-1 Up 2 seconds (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-api-2 Up 2 seconds (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-lb-1 Up 2 seconds (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-postgres-1 Up 5 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-s3-1 Up 4 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-valkey-1 Up 5 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-api-1 0.49% 227.9MiB / 512MiB
|
||||
hlpipe-lab4-forward-final-20261106-api-2 0.83% 227.9MiB / 512MiB
|
||||
hlpipe-lab4-forward-final-20261106-lb-1 1.16% 15.97MiB / 128MiB
|
||||
hlpipe-lab4-forward-final-20261106-postgres-1 2.18% 59.24MiB / 1GiB
|
||||
hlpipe-lab4-forward-final-20261106-s3-1 1.32% 297.5MiB / 512MiB
|
||||
hlpipe-lab4-forward-final-20261106-valkey-1 0.19% 13.54MiB / 128MiB
|
||||
exit_code: 0 elapsed_seconds: 2.646
|
||||
@@ -0,0 +1,18 @@
|
||||
date: 2026-11-06T09:16:14Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ sh -c 'docker info --format "cpus={{.NCPU}} memory={{.MemTotal}}"; uptime; docker ps --format "{{.Names}} {{.Status}}"; docker stats --no-stream --format "{{.Name}} {{.CPUPerc}} {{.MemUsage}}"'
|
||||
cpus=16 memory=8217190400
|
||||
12:16 up 37 days, 11:28, 6 users, load averages: 3.42 4.16 4.16
|
||||
hlpipe-lab4-forward-final-20261106-api-1 Up About a minute (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-api-2 Up 3 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-postgres-1 Up 3 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-lb-1 Up 3 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-s3-1 Up 2 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-valkey-1 Up 3 minutes (healthy)
|
||||
hlpipe-lab4-forward-final-20261106-api-1 12.78% 258.1MiB / 512MiB
|
||||
hlpipe-lab4-forward-final-20261106-api-2 0.83% 298.8MiB / 512MiB
|
||||
hlpipe-lab4-forward-final-20261106-postgres-1 0.13% 40.44MiB / 1GiB
|
||||
hlpipe-lab4-forward-final-20261106-lb-1 0.14% 24.3MiB / 128MiB
|
||||
hlpipe-lab4-forward-final-20261106-s3-1 0.04% 69.52MiB / 512MiB
|
||||
hlpipe-lab4-forward-final-20261106-valkey-1 1.25% 13.12MiB / 128MiB
|
||||
exit_code: 0 elapsed_seconds: 2.724
|
||||
@@ -0,0 +1,17 @@
|
||||
date: 2026-11-06T09:09:23Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ sh scripts/persistence-evidence.sh
|
||||
date: 2026-11-06T09:09:23Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
== before: service hostname StartedAt status
|
||||
api d4c8d53d7433 2026-11-06T09:09:18.754909134Z running
|
||||
api da922ab2ea09 2026-11-06T09:09:18.824598676Z running
|
||||
lb ea6930f64089 2026-11-06T09:09:12.580488131Z running
|
||||
migrate adc778a3d97c 2026-11-06T09:09:13.657768882Z exited
|
||||
postgres 3f3a870d89c0 2026-11-06T09:09:12.588930798Z running
|
||||
s3 5921e788f03d 2026-11-06T09:09:12.58822809Z running
|
||||
s3-init c90ac1d6c503 2026-11-06T09:09:18.165289926Z exited
|
||||
valkey 07ea16e2fcfe 2026-11-06T09:09:12.587649298Z running
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
||||
FAIL: GET /health/live: connection/TLS failure (URLError)
|
||||
make: *** [test-persistence] Error 1
|
||||
exit_code: 2 elapsed_seconds: 0.381
|
||||
@@ -0,0 +1,26 @@
|
||||
date: 2026-11-06T09:10:08Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ sh scripts/persistence-evidence.sh http://127.0.0.1:18084
|
||||
date: 2026-11-06T09:10:08Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
== before: service hostname StartedAt status
|
||||
api d4c8d53d7433 2026-11-06T09:09:18.754909134Z running
|
||||
api da922ab2ea09 2026-11-06T09:09:18.824598676Z running
|
||||
lb ea6930f64089 2026-11-06T09:09:12.580488131Z running
|
||||
migrate adc778a3d97c 2026-11-06T09:09:13.657768882Z exited
|
||||
postgres 3f3a870d89c0 2026-11-06T09:09:12.588930798Z running
|
||||
s3 5921e788f03d 2026-11-06T09:09:12.58822809Z running
|
||||
s3-init c90ac1d6c503 2026-11-06T09:09:18.165289926Z exited
|
||||
valkey 07ea16e2fcfe 2026-11-06T09:09:12.587649298Z running
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18084"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
== after: service hostname StartedAt status
|
||||
api d4c8d53d7433 2026-11-06T09:10:18.309662551Z running
|
||||
api da922ab2ea09 2026-11-06T09:10:18.377623592Z running
|
||||
lb ea6930f64089 2026-11-06T09:10:12.683407215Z running
|
||||
migrate adc778a3d97c 2026-11-06T09:10:13.202156257Z exited
|
||||
postgres 3f3a870d89c0 2026-11-06T09:10:12.374370839Z running
|
||||
s3 5921e788f03d 2026-11-06T09:10:12.339453423Z running
|
||||
s3-init c90ac1d6c503 2026-11-06T09:10:17.710432217Z exited
|
||||
valkey 07ea16e2fcfe 2026-11-06T09:10:12.392600006Z running
|
||||
exit_code: 0 elapsed_seconds: 13.179
|
||||
@@ -0,0 +1,37 @@
|
||||
date: 2026-11-06T09:33:10Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ sh -c 'make lint && openspec validate --all --strict && openspec list --json && git diff --check && git diff --exit-code d7478726a85791c21e065d58f610735a9e687433 -- contracts tests README.md COURSE.md'
|
||||
.venv/bin/ruff check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
All checks passed!
|
||||
.venv/bin/ruff format --check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py
|
||||
163 files already formatted
|
||||
.venv/bin/ty check src student-tests alembic
|
||||
All checks passed!
|
||||
- Validating...
|
||||
✓ spec/lab1-event-publication
|
||||
✓ spec/lab1-messenger-chats
|
||||
✓ spec/lab1-messenger-history
|
||||
✓ spec/lab1-messenger-identity
|
||||
✓ spec/lab1-service-operability
|
||||
✓ spec/lab2-auth-sessions
|
||||
✓ spec/lab2-dependency-failures
|
||||
✓ spec/lab2-history-index
|
||||
✓ spec/lab2-persistent-storage
|
||||
✓ spec/lab2-session-cache
|
||||
✓ spec/lab3-failover-operations
|
||||
✓ spec/lab3-idempotent-messages
|
||||
✓ spec/lab3-load-balancing
|
||||
✓ spec/lab4-attachments
|
||||
✓ spec/lab4-evidence-runs
|
||||
✓ spec/lab4-object-storage
|
||||
✓ spec/lab4-storage-reconciler
|
||||
✓ spec/lab4-upload-resilience
|
||||
Totals: 18 passed, 0 failed (18 items)
|
||||
{
|
||||
"changes": [],
|
||||
"root": {
|
||||
"path": "<repo>",
|
||||
"source": "nearest"
|
||||
}
|
||||
}
|
||||
exit_code: 0 elapsed_seconds: 1.921
|
||||
@@ -0,0 +1,19 @@
|
||||
date: 2026-11-06T09:19:41Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-reconcile-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:hlpipe-lab4-forward-final-20261106"}
|
||||
$ make reconcile-demo 'ARGS=--out evidence/forward-final-2026-11-06/reconcile-demo'
|
||||
python3 scripts/reconcile_track.py demo --base-url "http://127.0.0.1:18084" --out evidence/forward-final-2026-11-06/reconcile-demo
|
||||
PASS dry-run находит каждый внедрённый класс, и найдено ровно внедрённое
|
||||
PASS dry-run ничего не меняет
|
||||
PASS apply исправляет ровно найденное dry-run, удаление намерений — в журнале аудита
|
||||
PASS повторный apply — 0 действий
|
||||
PASS независимая проверка после apply: нарушений нет, готовые не потеряны
|
||||
PASS строки с расхождениями и ссылки сообщений сохранены
|
||||
PASS карантин: метаданные 200, /content 404; нетронутое скачивается
|
||||
PASS вернули те же байты — карантин снят; другие байты той же длины — остался
|
||||
PASS второй одновременный проход пропущен
|
||||
PASS SIGTERM: идущий проход останавливается за секунды, блокировка освобождена
|
||||
PASS S3 остановлен: код 1 за ограниченное время, состояние не изменилось
|
||||
PASS под нагрузкой: исправлены только внедрённые, ошибок нет
|
||||
PASS под нагрузкой: все 201 готовы и совпадают по SHA-256, потерь 0
|
||||
{"ok": true, "checks": 13}
|
||||
exit_code: 0 elapsed_seconds: 257.493
|
||||
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"date": "2026-11-06T09:20:54Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"mode": "apply",
|
||||
"skipped": false,
|
||||
"grace_seconds": 60,
|
||||
"skew_seconds": 0,
|
||||
"deep": true,
|
||||
"page_size": 1000,
|
||||
"scanned": {
|
||||
"objects": 24,
|
||||
"rows": 27
|
||||
},
|
||||
"found": {
|
||||
"orphan_stale": 3,
|
||||
"orphan_fresh": 2,
|
||||
"missing": 3,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale": 6,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 0,
|
||||
"healed": 0
|
||||
},
|
||||
"fixed": {
|
||||
"orphan_stale": 3,
|
||||
"missing": 3,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale": 6,
|
||||
"healed": 0
|
||||
},
|
||||
"rechecked": {},
|
||||
"errors": 0,
|
||||
"samples": {
|
||||
"missing": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621"
|
||||
],
|
||||
"size_mismatch": [
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d"
|
||||
],
|
||||
"sha_mismatch": [
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2"
|
||||
],
|
||||
"pending_stale": [
|
||||
"2cc53ddd-063f-4edc-ae55-98f201965b7f",
|
||||
"73fc548a-79a1-4396-a848-2e598eba75a1",
|
||||
"848bed6c-437a-4169-8cca-940c1987055b",
|
||||
"99d824a9-d16d-481e-9804-e209f2fa410b",
|
||||
"a0a3b632-5fe3-447e-a93b-bbdce77c4fb1",
|
||||
"d86c4cba-2836-4150-bf0e-d32e1ec442ec"
|
||||
],
|
||||
"orphan_stale": [
|
||||
"attachments/35df74ac-5753-48e0-b106-d596db2ca8e6",
|
||||
"attachments/8ba5a522-a4b8-40a8-b1f3-274401976db6",
|
||||
"attachments/de3cc053-2a20-44ad-b223-e06818b039e7"
|
||||
],
|
||||
"orphan_fresh": [
|
||||
"attachments/7b96d477-2dc4-4a8c-8703-e6176a7e46a6",
|
||||
"attachments/d69d9843-ceab-4101-a278-7e5974071ac6"
|
||||
],
|
||||
"pending_fresh": [
|
||||
"dfb03912-2304-4280-bfb7-7a7b9cb28597",
|
||||
"f1cf4216-9e57-4217-866a-440aac9435f3"
|
||||
]
|
||||
},
|
||||
"cost": {
|
||||
"seconds": 0.119,
|
||||
"requests": {
|
||||
"s3_list": 1,
|
||||
"s3_head": 6,
|
||||
"s3_get": 13,
|
||||
"s3_delete": 9,
|
||||
"sql": 19
|
||||
},
|
||||
"waited_seconds": {
|
||||
"s3_list": 0.018,
|
||||
"sql": 0.006
|
||||
},
|
||||
"hashed_bytes": 1453621,
|
||||
"cpu_seconds": 0.621,
|
||||
"max_rss_mib": 107.6
|
||||
},
|
||||
"exit_code": 0,
|
||||
"wall_seconds": 1.106,
|
||||
"audit": [
|
||||
{
|
||||
"attachment_id": "2cc53ddd-063f-4edc-ae55-98f201965b7f",
|
||||
"chat_id": "01a1b028-1d47-75b7-a3d7-f9dda0509d40",
|
||||
"reason": "reconcile",
|
||||
"event": "audit.attachment_discarded",
|
||||
"level": "info",
|
||||
"ts": "2026-11-06T09:20:54.712257Z"
|
||||
},
|
||||
{
|
||||
"attachment_id": "73fc548a-79a1-4396-a848-2e598eba75a1",
|
||||
"chat_id": "01a1b028-1d47-75b7-a3d7-f9dda0509d40",
|
||||
"reason": "reconcile",
|
||||
"event": "audit.attachment_discarded",
|
||||
"level": "info",
|
||||
"ts": "2026-11-06T09:20:54.724316Z"
|
||||
},
|
||||
{
|
||||
"attachment_id": "848bed6c-437a-4169-8cca-940c1987055b",
|
||||
"chat_id": "01a1b028-1d47-75b7-a3d7-f9dda0509d40",
|
||||
"reason": "reconcile",
|
||||
"event": "audit.attachment_discarded",
|
||||
"level": "info",
|
||||
"ts": "2026-11-06T09:20:54.732394Z"
|
||||
},
|
||||
{
|
||||
"attachment_id": "99d824a9-d16d-481e-9804-e209f2fa410b",
|
||||
"chat_id": "01a1b028-1d47-75b7-a3d7-f9dda0509d40",
|
||||
"reason": "reconcile",
|
||||
"event": "audit.attachment_discarded",
|
||||
"level": "info",
|
||||
"ts": "2026-11-06T09:20:54.741795Z"
|
||||
},
|
||||
{
|
||||
"attachment_id": "a0a3b632-5fe3-447e-a93b-bbdce77c4fb1",
|
||||
"chat_id": "01a1b028-1d47-75b7-a3d7-f9dda0509d40",
|
||||
"reason": "reconcile",
|
||||
"event": "audit.attachment_discarded",
|
||||
"level": "info",
|
||||
"ts": "2026-11-06T09:20:54.749494Z"
|
||||
},
|
||||
{
|
||||
"attachment_id": "d86c4cba-2836-4150-bf0e-d32e1ec442ec",
|
||||
"chat_id": "01a1b028-1d47-75b7-a3d7-f9dda0509d40",
|
||||
"reason": "reconcile",
|
||||
"event": "audit.attachment_discarded",
|
||||
"level": "info",
|
||||
"ts": "2026-11-06T09:20:54.757598Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"date": "2026-11-06T09:20:55Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"mode": "apply",
|
||||
"skipped": false,
|
||||
"grace_seconds": 60,
|
||||
"skew_seconds": 0,
|
||||
"deep": true,
|
||||
"page_size": 1000,
|
||||
"scanned": {
|
||||
"objects": 18,
|
||||
"rows": 21
|
||||
},
|
||||
"found": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 2,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 9,
|
||||
"healed": 0
|
||||
},
|
||||
"fixed": {
|
||||
"orphan_stale": 0,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"healed": 0
|
||||
},
|
||||
"rechecked": {},
|
||||
"errors": 0,
|
||||
"samples": {
|
||||
"quarantined": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d",
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2"
|
||||
],
|
||||
"orphan_fresh": [
|
||||
"attachments/7b96d477-2dc4-4a8c-8703-e6176a7e46a6",
|
||||
"attachments/d69d9843-ceab-4101-a278-7e5974071ac6"
|
||||
],
|
||||
"pending_fresh": [
|
||||
"dfb03912-2304-4280-bfb7-7a7b9cb28597",
|
||||
"f1cf4216-9e57-4217-866a-440aac9435f3"
|
||||
]
|
||||
},
|
||||
"cost": {
|
||||
"seconds": 0.043,
|
||||
"requests": {
|
||||
"s3_list": 1,
|
||||
"s3_head": 0,
|
||||
"s3_get": 13,
|
||||
"s3_delete": 0,
|
||||
"sql": 1
|
||||
},
|
||||
"waited_seconds": {
|
||||
"s3_list": 0.017,
|
||||
"sql": 0.006
|
||||
},
|
||||
"hashed_bytes": 1453621,
|
||||
"cpu_seconds": 0.595,
|
||||
"max_rss_mib": 107.4
|
||||
},
|
||||
"exit_code": 0,
|
||||
"wall_seconds": 1.021,
|
||||
"audit": []
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"checked_at": "2026-11-06T09:20:57Z",
|
||||
"grace_seconds": 60,
|
||||
"deep": true,
|
||||
"objects": 18,
|
||||
"rows": 21,
|
||||
"ready_healthy": 10,
|
||||
"counts": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 2,
|
||||
"missing_referenced": 0,
|
||||
"missing_unreferenced": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale_with_object": 0,
|
||||
"pending_stale_without_object": 0,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 9,
|
||||
"incomplete_stale": 0,
|
||||
"incomplete_fresh": 0,
|
||||
"lost_ready": 0
|
||||
},
|
||||
"samples": {
|
||||
"orphan_fresh": [
|
||||
"attachments/7b96d477-2dc4-4a8c-8703-e6176a7e46a6",
|
||||
"attachments/d69d9843-ceab-4101-a278-7e5974071ac6"
|
||||
],
|
||||
"pending_fresh": [
|
||||
"dfb03912-2304-4280-bfb7-7a7b9cb28597",
|
||||
"f1cf4216-9e57-4217-866a-440aac9435f3"
|
||||
],
|
||||
"quarantined": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2"
|
||||
]
|
||||
},
|
||||
"seconds": {
|
||||
"s3_list": 0.3,
|
||||
"s3_incomplete": 0.325,
|
||||
"pg_query": 0.128,
|
||||
"deep_hash": 0.593,
|
||||
"total": 1.348
|
||||
},
|
||||
"violations": [],
|
||||
"ok": true
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"checked_at": "2026-11-06T09:20:51Z",
|
||||
"grace_seconds": 60,
|
||||
"deep": true,
|
||||
"objects": 24,
|
||||
"rows": 27,
|
||||
"ready_healthy": 10,
|
||||
"counts": {
|
||||
"orphan_stale": 3,
|
||||
"orphan_fresh": 2,
|
||||
"missing_referenced": 2,
|
||||
"missing_unreferenced": 1,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale_with_object": 3,
|
||||
"pending_stale_without_object": 3,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 0,
|
||||
"incomplete_stale": 0,
|
||||
"incomplete_fresh": 0,
|
||||
"lost_ready": 0
|
||||
},
|
||||
"samples": {
|
||||
"orphan_stale": [
|
||||
"attachments/35df74ac-5753-48e0-b106-d596db2ca8e6",
|
||||
"attachments/8ba5a522-a4b8-40a8-b1f3-274401976db6",
|
||||
"attachments/de3cc053-2a20-44ad-b223-e06818b039e7"
|
||||
],
|
||||
"orphan_fresh": [
|
||||
"attachments/7b96d477-2dc4-4a8c-8703-e6176a7e46a6",
|
||||
"attachments/d69d9843-ceab-4101-a278-7e5974071ac6"
|
||||
],
|
||||
"missing_referenced": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10"
|
||||
],
|
||||
"missing_unreferenced": [
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621"
|
||||
],
|
||||
"size_mismatch": [
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d"
|
||||
],
|
||||
"sha_mismatch": [
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2"
|
||||
],
|
||||
"pending_stale_with_object": [
|
||||
"848bed6c-437a-4169-8cca-940c1987055b",
|
||||
"a0a3b632-5fe3-447e-a93b-bbdce77c4fb1",
|
||||
"d86c4cba-2836-4150-bf0e-d32e1ec442ec"
|
||||
],
|
||||
"pending_stale_without_object": [
|
||||
"2cc53ddd-063f-4edc-ae55-98f201965b7f",
|
||||
"73fc548a-79a1-4396-a848-2e598eba75a1",
|
||||
"99d824a9-d16d-481e-9804-e209f2fa410b"
|
||||
],
|
||||
"pending_fresh": [
|
||||
"dfb03912-2304-4280-bfb7-7a7b9cb28597",
|
||||
"f1cf4216-9e57-4217-866a-440aac9435f3"
|
||||
]
|
||||
},
|
||||
"seconds": {
|
||||
"s3_list": 0.304,
|
||||
"s3_incomplete": 0.347,
|
||||
"pg_query": 0.112,
|
||||
"deep_hash": 0.556,
|
||||
"total": 1.319
|
||||
},
|
||||
"violations": [
|
||||
"orphan_stale",
|
||||
"missing_referenced",
|
||||
"missing_unreferenced",
|
||||
"size_mismatch",
|
||||
"sha_mismatch",
|
||||
"pending_stale_with_object",
|
||||
"pending_stale_without_object"
|
||||
],
|
||||
"ok": false
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"checked_at": "2026-11-06T09:23:59Z",
|
||||
"grace_seconds": 60,
|
||||
"deep": true,
|
||||
"objects": 3382,
|
||||
"rows": 3383,
|
||||
"ready_healthy": 3375,
|
||||
"counts": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 0,
|
||||
"missing_referenced": 0,
|
||||
"missing_unreferenced": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale_with_object": 0,
|
||||
"pending_stale_without_object": 0,
|
||||
"pending_fresh": 0,
|
||||
"quarantined": 8,
|
||||
"incomplete_stale": 0,
|
||||
"incomplete_fresh": 0,
|
||||
"lost_ready": 0
|
||||
},
|
||||
"samples": {
|
||||
"quarantined": [
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2"
|
||||
]
|
||||
},
|
||||
"seconds": {
|
||||
"s3_list": 0.677,
|
||||
"s3_incomplete": 0.367,
|
||||
"pg_query": 0.149,
|
||||
"deep_hash": 67.224,
|
||||
"total": 68.428
|
||||
},
|
||||
"violations": [],
|
||||
"ok": true
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
{
|
||||
"date": "2026-11-06T09:23:59Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"started_at": "2026-11-06T09:19:42Z",
|
||||
"faults": {
|
||||
"injected": {
|
||||
"orphan_stale": [
|
||||
"35df74ac-5753-48e0-b106-d596db2ca8e6",
|
||||
"de3cc053-2a20-44ad-b223-e06818b039e7",
|
||||
"8ba5a522-a4b8-40a8-b1f3-274401976db6"
|
||||
],
|
||||
"missing": [
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808"
|
||||
],
|
||||
"size_mismatch": [
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d",
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9"
|
||||
],
|
||||
"sha_mismatch": [
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e"
|
||||
],
|
||||
"pending_stale": [
|
||||
"2cc53ddd-063f-4edc-ae55-98f201965b7f",
|
||||
"99d824a9-d16d-481e-9804-e209f2fa410b",
|
||||
"73fc548a-79a1-4396-a848-2e598eba75a1",
|
||||
"a0a3b632-5fe3-447e-a93b-bbdce77c4fb1",
|
||||
"848bed6c-437a-4169-8cca-940c1987055b",
|
||||
"d86c4cba-2836-4150-bf0e-d32e1ec442ec"
|
||||
],
|
||||
"orphan_fresh": [
|
||||
"d69d9843-ceab-4101-a278-7e5974071ac6",
|
||||
"7b96d477-2dc4-4a8c-8703-e6176a7e46a6"
|
||||
],
|
||||
"pending_fresh": [
|
||||
"f1cf4216-9e57-4217-866a-440aac9435f3",
|
||||
"dfb03912-2304-4280-bfb7-7a7b9cb28597"
|
||||
]
|
||||
},
|
||||
"targets": {
|
||||
"missing": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621"
|
||||
],
|
||||
"corrupt": [
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d"
|
||||
],
|
||||
"bitflip": [
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2"
|
||||
]
|
||||
},
|
||||
"linked": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-22cb-73b4-92c8-0db140de50a1",
|
||||
"01a1b028-22d2-7761-8bdd-8b9987dcd70f"
|
||||
]
|
||||
},
|
||||
"seconds": 256.6,
|
||||
"checks": [
|
||||
{
|
||||
"name": "dry-run находит каждый внедрённый класс, и найдено ровно внедрённое",
|
||||
"ok": true,
|
||||
"expected": {
|
||||
"orphan_stale": 3,
|
||||
"missing": 3,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale": 6,
|
||||
"orphan_fresh": 2,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 0
|
||||
},
|
||||
"found": {
|
||||
"orphan_stale": 3,
|
||||
"orphan_fresh": 2,
|
||||
"missing": 3,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale": 6,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 0,
|
||||
"healed": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dry-run ничего не меняет",
|
||||
"ok": true,
|
||||
"objects": [
|
||||
24,
|
||||
24
|
||||
],
|
||||
"rows": [
|
||||
27,
|
||||
27
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "apply исправляет ровно найденное dry-run, удаление намерений — в журнале аудита",
|
||||
"ok": true,
|
||||
"dry_run": {
|
||||
"orphan_stale": 3,
|
||||
"missing": 3,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale": 6
|
||||
},
|
||||
"fixed": {
|
||||
"orphan_stale": 3,
|
||||
"missing": 3,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale": 6
|
||||
},
|
||||
"audit_discarded": 6
|
||||
},
|
||||
{
|
||||
"name": "повторный apply — 0 действий",
|
||||
"ok": true,
|
||||
"fixed": {
|
||||
"orphan_stale": 0,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"healed": 0
|
||||
},
|
||||
"found": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 2,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 9,
|
||||
"healed": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "независимая проверка после apply: нарушений нет, готовые не потеряны",
|
||||
"ok": true,
|
||||
"counts": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 2,
|
||||
"missing_referenced": 0,
|
||||
"missing_unreferenced": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale_with_object": 0,
|
||||
"pending_stale_without_object": 0,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 9,
|
||||
"incomplete_stale": 0,
|
||||
"incomplete_fresh": 0,
|
||||
"lost_ready": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "строки с расхождениями и ссылки сообщений сохранены",
|
||||
"ok": true,
|
||||
"quarantine": {
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808": "missing",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10": "missing",
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1": "size_mismatch",
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e": "sha_mismatch",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621": "missing",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9": "size_mismatch",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d": "size_mismatch",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2": "sha_mismatch",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2": "sha_mismatch"
|
||||
},
|
||||
"message_links": 6
|
||||
},
|
||||
{
|
||||
"name": "карантин: метаданные 200, /content 404; нетронутое скачивается",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"name": "вернули те же байты — карантин снят; другие байты той же длины — остался",
|
||||
"ok": true,
|
||||
"fixed": {
|
||||
"orphan_stale": 0,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"healed": 1
|
||||
},
|
||||
"s3_get": 5
|
||||
},
|
||||
{
|
||||
"name": "второй одновременный проход пропущен",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"name": "SIGTERM: идущий проход останавливается за секунды, блокировка освобождена",
|
||||
"ok": true,
|
||||
"s3": "paused",
|
||||
"state_before_stop": "running",
|
||||
"init": "true",
|
||||
"stop_seconds": 0.1,
|
||||
"exit_code": 143,
|
||||
"next_pass_skipped": false
|
||||
},
|
||||
{
|
||||
"name": "S3 остановлен: код 1 за ограниченное время, состояние не изменилось",
|
||||
"ok": true,
|
||||
"exit_code": 1,
|
||||
"wall_seconds": 2.32
|
||||
},
|
||||
{
|
||||
"name": "под нагрузкой: исправлены только внедрённые, ошибок нет",
|
||||
"ok": true,
|
||||
"fixed": {
|
||||
"orphan_stale": 5,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 5
|
||||
},
|
||||
"runs": 59
|
||||
},
|
||||
{
|
||||
"name": "под нагрузкой: все 201 готовы и совпадают по SHA-256, потерь 0",
|
||||
"ok": true,
|
||||
"uploads": {
|
||||
"201": 3364
|
||||
},
|
||||
"lost_ready": 0
|
||||
}
|
||||
],
|
||||
"ok": true
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"date": "2026-11-06T09:20:52Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"mode": "dry-run",
|
||||
"skipped": false,
|
||||
"grace_seconds": 60,
|
||||
"skew_seconds": 0,
|
||||
"deep": true,
|
||||
"page_size": 1000,
|
||||
"scanned": {
|
||||
"objects": 24,
|
||||
"rows": 27
|
||||
},
|
||||
"found": {
|
||||
"orphan_stale": 3,
|
||||
"orphan_fresh": 2,
|
||||
"missing": 3,
|
||||
"size_mismatch": 3,
|
||||
"sha_mismatch": 3,
|
||||
"pending_stale": 6,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 0,
|
||||
"healed": 0
|
||||
},
|
||||
"fixed": {
|
||||
"orphan_stale": 0,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"healed": 0
|
||||
},
|
||||
"rechecked": {},
|
||||
"errors": 0,
|
||||
"samples": {
|
||||
"missing": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621"
|
||||
],
|
||||
"size_mismatch": [
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d"
|
||||
],
|
||||
"sha_mismatch": [
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2"
|
||||
],
|
||||
"pending_stale": [
|
||||
"2cc53ddd-063f-4edc-ae55-98f201965b7f",
|
||||
"73fc548a-79a1-4396-a848-2e598eba75a1",
|
||||
"848bed6c-437a-4169-8cca-940c1987055b",
|
||||
"99d824a9-d16d-481e-9804-e209f2fa410b",
|
||||
"a0a3b632-5fe3-447e-a93b-bbdce77c4fb1",
|
||||
"d86c4cba-2836-4150-bf0e-d32e1ec442ec"
|
||||
],
|
||||
"orphan_stale": [
|
||||
"attachments/35df74ac-5753-48e0-b106-d596db2ca8e6",
|
||||
"attachments/8ba5a522-a4b8-40a8-b1f3-274401976db6",
|
||||
"attachments/de3cc053-2a20-44ad-b223-e06818b039e7"
|
||||
],
|
||||
"orphan_fresh": [
|
||||
"attachments/7b96d477-2dc4-4a8c-8703-e6176a7e46a6",
|
||||
"attachments/d69d9843-ceab-4101-a278-7e5974071ac6"
|
||||
],
|
||||
"pending_fresh": [
|
||||
"dfb03912-2304-4280-bfb7-7a7b9cb28597",
|
||||
"f1cf4216-9e57-4217-866a-440aac9435f3"
|
||||
]
|
||||
},
|
||||
"cost": {
|
||||
"seconds": 0.04,
|
||||
"requests": {
|
||||
"s3_list": 1,
|
||||
"s3_head": 0,
|
||||
"s3_get": 13,
|
||||
"s3_delete": 0,
|
||||
"sql": 1
|
||||
},
|
||||
"waited_seconds": {
|
||||
"s3_list": 0.016,
|
||||
"sql": 0.006
|
||||
},
|
||||
"hashed_bytes": 1453621,
|
||||
"cpu_seconds": 0.594,
|
||||
"max_rss_mib": 107.4
|
||||
},
|
||||
"exit_code": 0,
|
||||
"wall_seconds": 1.013,
|
||||
"audit": []
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"date": "2026-11-06T09:20:59Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"mode": "apply",
|
||||
"skipped": false,
|
||||
"grace_seconds": 60,
|
||||
"skew_seconds": 0,
|
||||
"deep": false,
|
||||
"page_size": 1000,
|
||||
"scanned": {
|
||||
"objects": 20,
|
||||
"rows": 21
|
||||
},
|
||||
"found": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 2,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"pending_fresh": 2,
|
||||
"quarantined": 8,
|
||||
"healed": 1
|
||||
},
|
||||
"fixed": {
|
||||
"orphan_stale": 0,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"healed": 1
|
||||
},
|
||||
"rechecked": {},
|
||||
"errors": 0,
|
||||
"samples": {
|
||||
"quarantined": [
|
||||
"01a1b028-22ba-778b-99d5-eef1d99349f1",
|
||||
"01a1b028-2306-74ed-9bff-7c2894a33621",
|
||||
"01a1b028-2316-7510-b41e-754b39583de9",
|
||||
"01a1b028-231e-70ba-8a9e-1de6d00c2e0d",
|
||||
"01a1b028-22ad-77fa-9b2e-d01e032a2c10",
|
||||
"01a1b028-2330-7662-8f98-6b45a5c165a2",
|
||||
"01a1b028-22c2-7713-adf4-93a25c06e07e",
|
||||
"01a1b028-2327-7105-838f-3f0df5b10dc2"
|
||||
],
|
||||
"orphan_fresh": [
|
||||
"attachments/7b96d477-2dc4-4a8c-8703-e6176a7e46a6",
|
||||
"attachments/d69d9843-ceab-4101-a278-7e5974071ac6"
|
||||
],
|
||||
"pending_fresh": [
|
||||
"dfb03912-2304-4280-bfb7-7a7b9cb28597",
|
||||
"f1cf4216-9e57-4217-866a-440aac9435f3"
|
||||
],
|
||||
"healed": [
|
||||
"01a1b028-2293-743d-a00c-f7fec1a50808"
|
||||
]
|
||||
},
|
||||
"cost": {
|
||||
"seconds": 0.04,
|
||||
"requests": {
|
||||
"s3_list": 1,
|
||||
"s3_head": 0,
|
||||
"s3_get": 5,
|
||||
"s3_delete": 0,
|
||||
"sql": 2
|
||||
},
|
||||
"waited_seconds": {
|
||||
"s3_list": 0.019,
|
||||
"sql": 0.006
|
||||
},
|
||||
"hashed_bytes": 559085,
|
||||
"cpu_seconds": 0.607,
|
||||
"max_rss_mib": 107.5
|
||||
},
|
||||
"exit_code": 0,
|
||||
"wall_seconds": 1.074,
|
||||
"audit": []
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"date": "2026-11-06T09:21:14Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"mode": "apply",
|
||||
"skipped": true,
|
||||
"grace_seconds": 60,
|
||||
"skew_seconds": 0,
|
||||
"deep": false,
|
||||
"page_size": 1000,
|
||||
"scanned": {
|
||||
"objects": 0,
|
||||
"rows": 0
|
||||
},
|
||||
"found": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 0,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"pending_fresh": 0,
|
||||
"quarantined": 0,
|
||||
"healed": 0
|
||||
},
|
||||
"fixed": {
|
||||
"orphan_stale": 0,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 0,
|
||||
"healed": 0
|
||||
},
|
||||
"rechecked": {},
|
||||
"errors": 0,
|
||||
"samples": {},
|
||||
"cost": {
|
||||
"seconds": 0.008,
|
||||
"requests": {
|
||||
"s3_list": 0,
|
||||
"s3_head": 0,
|
||||
"s3_get": 0,
|
||||
"s3_delete": 0,
|
||||
"sql": 0
|
||||
},
|
||||
"waited_seconds": {},
|
||||
"hashed_bytes": 0,
|
||||
"cpu_seconds": 0.549,
|
||||
"max_rss_mib": 106.5
|
||||
},
|
||||
"exit_code": 0,
|
||||
"wall_seconds": 0.917,
|
||||
"audit": []
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"01a1b028-1dde-7345-971e-c4c24622ef5d": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2293-743d-a00c-f7fec1a50808": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-22ad-77fa-9b2e-d01e032a2c10": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-22ba-778b-99d5-eef1d99349f1": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-22c2-7713-adf4-93a25c06e07e": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-22cb-73b4-92c8-0db140de50a1": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-22d2-7761-8bdd-8b9987dcd70f": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2306-74ed-9bff-7c2894a33621": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2316-7510-b41e-754b39583de9": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-231e-70ba-8a9e-1de6d00c2e0d": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2327-7105-838f-3f0df5b10dc2": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2330-7662-8f98-6b45a5c165a2": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2339-7091-b944-16c65cfce6f9": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2341-737d-b71f-ed06fdf083e5": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2349-7776-b1f8-5d8380dec796": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2351-7605-96d5-b39a1ad9df0f": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2359-72bc-add8-a22020ccf80a": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2361-71b8-b4bd-4227e8de54bc": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", "01a1b028-2369-7670-9824-9c1871789b60": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75"}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"01a1b028-1dde-7345-971e-c4c24622ef5d": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-22cb-73b4-92c8-0db140de50a1": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-22d2-7761-8bdd-8b9987dcd70f": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-2339-7091-b944-16c65cfce6f9": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-2341-737d-b71f-ed06fdf083e5": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-2349-7776-b1f8-5d8380dec796": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-2351-7605-96d5-b39a1ad9df0f": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-2359-72bc-add8-a22020ccf80a": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-2361-71b8-b4bd-4227e8de54bc": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"01a1b028-2369-7670-9824-9c1871789b60": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"date": "2026-11-06T09:21:32Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"exit_code": 1,
|
||||
"wall_seconds": 2.32,
|
||||
"stdout": "",
|
||||
"log": [
|
||||
"{\"error\":\"EndpointConnectionError\",\"event\":\"reconcile.failed\",\"level\":\"error\",\"ts\":\"2026-11-06T09:21:25.233096Z\"}"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"date": "2026-11-06T09:21:22Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"s3": "paused",
|
||||
"state_before_stop": "running",
|
||||
"init": "true",
|
||||
"stop_seconds": 0.1,
|
||||
"exit_code": 143,
|
||||
"next_pass_skipped": false
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"date": "2026-11-06T09:23:59Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"seconds": 75,
|
||||
"upload_threads": 3,
|
||||
"uploads": {
|
||||
"201": 3364
|
||||
},
|
||||
"created": 3364,
|
||||
"linked_every": 10,
|
||||
"reconciler_runs": 59,
|
||||
"run_seconds": [
|
||||
0.055,
|
||||
0.048,
|
||||
0.056,
|
||||
0.057,
|
||||
0.063,
|
||||
0.067,
|
||||
0.078,
|
||||
0.082,
|
||||
0.094,
|
||||
0.093,
|
||||
0.097,
|
||||
0.102,
|
||||
0.116,
|
||||
0.144,
|
||||
0.125,
|
||||
0.131,
|
||||
0.127,
|
||||
0.15,
|
||||
0.137,
|
||||
0.155,
|
||||
0.163,
|
||||
0.161,
|
||||
0.168,
|
||||
0.183,
|
||||
0.171,
|
||||
0.177,
|
||||
0.176,
|
||||
0.195,
|
||||
0.208,
|
||||
0.197,
|
||||
0.212,
|
||||
0.217,
|
||||
0.221,
|
||||
0.222,
|
||||
0.246,
|
||||
0.236,
|
||||
0.248,
|
||||
0.247,
|
||||
0.257,
|
||||
0.277,
|
||||
0.262,
|
||||
0.3,
|
||||
0.305,
|
||||
0.289,
|
||||
0.299,
|
||||
0.297,
|
||||
0.302,
|
||||
0.358,
|
||||
0.325,
|
||||
0.325,
|
||||
0.333,
|
||||
0.352,
|
||||
0.334,
|
||||
0.346,
|
||||
0.344,
|
||||
0.346,
|
||||
0.384,
|
||||
0.38,
|
||||
0.406
|
||||
],
|
||||
"fixed_total": {
|
||||
"orphan_stale": 5,
|
||||
"missing": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale": 5
|
||||
},
|
||||
"fresh_seen_total": {
|
||||
"orphan_fresh": 175,
|
||||
"pending_fresh": 42
|
||||
},
|
||||
"rechecked_total": {
|
||||
"missing": 55
|
||||
},
|
||||
"errors": 0,
|
||||
"skipped": 0,
|
||||
"injected_before_load": {
|
||||
"orphan": 3,
|
||||
"pending_stale": 3
|
||||
},
|
||||
"left_from_faults": {
|
||||
"orphan_stale": 2,
|
||||
"pending_stale": 2
|
||||
},
|
||||
"check_after": {
|
||||
"objects": 3382,
|
||||
"rows": 3383,
|
||||
"ready_healthy": 3375,
|
||||
"counts": {
|
||||
"orphan_stale": 0,
|
||||
"orphan_fresh": 0,
|
||||
"missing_referenced": 0,
|
||||
"missing_unreferenced": 0,
|
||||
"size_mismatch": 0,
|
||||
"sha_mismatch": 0,
|
||||
"pending_stale_with_object": 0,
|
||||
"pending_stale_without_object": 0,
|
||||
"pending_fresh": 0,
|
||||
"quarantined": 8,
|
||||
"incomplete_stale": 0,
|
||||
"incomplete_fresh": 0,
|
||||
"lost_ready": 0
|
||||
},
|
||||
"ok": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
date: 2026-11-06T09:23:59Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-reconcile-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:hlpipe-lab4-forward-final-20261106"}
|
||||
$ make down
|
||||
docker compose --profile bench --profile tools --profile reconcile down
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Removed
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Removed
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Removed
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Removed
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Removed
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Stopping
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Removed
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Stopped
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Removing
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Removed
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Removed
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_edge Removing
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_backend Removing
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_edge Removed
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_backend Removed
|
||||
exit_code: 0 elapsed_seconds: 3.396
|
||||
@@ -0,0 +1,6 @@
|
||||
date: 2026-11-06T09:19:41Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-reconcile-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:hlpipe-lab4-forward-final-20261106"}
|
||||
$ make test
|
||||
python3 tests/smoke.py --base-url "http://127.0.0.1:18084"
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit_code: 0 elapsed_seconds: 0.460
|
||||
@@ -0,0 +1,149 @@
|
||||
date: 2026-11-06T09:19:28Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-reconcile-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:hlpipe-lab4-forward-final-20261106"}
|
||||
$ make up
|
||||
sh scripts/secrets.sh
|
||||
docker compose up -d --build --wait
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 453B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 1.65kB done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
|
||||
#4 DONE 1.4s
|
||||
|
||||
#5 [internal] load .dockerignore
|
||||
#5 transferring context: 453B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
|
||||
#6 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
|
||||
#7 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [internal] load build context
|
||||
#8 transferring context: 18.81kB 0.0s done
|
||||
#8 DONE 0.1s
|
||||
|
||||
#9 [runtime 5/6] COPY --chown=root:root alembic.ini ./
|
||||
#9 CACHED
|
||||
|
||||
#10 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
|
||||
#10 CACHED
|
||||
|
||||
#11 [builder 7/7] RUN uv sync --locked --no-dev --no-editable
|
||||
#11 CACHED
|
||||
|
||||
#12 [runtime 3/6] COPY --from=builder --chown=root:root /opt/venv /opt/venv
|
||||
#12 CACHED
|
||||
|
||||
#13 [builder 3/7] WORKDIR /build
|
||||
#13 CACHED
|
||||
|
||||
#14 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable
|
||||
#14 CACHED
|
||||
|
||||
#15 [builder 4/7] COPY pyproject.toml uv.lock README.md ./
|
||||
#15 CACHED
|
||||
|
||||
#16 [builder 6/7] COPY src ./src
|
||||
#16 CACHED
|
||||
|
||||
#17 [runtime 2/6] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
|
||||
#17 CACHED
|
||||
|
||||
#18 [runtime 4/6] WORKDIR /app
|
||||
#18 CACHED
|
||||
|
||||
#19 [runtime 6/6] COPY --chown=root:root alembic ./alembic
|
||||
#19 CACHED
|
||||
|
||||
#20 exporting to image
|
||||
#20 exporting layers done
|
||||
#20 exporting manifest sha256:3eab4c0213dac6c3abf99f1aae3241f7f05473144ea0af93cbd54f2493ead5a9 done
|
||||
#20 exporting config sha256:69a1b793a45421608110feaeff33be9ffc032aef2a7543216961693aaea7a897 done
|
||||
#20 exporting attestation manifest sha256:3a5615e55b30f4fcea966479882ce9f7b5226b07b170e3c3b9c58831718ace92 done
|
||||
#20 exporting manifest list sha256:0a338d6793692cb6388d9855a4ea5fa5f4a7fce70c493d6ffdb8e1330147011d done
|
||||
#20 naming to docker.io/library/mtusi-messenger:hlpipe-lab4-forward-final-20261106 done
|
||||
#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab4-forward-final-20261106 done
|
||||
#20 DONE 0.0s
|
||||
|
||||
#21 resolving provenance for metadata file
|
||||
#21 DONE 0.0s
|
||||
api Built
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_backend Creating
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_backend Created
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_edge Creating
|
||||
Network hlpipe-lab4-forward-reconcile-20261106_edge Created
|
||||
Volume "hlpipe-lab4-forward-reconcile-20261106_pgdata" Creating
|
||||
Volume "hlpipe-lab4-forward-reconcile-20261106_pgdata" Created
|
||||
Volume "hlpipe-lab4-forward-reconcile-20261106_s3data" Creating
|
||||
Volume "hlpipe-lab4-forward-reconcile-20261106_s3data" Created
|
||||
Volume "hlpipe-lab4-forward-reconcile-20261106_valkeydata" Creating
|
||||
Volume "hlpipe-lab4-forward-reconcile-20261106_valkeydata" Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Creating
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Created
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Healthy
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Healthy
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Exited
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Exited
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Starting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Started
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Waiting
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-1 Healthy
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-migrate-1 Exited
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-valkey-1 Healthy
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-postgres-1 Healthy
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-s3-init-1 Exited
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-1 Healthy
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-api-2 Healthy
|
||||
Container hlpipe-lab4-forward-reconcile-20261106-lb-1 Healthy
|
||||
scripts/lb-wait.sh
|
||||
exit_code: 0 elapsed_seconds: 12.779
|
||||
@@ -0,0 +1,12 @@
|
||||
date: 2026-11-06T09:14:46Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:hlpipe-lab4-forward-final-20261106"}
|
||||
$ make restore
|
||||
scripts/restore.sh
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Running
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Healthy
|
||||
exit_code: 0 elapsed_seconds: 2.582
|
||||
@@ -0,0 +1,13 @@
|
||||
date: 2026-11-06T09:10:56Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ python3 -c 'import subprocess
|
||||
from pathlib import Path
|
||||
paths=["src/messenger/attachments", "src/messenger/shared", "scripts/reconcile_track.py", "student-tests/tools/seed_storage.py", "alembic", "compose.yaml", "Dockerfile", "pyproject.toml", "uv.lock"]
|
||||
subprocess.run(["git", "diff", "--exit-code", "d7478726a85791c21e065d58f610735a9e687433", "--", *paths],check=True)
|
||||
print("PASS: reconciler algorithm, entrypoint, attachment SQL/S3, platform, schema, dependencies and cost driver unchanged")
|
||||
print("Retained 27 measurements: evidence/sqlalchemy-2026-11-06/track5/measurements/cost, source runtime 3402fd69d4922e500035a204d957be2cccaeb85a")
|
||||
print("Cache miss/logout, NUL validation and LB JSON are outside the measured cost path; API/LB/Valkey were stopped during that series")'
|
||||
PASS: reconciler algorithm, entrypoint, attachment SQL/S3, platform, schema, dependencies and cost driver unchanged
|
||||
Retained 27 measurements: evidence/sqlalchemy-2026-11-06/track5/measurements/cost, source runtime 3402fd69d4922e500035a204d957be2cccaeb85a
|
||||
Cache miss/logout, NUL validation and LB JSON are outside the measured cost path; API/LB/Valkey were stopped during that series
|
||||
exit_code: 0 elapsed_seconds: 0.036
|
||||
@@ -0,0 +1,54 @@
|
||||
date: 2026-11-06T09:13:32Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ python3 scripts/lab4_scenarios.py s3-outage --base-url http://127.0.0.1:18084 --output evidence/forward-final-2026-11-06/s3-outage.json
|
||||
{
|
||||
"ok": true,
|
||||
"date": "2026-11-06T09:13:32Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"scenario": "s3-outage",
|
||||
"s3_container_during_outage": [
|
||||
{
|
||||
"hostname": "5921e788f03d",
|
||||
"status": "exited",
|
||||
"exit_code": "0",
|
||||
"started_at": "2026-11-06T09:12:21.141692594Z",
|
||||
"finished_at": "2026-11-06T09:13:33.012881918Z"
|
||||
}
|
||||
],
|
||||
"during_outage": {
|
||||
"upload": {
|
||||
"status": 503,
|
||||
"seconds": 4.99,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"metadata": {
|
||||
"status": 200,
|
||||
"seconds": 0.026,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"download": {
|
||||
"status": 503,
|
||||
"seconds": 5.329,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"text_message": {
|
||||
"status": 201,
|
||||
"seconds": 0.033,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"health_ready": {
|
||||
"status": 200,
|
||||
"seconds": 0.003,
|
||||
"instance": "da922ab2ea09"
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"upload": 503,
|
||||
"download": 503,
|
||||
"text_message": 201
|
||||
},
|
||||
"as_expected": true,
|
||||
"s3_back_healthy_seconds": 5.76,
|
||||
"download_after_recovery": "sha256 equal"
|
||||
}
|
||||
exit_code: 0 elapsed_seconds: 16.753
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"ok": true,
|
||||
"date": "2026-11-06T09:13:32Z",
|
||||
"commit": "75b93bbba5f29575d3fca1d013cc7e0770d88082",
|
||||
"scenario": "s3-outage",
|
||||
"s3_container_during_outage": [
|
||||
{
|
||||
"hostname": "5921e788f03d",
|
||||
"status": "exited",
|
||||
"exit_code": "0",
|
||||
"started_at": "2026-11-06T09:12:21.141692594Z",
|
||||
"finished_at": "2026-11-06T09:13:33.012881918Z"
|
||||
}
|
||||
],
|
||||
"during_outage": {
|
||||
"upload": {
|
||||
"status": 503,
|
||||
"seconds": 4.99,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"metadata": {
|
||||
"status": 200,
|
||||
"seconds": 0.026,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"download": {
|
||||
"status": 503,
|
||||
"seconds": 5.329,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"text_message": {
|
||||
"status": 201,
|
||||
"seconds": 0.033,
|
||||
"instance": "da922ab2ea09"
|
||||
},
|
||||
"health_ready": {
|
||||
"status": 200,
|
||||
"seconds": 0.003,
|
||||
"instance": "da922ab2ea09"
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"upload": 503,
|
||||
"download": 503,
|
||||
"text_message": 201
|
||||
},
|
||||
"as_expected": true,
|
||||
"s3_back_healthy_seconds": 5.76,
|
||||
"download_after_recovery": "sha256 equal"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
date: 2026-11-06T09:26:56Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {}
|
||||
$ python3 -
|
||||
{"project": "hlpipe-lab4-forward-final-20261106", "containers": [], "persistent_volumes": ["hlpipe-lab4-forward-final-20261106_pgdata", "hlpipe-lab4-forward-final-20261106_s3data", "hlpipe-lab4-forward-final-20261106_valkeydata"]}
|
||||
{"project": "hlpipe-lab4-forward-reconcile-20261106", "containers": [], "persistent_volumes": ["hlpipe-lab4-forward-reconcile-20261106_pgdata", "hlpipe-lab4-forward-reconcile-20261106_s3data", "hlpipe-lab4-forward-reconcile-20261106_valkeydata"]}
|
||||
{"project": "hlpipe-lab4-forward-lb-20261106", "containers": [], "persistent_volumes": []}
|
||||
PASS: all owned containers stopped; six persistent volumes retained
|
||||
exit_code: 0 elapsed_seconds: 0.152
|
||||
@@ -0,0 +1,6 @@
|
||||
date: 2026-11-06T09:09:22Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ make test
|
||||
python3 tests/smoke.py --base-url "http://127.0.0.1:18084"
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit_code: 0 elapsed_seconds: 0.534
|
||||
@@ -0,0 +1,114 @@
|
||||
date: 2026-11-06T09:10:42Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ make test-faults
|
||||
BASE_URL="http://127.0.0.1:18084" .venv/bin/pytest -m stack -v -s student-tests/stack
|
||||
============================= test session starts ==============================
|
||||
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0 -- <repo>/.venv/bin/python
|
||||
cachedir: .pytest_cache
|
||||
rootdir: <repo>
|
||||
configfile: pyproject.toml
|
||||
plugins: asyncio-1.4.0, anyio-4.15.1
|
||||
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
|
||||
collecting ... collected 19 items
|
||||
|
||||
student-tests/stack/test_attachment_faults.py::test_user_errors_never_become_500 10 MiB + 1 с Content-Length, тело не отправлено: 413
|
||||
10 MiB + 1 chunked: 413
|
||||
PNG 100000×100000 (бомба): 413
|
||||
PNG 8001×5000: 413
|
||||
обрезанный PNG: 415
|
||||
обрезанный JPEG: 415
|
||||
JPEG как image/png: 415
|
||||
GIF как image/png: 415
|
||||
WebP как image/png: 415
|
||||
текст как image/png: 415
|
||||
PNG как image/jpeg: 415
|
||||
пустое тело: 415
|
||||
application/octet-stream: 415
|
||||
без Content-Type: 415
|
||||
filename='../a.png': 400
|
||||
filename='a/b.png': 400
|
||||
filename='a\\b.png': 400
|
||||
filename='a\x00.png': 400
|
||||
filename='a\x01.png': 400
|
||||
filename='a\x7f.png': 400
|
||||
filename='': 400
|
||||
filename=' ': 400
|
||||
filename='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: 400
|
||||
filename=None: 400
|
||||
посторонний: upload в чужой чат: 404
|
||||
посторонний: метаданные: 404
|
||||
посторонний: /content: 404
|
||||
посторонний: ссылка на чужое вложение: 404
|
||||
вложение другого чата: 404
|
||||
неизвестное вложение: 404
|
||||
11 вложений: 400
|
||||
повтор вложения: 400
|
||||
невалидный UUID: 400
|
||||
пустой текст без вложений: 400
|
||||
невалидный id вложения: 400
|
||||
variant=thumbnail: 400
|
||||
строк вложений в чате: 2 (= ответов 201); ответов в журнале реплик: 112, из них 5xx: 0
|
||||
PASSED
|
||||
student-tests/stack/test_attachment_faults.py::test_commit_failure_is_compensated_at_once отказ COMMIT после записи объекта: 503 unavailable
|
||||
сразу после ответа: строка нет, объект HEAD 404
|
||||
журнал: audit.attachment_discarded reason=compensation
|
||||
PASSED
|
||||
student-tests/stack/test_attachment_faults.py::test_crash_between_put_and_commit_is_swept_after_grace реплика da922ab2ea09 убита между PUT и COMMIT, клиент получил 502
|
||||
реплика d4c8d53d7433 убита между PUT и COMMIT, клиент получил 502
|
||||
остаток после падения: строка pending, объект HEAD 200
|
||||
остаток после падения: строка pending, объект HEAD 200
|
||||
старше grace: строка убрана через 26.1 с, объект HEAD 404
|
||||
моложе grace: строка pending, объект HEAD 200
|
||||
тот же после сдвига: убран через 1.5 с, объект HEAD 404
|
||||
готовое вложение в сообщении со сдвинутым created_at скачивается, SHA-256 совпадает
|
||||
PASSED
|
||||
student-tests/stack/test_attachment_faults.py::test_aborted_upload_leaves_nothing обрыв после 256 KiB из 5 MiB: статус в журнале реплики [400], намерение None
|
||||
PASSED
|
||||
student-tests/stack/test_attachment_faults.py::test_stalled_upload_is_cut_and_leaves_nothing тело зависло после 1 KiB: 503 unavailable за 8.02 с
|
||||
PASSED
|
||||
student-tests/stack/test_attachment_faults.py::test_token_is_checked_before_the_declared_size без токена, Content-Length 10485761: 401 unauthorized
|
||||
PASSED
|
||||
student-tests/stack/test_attachment_faults.py::test_slow_but_steady_transfers_outlive_the_request_timeout upload 3 MiB ≈ 256 KiB/s: клиент 12.3 с, реплика (201, 12.061776)
|
||||
скачивание 3 MiB ≈ 192 KiB/s из сети edge: клиент 16.1 с, реплика (200, 10.474701)
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_registration_race_yields_exactly_one_user гонка 50 регистраций: 201×1, 409×49
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_chat_creation_rolls_back_on_unknown_member чат с несуществующим участником: 400 invalid_request
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_wrong_password_and_unknown_user_get_same_basic_challenge неверный пароль: 401 за 0.014 с
|
||||
неизвестный пользователь: 401 за 0.013 с
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_logout_then_token_is_dead logout: 204, затем 401, повтор 401
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_serves_repeated_checks 5 проверок токена: keyspace_hits 294 → 299
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_stopped_is_bypassed_but_logout_waits valkey остановлен, действующий токен: 200 за 0.005 с
|
||||
valkey остановлен, неизвестный токен: 401 за 0.003 с
|
||||
valkey остановлен: ready 200, вход 201, выход 503
|
||||
valkey снова запущен: повторный выход 204
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_restart_keeps_cache_and_revocations рестарт valkey: ключей 31 → 31
|
||||
рестарт valkey: живой 200, отозванный 401
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_flushall_loses_nothing FLUSHALL: живой 200, отозванный 401
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_postgres_stopped_gives_bounded_503_and_recovers postgres остановлен, ready: 503 за 0.004 с
|
||||
postgres остановлен, me: 503 за 0.003 с
|
||||
postgres остановлен, stranger: 503 за 0.003 с
|
||||
postgres остановлен, login: 503 за 0.002 с
|
||||
postgres остановлен, register: 503 за 0.015 с
|
||||
live внутри реплики 200; LB исключил все реплики ещё через 0.68 с
|
||||
live через LB без реплик: 503 за 0.000 с
|
||||
postgres запущен: готовность через 2.1 с, прежний токен 200
|
||||
postgres запущен: 40 регистраций 201 через 2 реплики без рестарта API
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_api_restart_keeps_session_without_extending_it рестарт api: готовность через 1.8 с, токен 200
|
||||
expires_at при входе 2026-11-06T10:12:13.154076Z, в БД после рестарта 2026-11-06T10:12:13.154076Z
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_full_restart_keeps_session_until_logout restart.sh: готовность через 0.0 с, прежний токен 200, выход 204, затем 401
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_session_expires_after_restart_at_original_time срок сессии сокращён до 20 с, рестарт api: готовность через 2.8 с, до срока 200, после срока 401
|
||||
PASSED
|
||||
|
||||
======================== 19 passed in 128.23s (0:02:08) ========================
|
||||
exit_code: 0 elapsed_seconds: 128.882
|
||||
@@ -0,0 +1,159 @@
|
||||
date: 2026-11-06T09:09:05Z commit: 75b93bbba5f29575d3fca1d013cc7e0770d88082
|
||||
environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-forward-final-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/forward-final-2026-11-06", "NO_PROXY": "localhost,127.0.0.1,::1"}
|
||||
$ make up
|
||||
sh scripts/secrets.sh
|
||||
docker compose up -d --build --wait
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 453B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 1.65kB done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [internal] load .dockerignore
|
||||
#5 transferring context: 453B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
|
||||
#6 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d 0.0s done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
|
||||
#7 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 0.0s done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [internal] load build context
|
||||
#8 transferring context: 88.06kB 0.0s done
|
||||
#8 DONE 0.0s
|
||||
|
||||
#9 [builder 4/7] COPY pyproject.toml uv.lock README.md ./
|
||||
#9 CACHED
|
||||
|
||||
#10 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
|
||||
#10 CACHED
|
||||
|
||||
#11 [builder 3/7] WORKDIR /build
|
||||
#11 CACHED
|
||||
|
||||
#12 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable
|
||||
#12 CACHED
|
||||
|
||||
#13 [builder 6/7] COPY src ./src
|
||||
#13 DONE 0.0s
|
||||
|
||||
#14 [builder 7/7] RUN uv sync --locked --no-dev --no-editable
|
||||
#14 0.197 Resolved 78 packages in 10ms
|
||||
#14 0.217 Building mtusi-messenger @ file:///build
|
||||
#14 1.666 Built mtusi-messenger @ file:///build
|
||||
#14 1.670 Prepared 1 package in 1.45s
|
||||
#14 1.673 Installed 1 package in 2ms
|
||||
#14 1.842 Bytecode compiled 1701 files in 169ms
|
||||
#14 1.842 + mtusi-messenger==1.4.0 (from file:///build)
|
||||
#14 DONE 1.9s
|
||||
|
||||
#15 [runtime 2/6] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
|
||||
#15 CACHED
|
||||
|
||||
#16 [runtime 3/6] COPY --from=builder --chown=root:root /opt/venv /opt/venv
|
||||
#16 DONE 0.3s
|
||||
|
||||
#17 [runtime 4/6] WORKDIR /app
|
||||
#17 DONE 0.0s
|
||||
|
||||
#18 [runtime 5/6] COPY --chown=root:root alembic.ini ./
|
||||
#18 DONE 0.0s
|
||||
|
||||
#19 [runtime 6/6] COPY --chown=root:root alembic ./alembic
|
||||
#19 DONE 0.0s
|
||||
|
||||
#20 exporting to image
|
||||
#20 exporting layers
|
||||
#20 exporting layers 2.8s done
|
||||
#20 exporting manifest sha256:3eab4c0213dac6c3abf99f1aae3241f7f05473144ea0af93cbd54f2493ead5a9
|
||||
#20 exporting manifest sha256:3eab4c0213dac6c3abf99f1aae3241f7f05473144ea0af93cbd54f2493ead5a9 done
|
||||
#20 exporting config sha256:69a1b793a45421608110feaeff33be9ffc032aef2a7543216961693aaea7a897 done
|
||||
#20 exporting attestation manifest sha256:e1e89c5d35d917ea80fcbc1233c1a97c191fa11007c9414c3a1d5cc89429fc08 done
|
||||
#20 exporting manifest list sha256:085f71679218b524f710c1da526f25cbe81073ef1fc01430e842d8b59369bd28 done
|
||||
#20 naming to docker.io/library/mtusi-messenger:hlpipe-lab4-forward-final-20261106 done
|
||||
#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab4-forward-final-20261106
|
||||
#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab4-forward-final-20261106 0.6s done
|
||||
#20 DONE 3.4s
|
||||
|
||||
#21 resolving provenance for metadata file
|
||||
#21 DONE 0.0s
|
||||
api Built
|
||||
Network hlpipe-lab4-forward-final-20261106_backend Creating
|
||||
Network hlpipe-lab4-forward-final-20261106_backend Created
|
||||
Network hlpipe-lab4-forward-final-20261106_edge Creating
|
||||
Network hlpipe-lab4-forward-final-20261106_edge Created
|
||||
Volume "hlpipe-lab4-forward-final-20261106_s3data" Creating
|
||||
Volume "hlpipe-lab4-forward-final-20261106_s3data" Created
|
||||
Volume "hlpipe-lab4-forward-final-20261106_pgdata" Creating
|
||||
Volume "hlpipe-lab4-forward-final-20261106_pgdata" Created
|
||||
Volume "hlpipe-lab4-forward-final-20261106_valkeydata" Creating
|
||||
Volume "hlpipe-lab4-forward-final-20261106_valkeydata" Created
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Creating
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Created
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Exited
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Exited
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Starting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Started
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Waiting
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-migrate-1 Exited
|
||||
Container hlpipe-lab4-forward-final-20261106-postgres-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-s3-init-1 Exited
|
||||
Container hlpipe-lab4-forward-final-20261106-valkey-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-api-1 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-api-2 Healthy
|
||||
Container hlpipe-lab4-forward-final-20261106-lb-1 Healthy
|
||||
scripts/lb-wait.sh
|
||||
exit_code: 0 elapsed_seconds: 17.380
|
||||
+140
-11
@@ -6,9 +6,13 @@
|
||||
в `.pipeline/.runs/labs/snapshots/`; изменяемый каталог ЛР3 не использован.
|
||||
База ЛР4: `d7478726a85791c21e065d58f610735a9e687433`, чистое дерево до начала.
|
||||
План зафиксирован в `f0fc084`; change `forward-lab3-final-review-fixes`.
|
||||
Код и инструменты проверок зафиксированы в `75b93bbba5f29575d3fca1d013cc7e0770d88082`.
|
||||
Все успешные новые runtime-проверки ниже выполнены на этом SHA 6 ноября 2026 года (UTC).
|
||||
|
||||
Полный список всех 214 изменённых файлов, их source blob и решение для каждого:
|
||||
[manifest](forward-final-2026-11-06/source-manifest.json). Неучтённых путей нет.
|
||||
[Проверка диапазона и source blob](forward-final-2026-11-06/forward-audit.txt) подтверждает
|
||||
214 путей и побайтное совпадение 31 перенесённого файла; два файла объединены вручную.
|
||||
|
||||
## Применимые исправления
|
||||
|
||||
@@ -23,9 +27,11 @@
|
||||
| OpenSpec | 6 исходных capabilities; 3 source archives (19 файлов) | Дельты применяются к прежним префиксам. В history сохранены все сценарии attachment_ids. Архивы ЛР3 сохранены побайтно с lab:3, это история источника, не проверки ЛР4. |
|
||||
| Контекст | AGENTS.md, openspec/config.yaml | Переносимые правила provenance/Context7/сохранения evidence адаптированы к ЛР4 и текущему правилу major/minor. |
|
||||
|
||||
Пять файлов Identity и семь тестовых файлов совпали с базой f591fa6 до переноса,
|
||||
поэтому взяты из final snapshot целиком. Два файла с механизмами ЛР4 объединены вручную.
|
||||
Пять файлов Identity и существовавшие тестовые файлы совпали с базой f591fa6 до переноса;
|
||||
они и новые тесты взяты из final snapshot целиком. Два файла с механизмами ЛР4 объединены вручную.
|
||||
SQLAlchemy/Alembic остаются обязательными; новых миграций или зависимостей в диапазоне нет.
|
||||
Учтены 14 файлов кода/тестов, 19 файлов архивов, 6 capabilities, 2 файла контекста,
|
||||
4 инструмента из evidence и 169 непереносимых файлов отчёта/результатов: всего 214.
|
||||
|
||||
## Неприменимые изменения
|
||||
|
||||
@@ -40,13 +46,136 @@ Source REPORT содержит minor про суррогаты; он сохра
|
||||
|
||||
## Проверки и применимость измерений
|
||||
|
||||
Новые команды, UTC и полные SHA сохраняются в `forward-final-2026-11-06/`.
|
||||
API-сессии/валидация/LB затронуты: повторяются smoke, persistence, failover,
|
||||
stack faults и сетевые регрессии, три прогона записи и граничные точки памяти.
|
||||
Reconciler demo повторяется для интеграции с API. Его стоимость 1k–100k сохраняется:
|
||||
алгоритм, SQL-адаптер вложений, CLI, S3, зависимости и драйвер cost неизменны;
|
||||
в cost API/LB/Valkey остановлены. Прежняя матрица памяти остаётся историческим
|
||||
сравнением, новые контрольные точки не выдаются за повтор всех 36 точек.
|
||||
Фон Docker фиксируется, чужие контейнеры не останавливаются.
|
||||
Новые команды, UTC и полные SHA сохранены в `forward-final-2026-11-06/`.
|
||||
Основной project — `hlpipe-lab4-forward-final-20261106`, HTTP `18084`, статистика
|
||||
`24844`, образ `mtusi-messenger:hlpipe-lab4-forward-final-20261106`.
|
||||
Demo использует тот же образ в отдельном `hlpipe-lab4-forward-reconcile-20261106`;
|
||||
fixture HAProxy — `hlpipe-lab4-forward-lb-20261106`, без host-портов.
|
||||
Каждый project создан в текущем репозитории со своими volumes, старые данные не удалены.
|
||||
|
||||
Результаты этого этапа будут добавлены после завершения команд.
|
||||
| Критерий / команда | Наблюдение | Сырьё |
|
||||
| --- | --- | --- |
|
||||
| `make check`, `make validate`, `make lint`, `make student-test` | PASS; 492 собственных теста, 19 stack deselected. Регрессии гонок используют реальные PostgreSQL/Valkey; прежние тесты вложений и миграций сохранены. | [offline-checks-rerun.txt](forward-final-2026-11-06/offline-checks-rerun.txt) |
|
||||
| Уровень 3: `make up`, `make test` | Обе реплики healthy; checksum, авторизация, сообщения с вложениями — PASS. | [up.txt](forward-final-2026-11-06/up.txt), [smoke.txt](forward-final-2026-11-06/smoke.txt) |
|
||||
| Уровень 3: `scripts/persistence-evidence.sh http://127.0.0.1:18084` | PASS после рестарта API/LB/PostgreSQL/Valkey/S3 с volumes, 13,179 с. | [persistence-rerun.txt](forward-final-2026-11-06/persistence-rerun.txt) |
|
||||
| Уровень 3: `make test-failover ACTION_SCRIPT=scripts/stop-one.sh` | Остановлена `d4c8d53d7433`; 130 записей, 0 ошибок, первое восстановление 2,883 с. Реплики возвращены в ротацию. | [failover-command.txt](forward-final-2026-11-06/failover-command.txt), [failover-d4c8d53d7433.txt](forward-final-2026-11-06/failover-d4c8d53d7433.txt), [restore.txt](forward-final-2026-11-06/restore.txt) |
|
||||
| Сетевая регрессия: `student-tests/tools/forward_network.py` | NUL: display/title/text → 400, Basic → 401; non-ASCII Basic → 401. Исправленный повтор с прежним ключом → 201, одна запись; logout → 401 на обеих репликах. | [network-regressions.txt](forward-final-2026-11-06/network-regressions.txt) |
|
||||
| Уровни 3/4: `make test-faults` | 19 PASS за 128,23 с: PostgreSQL/Valkey, откат logout/TTL, 112 ответов негативного файлового suite без 5xx, компенсация между PUT/COMMIT, pending и grace, обрыв/зависание/медленное тело. | [stack-faults.txt](forward-final-2026-11-06/stack-faults.txt) |
|
||||
| Уровень 3: `make scenario SCENARIO=failover-upload` | Обслужившая upload реплика остановлена, download через другую; исходный SHA-256 совпал. | [failover-upload-command.txt](forward-final-2026-11-06/failover-upload-command.txt), [JSON](forward-final-2026-11-06/failover-upload.json) |
|
||||
| Уровень 3: `make scenario SCENARIO=s3-outage` | S3 остановлен: upload 503 за 4,990 с, download 503 за 5,329 с, текст 201, метаданные и ready 200. После старта байты совпали. | [s3-outage-command.txt](forward-final-2026-11-06/s3-outage-command.txt), [JSON](forward-final-2026-11-06/s3-outage.json) |
|
||||
| Минимум ЛР3: HAProxy fixture с текущей конфигурацией | 12 проверок: 502/503/504 × кавычка/backslash/tab/200 символов. Валидный JSON, request_id совпадает с заголовком. | [haproxy-errors.txt](forward-final-2026-11-06/haproxy-errors.txt) |
|
||||
| Уровень 4: `make limits` | Политика ресурсов, портов, credentials, volumes и сетей — PASS. | [limits.txt](forward-final-2026-11-06/limits.txt) |
|
||||
| После нагрузок: `make test` | PASS. | [final-smoke.txt](forward-final-2026-11-06/final-smoke.txt) |
|
||||
| Трек 2: `make reconcile-demo ARGS="--out evidence/forward-final-2026-11-06/reconcile-demo"` | 13 PASS; подробности ниже. | [reconcile-demo.txt](forward-final-2026-11-06/reconcile-demo.txt), [demo.json](forward-final-2026-11-06/reconcile-demo/demo.json) |
|
||||
|
||||
Ошибочные попытки сохранены: `offline-checks.txt` содержит две ошибки ty в адаптированном
|
||||
инструменте (проверки Optional/None исправлены до коммита кода); `persistence-command.txt`
|
||||
не передал URL обёртке и обратился к несуществующему localhost:8080 до запуска hook.
|
||||
Это не успешные проверки. Исправленные команды и результаты — в файлах с `-rerun` выше.
|
||||
|
||||
## Повтор затронутых измерений
|
||||
|
||||
Проверяемая гипотеза: после усиления проверки сессии сохраняются запись через обе реплики,
|
||||
ограниченная память крупных загрузок и отсутствие потери ready при параллельной сверке.
|
||||
API ×2, на реплику 1 CPU / 512 MiB / 2 worker, 3 upload-слота на worker,
|
||||
`MALLOC_MMAP_THRESHOLD_=131072`. Последовательные серии; одновременных нагрузочных серий нет.
|
||||
Docker VM: 16 CPU, 8 217 190 400 байт RAM. До/после видны только контейнеры текущего project;
|
||||
host load average 1m 3,42 → 4,69. Это наблюдение фона, не эксклюзивность физического хоста:
|
||||
[performance-before.txt](forward-final-2026-11-06/performance-before.txt),
|
||||
[performance-after.txt](forward-final-2026-11-06/performance-after.txt).
|
||||
Чужие контейнеры не останавливались, выброшенных прогонов нет.
|
||||
|
||||
`make load-evidence`: 3 × 8 с, 64 клиента, новый чат на прогон, пауза 15 с;
|
||||
клиент в сети edge с 2 CPU / 512 MiB. Это закрытый контур all-write, не SLO и не точка насыщения.
|
||||
Прогон с повторно используемым токеном не измеряет профиль постоянных cache miss;
|
||||
стоимость nonce/блокировки при массовом входе новых пользователей отдельно не измерена.
|
||||
|
||||
| Прогон | RPS | p95, мс | Ошибок |
|
||||
| --- | ---: | ---: | ---: |
|
||||
| 1 | 1428,577 | 100,062 | 0 |
|
||||
| 2 | 1456,338 | 98,948 | 0 |
|
||||
| 3 | 1529,320 | 98,475 | 0 |
|
||||
|
||||
Медиана 1456,338 RPS, диапазон 1428,577–1529,320. Историческая SQLAlchemy-серия дала
|
||||
медиану 1529,186 RPS: наблюдаемая разница −4,8%, причинный эффект исправления по этим
|
||||
непарным сериям не установлен. Сырьё: [load-command.txt](forward-final-2026-11-06/load-command.txt),
|
||||
[load.txt](forward-final-2026-11-06/load.txt), [3 JSON](forward-final-2026-11-06/load/).
|
||||
|
||||
`python3 scripts/upload_memory.py --base-url http://127.0.0.1:18084 --slots 3
|
||||
--sizes 10485760 --levels 40 --out ...`: 40 клиентов, по 2 upload;
|
||||
размер созданного PNG 10 485 256 байт (параметр генератора 10 MiB).
|
||||
|
||||
| Прогон | HTTP | Пик API, MiB | Пик LB, MiB | Upload p95, мс | OOM |
|
||||
| --- | --- | ---: | ---: | ---: | ---: |
|
||||
| 1 | 80 × 201 | 456,2 | 31,8 | 3641,3 | 0 |
|
||||
| 2 | 80 × 201 | 438,1 | 28,5 | 4755,0 | 0 |
|
||||
| 3 | 78 × 201, 2 × 503 | 450,4 | 29,1 | 8091,8 | 0 |
|
||||
|
||||
238/240 успешны. Максимум API 456,2 < 512 MiB, медиана 450,4; LB медиана 29,1 MiB.
|
||||
Предел RAM соблюдён, но 100% успешности при 40 крупных параллельных upload не показано.
|
||||
Причина двух 503 отдельно не локализована; точка сохранена, повтор ради улучшения результата
|
||||
не делался. Отдельная уборка возможных остатков этих двух запросов в этой серии не измерялась.
|
||||
Сырьё: [memory-1.txt](forward-final-2026-11-06/memory-1.txt),
|
||||
[memory-2.txt](forward-final-2026-11-06/memory-2.txt),
|
||||
[memory-3.txt](forward-final-2026-11-06/memory-3.txt),
|
||||
[3 JSON](forward-final-2026-11-06/memory/).
|
||||
[Сводка из сырья](forward-final-2026-11-06/measurement-summary.json) и
|
||||
[команда агрегации](forward-final-2026-11-06/measurement-summary.txt).
|
||||
|
||||
## Reconciler и сохранённые доказательства
|
||||
|
||||
На новом стенде dry-run нашёл ровно внедрённые расхождения и не изменил 24 объекта / 27 строк.
|
||||
Apply исправил 3 старых orphan, 9 ready перевёл в карантин и удалил 6 старых pending
|
||||
с 6 audit-событиями; повтор дал 0 действий. Ссылки сообщений сохранены, свежие записи не удалены,
|
||||
снятие карантина возможно только после совпадения SHA-256, и без `--deep`.
|
||||
Одновременный запуск пропущен, SIGTERM завершил процесс за 0,1 с (exit 143, init=true),
|
||||
после него lock доступен. При остановленном S3 выход 1 за 2,32 с, без изменения состояния.
|
||||
|
||||
Нагрузка 75 с: 3364 upload с 201, 59 проходов сверки, ошибок и потерянных ready 0.
|
||||
Удалены только 5 внедрённых/состарившихся orphan и 5 pending; 55 возможных missing
|
||||
повторно проверены. Независимый deep-аудит всех готовых вложений проверил байты:
|
||||
[under-load.json](forward-final-2026-11-06/reconcile-demo/under-load.json),
|
||||
[check-under-load.json](forward-final-2026-11-06/reconcile-demo/check-under-load.json).
|
||||
|
||||
Стоимость 1k/10k/30k/100k повторно не снималась: алгоритм, SQL/S3-адаптеры вложений,
|
||||
CLI, shared, схема, зависимости, compose и драйвер cost побайтно не изменились от базы ЛР4.
|
||||
В сохранённой cost-серии API/LB/Valkey были остановлены, поздние изменения Identity/валидации/LB
|
||||
не входят в измеряемый путь. Проверка: [retained-cost-audit.txt](forward-final-2026-11-06/retained-cost-audit.txt).
|
||||
27 точек остаются результатами SHA `3402fd69d4922e500035a204d957be2cccaeb85a`,
|
||||
[исходное сырьё](sqlalchemy-2026-11-06/track5/measurements/cost/).
|
||||
Медианы 100k: shallow 20,215 с, deep 110,910 с (58,661–147,215 с).
|
||||
Страничность и ограниченная память подтверждены; линейность времени не подтвердилась,
|
||||
разброс deep и ограничения одного хоста сохраняются. Это не новые замеры на SHA 75b93bb.
|
||||
Прежняя полная матрица памяти (36 точек) также остаётся исторической; новые 3 точки её не заменяют.
|
||||
IAM/bootstrap не менялись; прежние 31 проверка private bucket, прав и повторного bootstrap
|
||||
сохраняют исходный SHA и находятся в `sqlalchemy-2026-11-06/grade3/`.
|
||||
|
||||
## Ограничения и завершение
|
||||
|
||||
Сохранён minor источника: `src/messenger/messaging/entrypoints/schemas.py:35`
|
||||
сериализует text до доменной проверки. Для непарного surrogate U+D800/U+DFFF
|
||||
получен `PydanticSerializationError`, реальный HTTP вернул 500 internal_error.
|
||||
[Локальная проверка](forward-final-2026-11-06/known-minor.txt),
|
||||
[HTTP-проверка](forward-final-2026-11-06/known-minor-http.txt).
|
||||
Это известный крайний случай некорректного Unicode, не успешно пройденный тест;
|
||||
по актуальному правилу minor сохранён в findings и ограничениях REPORT без исправления.
|
||||
[Машиночитаемый finding](forward-final-2026-11-06/findings.json).
|
||||
|
||||
При реализации проверены через Context7 `redis-py /redis/redis-py/v8.1.0`
|
||||
(`eval`, async close) и `SQLAlchemy /sqlalchemy/sqlalchemy/rel_2_0_45`
|
||||
(`with_for_update(read=True, key_share=True)` → `FOR KEY SHARE`).
|
||||
|
||||
Основной стенд и demo остановлены `make down`, fixture — `docker compose ... down`;
|
||||
volumes не удалялись. [main-down.txt](forward-final-2026-11-06/main-down.txt),
|
||||
[reconcile-down.txt](forward-final-2026-11-06/reconcile-down.txt),
|
||||
[shutdown-state.txt](forward-final-2026-11-06/shutdown-state.txt): у всех трёх project
|
||||
0 контейнеров, сохранено 6 постоянных volumes. Для проверки использованы `docker ps -aq
|
||||
--filter label=com.docker.compose.project=<project>` и `docker volume ls -q` с тем же фильтром.
|
||||
В логах только нормализованы конечные пробелы и завершающая пустая строка; числа/исходы сохранены.
|
||||
Шесть main specs синхронизированы с сохранением прежних сценариев, change закрыт в
|
||||
`openspec/changes/archive/2026-11-06-forward-lab3-final-review-fixes/` (`lab: 4`):
|
||||
[archive log](forward-final-2026-11-06/openspec-archive.txt). `--skip-specs` использован
|
||||
после ручной синхронизации и проверки полного совпадения дельт с main specs.
|
||||
Завершающие проверки: [final-checks.txt](forward-final-2026-11-06/final-checks.txt),
|
||||
[precommit-checks.txt](forward-final-2026-11-06/precommit-checks.txt).
|
||||
Изменения нормативных файлов, публикация, push и Telegram не выполнялись.
|
||||
|
||||
+2
@@ -1,2 +1,4 @@
|
||||
schema: spec-driven
|
||||
created: 2026-11-06
|
||||
archived: 2026-11-06
|
||||
lab: 4
|
||||
+12
-12
@@ -1,20 +1,20 @@
|
||||
## 1. Перенос обязательного минимума
|
||||
|
||||
- [ ] 1.1 Перенести исправления Identity и их unit/API регрессии.
|
||||
- [ ] 1.2 Перенести валидацию Messaging с сохранением attachment_ids; проверить пустой текст с вложением.
|
||||
- [ ] 1.3 Перенести экранирование ошибок HAProxy и проверить шаблоны.
|
||||
- [ ] 1.4 Составить полный манифест диапазона и причин исключения; сохранить source archives и адаптировать контекст.
|
||||
- [ ] 1.5 Выполнить check/validate/lint/student-test, закоммитить код.
|
||||
- [x] 1.1 Перенести исправления Identity и их unit/API регрессии.
|
||||
- [x] 1.2 Перенести валидацию Messaging с сохранением attachment_ids; проверить пустой текст с вложением.
|
||||
- [x] 1.3 Перенести экранирование ошибок HAProxy и проверить шаблоны.
|
||||
- [x] 1.4 Составить полный манифест диапазона и причин исключения; сохранить source archives и адаптировать контекст.
|
||||
- [x] 1.5 Выполнить check/validate/lint/student-test, закоммитить код.
|
||||
|
||||
## 2. Реальный стенд и затронутые сценарии
|
||||
|
||||
- [ ] 2.1 Выполнить smoke/persistence/failover, stack faults, upload failover/S3 и сетевые регрессии.
|
||||
- [ ] 2.2 Проверить JSON ошибок 502/503/504 на реальном HAProxy с особыми request_id.
|
||||
- [ ] 2.3 Снять три прогона записи и три граничных замера памяти, записать фон.
|
||||
- [ ] 2.4 Повторить demo reconciler; обосновать применимость сохранённой матрицы стоимости.
|
||||
- [x] 2.1 Выполнить smoke/persistence/failover, stack faults, upload failover/S3 и сетевые регрессии.
|
||||
- [x] 2.2 Проверить JSON ошибок 502/503/504 на реальном HAProxy с особыми request_id.
|
||||
- [x] 2.3 Снять три прогона записи и три граничных замера памяти, записать фон.
|
||||
- [x] 2.4 Повторить demo reconciler; обосновать применимость сохранённой матрицы стоимости.
|
||||
|
||||
## 3. Завершение
|
||||
|
||||
- [ ] 3.1 Обновить evidence/forward-port.md и ограничения REPORT, сохранить minor без исправления.
|
||||
- [ ] 3.2 Остановить свои стенды без удаления volumes, синхронизировать specs и архивировать цикл.
|
||||
- [ ] 3.3 Выполнить lint перед финальным коммитом, подтвердить чистое дерево и неизменность нормативных файлов.
|
||||
- [x] 3.1 Обновить evidence/forward-port.md и ограничения REPORT, сохранить minor без исправления.
|
||||
- [x] 3.2 Остановить свои стенды без удаления volumes, синхронизировать specs и архивировать цикл.
|
||||
- [x] 3.3 Выполнить lint перед финальным коммитом, подтвердить чистое дерево и неизменность нормативных файлов.
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
Сервис SHALL принимать `POST /api/v1/chats` от аутентифицированного пользователя с телом `{"title":..., "member_ids":[...]}` и возвращать `201` с объектом `Chat`. `title` SHALL содержать от 1 до 100 code points и не состоять только из пробельных символов. `member_ids` SHALL содержать от 1 до 100 уникальных идентификаторов существующих пользователей и SHALL включать вызывающего. Чат SHALL создаваться атомарно: при любой ошибке валидации он не создаётся вовсе.
|
||||
|
||||
По правилам неверных полей и атомарного создания из `contracts/README.md`, `title` SHALL NOT содержать NUL.
|
||||
|
||||
#### Scenario: Чат создан
|
||||
|
||||
- **WHEN** участник отправляет `POST /api/v1/chats` с корректным `title` и списком из своего и чужого идентификаторов
|
||||
@@ -34,6 +36,12 @@
|
||||
- **WHEN** `POST /api/v1/chats` приходит без `Authorization: Bearer` или с недействительным токеном
|
||||
- **THEN** ответ `401` с кодом `unauthorized` и `WWW-Authenticate: Bearer realm="messenger"`
|
||||
|
||||
#### Scenario: NUL в названии чата
|
||||
|
||||
- **WHEN** аутентифицированный пользователь отправляет `POST /api/v1/chats` с NUL в `title` и корректными участниками
|
||||
- **THEN** ответ `400` с телом `{"error":{"code":"invalid_request","message":...,"request_id":...}}`; чат не появляется в списке
|
||||
- **AND** ответ содержит непустые `X-Instance-Id` и `X-Request-Id`, совпадающий с `error.request_id`
|
||||
|
||||
### Requirement: Членство как граница доступа
|
||||
|
||||
Чат SHALL быть доступен только своим участникам. Посторонний пользователь SHALL получать `404` с кодом `not_found` — тот же ответ, что и для несуществующего чата. Сервис SHALL NOT использовать `403` и SHALL NOT раскрывать факт существования чужого чата ни кодом ответа, ни текстом сообщения.
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
Сервис SHALL принимать `POST /api/v1/chats/{chat_id}/messages` от участника чата с телом `{"text":..., "attachment_ids":[...]}` и обязательным заголовком `Idempotency-Key` и возвращать `201` с объектом `Message`. Отправитель SHALL выводиться из предъявленной идентификации; поле `sender_id` в теле запроса SHALL NOT приниматься. `text` SHALL быть обязательным, содержать не более 4000 Unicode code points и SHALL NOT состоять только из пробельных символов; пустая строка допустима только при хотя бы одном вложении. `attachment_ids` SHALL быть необязательным списком из 0–10 уникальных UUID (по умолчанию `[]`); каждое вложение SHALL принадлежать этому чату и быть готовым, иначе ответ `404`. Порядок `attachment_ids` SHALL сохраняться, а одно вложение SHALL допускаться в нескольких сообщениях. Каждый `Message` в ответе SHALL содержать `attachment_ids`, у текстового — `[]`. `id` и `created_at` SHALL назначаться сервером. Правила ключа описаны в `lab3-idempotent-messages`.
|
||||
|
||||
По правилам неверных полей, доступа и идемпотентности из `contracts/README.md`, `text` SHALL NOT содержать NUL; отклонённая запись SHALL NOT занимать `Idempotency-Key`.
|
||||
|
||||
#### Scenario: Сообщение отправлено
|
||||
|
||||
- **WHEN** участник отправляет `{"text":"Привет, мир 👋"}` в свой чат с новым `Idempotency-Key`
|
||||
@@ -65,6 +67,17 @@
|
||||
- **WHEN** посторонний отправляет в чужой чат с ключом тело с пустым `text` или с 11 вложениями
|
||||
- **THEN** ответ `404`, а не `400`
|
||||
|
||||
#### Scenario: NUL в тексте сообщения
|
||||
|
||||
- **WHEN** участник отправляет `POST /api/v1/chats/{chat_id}/messages` с NUL в `text` и новым корректным `Idempotency-Key`
|
||||
- **THEN** ответ `400` с телом `{"error":{"code":"invalid_request","message":...,"request_id":...}}`; история не меняется, исправленное сообщение с тем же ключом получает `201`, повтор возвращает тот же объект
|
||||
- **AND** ответ содержит непустые `X-Instance-Id` и `X-Request-Id`, совпадающий с `error.request_id`
|
||||
|
||||
#### Scenario: NUL не раскрывает чужой чат
|
||||
|
||||
- **WHEN** посторонний отправляет сообщение с NUL в чужой или несуществующий чат с корректным ключом
|
||||
- **THEN** ответ `404 not_found` в стандартном теле ошибки с `X-Instance-Id` и `X-Request-Id`; записи нет
|
||||
|
||||
### Requirement: Порядок истории
|
||||
|
||||
История чата SHALL быть упорядочена по паре `(created_at, id)` по возрастанию. Время SHALL назначаться сервером в формате RFC 3339 UTC с суффиксом `Z`. Сервис SHALL гарантировать, что `created_at` внутри одного чата строго возрастает в порядке фиксации сообщений, в том числе при конкурентных вставках через разные процессы API, — иначе обход истории keyset-курсором теряет запись, зафиксированную позже с меньшей отметкой.
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
Сервис SHALL принимать `POST /api/v1/users` без аутентификации и возвращать `201` с объектом `User`, содержащим назначенные сервером `id` и `created_at`. Тело запроса SHALL содержать ровно поля `username`, `display_name` и `password`. `username` SHALL соответствовать `^[a-z0-9_]{3,32}$` и быть уникальным, `display_name` SHALL содержать от 1 до 100 Unicode code points и не состоять только из пробельных символов, требования к `password` задаёт `lab2-auth-sessions`. Ответ SHALL NOT содержать полей, отсутствующих в схеме `User`. Уникальность SHALL соблюдаться и при конкурентной регистрации одного `username`: успешной будет ровно одна, остальные получат `409`.
|
||||
|
||||
По правилам неверных полей и ошибок из `contracts/README.md`, `display_name` SHALL NOT содержать NUL.
|
||||
|
||||
#### Scenario: Пользователь создан
|
||||
|
||||
- **WHEN** приходит `POST /api/v1/users` с телом `{"username":"alice_01","display_name":"Алиса","password":"<12+ символов>"}`
|
||||
@@ -39,6 +41,12 @@
|
||||
- **WHEN** `POST /api/v1/users` приходит без заголовка `Authorization`
|
||||
- **THEN** запрос обрабатывается на общих основаниях, ответ не равен `401`
|
||||
|
||||
#### Scenario: NUL в отображаемом имени
|
||||
|
||||
- **WHEN** `POST /api/v1/users` содержит NUL в `display_name`
|
||||
- **THEN** ответ `400` с телом `{"error":{"code":"invalid_request","message":...,"request_id":...}}`; пользователь не создаётся, повтор с корректным именем и тем же username может дать `201`
|
||||
- **AND** ответ содержит непустые `X-Instance-Id` и `X-Request-Id`, совпадающий с `error.request_id`
|
||||
|
||||
### Requirement: Чтение текущего пользователя
|
||||
|
||||
Сервис SHALL отдавать по `GET /api/v1/users/me` объект `User` владельца предъявленной `Bearer`-сессии в том же виде, в каком он был возвращён при регистрации.
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
Сервис SHALL принимать `POST /api/v1/auth/sessions` только с заголовком `Authorization: Basic <base64(username:password)>` и без тела. Декодирование base64 SHALL быть строгим, разделителем SHALL служить первое двоеточие, пароль SHALL декодироваться как UTF-8. При верных учётных данных ответ SHALL быть `201` с телом `{"token","token_type":"Bearer","expires_at","user"}`, где `token` — непрозрачная случайная строка не короче 32 символов с энтропией не менее 256 бит, `expires_at` — RFC 3339 UTC с `Z`, а `user` совпадает с ответом регистрации. Неверный пароль, неизвестный `username`, отсутствующий и испорченный заголовок SHALL давать одинаковый `401` с кодом `unauthorized` и заголовком `WWW-Authenticate: Basic realm="messenger", charset="UTF-8"`.
|
||||
|
||||
В соответствии с разделом «Идентификация и сессии» `contracts/README.md`, NUL в Basic username и не-ASCII символы в закодированной части Basic SHALL приводить к тому же `401 unauthorized`.
|
||||
|
||||
#### Scenario: Успешный вход
|
||||
|
||||
- **WHEN** зарегистрированный пользователь отправляет верные `username:password` в `Basic`
|
||||
@@ -58,6 +60,18 @@
|
||||
- **WHEN** запрос с верным `Basic` содержит тело
|
||||
- **THEN** ответ `400` с кодом `invalid_request`, сессия не создаётся
|
||||
|
||||
#### Scenario: Username с NUL
|
||||
|
||||
- **WHEN** в `POST /api/v1/auth/sessions` передан корректный Base64 от username с NUL и пароля
|
||||
- **THEN** ответ `401` с `WWW-Authenticate: Basic realm="messenger", charset="UTF-8"`; тело `{"error":{"code":"unauthorized","message":...,"request_id":...}}` совпадает с ошибкой неверного пароля, кроме `request_id`
|
||||
- **AND** ответ содержит непустые `X-Instance-Id` и `X-Request-Id`, совпадающий с `error.request_id`
|
||||
|
||||
#### Scenario: Не-ASCII в закодированной части Basic
|
||||
|
||||
- **WHEN** `POST /api/v1/auth/sessions` получает `Authorization` с не-ASCII байтами после `Basic `, в том числе `0xff`
|
||||
- **THEN** ответ `401` с `WWW-Authenticate: Basic realm="messenger", charset="UTF-8"`; тело `{"error":{"code":"unauthorized","message":...,"request_id":...}}` совпадает с ошибкой неверного пароля, кроме `request_id`
|
||||
- **AND** ответ содержит непустой `X-Instance-Id` и `X-Request-Id`, совпадающий с `error.request_id`; сессия не создаётся
|
||||
|
||||
### Requirement: Защищённые endpoint принимают только Bearer
|
||||
|
||||
Все `/api/v1/*`, кроме `POST /api/v1/users` и `POST /api/v1/auth/sessions`, SHALL требовать `Authorization: Bearer <token>`; схема сравнивается без учёта регистра. Отсутствующий, неизвестный, истёкший и отозванный токен, а также `Basic` на этих endpoint SHALL давать `401` с кодом `unauthorized` и `WWW-Authenticate: Bearer realm="messenger"`. Заголовок `X-User-Id` SHALL игнорироваться: он не даёт доступа и не меняет владельца сессии. Аутентификация SHALL выполняться раньше проверки доступа к ресурсу и раньше валидации пути, параметров и тела.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
### Requirement: Выход инвалидирует кэш
|
||||
|
||||
Отзыв сессии SHALL записывать в кэш отметку отзыва на оставшийся срок сессии до удаления строки в БД, а заполнение кэша после промаха SHALL выполняться только при отсутствии ключа. Отозванный токен SHALL получать `401` и при гонке «чтение заполнило кэш после выхода». Если отметку отзыва записать нельзя, выход SHALL отвечать `503` и SHALL NOT удалять сессию. Если после записи отметки удалить сессию в PostgreSQL не удалось, выход SHALL отвечать `503` и SHALL снимать отметку отзыва: ответ `503` означает, что сессия осталась действующей и в БД, и для проверки токена.
|
||||
Отзыв сессии SHALL инвалидировать кэш до фиксации удаления в PostgreSQL. Отозванный токен SHALL получать `401` и при гонке «чтение заполнило кэш после выхода», включая потерю или смену состояния кэша. Если инвалидация невозможна, выход SHALL отвечать `503` и SHALL NOT фиксировать удаление сессии. Если транзакция удаления не завершилась, выход SHALL отвечать `503` и SHALL снимать отметку отзыва: сессия остаётся действующей. Основание: `contracts/README.md`, выход и абсолютный TTL; `README.md`, уровень «3», сохранение минимума lab2.
|
||||
|
||||
#### Scenario: Отозванный токен не оживает из кэша
|
||||
|
||||
@@ -33,10 +33,20 @@
|
||||
|
||||
#### Scenario: Выход при сбое PostgreSQL
|
||||
|
||||
- **WHEN** отметка отзыва записана, но удаление сессии в PostgreSQL завершилось ошибкой
|
||||
- **WHEN** отметка отзыва записана, но транзакция удаления сессии в PostgreSQL завершилась ошибкой
|
||||
- **THEN** выход отвечает `503` с кодом `unavailable`, токен по-прежнему получает `200`, отметки отзыва в кэше нет
|
||||
- **AND** после возвращения PostgreSQL повторный выход отвечает `204`, а токен затем получает `401`
|
||||
|
||||
#### Scenario: Запоздавшее чтение после выхода и потери кэша
|
||||
|
||||
- **WHEN** чтение действующей сессии задержалось, другая реплика завершила logout с `204`, затем очистка или вытеснение удалили отметку отзыва и задержанное чтение продолжилось
|
||||
- **THEN** новый `GET /api/v1/users/me` с тем же токеном получает `401` с `WWW-Authenticate: Bearer realm="messenger"` и телом общей ошибки, даже если другая проверка успела заново обратиться к кэшу
|
||||
|
||||
#### Scenario: Очистка кэша до завершения выхода
|
||||
|
||||
- **WHEN** кэш очищен после инвалидации, но до COMMIT удаления сессии, и параллельно начинается новая проверка токена
|
||||
- **THEN** эта проверка не оставляет действующую сессию в кэше после успешного logout, следующие запросы получают `401`
|
||||
|
||||
### Requirement: Недоступный кэш обходится, но не открывает доступ
|
||||
|
||||
При ошибке или таймауте Valkey проверка сессии SHALL выполняться по PostgreSQL за ограниченное время, а повторные попытки обращения к кэшу SHALL приостанавливаться на короткий интервал. Недействительный токен SHALL получать `401`; запрос SHALL NOT приниматься как анонимный. Недоступность Valkey SHALL NOT переводить `/health/ready` в `503`.
|
||||
|
||||
@@ -46,6 +46,12 @@
|
||||
- **WHEN** все реплики API остановлены
|
||||
- **THEN** запрос через LB получает `503` с телом `{"error":{"code":"unavailable",...}}`
|
||||
|
||||
#### Scenario: Специальные символы идентификатора в ошибке LB
|
||||
|
||||
- **WHEN** запрос с допустимым `X-Request-Id`, содержащим кавычку, обратную косую черту или табуляцию, получает ошибку `502`, `503` или `504` от балансировщика
|
||||
- **THEN** заголовок ответа сохраняет исходное значение, тело является валидным JSON, а декодированное `error.request_id` совпадает с заголовком
|
||||
- **AND** сохраняется общий формат ошибки из `contracts/README.md`; требование относится к единой точке входа уровня «3» `README.md`
|
||||
|
||||
### Requirement: Повтор запросов балансировщиком
|
||||
|
||||
Балансировщик SHALL повторять на другой реплике запрос, который не удалось отправить из-за отказа соединения. Повтор после того, как запрос мог быть обработан, SHALL допускаться только для `GET` и для `POST /api/v1/chats/{chat_id}/messages` с `Idempotency-Key`. Балансировщик SHALL NOT прозрачно повторять `POST /api/v1/users`, `POST /api/v1/chats` и `POST /api/v1/auth/sessions`.
|
||||
|
||||
Reference in New Issue
Block a user