import { z } from 'zod'; import { type PrMeta } from './selection-rule.js'; import { type SplitArtifact } from './split.js'; import { type WindtunnelLock } from './windtunnel-lock.js'; export declare const CertCorpusSeedSchema: z.ZodEffects>; gate: z.ZodString; canonicalPath: z.ZodString; repo: z.ZodString; phase: z.ZodLiteral<"certifying">; selectionRule: z.ZodObject<{ state: z.ZodString; predicate: z.ZodEffects; window: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"all">; }, "strip", z.ZodTypeAny, { type: "all"; }, { type: "all"; }>, z.ZodObject<{ type: z.ZodLiteral<"bounded">; n: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "bounded"; n: number; }, { type: "bounded"; n: number; }>]>; asOfCommit: z.ZodString; codePathClassifier: z.ZodObject<{ includeGlobs: z.ZodArray; excludeGlobs: z.ZodArray; }, "strip", z.ZodTypeAny, { excludeGlobs: string[]; includeGlobs: string[]; }, { excludeGlobs: string[]; includeGlobs: string[]; }>; excludeRevertPairs: z.ZodDefault; excludeBotPrs: z.ZodDefault; }, "strip", z.ZodTypeAny, { asOfCommit: string; predicate: string; state: string; window: { type: "all"; } | { type: "bounded"; n: number; }; codePathClassifier: { excludeGlobs: string[]; includeGlobs: string[]; }; excludeRevertPairs: boolean; excludeBotPrs: boolean; }, { asOfCommit: string; predicate: string; state: string; window: { type: "all"; } | { type: "bounded"; n: number; }; codePathClassifier: { excludeGlobs: string[]; includeGlobs: string[]; }; excludeRevertPairs?: boolean | undefined; excludeBotPrs?: boolean | undefined; }>; split: z.ZodObject<{ cutIndex: z.ZodNumber; excludedPrs: z.ZodDefault>; frozenAt: z.ZodOptional; frozenSplitRef: z.ZodOptional; }, "strip", z.ZodTypeAny, { excludedPrs: number[]; cutIndex: number; frozenAt?: string | undefined; frozenSplitRef?: string | undefined; }, { cutIndex: number; excludedPrs?: number[] | undefined; frozenAt?: string | undefined; frozenSplitRef?: string | undefined; }>; controls: z.ZodObject<{ positiveRef: z.ZodString; negativeRef: z.ZodString; mechanism: z.ZodString; positive: z.ZodDefault, "many">>; negative: z.ZodDefault>; }, "strip", z.ZodTypeAny, { positive: { pr: number; targetRuleId: string; }[]; negative: number[]; positiveRef: string; negativeRef: string; mechanism: string; }, { positiveRef: string; negativeRef: string; mechanism: string; positive?: { pr: number; targetRuleId: string; }[] | undefined; negative?: number[] | undefined; }>; fpDefinition: z.ZodObject<{ rubricRef: z.ZodString; groundTruthRef: z.ZodString; adjudicator: z.ZodString; }, "strip", z.ZodTypeAny, { rubricRef: string; groundTruthRef: string; adjudicator: string; }, { rubricRef: string; groundTruthRef: string; adjudicator: string; }>; cullRateThreshold: z.ZodNumber; exposureDenominator: z.ZodObject<{ activeRulesEvaluated: z.ZodObject<{ floor: z.ZodNumber; }, "strip", z.ZodTypeAny, { floor: number; }, { floor: number; }>; filesTouchedInWindow: z.ZodObject<{ floor: z.ZodNumber; }, "strip", z.ZodTypeAny, { floor: number; }, { floor: number; }>; positiveControlsExercised: z.ZodObject<{ floor: z.ZodNumber; }, "strip", z.ZodTypeAny, { floor: number; }, { floor: number; }>; }, "strip", z.ZodTypeAny, { activeRulesEvaluated: { floor: number; }; filesTouchedInWindow: { floor: number; }; positiveControlsExercised: { floor: number; }; }, { activeRulesEvaluated: { floor: number; }; filesTouchedInWindow: { floor: number; }; positiveControlsExercised: { floor: number; }; }>; }, "strip", z.ZodTypeAny, { split: { excludedPrs: number[]; cutIndex: number; frozenAt?: string | undefined; frozenSplitRef?: string | undefined; }; repo: string; gate: string; selectionRule: { asOfCommit: string; predicate: string; state: string; window: { type: "all"; } | { type: "bounded"; n: number; }; codePathClassifier: { excludeGlobs: string[]; includeGlobs: string[]; }; excludeRevertPairs: boolean; excludeBotPrs: boolean; }; canonicalPath: string; phase: "certifying"; fpDefinition: { rubricRef: string; groundTruthRef: string; adjudicator: string; }; controls: { positive: { pr: number; targetRuleId: string; }[]; negative: number[]; positiveRef: string; negativeRef: string; mechanism: string; }; cullRateThreshold: number; exposureDenominator: { activeRulesEvaluated: { floor: number; }; filesTouchedInWindow: { floor: number; }; positiveControlsExercised: { floor: number; }; }; producerKind?: "mined" | "authored" | undefined; }, { split: { cutIndex: number; excludedPrs?: number[] | undefined; frozenAt?: string | undefined; frozenSplitRef?: string | undefined; }; repo: string; gate: string; selectionRule: { asOfCommit: string; predicate: string; state: string; window: { type: "all"; } | { type: "bounded"; n: number; }; codePathClassifier: { excludeGlobs: string[]; includeGlobs: string[]; }; excludeRevertPairs?: boolean | undefined; excludeBotPrs?: boolean | undefined; }; canonicalPath: string; phase: "certifying"; fpDefinition: { rubricRef: string; groundTruthRef: string; adjudicator: string; }; controls: { positiveRef: string; negativeRef: string; mechanism: string; positive?: { pr: number; targetRuleId: string; }[] | undefined; negative?: number[] | undefined; }; cullRateThreshold: number; exposureDenominator: { activeRulesEvaluated: { floor: number; }; filesTouchedInWindow: { floor: number; }; positiveControlsExercised: { floor: number; }; }; producerKind?: "mined" | "authored" | undefined; }>, { split: { excludedPrs: number[]; cutIndex: number; frozenAt?: string | undefined; frozenSplitRef?: string | undefined; }; repo: string; gate: string; selectionRule: { asOfCommit: string; predicate: string; state: string; window: { type: "all"; } | { type: "bounded"; n: number; }; codePathClassifier: { excludeGlobs: string[]; includeGlobs: string[]; }; excludeRevertPairs: boolean; excludeBotPrs: boolean; }; canonicalPath: string; phase: "certifying"; fpDefinition: { rubricRef: string; groundTruthRef: string; adjudicator: string; }; controls: { positive: { pr: number; targetRuleId: string; }[]; negative: number[]; positiveRef: string; negativeRef: string; mechanism: string; }; cullRateThreshold: number; exposureDenominator: { activeRulesEvaluated: { floor: number; }; filesTouchedInWindow: { floor: number; }; positiveControlsExercised: { floor: number; }; }; producerKind?: "mined" | "authored" | undefined; }, { split: { cutIndex: number; excludedPrs?: number[] | undefined; frozenAt?: string | undefined; frozenSplitRef?: string | undefined; }; repo: string; gate: string; selectionRule: { asOfCommit: string; predicate: string; state: string; window: { type: "all"; } | { type: "bounded"; n: number; }; codePathClassifier: { excludeGlobs: string[]; includeGlobs: string[]; }; excludeRevertPairs?: boolean | undefined; excludeBotPrs?: boolean | undefined; }; canonicalPath: string; phase: "certifying"; fpDefinition: { rubricRef: string; groundTruthRef: string; adjudicator: string; }; controls: { positiveRef: string; negativeRef: string; mechanism: string; positive?: { pr: number; targetRuleId: string; }[] | undefined; negative?: number[] | undefined; }; cullRateThreshold: number; exposureDenominator: { activeRulesEvaluated: { floor: number; }; filesTouchedInWindow: { floor: number; }; positiveControlsExercised: { floor: number; }; }; producerKind?: "mined" | "authored" | undefined; }>; export type CertCorpusSeed = z.infer; export type PrControlKind = 'corpus' | 'positive' | 'negative'; /** The control role of one held-out (scored) PR — drives pr-diffs.json + control-dir routing. */ export interface PrDiffRole { pr: number; controlKind: PrControlKind; /** Present iff `controlKind === 'positive'` (the rule that MUST fire). */ targetRuleId?: string; } export interface DerivedCorpus { /** The full corpus = `resolveSelectionRule(metas, config)` = the lock's resolvedPrs PR set. */ corpus: number[]; /** The validated frozen split (train/held-out/excluded + control tags). */ split: SplitArtifact; /** * Per-held-out-PR control roles — the SCORED slice (`pr-diffs.json` covers * held-out, controls are tags within it; mining runs over train, never scored). */ prDiffRoles: PrDiffRole[]; } /** Fail-loud producer fault (Tenet 4): a contradictory seed never materializes. */ export declare class CertCorpusSeedError extends Error { constructor(message: string); } /** * Pure derivation: corpus + frozen split + held-out control roles from the seed * and the git-enumerated `PrMeta[]` (newest-first `--topo-order`, as * `enumeratePrMetas` returns). Throws `CertCorpusSeedError` on any contradiction * BEFORE emit (Amendment-C: controls must be corpus members; `resolveSplit` then * enforces controls ⊆ held-out + the disjoint cover). No git, no I/O. */ export declare function deriveCorpus(params: { seed: CertCorpusSeed; metas: PrMeta[]; }): DerivedCorpus; /** A resolved corpus PR with the git-derived base/head the lock pins. */ export interface ResolvedPrInput { pr: number; mergeCommit: string; baseSha: string; headSha: string; } /** The integrity shas the CLI computes off disk after materializing the fixtures. */ export interface LockIntegrityInput { /** 40-hex `git hash-object` digest over the control dirs (`computeFixtureSha`). */ fixtureSha: string; /** 64-hex sha256 over the canonical `pr-diffs.json` (fold-2). */ prDiffsSha: string; /** 64-hex sha256 over the frozen `llm-replay.v1` — stamped by `freeze` after `record` (two-phase). */ llmReplaySha?: string; } /** * Assemble + validate the windtunnel lock (pure). The producer authors the WHOLE * lock (panel OQ4 — single writer); the I/O-derived integrity shas are passed in. * `llmReplaySha` is OMITTED at producer time and stamped later by `freeze` (the * two-phase sealed lock, panel OQ-seq). Parses through `WindtunnelLockSchema`, so * a malformed assembly (unsorted/duplicate resolvedPrs, bad sha) fails loud here. */ export declare function buildWindtunnelLock(params: { seed: CertCorpusSeed; resolvedPrs: ResolvedPrInput[]; integrity: LockIntegrityInput; /** * ADR-112 §8 Slice D5 — the authored producer stamps `producerKind:'authored'` so the * resolver selects the authored sibling. Absent ⇒ mined (the canonical absent-⇒-mined * default). Additive-optional: the mined producer never passes it, so the emitted lock is * BYTE-IDENTICAL to the pre-D5 shape (conditional-spread below, no `key:undefined`). */ producerKind?: 'authored'; /** ADR-112 §8 D5 — the authored cert-run input binding (present ONLY with `producerKind:'authored'`). */ authored?: { expectedSplitRef: string; }; }): WindtunnelLock; //# sourceMappingURL=cert-corpus-seed.d.ts.map