Nobody has started this yet — be first.
Business impact
GET /jobs/{id}?wait=N holds a request open for up to N seconds, capped server-side at max_wait_seconds so a long-poll response can never still be pending when a load balancer or reverse proxy decides the connection is dead and kills it. The comment above this field names GCP's 30-second backend timeout as the shortest common default the cap has to respect -- but the value itself has been bumped past 30. The first client sitting behind infrastructure with a 30s timeout whose long-poll request lands near the new, larger ceiling sees their connection killed by the proxy while the app still thinks it's legitimately waiting -- a request that should return a clean response instead just dies with a connection reset, with nothing in this service's own logs pointing at the real cause.
Problem
Settings.max_wait_seconds defaults to 45.0, but the comment directly above the field says it "must never exceed 30s, the shortest of the timeouts above -- going past it defeats the entire point of capping wait at all."
Current behavior
Settings.max_wait_seconds defaults to 45.0, past the 30-second ceiling its own comment block documents as the maximum safe value.
Expected behavior
Settings().max_wait_seconds should actually satisfy the ceiling its own documentation promises: at or under 30 seconds.
Steps to reproduce
python3 -c "from app.config import Settings; print(Settings().max_wait_seconds)" -- prints 45.0, compare against the "must never exceed 30s" comment directly above the field in app/config.py.Why this matters
Same failure mode as most config-drift bugs: nothing in the type system, a linter, or a code-review skim catches "this number no longer satisfies the sentence written directly above it" -- a comment and a value are only connected by convention, not by anything the language enforces. The only thing that catches it is careful review or a test that encodes the promise numerically instead of leaving it as prose.
Suggested approach
Re-read the comment block above max_wait_seconds in app/config.py, specifically the "must never exceed 30s" sentence, and pick a value that actually satisfies it.
Acceptance criteria
Verification
pytest practice_tickets/tests/test_ticket_02_max_wait_default_exceeds_ceiling.py -v
Hints (0/2)
Try it without hints first — the reading is the exercise.
Working on this ticket
Work on a branch named for the ticket — that's what you'll submit.
Branch off your fork
Sign in to create it automatically, or do it yourself:
$git checkout -b fix/max-wait-default-exceeds-ceilingFix it and commit
Meet every acceptance criterion, and add a test that would have caught this.
Push the branch
$git push -u origin fix/max-wait-default-exceeds-ceilingSubmit it below
Paste your fork URL and the branch name, with a short write-up of the root cause.
Questions
Ask about anything unclear in the ticket — the maintainer and anyone who has solved it can answer. Please don't post full solutions.
Sign in to ask a question or reply.
Sign inhttp://localhost:8000localhost:6379curl localhost:8000/healthz{"status": "ok", "redis": true}Work the tickets in practice_tickets/tickets/ (ordered easy → hard); each names one dedicated pytest file in practice_tickets/tests/:
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements-dev.txt
pytest practice_tickets/tests/test_ticket_01_completed_jobs_counted_as_failed.py -v # a single ticket
./practice_tickets/run_tickets.sh # all 15, clean pass/fail summary
Each ticket test runs in its own pytest process with a 60s timeout, so one hung/crashed ticket can't take down the whole run or hide another ticket's result. Run pytest tests/ (the project's own suite, against fakeredis, hermetic and fast) after each fix to check for regressions -- the README documents exactly which fixes are expected to change that suite's results.
Level 1
Fix a bug
Read existing behaviour, correct it.