Promotion Engine.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/memory/promotion-engine.test.tsRelative: loom/tests/memory/promotion-engine.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 212Bytes: 9,720Imports: 5Exports: 0has tests

Content Preview

  1. /**
  2. * PromotionEngine tests (H4.2).
  3. *
  4. * Proves:
  5. * - Promotion fires at EXACTLY m_promote distinct traces (not m-1; same trace repeated ≠ distinct)
  6. * - Provenance lists the exact trace ids that justified the promotion
  7. * - Procedural promotion (semantic→procedural) creates status='proposed' row only
  8. * - No promotion when m-1 distinct traces
  9. */
  10. import { describe, expect, test } from "bun:test";
  11. import { Database } from "bun:sqlite";
  12. import { PromotionEngine } from "../../src/memory