# jobs-retry-replay
# date: 2026-11-11T23:57:49  commit: 276dbda

$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/jobs.py --base-url http://localhost:8080 --scenario retry-replay
== временные ошибки → backoff+jitter → failed → replay ==
  ok   - after 22s: failed, error_code=retry_exhausted
  ok   - bounded: 5 attempts, 4 scheduled retries, delays [0.7, 1.1, 3.6, 6.3]
  ok   - backoff grows 2^n with jitter in [d/2, d] (JOB_BACKOFF_BASE_SECONDS=1)
  ok   - content of failed → 409 (got 409)
  ok   - failed attachment cannot be attached → 409 (got 409)
  ok   - failed job is in the registry (python -m app.replay --list)
  ok   - explicit replay accepted
  ok   - after replay: status ready, error_code null
  ok   - after replay: variants thumbnail+crop+optimized (['thumbnail', 'crop', 'optimized'])
  ok   - after replay: original byte-for-byte
  ok   - after replay: thumbnail 256x160, sha256 matches
  ok   - same job_id, attempt 6, replays=1 (audit)
  ok   - replay of a ready job is refused (no duplicate execution)
   [retry-replay: 55s]

13 passed, 0 failed
[exit 0]
