Nobody has started this yet — be first.
Business impact
An operator tuning the TTL reaper under load (e.g. raising the batch size because expired reservations are piling up faster than the reaper clears them) sets REAPER_BATCH_SIZE in their deployment config and sees no change at all. There is no error, no warning -- the setting is 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.ReaperBatchSize, so setting the documented REAPER_BATCH_SIZE has no effect.
Current behavior
Setting REAPER_BATCH_SIZE=777 and calling config.Load() still returns ReaperBatchSize == 100 (the default), because the getEnvInt call for that field reads a different string than the documented env var name.
Expected behavior
REAPER_BATCH_SIZE (as documented in .env.example and the README's configuration table) should actually control Config.ReaperBatchSize.
Steps to reproduce
go test ./tickets/tests/... -run TestTicket02 -vos.Setenv("DATABASE_URL", "postgresql://x/x"); os.Setenv("REAPER_BATCH_SIZE", "777")cfg, _ := config.Load()fmt.Println(cfg.ReaperBatchSize) -- prints 100, not 777.Why this matters
Load() builds Config field-by-field via getEnvInt(name, default) calls, one per env var. Every other field's 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 ReaperBatchSize against .env.example's REAPER_BATCH_SIZE line, letter by letter.
Acceptance criteria
Verification
go test ./tickets/tests/... -run TestTicket02 -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/reaper-batch-size-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/reaper-batch-size-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 inSKIP LOCKEDhttp://localhost:8081localhost:5434flash-saleeveryday-widgetcurl localhost:8081/healthzgo run ./cmd/loadtest -url http://localhost:8081 -sku flash-sale -concurrency 10000Work the tickets in tickets/docs/ (ordered easy → hard); each names one dedicated Go test in tickets/tests/:
export TEST_DATABASE_URL=postgresql://inventory:inventory@localhost:5432/inventory_test?sslmode=disable
go test ./tickets/tests/... -run TestTicket24 -v # a single ticket
./tickets/run_tickets.sh # all 25, clean pass/fail summary
Tickets that don't touch Postgres (02, 07, 17, 19) run fine without TEST_DATABASE_URL; the rest t.Skip cleanly, not fail, if it's unset.
Level 1
Fix a bug
Read existing behaviour, correct it.