import type { ArtifactMetadataManifest } from "../types/artifactMetadata.js"; import type { CoverageMatrix, CoverageFileRecord, RepoManifest } from "../types.js"; /** Per-coverage-file baseline: file path → signature-sensitive content key. */ export type CoverageElementBaselineStore = Record; /** * The per-file content signal that determines whether a file's audit must be * redone: the repo-manifest content `hash` when present, else its `size_bytes`. * Returns a map keyed by repo-manifest path. Files absent from the manifest (no * signal) are simply omitted — a file with no signal gets no baseline and is * never preserved (fail-safe to re-audit). */ export declare function coverageContentSignature(repoManifest: RepoManifest): Record; /** * Derive the signature-SENSITIVE content key for one coverage file from its audit * inputs: the file's content signal, its required lenses, and its unit * membership. Any change to any input moves the key, forcing a re-audit; an * identical set of inputs reproduces the same key, enabling preservation. Lenses * and unit ids are sorted so ordering noise never moves the key. */ export declare function deriveCoverageElementKey(file: CoverageFileRecord, contentSig: string | undefined): string; /** * Build the fresh per-element baseline store for a coverage matrix: a content key * for every file that carries audit work (not excluded). Excluded files are * omitted — they have no work to preserve. Pure. */ export declare function recordCoverageElementBaselines(coverage: CoverageMatrix, contentSigByPath: Record): CoverageElementBaselineStore; /** Read the carried-forward coverage-element baselines off the artifact metadata. */ export declare function readCoverageElementBaselines(metadata: ArtifactMetadataManifest | undefined): CoverageElementBaselineStore | undefined; /** * Carry the executor's freshly-recorded coverage-element baselines onto the * bundle's artifact metadata so `computeArtifactMetadata` persists them (the same * carry-forward path `result_baselines` uses). Returns a new manifest; never * mutates the input. Stamps the F1 schema version when seeding a fresh manifest * so the CE-007 freshness gate recognizes the store on the next run. */ export declare function withCoverageElementBaselines(metadata: ArtifactMetadataManifest | undefined, baselines: CoverageElementBaselineStore): ArtifactMetadataManifest; /** * Preserve prior completion for coverage files whose audit inputs are UNCHANGED * from the recorded baseline — content-addressed granular staleness. Mutates * `coverage` in place and returns the number of files preserved. * * A file is preserved iff: it still carries pending work (not excluded), a prior * baseline exists for its path, the freshly-computed live key EQUALS that * baseline, AND a prior coverage record exists for the path. The prior record's * `completed_lenses` / `audit_status` are carried verbatim — valid because the * content key includes `required_lenses`, so an unchanged key guarantees an * unchanged required-lens set (partial completion is preserved too, not only * fully-complete files). * * No baseline, a moved key, or a missing prior record all leave the file at its * freshly-built (pending) state — fail-safe to re-audit. */ export declare function applyContentAddressedPreservation(coverage: CoverageMatrix, priorCoverage: CoverageMatrix | undefined, priorBaselines: CoverageElementBaselineStore | undefined, contentSigByPath: Record): number; //# sourceMappingURL=coverageElementBaseline.d.ts.map