/** * `src/services/observability/results-baseline-artifact.ts` * * WHY THIS MODULE EXISTS — the tracked artifact and the comparison against it * are separated from the computation, so the question "what does the baseline * say?" and the question "what does the machine measure right now?" can be * answered by different modules. * * The tracked artifact lives at `.peaks/observability/results-baseline.json`. * It is NOT CI-enforceable: its source data is gitignored session state * (`.peaks/_runtime//metrics/slices.jsonl`), so a CI runner has * nothing to compare against. This module never wires the artifact into a * gate; it only reads it, writes it, and reports drift against it. */ import { type BaselineDrift, type BaselineRowKind, type BaselineTolerance, type ResultsBaseline } from './results-baseline.js'; /** Absolute path of the tracked artifact for a project root. */ export declare function resultsBaselinePath(projectRoot: string): string; /** The tracked artifact, or null when this project has none yet. */ export declare function readTrackedResultsBaseline(projectRoot: string): ResultsBaseline | null; /** Regenerate the tracked artifact and return the path it was written to. */ export declare function writeResultsBaseline(projectRoot: string, baseline: ResultsBaseline): string; /** The tolerance that applies to a row kind, read from the tracked artifact. */ export declare function toleranceFor(tolerance: BaselineTolerance, kind: BaselineRowKind): number; /** * Compare a freshly computed baseline with the tracked one. A missing row or * a metric-version mismatch is drift; so is a value that moved further than * the tolerance its kind allows. */ export declare function compareResultsBaseline(computed: ResultsBaseline, tracked: ResultsBaseline): BaselineDrift[];