Failure Clusterer.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/synthesis/failure-clusterer.test.tsRelative: loom/tests/synthesis/failure-clusterer.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 200Bytes: 7,278Imports: 3Exports: 0has tests

Content Preview

  1. /**
  2. * Tests for H5.1 — Failure Clusterer.
  3. *
  4. * Proves:
  5. * - normalizeErrorSignature strips ids, paths, numbers deterministically
  6. * - extractFailures correctly identifies failures from enriched events
  7. * - clusterFailures groups normalized signatures correctly (table-driven)
  8. * - Empty input → empty output
  9. * - No failures in events → empty output
  10. */
  11. import { describe, expect, test } from "bun:test";
  12. import { normalizeErrorSignature, extractFailures, clusterFailures, FailureRecord