Nobody has started this yet — be first.
Business impact
Operators managing more than a handful of jobs need to quickly answer "what's currently disabled?" or "what's actually running?" without eyeballing a full unfiltered dump. Today GET /v1/jobs always returns everything, so anyone building tooling on top of the API (a dashboard, an alert that pages when too many jobs are disabled, a cleanup script) has to fetch and filter client-side -- fine at 10 jobs, painful and wasteful at 10,000.
Problem
internal/api/jobs_handler.go's listJobs already parses ?enabled=true|false and calls s.jobs.ListFiltered(ctx, &enabled) when present. internal/store/jobs.go's ListFiltered is a placeholder that panics with "TODO(ticket-E1): ListFiltered not implemented". Because internal/api/server.go wraps every request in middleware.Recoverer, hitting this endpoint with ?enabled= today returns an opaque HTTP 500 instead of crashing the process -- but it's still broken.
Current behavior
GET /v1/jobs?enabled=true returns HTTP 500 instead of 200.
Expected behavior
GET /v1/jobs?enabled=true returns only enabled jobs; ?enabled=false returns only disabled ones; omitting the parameter keeps today's "return everything" behavior.
Steps to reproduce
Why this matters
This is the simplest possible read-filter: one boolean column, one query parameter, no joins, no pagination interaction to worry about. It's a good first enhancement because the wiring on the HTTP side is already done -- the whole task is one SQL query.
Suggested approach
Look at List and ListEnabled right above ListFiltered in internal/store/jobs.go for the exact query shape and column list (jobColumns) to match. ListFiltered needs to do the same thing but filter on jobs.enabled using the pointer's dereferenced value.
Acceptance criteria
Verification
TEST_DATABASE_URL="postgresql://chronos:chronos@localhost:5432/chronos?sslmode=disable" go test ./tickets/tests/... -run TestTicket03 -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 feat/list-jobs-enabled-filterFix it and commit
Meet every acceptance criterion, and add a test that would have caught this.
Push the branch
$git push -u origin feat/list-jobs-enabled-filterSubmit 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:8081app-1http://localhost:8082app-2http://localhost:8090curl localhost:8081/healthzcurl localhost:8081/readyzWork the tickets in tickets/docs/ (ordered easy → hard); each names one Go test in tickets/tests/. Most tickets need a real Postgres (tickets 4, 11, and 18 are pure-function tests and do not):
export TEST_DATABASE_URL="postgresql://chronos:chronos@localhost:5432/chronos?sslmode=disable"
go test ./tickets/tests/... -run TestTicket08 -v # a single ticket
./tickets/run_tickets.sh # all 20, clean pass/fail summary
Use -race when working on tickets 15, 16, or 17 (the concurrency ones) -- run_tickets.sh already does this for every ticket. Tickets 15 and 16 are adjacent bugs in the same function (pkg/leader/leader.go's lock-release path); fix ticket 16 first, since ticket 15's test keeps failing for ticket 16's reason until that one is fixed too.
Level 2
Implement a feature
Extend the system within its own patterns.