Registry Updater

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/synthesis/core/registry-updater.tsRelative: loom/src/synthesis/core/registry-updater.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 153Bytes: 4,797Imports: 2Exports: 6

Content Preview

  1. /**
  2. * H5.3 — Registry Updater.
  3. *
  4. * Recomputes mode_registry success_n / fail_n / avg_cost_tokens per
  5. * (mode, variety_class) from fresh traces.
  6. *
  7. * Pure statistics — deterministic: same input rows → identical output rows
  8. * (test asserts byte-equal JSON).
  9. *
  10. * Output: RegistryUpdateSummary[] — written to DB + returned for the report.
  11. * The writes happen via the injected RegistryWriter.
  12. */
  13. import type { EnrichedTraceEvent, RegistryUpdateSummary, RegistryWriter, Clock } from "../../types