# 2026-11-05T21:24:17Z commit=n/a host=Linux 6.18.44-fc-v236 x86_64 cpus=2
$ python3 student-tests/test_reconcile.py
## reconciler (track 2, grace=60.0s, http://127.0.0.1:8080)
PASS inject faults: DB side and S3 side (old) + fresh/used controls  85.77s  14 fault/control items
PASS dry-run detects every class and changes nothing (exit 2)        13.79s  scanned {'s3_objects': 113, 'db_attachments': 111, 'upload_intents': 3, 'multipart_uploads': 0}, cost 7.202s / 109 S3 req
PASS apply fixes only safe classes; fresh and used items untouched   19.42s  actions {'deleted_orphan_object': 2, 'deleted_stale_upload_object': 2, 'removed_stale_intent': 2, 'deleted_lost_metadata': 1, 'flagged_checksum_mismatch': 1, 'flagged_size_mismatch': 1, 'flagged_missing_object': 1}
PASS fresh items are fixed only after they outlive grace; live intent still protected  37.14s  fresh items aged 70s > grace; intent younger than UPLOAD_TIMEOUT+5 kept
PASS second run is idempotent: nothing actionable, no repeated actions  21.29s  still reported (flagged, not actionable): {'checksum_mismatch': 1, 'missing_referenced': 1, 'size_mismatch': 1}
PASS restored object (from backup) clears the flag; download works again   4.53s
PASS concurrent uploads+messages during reconcile --apply (grace 0): nothing lost  20.25s  849 uploads, 6 reconcile --apply runs, 0 lost
summary: 7 passed, 0 failed
exit=0
