Flagged example
async function fetchInvoice(id: string) {
const response = await fetch(`/api/invoices/${id}`)
// TODO: handle the retry case
return response.json()
}
Why this trips
Deterministic regex match: flags TODO/FIXME comments with no owner, ticket reference, or completion plan.
Clean example
async function fetchInvoice(id: string) {
return retry(() => fetchJson(`/api/invoices/${id}`), {
retries: 3,
backoff: 'exponential',
retryOn: [503],
})
}
What changed
Either finish the deferred behavior now or attach a real owner, ticket, and completion condition. The goal is to make the deferral trackable instead of permanent background noise.