Escalation Ledger

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/orchestrator/core/escalation-ledger.tsRelative: loom/src/orchestrator/core/escalation-ledger.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 115Bytes: 3,562Imports: 5Exports: 3

Content Preview

  1. /**
  2. * H1.4 — Escalation ledger for per-stage fail_streak persistence and
  3. * escalation records. Append-only records are surfaced via GET.
  4. *
  5. * Used by checkpoint to track how many consecutive failures a stage has
  6. * accumulated and when escalation actions were taken.
  7. */
  8. import { newEventId } from "../../lib/ids";
  9. import { createLogger } from "../../lib/logger";
  10. import type { GoalId, StageId } from "../../types/contracts";
  11. import type { CheckpointDecision } from "./types";
  12. import type { KVSto