Code RoomPostgres job runner
HardPrep Room Coding #4264

Postgres job runner

Vibe & agenticNetworking & APIsSenior–Staff~30 min

Greenfield: direct an AI agent to build a background job runner in Python that pulls jobs from Postgres (no Redis/Celery allowed — single-binary deploy constraint), runs them with retries and backoff, and supports concurrent workers. Lay out the build plan: how you'd have it claim jobs safely, the retry/dead-letter model, and the acceptance criteria. What does a naive 'build a job queue on Postgres' prompt get wrong about concurrency?

Implement
claim_due_jobs(job_lines: list[str], now_epoch: int, visibility_timeout: int, worker_capacity: int) → list[str]
Examples
in[["job_a|pending|900|0","job_b|pending|1100|0","job_c|running|0|990"],1000,60,5]out["job_a"]
in[["job_c|running|0|900","job_a|pending|500|0","job_b|pending|500|0","job_d|done|0|0"],1000,60,2]out["job_c","job_a"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 30 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.