Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Extend an API with a Redis-backed queue (BullMQ or similar): at least two job types (one scheduled, one event-driven), idempotent handlers safe under redelivery, retries with backoff, a dead-letter path, and structured logs correlating request → job. Prove idempotency with a test that runs a job twice.
Handlers provably safe to re-run; deterministic job ids; the double-run test exists.
Bounded retries with backoff; dead-letter handling; poison jobs can't wedge the queue.
Structured logs with correlation ids across API and worker; queue depth visible.
Services shared between API and worker; no business logic in routes/processors.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# Queue-backed worker with idempotent jobs ## Goal Extend an API with a Redis-backed queue (BullMQ or similar): at least two job types (one scheduled, one event-driven), idempotent handlers safe under redelivery, retries with backoff, a dead-letter path, and structured logs correlating request → job. Prove idempotency with a test that runs a job twice. ## Acceptance criteria - [ ] Idempotency: Handlers provably safe to re-run; deterministic job ids; the double-run test exists. - [ ] Failure policy: Bounded retries with backoff; dead-letter handling; poison jobs can't wedge the queue. - [ ] Observability: Structured logs with correlation ids across API and worker; queue depth visible. - [ ] Code organization: Services shared between API and worker; no business logic in routes/processors. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.