/** * Certification harness: the WRITE gate that decides whether a * (provider-profile, support-matrix-entry) pair may reach VERIFIED. * * The reliability contract forbids turning model confidence into certification. * Certification therefore comes exclusively from stored, host-owned benchmark * evidence that this module re-scores deterministically. Evidence is shipped as * frozen package data — never read from the analyzed repository, which is * untrusted — and the shipped registry is intentionally EMPTY until a real * benchmark corpus has actually run. With no evidence, nothing is certified and * VERIFIED stays unreachable. That is independent of the package version: 1.0 * freezes the interfaces, not the quality of generated code. */ import type { Ecosystem } from "../tools/analysis/analyzer-types.ts"; /** * Fail-closed thresholds from the reliability contract: a large per-ecosystem * corpus, repeated runs, and a high pass rate. These are policy constants and * are never relaxed by a caller, model, or repository. */ export declare const CERTIFICATION_POLICY: Readonly<{ minTasksPerEcosystem: 25; runsPerTask: 3; minPassRate: 0.95; }>; /** * A benchmark run "passes" only when the generated candidate reached a * validated strong sandbox for that task's own oracle. It is deliberately NOT * the production VERIFIED status, which requires certification and would make * this gate circular. */ export type BenchmarkRunOutcome = "validated" | "failed" | "inconclusive"; export interface CertificationTaskResultV1 { /** Stable identifier of the benchmark task within the corpus. */ taskId: string; /** Exactly `runsPerTask` independent outcomes for this task. */ runs: readonly BenchmarkRunOutcome[]; } export interface CertificationEvidenceV1 { schemaVersion: 1; /** Evidence is invalidated when the support matrix it was produced against changes. */ supportMatrixVersion: string; ecosystem: Ecosystem; /** Exact support-matrix entry key this evidence certifies. */ matrixKey: string; /** Exact provider/model profile that produced the runs (see providerProfileId). */ providerProfileId: string; /** sha256 of the benchmark corpus used; recorded for provenance. */ corpusHash: string; producedAt: string; tasks: readonly CertificationTaskResultV1[]; } export interface CertificationScore { certified: boolean; passRate: number; taskCount: number; runCount: number; reasons: string[]; } /** * Deterministic profile identity for a provider/model combination. Moving * aliases and tags are not immutable digests, so this proves which label ran, * not a reproducible snapshot. Evidence and live runs must match exactly. */ export declare function providerProfileId(name: string, resolvedModel: string): string; /** * Strictly validate one evidence document. Throws on any deviation so a corrupt * or over-broad evidence file can never contribute silent trust. */ export declare function validateCertificationEvidenceV1(value: unknown): CertificationEvidenceV1; /** * Re-score already-validated evidence against the fail-closed policy. Every * failing condition is collected so the diagnostics explain exactly why a * profile is not certified. `certified` is true only when nothing failed. */ export declare function scoreCertificationEvidence(evidence: CertificationEvidenceV1): CertificationScore; export interface CertificationEvaluation { matrixKey: string; certified: boolean; passRate: number; reasons: string[]; } export interface ProviderCertificationResult { providerProfileId: string; /** Support-matrix keys with passing evidence for this exact provider profile. */ certifiedMatrixKeys: string[]; /** One evaluation per evidence document matching this provider profile. */ evaluations: CertificationEvaluation[]; } /** * Resolve every support-matrix key a provider profile has passing evidence for. * Only evidence whose `providerProfileId` matches exactly is considered, and * each document must independently clear the fail-closed score. */ export declare function evaluateProviderCertification(profileId: string, evidence?: readonly CertificationEvidenceV1[]): ProviderCertificationResult; /** * Shipped, host-owned certification evidence. Deliberately EMPTY: no * 25-task-per-ecosystem, three-run, 95% benchmark has been executed and * archived for this release, so no provider/model/profile is certified and * VERIFIED remains unreachable. Adding a real, scored corpus here — and nowhere * else — is the only way to make a profile certifiable. */ export declare const CERTIFIED_EVIDENCE: readonly CertificationEvidenceV1[]; //# sourceMappingURL=certification.d.ts.map