Files
mtusi2026lab4/evidence/lab4-results.md
T

2.9 KiB

Lab 4 verification summary

Date: 2026-10-29. Environment: local Docker Compose on WSL2; two API replicas; PostgreSQL 16.15; Redis 8.10.2; MinIO release RELEASE.2025-10-15T17-29-55Z built from the official source module.

Check Command Observed result
Public contract BASE_URL=http://127.0.0.1:18080 make test PASS: upload, attachment-only message, authorized byte download, checksum/content type and outsider 404
Exact boundaries / decode BASE_URL=http://127.0.0.1:18080 make test-attachment-boundaries Exact 10 MiB and 40,000,000 pixels accepted; truncated/corrupted-after-64-KiB PNG rejected 415; blank/C1 filename rejected 400
One-replica failover PUBLIC_PORT=18080 BASE_URL=http://127.0.0.1:18080 ACTION_SCRIPT=./scripts/stop-one.sh make test-failover 2 instances before failure; 142 successful writes; 0 failed attempts; first recovery 2.771 s; attachment unchanged
Full persistence restart PUBLIC_PORT=18080 BASE_URL=http://127.0.0.1:18080 ACTION_SCRIPT=./scripts/restart.sh make test-persistence PASS after restarting PostgreSQL, Redis, MinIO, both API replicas, frontend and HAProxy; existing session, metadata and bytes survived
Real MinIO outage BASE_URL=http://127.0.0.1:18080 make test-storage-outage Public readiness returned JSON 503 in 2.004 s, upload returned JSON 503 in 6.016 s; after recovery the 111,817-byte previous original was byte-identical
Private bucket / least privilege make test-minio-policy API containers had no MinIO root env/secrets; limited credentials could put/read/delete only in configured bucket; creating another bucket and anonymous GET failed
Concurrent upload memory BASE_URL=http://127.0.0.1:18080 make test-attachment-memory 12/12 successful 6,293,028-byte PNG uploads (75,516,336 bytes total) in 0.599 s; peak API memory 31,216,107 and 26,214,400 bytes
Reconciler behavior make test-reconcile Dry-run found 4 injected issues; apply deleted 2 objects and marked 2 attachments failed; repeat made 0 mutations; 1 referenced missing attachment remained protected/manual
Reconciler traversal make test-reconcile-scale 100 orphan objects: 109 objects scanned, 9 ms core / 1,978 ms including container startup. 1,000 orphans: 1,009 scanned, 38 ms core / 2,019 ms including startup
Ambiguous DB COMMIT fault go test ./internal/application -count=1 Successful finalize with lost response is recovered by readback; if DB remains unavailable, ready metadata keeps its object and returns an honest error
Go quality gates go test ./...; go test -race ./...; go vet ./...; make check; git diff --check PASS

The measurements are single local runs, not production capacity claims. The reconciler currently materializes both inventories in memory, so its measured near-linear small-scale cost must be re-evaluated before using it with a large bucket.