Dlq Escalator

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/dispatcher/core/dlq-escalator.tsRelative: loom/src/dispatcher/core/dlq-escalator.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 94Bytes: 3,061Imports: 4Exports: 1

Content Preview

  1. /**
  2. * H2.4 — DLQ Escalator.
  3. *
  4. * Converts a dead letter into a Loop 1 escalation:
  5. * - builds typed escalation payload (goal_id, stage_id, dispatch_id, attempts, last_error)
  6. * - posts via injected EscalationPoster with retry from src/lib/retry.ts
  7. * (≥3 attempts, backoff+jitter)
  8. */
  9. import { withRetry } from "../../lib/retry";
  10. import { createLogger } from "../../lib/logger";
  11. import type { EscalationPoster, EscalationPayload, DeadLetterBody } from "./types";
  12. import type { GoalId, StageId, S