Nobody has started this yet — be first.
Business impact
An operator tuning the timeout sweeper's batch size under load (e.g. raising it because timeouts are backing up) sets TIMEOUT_SWEEP_BATCH_SIZE in their deployment config and sees... no change at all, because Load() is reading a differently-spelled env var name and always falls back to the default of 20. There's no error, no warning -- the setting is just silently discarded. This is exactly the kind of bug that costs an on-call engineer an hour of "I set it, why isn't it working?!" before anyone thinks to grep the source for the literal env var name.
Problem
config.Load() reads a misspelled environment variable name for Config.TimeoutSweepBatchSize, so setting the documented TIMEOUT_SWEEP_BATCH_SIZE has no effect.
Current behavior
Setting TIMEOUT_SWEEP_BATCH_SIZE=777 in the environment and calling config.Load() still returns TimeoutSweepBatchSize=20, the default.
Expected behavior
TIMEOUT_SWEEP_BATCH_SIZE (as documented in .env.example and the README's configuration table) should actually control Config.TimeoutSweepBatchSize.
Steps to reproduce
os.Setenv("DATABASE_URL", "postgresql://x/x") os.Setenv("TIMEOUT_SWEEP_BATCH_SIZE", "777") cfg, _ := config.Load() fmt.Println(cfg.TimeoutSweepBatchSize) // prints 20, not 777
Why this matters
Load() builds Config field-by-field via getEnvInt(name, default) calls, one per env var. Every other field's getEnvInt/getEnvDuration call uses the exact documented name -- this one field's call has a typo in the string literal passed as name.
Suggested approach
Compare the string literal passed to getEnvInt for TimeoutSweepBatchSize against .env.example's TIMEOUT_SWEEP_BATCH_SIZE line, letter by letter.
Acceptance criteria
Verification
go test ./tickets/tests/... -run TestTicket05 -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/config-env-var-typoFix it and commit
Meet every acceptance criterion, and add a test that would have caught this.
Push the branch
$git push -u origin fix/config-env-var-typoSubmit 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 indocker composepaystate/paystate/go.modreplace reliable => ../reliabledocker compose up --buildpaystate/context: ..docker-compose.ymlCREATED_TIMEOUTAUTHORIZED_TIMEOUTWork the tickets in tickets/docs/ (ticket-01 through ticket-25); each names one Go test in tickets/tests/:
TEST_DATABASE_URL=postgresql://... go test ./tickets/tests/... -run TestTicket01 -v # a single ticket
TEST_DATABASE_URL=postgresql://... ./tickets/run_tickets.sh # all 25, clean pass/fail summary
Tickets that don't touch Postgres (02, 03, 04, 05, 06, 14, 15, 24) run fine without TEST_DATABASE_URL set; the rest report FAIL with a "TEST_DATABASE_URL not set" message if it's missing. make test-race runs the full go test -race -p 1 ./... suite the same way.
Level 1
Fix a bug
Read existing behaviour, correct it.