Escalation Ledger.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/orchestrator/escalation-ledger.test.tsRelative: loom/tests/orchestrator/escalation-ledger.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 110Bytes: 3,728Imports: 4Exports: 0has tests

Content Preview

  1. /**
  2. * Tests for EscalationLedger (H1.4).
  3. *
  4. * Proves:
  5. * - fail_streak increment/reset
  6. * - escalation records append-only
  7. * - records surfaced via GET
  8. */
  9. import { describe, expect, test } from "bun:test";
  10. import { EscalationLedger } from "../../src/orchestrator/core/escalation-ledger";
  11. import type { KVStore } from "../../src/orchestrator/core/types";
  12. import type { GoalId, StageId } from "../../src/types/contracts";
  13. function fakeKVStore(): KVStore {
  14. const store = new Map<string, unknown>