import type { CompiledRule, LegitimacyProjectionSkip, ProvenanceRecord, RuleFiring, WindtunnelVerdict } from '@mmnto/totem';
export interface CertPersistInput {
    /** The scorer verdict for this run. */
    verdict: WindtunnelVerdict;
    /** Firings the verdict was computed over (for the C1 control map + report). */
    firings: RuleFiring[];
    /** Minted (active) rule ids the scorer evaluated. */
    mintedRuleIds: string[];
    /** Positive-control targets (for the per-rule control map). */
    positiveControlTargets: Array<{
        pr: number;
        targetRuleId: string;
    }>;
    /** Candidate compiled rules eligible for stamping (the corpus rules). */
    candidates: CompiledRule[];
    /** Mining provenance per rule (lessonHash → provenance). */
    provenanceByRule: Map<string, ProvenanceRecord>;
    /**
     * Where PASS-survivors are written (the cert OUTPUT compiled-rules file under
     * the gate-1 dir — NOT the repo's live `.totem/compiled-rules.json`, which the
     * strategy#516 populator owns). Required: no default to the live corpus, so a
     * cert run can never clobber it.
     */
    certifiedRulesOutPath: string;
    /** Directory for the transient cert-run report (§6 L3). */
    reportDir: string;
    /** Injected ISO timestamp (report filename + body) — keeps the call testable. */
    nowIso: string;
    /** Corpus identity for the report (the lock's asOfCommit). */
    asOfCommit: string;
}
export interface CertPersistResult {
    /** True iff PASS-survivors were written to the cert output (PASS only). */
    persisted: boolean;
    /** Number of survivor rules stamped + written. */
    stampedCount: number;
    /** Absolute path of the transient cert-run report. */
    reportPath: string;
    /** Path of the written cert rules file (only when persisted). */
    certifiedRulesPath?: string;
    /** Projection skips (non-survivors / missing-provenance / verdict-not-pass). */
    skips: LegitimacyProjectionSkip[];
}
/**
 * The certifying-run persistence boundary (§6 L3 + bindings 1+4).
 *
 * 1. Computes the C1 per-rule control map from the firings (survivor-only).
 * 2. fold-B `projectLegitimacy`: stamps survivors PASS-only, from their OWN
 *    control results (never the global nonVacuity); non-PASS stamps nothing.
 * 3. fold-C `buildCertifiedRulesFile`: parses the payload BEFORE any write, so a
 *    half-stamp fails loud pre-disk. On PASS with ≥1 survivor, the validated
 *    file is written to `certifiedRulesOutPath` (the cert OUTPUT, never the live
 *    corpus — strategy#516 promotes from here).
 * 4. Always writes a transient cert-run report (verdict + skips + cull ledger +
 *    needs-adjudication + exposure) under `reportDir` — including for non-PASS
 *    runs, which write a report but NO rules (L3: non-terminals never reach the
 *    corpus).
 *
 * The clock + paths are injected so the whole step is deterministically testable
 * with a tmpdir, no real lock required.
 */
export declare function persistCertifyingOutcome(input: CertPersistInput): Promise<CertPersistResult>;
//# sourceMappingURL=spine-cert-persist.d.ts.map