forked from mtusi2026/mtusi2026lab2
REPORT.md gets the track 2 section: what the reconciler does and why it is safe, the hypotheses written before the first run, the method of the demo and the cost matrix with its screening, both result tables, the verdicts and the limits. H1 holds. H2 holds for the pass cost: time is linear (t(30k)/t(10k) = 3.73, 3.05 in the series of 29.10), the listing is 95 % of it, list requests are ceil(N/1000) and SQL one more for the empty last keyset page, RSS stays at 82.5-83.8 MiB; --deep is 4.3-5 times dearer per object, not ten. The criteria table, the failure table, the limits, AGENTS.md and the openspec context name the track rows, and evidence/reconcile/README.md describes every file. On a stand from a clean state make test, test-persistence, test-failover, restore, reconcile, lint, check, validate and student-test (342 passed) all pass; the dry-run after these scenarios finds 3 objects, 3 rows and no discrepancy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
151 lines
6.1 KiB
Plaintext
151 lines
6.1 KiB
Plaintext
date: 2026-10-30T04:08:39Z commit: 8cb5a66 стенд из чистого состояния: make reset-data && make up
|
|
|
|
$ 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=0
|
|
|
|
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
|
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.
|
|
exit=0
|
|
|
|
$ 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": 128, "failed_attempts": 0, "first_recovery_seconds": 2.704}
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
exit=0
|
|
|
|
$ make restore
|
|
scripts/restore.sh
|
|
Container mtusi2026lab4-api-1 Running
|
|
Container mtusi2026lab4-api-2 Starting
|
|
Container mtusi2026lab4-api-2 Started
|
|
Container mtusi2026lab4-api-1 Waiting
|
|
Container mtusi2026lab4-api-2 Waiting
|
|
Container mtusi2026lab4-api-1 Healthy
|
|
Container mtusi2026lab4-api-2 Healthy
|
|
exit=0
|
|
|
|
$ make reconcile
|
|
docker compose run --rm --no-deps reconciler
|
|
{
|
|
"mode": "dry-run",
|
|
"skipped": false,
|
|
"grace_seconds": 3600,
|
|
"skew_seconds": 60,
|
|
"deep": false,
|
|
"page_size": 1000,
|
|
"scanned": {
|
|
"objects": 3,
|
|
"rows": 3
|
|
},
|
|
"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.019,
|
|
"requests": {
|
|
"s3_list": 1,
|
|
"s3_head": 0,
|
|
"s3_get": 0,
|
|
"s3_delete": 0,
|
|
"sql": 1
|
|
},
|
|
"waited_seconds": {
|
|
"s3_list": 0.01,
|
|
"sql": 0.003
|
|
},
|
|
"hashed_bytes": 0,
|
|
"cpu_seconds": 0.455,
|
|
"max_rss_mib": 80.3
|
|
}
|
|
}
|
|
exit=0
|
|
|
|
$ make lint
|
|
.venv/bin/ruff check src student-tests 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/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
|
|
143 files already formatted
|
|
.venv/bin/ty check src student-tests
|
|
All checks passed!
|
|
exit=0
|
|
|
|
$ make check
|
|
python3 scripts/check_contract.py
|
|
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
|
exit=0
|
|
|
|
$ make validate
|
|
.venv/bin/python scripts/validate_openapi.py
|
|
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
|
exit=0
|
|
|
|
$ make student-test
|
|
.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 359 items / 17 deselected / 342 selected
|
|
|
|
student-tests/adapters/test_s3_storage.py ... [ 0%]
|
|
student-tests/api/test_access.py ......... [ 3%]
|
|
student-tests/api/test_attachments.py .................................. [ 13%]
|
|
... [ 14%]
|
|
student-tests/api/test_bounded_contexts.py .................. [ 19%]
|
|
student-tests/api/test_cache.py ...... [ 21%]
|
|
student-tests/api/test_concurrency.py .... [ 22%]
|
|
student-tests/api/test_consistency.py ........ [ 24%]
|
|
student-tests/api/test_drain.py .. [ 25%]
|
|
student-tests/api/test_events.py ...... [ 27%]
|
|
student-tests/api/test_idempotency.py ............... [ 31%]
|
|
student-tests/api/test_instance.py .... [ 32%]
|
|
student-tests/api/test_message_attachments.py ........... [ 35%]
|
|
student-tests/api/test_migrations.py ....... [ 38%]
|
|
student-tests/api/test_negative.py ..................................... [ 48%]
|
|
[ 48%]
|
|
student-tests/api/test_operability.py .............. [ 52%]
|
|
student-tests/api/test_pagination.py .................. [ 58%]
|
|
student-tests/api/test_pool.py .. [ 58%]
|
|
student-tests/api/test_reconciler.py ...... [ 60%]
|
|
student-tests/api/test_sessions.py .................. [ 65%]
|
|
student-tests/api/test_timeout.py ...... [ 67%]
|
|
student-tests/api/test_upload_consistency.py ......... [ 70%]
|
|
student-tests/api/test_wire_format.py .. [ 70%]
|
|
student-tests/unit/test_attachments_domain.py .......................... [ 78%]
|
|
. [ 78%]
|
|
student-tests/unit/test_authentication.py ..................... [ 84%]
|
|
student-tests/unit/test_cursor.py ........... [ 88%]
|
|
student-tests/unit/test_domain.py ...................................... [ 99%]
|
|
.. [ 99%]
|
|
student-tests/unit/test_timeouts.py . [100%]
|
|
|
|
===================== 342 passed, 17 deselected in 38.62s ======================
|
|
exit=0
|