Failure Clusterer

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/synthesis/core/failure-clusterer.tsRelative: loom/src/synthesis/core/failure-clusterer.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 181Bytes: 6,193Imports: 1Exports: 5

Content Preview

  1. /**
  2. * H5.1 — Failure Clusterer.
  3. *
  4. * Groups trace failures by (tool, normalized error signature, variety_class).
  5. * Error normalization strips ids, paths, and numbers into placeholders so that
  6. * semantically identical errors produce the same cluster key.
  7. *
  8. * Output: ranked failure-mode report entries with example trace refs (event_ids).
  9. *
  10. * Pure functions, table-tested. No side effects, no I/O.
  11. */
  12. import type { EnrichedTraceEvent, FailureModeReportEntry } from "../../types";
  13. // ── Help