import { findingIdentitySignature } from "audit-tools/shared"; import type { FindingIdentityFields } from "audit-tools/shared"; import type { Finding } from "../types.js"; export { findingIdentitySignature }; export type { FindingIdentityFields }; /** * Re-key finalized findings with globally-unique, content-addressed ids at the * synthesis boundary. * * Worker packets assign locally-scoped ids (e.g. `MNT-001`) that collide across * packets once merged, which breaks `audit-findings.json` as a machine contract: * work partition coverage keys on `id` (so colliding ids alias unrelated * findings), and `work_blocks.finding_ids` / theme `finding_ids` / * the remediator's per-finding addressing can no longer resolve a single finding. * * The id is `-`, where the signature comes * from the shared deterministic fallback ladder in `findingIdentitySignature` — * stable semantic fields only, so the same semantic finding keeps the same id * across passes and re-syntheses even when volatile fields (line numbers, pass * ordinals, unit ids, timestamps, title phrasing) drift. By the time findings * reach this function, mergeFindings() has already collapsed every re-emission * of one file-independent identity (exact normalized lens|category|title) into * a single multi-file finding, and the hash never covers the merged file list, * so the id also stays stable as a finding's merged file set grows. Distinct * findings that share a signature (e.g. two issues anchored at the same * path + scope) are disambiguated deterministically with a numeric suffix * (findings arrive in mergeFindings()' stable order). * * `related_findings`, when present, referenced the old colliding ids and cannot * be remapped unambiguously, so it is dropped rather than left dangling. (It is * unpopulated by every current extractor.) */ export declare function assignStableFindingIds(findings: Finding[]): Finding[]; //# sourceMappingURL=findingIdentity.d.ts.map