import type { GateImpl } from './types.js'; /** * Test-coverage gate (Phase 14). Extracted from settle.ts verbatim. Invoked * when 'test-coverage' is in the effective gate set. Refuses when any * non-explicit AC has no linked test, unless --allow-missing-coverage / --force. * * Phase 108: in `assertion` coverage mode the gate additionally refuses an AC * that is *mentioned* but never inside a recognized asserting test block (a * "weak link"), with a distinct hint from the plain "no linked test" message. * The `mention`-mode path (default) is unchanged. * * Phase 167: assertion-mode span recognition is no longer JS/TS-only — * built-in profiles cover js/ts, python, go, rust, and php (per-file * dispatch, `../verify/coverage-profiles/registry.ts`), plus an * operator-extensible `verification.coverageProfiles` escape hatch for any * other language. The refusal messages below are written language-neutral * accordingly and point at `cadence verify coverage --explain AC-N` (T8) — * the diagnostic built specifically so a weak-link refusal is debuggable * without reading engine source. * * Phase 141 (T5, AC-3/AC-5): when 'test-coverage' is in `config.gates.sealed` * (`isGateSealed`), neither the early --allow-missing-coverage short-circuit * nor the --force refusal escape apply — the gate always computes real * coverage and always refuses a genuine gap, with a distinct "sealed, cannot * be bypassed" message instead of the normal bypass hint. `coverageBypassed` * only reports `true` when a bypass actually took effect (never merely * because a bypass flag was passed while sealed). Unsealed behavior (AC-5) is * byte-for-byte unchanged. * * Phase 239 (T3, AC-2/AC-3/AC-4): under `verification.coverageScheme: * 'phase-qualified'` an AC token is only evidence when it carries this * phase's own prefix (`239-01/AC-3`); bare and foreign-phase occurrences are * not evidence at all. Because AC ids restart at `AC-1` every phase, the bare * scheme lets any past phase's `AC-3` satisfy every future phase's `AC-3` — * that is the shipped defect this closes. * * Two implementation notes worth keeping: * - The qualified path runs its OWN scan rather than consuming the shared * `ctx.coverage()` thunk, because that thunk is memoized with bare options * in `services/settle.ts` and cannot carry a qualifier. The bare path still * consumes the memoized thunk, so historical single-scan behavior is * untouched. * * CLOSED in T6: `ctx.coverage()` is now scheme-aware (it resolves the same * qualifier from the active draft id), so every other consumer — evidence * derivation in `services/settle.ts`, `deep-verify.ts`, `interactive.ts` — * sees the same AC↔test linkage this gate enforced. What remains is purely * an efficiency wart, not a correctness one: under the qualified scheme the * repo is scanned twice (once here, once by the shared thunk) because this * gate's tests specify a gate-local scan. Both scans use identical options, * so they cannot disagree. * - Every refusal names the LITERAL expected token, so an operator reading * stderr never has to infer the prefix form from docs or engine source. * * Bare-scheme behavior is byte-for-byte unchanged throughout: `expected()` is * the identity when no qualifier is in effect, and `schemeHint` is empty. */ export declare const runCoverageGate: GateImpl; //# sourceMappingURL=coverage.d.ts.map