Problem
In packages/jobs/src/takedown.ts, a domain's status is only promoted to taken_down if filed > 0:
if (filed > 0) {
await db.update(schema.domains).set({ status: 'taken_down' })...;
}
// ← no else branch for all-channels-failed case
If a domain has only one channel and it permanently returns 404 (registrar not found), all 3 Trigger.dev maxAttempts exhaust with identical permanent failures. The domain stays status: 'active' indefinitely. No alert, no escalation, no status: 'takedown_failed' state. The org's dashboard shows the domain as unactioned forever.
Fix
After all retries exhausted and filed === 0, set a terminal failure status and notify:
if (filed === 0 && channels.length > 0) {
await db.update(schema.domains)
.set({ status: 'takedown_failed' })
.where(eq(schema.domains.id, domain.id));
// Alert org via Knock: 'takedown.all_channels_failed'
}
Requires adding 'takedown_failed' to the domainStatusEnum.
Severity
MEDIUM — piracy domains silently remain active if all channels permanently fail; org has no visibility.
Problem
In
packages/jobs/src/takedown.ts, a domain's status is only promoted totaken_downiffiled > 0:If a domain has only one channel and it permanently returns 404 (registrar not found), all 3 Trigger.dev
maxAttemptsexhaust with identical permanent failures. The domain staysstatus: 'active'indefinitely. No alert, no escalation, nostatus: 'takedown_failed'state. The org's dashboard shows the domain as unactioned forever.Fix
After all retries exhausted and
filed === 0, set a terminal failure status and notify:Requires adding
'takedown_failed'to thedomainStatusEnum.Severity
MEDIUM — piracy domains silently remain active if all channels permanently fail; org has no visibility.