Checkpoint.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/orchestrator/checkpoint.test.tsRelative: loom/tests/orchestrator/checkpoint.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 386Bytes: 13,178Imports: 6Exports: 0has tests

Content Preview

  1. /**
  2. * Tests for CheckpointEngine (H1.1 + H1.4).
  3. *
  4. * Proves:
  5. * - scripted fake stage results drive fail_streak to EXACTLY m → REFORMULATE
  6. * - m-1 does NOT trigger reformulation
  7. * - reformulation depth cap → HALT with named reason
  8. * - drift: sustained divergence raises DRIFT, single spike does not
  9. */
  10. import { describe, expect, test } from "bun:test";
  11. import { CheckpointEngine } from "../../src/orchestrator/core/checkpoint";
  12. import { EscalationLedger } from "../../src/orchestrator/core/esc