record-before-effect-no-tx
errorThe event is marked processed before its work runs, outside one transaction and with no rollback.
Why it goes wrong
If the process dies after the claim, the event stays marked as processed with its work undone. The retry is skipped as a duplicate and the event is lost.
Safe pattern
Insert the processed-event row in the same transaction as the writes. For external effects, release the claim on failure, use a short lease TTL, or use an outbox.
See it in the playground →
An example handler that triggers this rule.
Safe patterns guide →
Keys, transactions, leases, and status codes.
Configure
// retrysafe.config.ts
export default defineConfig({
rules: { "record-before-effect-no-tx": "error" }, // or "off"
});
// or, for one line (a reason is required):
// retrysafe-ignore record-before-effect-no-tx -- <why this is safe>