severity: warnpack: inngestv1.0 core
inngest/missing-retry-or-idempotency
Function has neither `retries` nor `idempotency`
npx @pitcheye/check . --pack inngestwhyItBreaks
Inngest retries by default until it decides not to, and the same event can be delivered more than once. With no `retries` ceiling a permanently failing job hammers your database for hours, and with no `idempotency` key a re-delivered event charges the card twice.
✖ Bad — triggers warnfixtures/inngest-missing-retry-or-idempotency/bad
inngest.createFunction({ id: 'charge-invoice' }, { event: 'billing/invoice.due' }, handler)✓ Good — passes checkfixtures/inngest-missing-retry-or-idempotency/good
inngest.createFunction({ id: 'charge-invoice', retries: 3, idempotency: 'event.data.invoiceId' }, { event: 'billing/invoice.due' }, handler)suggestedFix
Set both: `{ id: "charge-invoice", retries: 3, idempotency: "event.data.invoiceId" }`. The idempotency expression must resolve to a stable business key, not a timestamp.
explain_rule({"inngest/missing-retry-or-idempotency"})Agent & MCP JSON output contract
{
"ruleId": "inngest/missing-retry-or-idempotency",
"pack": "inngest",
"severity": "warn",
"file": "apps/web/src/inngest/functions.ts",
"line": 6,
"message": "`createFunction({ id } , …)` with no `retries` and no `idempotency`",
"whyItBreaks": "Inngest retries by default until it decides not to, and the same event can be delivered more than once. With no `retries` ceiling a permanently failing job hammers your database for hours, and with no `idempotency` key a re-delivered event charges the card twice.",
"suggestedFix": "Set both: `{ id: \"charge-invoice\", retries: 3, idempotency: \"event.data.invoiceId\" }`. The idempotency expression must resolve to a stable business key, not a timestamp.",
"docsUrl": "https://pitcheye.dev/rules/inngest-missing-retry-or-idempotency"
}Markdown: curl -H "Accept: text/markdown" https://pitcheye.dev/rules/inngest-missing-retry-or-idempotency
raw markdown
# inngest/missing-retry-or-idempotency
- **severity:** warn
- **pack:** inngest
- **docs:** https://pitcheye.dev/rules/inngest-missing-retry-or-idempotency
## whyItBreaks
Inngest retries by default until it decides not to, and the same event can be delivered more than once. With no `retries` ceiling a permanently failing job hammers your database for hours, and with no `idempotency` key a re-delivered event charges the card twice.
## bad
```ts
inngest.createFunction({ id: 'charge-invoice' }, { event: 'billing/invoice.due' }, handler)
```
## good
```ts
inngest.createFunction({ id: 'charge-invoice', retries: 3, idempotency: 'event.data.invoiceId' }, { event: 'billing/invoice.due' }, handler)
```
## suggestedFix
Set both: `{ id: "charge-invoice", retries: 3, idempotency: "event.data.invoiceId" }`. The idempotency expression must resolve to a stable business key, not a timestamp.
## commands
```bash
npx @pitcheye/check . --pack inngest
```
```json
{"tool":"explain_rule","arguments":{"ruleId":"inngest/missing-retry-or-idempotency"}}
```