Dlq Escalator.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/dispatcher/dlq-escalator.test.tsRelative: loom/tests/dispatcher/dlq-escalator.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 151Bytes: 5,483Imports: 4Exports: 0has tests

Content Preview

  1. /**
  2. * Tests for DlqEscalator (H2.4).
  3. *
  4. * Proves:
  5. * - DLQ letter → escalation POST with correct payload (goal_id, stage_id, dispatch_id, attempts, last_error)
  6. * - poster failure retried ≥3 times then logged (exhaustion)
  7. * - successful escalation returns true
  8. * - exhausted escalation returns false
  9. */
  10. import { describe, expect, test, mock } from "bun:test";
  11. import { DlqEscalator } from "../../src/dispatcher/core/dlq-escalator";
  12. import type { EscalationPoster, EscalationPayload, DeadLetterB