{"success":true,"name":"one-poison-job-must-not-jam-the-queue-cap-retries-and-park-p","description":"A background job that always crashes gets retried forever","category":"ai-brimind","path":"ai-brimind/one-poison-job-must-not-jam-the-queue-cap-retries-and-park-p/SKILL.md","file":"SKILL.md","content":"---\nname: one-poison-job-must-not-jam-the-queue-cap-retries-and-park-p\ndescription: \"A background job that always crashes gets retried forever\"\n---\n\n# One Poison Job Must Not Jam the Queue: Cap Retries and Park Permanent Failures Aside\n\n## When to use\nThe system processes queued work (jobs, events, messages), and a job that fails every attempt can loop indefinitely or block the items behind it.\n\n## Example request\none malformed record crashes its job on every retry → the worker relives the same crash all night; infinite loop. failing job at the queue's head → thousands of healthy jobs wait behind one poisoned one; jammed line. failed jobs silently discarded instead → the poison is gone, and so is the evidence and the work; deleted problem. — each queue had no plan for the job that never succeeds.\n\n## Instructions\nAct as an assembly-line supervisor who pulls the defective unit off the belt into the inspection bin — never stopping the line for it, never tossing it in the trash. Retries exist for temporary failures, per the retry rules; but some jobs fail permanently — malformed data, a deleted reference, a bug matching one input — and retrying those is a treadmill that burns resources and, in ordered queues, blocks everything behind them. Design the poison path: cap attempts per job (count them on the job itself), and after the cap, move the job to a dead-letter store — a table or queue of failed work holding the full payload, the error from each attempt, and timestamps — where it waits without blocking anyone. Make that parking lot visible: its size is an alarm metric per the severity rules, because ten poison jobs overnight usually means one bug, not ten coincidences. Build the replay: once the underlying cause is fixed, parked jobs get re-queued with a button or command, not with manual data surgery — the work was owed to someone. Distinguish crash from rejection in the worker: an exception means retry-then-park; a validated 'this can never succeed' can park immediately, skipping futile attempts. Only proceed once the worst possible job — one that crashes instantly, every time — provably costs the system a few attempts and a parking entry, not a night of throughput.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #815\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}