/** * Call-graph soundness calibration — the precision-order (monotone-refinement) invariant * (change: add-callgraph-soundness-calibration). * * Deterministic, offline (CI/dogfood), ground-truth-free. It drives the existing * `CallGraphBuilder` with one resolution mechanism disabled and compares the result to the full * build, asserting the ladder is monotone: * * - Refining mechanisms (type inference, re-export resolution): turning the mechanism OFF may * only make a call site fall through to a more conservative tier. So every call site the * conservative (mechanism-off) build resolves to an internal target MUST still be resolved to * an internal target by the full build — the full build must never DROP a resolution the * conservative one found. A drop is a non-monotone ladder bug: the more-complete config lost a * real edge. * - Over-approximating mechanism (CHA): enabling it may only ADD `overrides` edges. Every * non-`overrides` edge MUST be identical between the CHA-off and CHA-on builds. A disturbed * non-`overrides` edge means CHA perturbed directly-resolved structure. * * Nothing here runs in a serving path. Violations are returned as the registered advisory finding * `callgraph-precision-order-violation`; the caller (a CI job, `openlore enforce`) decides whether * to gate. The comparators are pure and exported so the invariant can be tested with injected * edge sets, not only via a real ladder bug. */ import type { CallEdge } from './call-graph-types.js'; import type { GovernanceFinding } from '../services/mcp-handlers/enforcement-policy.js'; export declare const PRECISION_ORDER_FINDING = "callgraph-precision-order-violation"; export interface CalibrationInput { files: Array<{ path: string; content: string; language: string; }>; /** A label for the analyzed tree, named in each finding's subject (e.g. 'self', a repo name). */ repoLabel?: string; } /** * Refining invariant: every call site the conservative (mechanism-off) build resolved to an * internal target must still be resolved internally by the full build. A drop is a violation. */ export declare function compareRefining(mechanism: string, conservative: readonly CallEdge[], full: readonly CallEdge[], repoLabel?: string): GovernanceFinding[]; /** * CHA invariant: enabling CHA may only add `overrides` edges. Every non-`overrides` edge must be * identical between the CHA-on and CHA-off builds; any difference is a violation. */ export declare function compareCha(withCha: readonly CallEdge[], withoutCha: readonly CallEdge[], repoLabel?: string): GovernanceFinding[]; /** Full-ladder build plus one build per mechanism-off variant, then the monotone comparison. */ export declare function calibratePrecisionOrder(input: CalibrationInput): Promise; //# sourceMappingURL=soundness-calibration.d.ts.map