Nobody has started this yet — be first.
Business impact
The README explicitly calls out dead-letter inspection as a first-class workflow: record the full error so it's inspectable via the API, never just logged and dropped. In practice, a job with a long execution history buries the handful of dead runs someone actually cares about among hundreds of succeeded ones. Anyone triaging failures -- an on-call engineer, a support agent looking up why a customer's job stopped firing -- needs to filter straight to the failures, not page through everything and eyeball statuses.
Problem
internal/api/jobs_handler.go's listRuns already parses ?status= and calls s.queue.ListByJobFiltered(ctx, id, models.RunStatus(status), limit) when present. pkg/queue/queue.go's ListByJobFiltered is a placeholder that panics with "TODO(ticket-E2): ListByJobFiltered not implemented". Today, hitting GET /v1/jobs/{id}/runs?status=dead returns an opaque HTTP 500.
Current behavior
GET /v1/jobs/1/runs?status=dead returns HTTP 500 instead of 200.
Expected behavior
GET /v1/jobs/{id}/runs?status=dead returns only that job's dead runs, most recent first, honoring the existing limit parameter. Omitting ?status= keeps today's "all statuses" behavior.
Steps to reproduce
Why this matters
This mirrors ticket 3 (ListFiltered for jobs) but on job_runs: a single-column filter added to an existing query, no new joins or pagination interaction.
Suggested approach
Look at ListByJob immediately above ListByJobFiltered in pkg/queue/queue.go for the exact query shape (columns, ORDER BY, LIMIT) to match -- ListByJobFiltered needs the same query plus a status = $N predicate.
Acceptance criteria
Verification
TEST_DATABASE_URL="postgresql://chronos:chronos@localhost:5432/chronos?sslmode=disable" go test ./tickets/tests/... -run TestTicket06 -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-runs-status-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-runs-status-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.