import { z } from 'zod'; /** Routing off the classifier gate: structural → `compile`, behavioral → `rag-only` (never compiled). */ export declare const RoutingSchema: z.ZodEnum<["compile", "rag-only"]>; export type Routing = z.infer; /** * Provenance of a classifier-ledger disposition: a genuine classifier judgment * (`classified`) vs a safe-default forced by classifier failure (`error-default`, * always `behavioral`/RAG-only) vs an authored rule's INDEPENDENT structural * eligibility verdict (`authored-whitelist`, ADR-112 §3 — judged by the static * decidable-class whitelist, NOT an LLM classifier; named distinctly so the * classifier ledger never claims an LLM classified a human-authored rule — * Tenet-20 honesty). Reported in the §8 done-criterion so a flaky classifier's * error rate is a NAMED cause of behavioral-heavy output — never conflated with * "lc structural signal is sparse" (a valid HONEST-NEGATIVE) or "the classifier * mis-routed everything" (Tenet 19). It is NOT a falsifying condition (no FM * clause) — a done-criterion diagnostic, like `stage4Confirmed`. */ export declare const DispositionSourceSchema: z.ZodEnum<["classified", "error-default", "authored-whitelist"]>; export type DispositionSource = z.infer; /** * Compile + Stage-4 disposition of a compile-routed (structural) candidate (slice 4). * Recorded additively on the classifier ledger so the §8 done-criterion (which reads * the LEDGER, not the compiled `rule.status`) can distinguish the verify-stage outcomes * rather than collapse them onto the `stage4Confirmed` boolean: * - `confirmed` — Stage-4 found positive in-scope evidence (active rule). * - `untested-no-matches` — Stage-4 ran, zero hits (neutral/inconclusive). * - `archived-out-of-scope` — the §4 backstop ACTIVELY rejected a mis-structural * candidate (fired on the baseline) — a classifier-over-eager * signal, NOT the same as `no-matches` (Tenet 19, the * compile-stage twin of `dispositionSource`). * - `compile-rejected` — the pattern parsed but failed per-engine safety * validation (e.g. ReDoS); never produced as a rule. * Absent on entries the compile stage never touched (behavioral/rag-only, or a * classify-only run). NOT a falsifying condition (no FM clause) — a done-criterion * diagnostic; the harness only locks its consistency with `stage4Confirmed`. */ export declare const Stage4LedgerOutcomeSchema: z.ZodEnum<["confirmed", "untested-no-matches", "archived-out-of-scope", "compile-rejected"]>; export type Stage4LedgerOutcome = z.infer; /** * The SUBSTRATE provenance of a draft / zero-draft drop (slice β, strategy#709, * panel OQ-β4): whether the eligible review threads it derived from carried * `human`, `bot` (recognized review-finding bot — gemini/CR), or `mixed` comments. * `human|bot|mixed` not a binary — a single PR's draft can derive from both. A * non-FM Tenet-19 DIAGNOSTIC (like `dispositionSource` / `noDraftCause`): it makes * the bot-review-substrate share OBSERVABLE on the §8 emission ledger for this * bot-reviewed cert corpus, with NO falsifying-metric weight. */ export declare const DraftSourceKindSchema: z.ZodEnum<["human", "bot", "mixed"]>; export type DraftSourceKind = z.infer; export declare const EmissionLedgerEntrySchema: z.ZodObject<{ candidateRef: z.ZodEffects; provenance: z.ZodObject<{ kind: z.ZodOptional>; mergedPr: z.ZodNumber; reviewThread: z.ZodEffects; commitSha: z.ZodString; }, "strip", z.ZodTypeAny, { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }, { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }>; classifierDisposition: z.ZodEnum<["structural", "behavioral"]>; routing: z.ZodEnum<["compile", "rag-only"]>; classifierLedgerRef: z.ZodEffects; unverified: z.ZodLiteral; /** * Substrate provenance of the draft (slice β, panel OQ-β4) — `human|bot|mixed`, * threaded transiently on `DraftCandidate` from the exact extractor input and * serialized HERE (NOT on the reused `ProvenanceRecord`/legitimacy stamp, which a * diagnostic would pollute). Additive-OPTIONAL so pre-β emission ledgers parse. */ sourceKind: z.ZodOptional>; }, "strip", z.ZodTypeAny, { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }, { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }>; export type EmissionLedgerEntry = z.infer; export declare const EmissionLedgerSchema: z.ZodObject<{ entries: z.ZodArray; provenance: z.ZodObject<{ kind: z.ZodOptional>; mergedPr: z.ZodNumber; reviewThread: z.ZodEffects; commitSha: z.ZodString; }, "strip", z.ZodTypeAny, { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }, { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }>; classifierDisposition: z.ZodEnum<["structural", "behavioral"]>; routing: z.ZodEnum<["compile", "rag-only"]>; classifierLedgerRef: z.ZodEffects; unverified: z.ZodLiteral; /** * Substrate provenance of the draft (slice β, panel OQ-β4) — `human|bot|mixed`, * threaded transiently on `DraftCandidate` from the exact extractor input and * serialized HERE (NOT on the reused `ProvenanceRecord`/legitimacy stamp, which a * diagnostic would pollute). Additive-OPTIONAL so pre-β emission ledgers parse. */ sourceKind: z.ZodOptional>; }, "strip", z.ZodTypeAny, { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }, { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }>, "many">; /** * Run-level seed-blindness attestation (§7). `false` = no seed class was * supplied to any extraction/classification stage; `true` falsifies FM(f). */ extractionInputsAttestation: z.ZodObject<{ seedClassesProvided: z.ZodBoolean; }, "strip", z.ZodTypeAny, { seedClassesProvided: boolean; }, { seedClassesProvided: boolean; }>; }, "strip", z.ZodTypeAny, { entries: { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }[]; extractionInputsAttestation: { seedClassesProvided: boolean; }; }, { entries: { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }[]; extractionInputsAttestation: { seedClassesProvided: boolean; }; }>; export type EmissionLedger = z.infer; export declare const DropReasonCodeSchema: z.ZodEnum<["unreachable", "truncated", "unparseable", "incomplete-provenance", "outdated-rejected", "no-draft"]>; export type DropReasonCode = z.infer; /** * Why the extractor returned ZERO drafts for an otherwise-complete thread — the * extract-stage twin of the classifier's `dispositionSource` (a non-FM Tenet-19 * diagnostic). A bare `[]` from the `DraftExtractor` port conflates ≥6 distinct * causes with opposite fixes; recording WHICH one keeps a parser/format/transient * failure from masquerading as "the model judged nothing mintable" (a legitimate * decline). Set ONLY on the extractor-produced empty-draft `unparseable` drop — * never on a source-`unparseable` fetch failure or a per-body `isUsableDsl` drop. * * PARSE ORDER is the disjointness contract (evaluate in this order — the adapter * sets the first, `parseExtractorOutput` the rest): * - `invoke-error` — the live LLM invoke rejected (caught in the adapter). * - `empty-output` — the stripped RAW output was empty (pre-parse). * - `none-sentinel` — the stripped raw output equals the `NONE` sentinel. * - `unparseable-shape` — `JSON.parse` threw a `SyntaxError` (malformed JSON). * - `non-array` — JSON parsed, but not to an array. * - `all-filtered` — parsed to an array, but zero non-empty string bodies * survived (`[]`, blanks, non-strings) — NOT `empty-output`. * - `legacy-unknown` — REPLAY-MIGRATION ONLY: a pre-cause-tag fixture stored a * bare `string[]` empty row, so the cause was never * recorded. Never produced by a live parse; signals * "re-record needed before cause-rate reporting." * Not an FM falsifier — a done-criterion diagnostic, like `dispositionSource`. */ export declare const NoDraftCauseSchema: z.ZodEnum<["invoke-error", "empty-output", "none-sentinel", "unparseable-shape", "non-array", "all-filtered", "legacy-unknown"]>; export type NoDraftCause = z.infer; export declare const DropLedgerEntrySchema: z.ZodObject<{ /** * Source PR of the dropped candidate. REQUIRED — the funnel always knows which * train PR it is processing (it iterates the train slice), even for an * `incomplete-provenance` drop where the review-thread/SHA is missing. An * unrecorded source would make the drop uncreditable and open an undetectable * FM(i) train-skip gap. */ sourcePr: z.ZodNumber; reasonCode: z.ZodEnum<["unreachable", "truncated", "unparseable", "incomplete-provenance", "outdated-rejected", "no-draft"]>; detail: z.ZodOptional; /** * The extract-stage NO-DRAFT diagnostic (Tenet-19). Present ONLY on the * extractor-produced empty-draft drop (`reasonCode: 'no-draft'`, detail * "extractor produced no draft…") — absent on every other drop. Additive- * optional so older ledgers (no cause recorded) still parse. */ noDraftCause: z.ZodOptional>; /** * Substrate provenance (slice β, panel OQ-β4) of the eligible threads on a * ZERO-DRAFT (`reasonCode: 'no-draft'`) drop — `human|bot|mixed`, so the §8 * report can ask "what KIND of substrate did the model decline?". Present only on * the no-draft drop; additive-OPTIONAL so other drops + older ledgers parse. */ sourceKind: z.ZodOptional>; }, "strip", z.ZodTypeAny, { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }, { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }>; export type DropLedgerEntry = z.infer; export declare const DropLedgerSchema: z.ZodObject<{ entries: z.ZodArray; detail: z.ZodOptional; /** * The extract-stage NO-DRAFT diagnostic (Tenet-19). Present ONLY on the * extractor-produced empty-draft drop (`reasonCode: 'no-draft'`, detail * "extractor produced no draft…") — absent on every other drop. Additive- * optional so older ledgers (no cause recorded) still parse. */ noDraftCause: z.ZodOptional>; /** * Substrate provenance (slice β, panel OQ-β4) of the eligible threads on a * ZERO-DRAFT (`reasonCode: 'no-draft'`) drop — `human|bot|mixed`, so the §8 * report can ask "what KIND of substrate did the model decline?". Present only on * the no-draft drop; additive-OPTIONAL so other drops + older ledgers parse. */ sourceKind: z.ZodOptional>; }, "strip", z.ZodTypeAny, { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }, { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { entries: { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }[]; }, { entries: { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }[]; }>; export type DropLedger = z.infer; export declare const ClassifierLedgerEntrySchema: z.ZodObject<{ /** * This classifier-ledger entry's own ref — the JOIN KEY that an emission entry's * `classifierLedgerRef` points to (not necessarily the candidate's own * `candidateRef`). Slice 1 joins on this ref + checks disposition consistency; a * stricter same-candidate identity assertion is deferred to slice 2. */ candidateRef: z.ZodEffects; disposition: z.ZodEnum<["structural", "behavioral"]>; /** * Stage-4 Verify-Against-Codebase confirmation — the deterministic backstop. * NON-CERTIFYING IN SLICE 1: Stage-4 is wired in slice 4, so the harness does NOT * yet require `stage4Confirmed === true` for compile-routed candidates (it checks * disposition consistency only). The field is carried now so slice 4 can enforce * it without a schema change. */ stage4Confirmed: z.ZodBoolean; /** * Whether `disposition` is a genuine classifier judgment or a safe-default on * classifier failure (always `behavioral`). Present-and-`'classified'` in normal * runs; set `'error-default'` on the safe-default path (slice 3). Read by the §8 * terminal report (slice 5) to keep a flaky-classifier error rate from * masquerading as structural-signal sparsity (Tenet 19, panel flag-5). Not an FM * condition — a diagnostic, like `stage4Confirmed`. */ dispositionSource: z.ZodEnum<["classified", "error-default", "authored-whitelist"]>; /** * Compile + Stage-4 outcome (slice 4), set by `runCompileStage` on the matched * compile-routed entry. OPTIONAL — absent until the compile stage runs (and * never set on behavioral/rag-only entries, which are never compiled). When * present it MUST be consistent with `stage4Confirmed`: `confirmed` ⟺ * `stage4Confirmed === true`; the other three outcomes ⟺ `false`. The §8 harness * locks that consistency (no new FM clause) — see `Stage4LedgerOutcomeSchema`. */ stage4Outcome: z.ZodOptional>; }, "strip", z.ZodTypeAny, { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }, { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }>; export type ClassifierLedgerEntry = z.infer; export declare const ClassifierLedgerSchema: z.ZodObject<{ entries: z.ZodArray; disposition: z.ZodEnum<["structural", "behavioral"]>; /** * Stage-4 Verify-Against-Codebase confirmation — the deterministic backstop. * NON-CERTIFYING IN SLICE 1: Stage-4 is wired in slice 4, so the harness does NOT * yet require `stage4Confirmed === true` for compile-routed candidates (it checks * disposition consistency only). The field is carried now so slice 4 can enforce * it without a schema change. */ stage4Confirmed: z.ZodBoolean; /** * Whether `disposition` is a genuine classifier judgment or a safe-default on * classifier failure (always `behavioral`). Present-and-`'classified'` in normal * runs; set `'error-default'` on the safe-default path (slice 3). Read by the §8 * terminal report (slice 5) to keep a flaky-classifier error rate from * masquerading as structural-signal sparsity (Tenet 19, panel flag-5). Not an FM * condition — a diagnostic, like `stage4Confirmed`. */ dispositionSource: z.ZodEnum<["classified", "error-default", "authored-whitelist"]>; /** * Compile + Stage-4 outcome (slice 4), set by `runCompileStage` on the matched * compile-routed entry. OPTIONAL — absent until the compile stage runs (and * never set on behavioral/rag-only entries, which are never compiled). When * present it MUST be consistent with `stage4Confirmed`: `confirmed` ⟺ * `stage4Confirmed === true`; the other three outcomes ⟺ `false`. The §8 harness * locks that consistency (no new FM clause) — see `Stage4LedgerOutcomeSchema`. */ stage4Outcome: z.ZodOptional>; }, "strip", z.ZodTypeAny, { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }, { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { entries: { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }[]; }, { entries: { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }[]; }>; export type ClassifierLedger = z.infer; export declare const SplitLedgerSchema: z.ZodEffects; heldOutPrs: z.ZodArray; excludedPrs: z.ZodArray; positiveControlPrs: z.ZodArray; negativeControlPrs: z.ZodArray; splitRule: z.ZodObject<{ predicate: z.ZodEffects; cutIndex: z.ZodNumber; }, "strip", z.ZodTypeAny, { predicate: string; cutIndex: number; }, { predicate: string; cutIndex: number; }>; frozenAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }>, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }>; /** The frozen corpus = `selectionRule(asOfCommit)` the cover is checked against. */ corpus: z.ZodArray; /** PR → merge-commit, for the disjoint-by-merge-commit check (rebuilds the map). */ corpusMergeCommits: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }>, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }>, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }>; export type SplitLedger = z.infer; export declare const ApiFetchSliceSchema: z.ZodEnum<["train", "heldOut"]>; export type ApiFetchSlice = z.infer; export declare const ApiUsageLedgerEntrySchema: z.ZodObject<{ targetPr: z.ZodNumber; slice: z.ZodEnum<["train", "heldOut"]>; fetchKind: z.ZodEffects; }, "strip", z.ZodTypeAny, { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }, { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }>; export type ApiUsageLedgerEntry = z.infer; export declare const ApiUsageLedgerSchema: z.ZodObject<{ entries: z.ZodArray; fetchKind: z.ZodEffects; }, "strip", z.ZodTypeAny, { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }, { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }>, "many">; /** MUST be 0 — any held-out/control content fetch during mining falsifies FM(h). */ heldOutFetchCount: z.ZodNumber; }, "strip", z.ZodTypeAny, { entries: { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }[]; heldOutFetchCount: number; }, { entries: { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }[]; heldOutFetchCount: number; }>; export type ApiUsageLedger = z.infer; export declare const MinerLedgersSchema: z.ZodObject<{ emission: z.ZodObject<{ entries: z.ZodArray; provenance: z.ZodObject<{ kind: z.ZodOptional>; mergedPr: z.ZodNumber; reviewThread: z.ZodEffects; commitSha: z.ZodString; }, "strip", z.ZodTypeAny, { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }, { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }>; classifierDisposition: z.ZodEnum<["structural", "behavioral"]>; routing: z.ZodEnum<["compile", "rag-only"]>; classifierLedgerRef: z.ZodEffects; unverified: z.ZodLiteral; /** * Substrate provenance of the draft (slice β, panel OQ-β4) — `human|bot|mixed`, * threaded transiently on `DraftCandidate` from the exact extractor input and * serialized HERE (NOT on the reused `ProvenanceRecord`/legitimacy stamp, which a * diagnostic would pollute). Additive-OPTIONAL so pre-β emission ledgers parse. */ sourceKind: z.ZodOptional>; }, "strip", z.ZodTypeAny, { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }, { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }>, "many">; /** * Run-level seed-blindness attestation (§7). `false` = no seed class was * supplied to any extraction/classification stage; `true` falsifies FM(f). */ extractionInputsAttestation: z.ZodObject<{ seedClassesProvided: z.ZodBoolean; }, "strip", z.ZodTypeAny, { seedClassesProvided: boolean; }, { seedClassesProvided: boolean; }>; }, "strip", z.ZodTypeAny, { entries: { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }[]; extractionInputsAttestation: { seedClassesProvided: boolean; }; }, { entries: { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }[]; extractionInputsAttestation: { seedClassesProvided: boolean; }; }>; drop: z.ZodObject<{ entries: z.ZodArray; detail: z.ZodOptional; /** * The extract-stage NO-DRAFT diagnostic (Tenet-19). Present ONLY on the * extractor-produced empty-draft drop (`reasonCode: 'no-draft'`, detail * "extractor produced no draft…") — absent on every other drop. Additive- * optional so older ledgers (no cause recorded) still parse. */ noDraftCause: z.ZodOptional>; /** * Substrate provenance (slice β, panel OQ-β4) of the eligible threads on a * ZERO-DRAFT (`reasonCode: 'no-draft'`) drop — `human|bot|mixed`, so the §8 * report can ask "what KIND of substrate did the model decline?". Present only on * the no-draft drop; additive-OPTIONAL so other drops + older ledgers parse. */ sourceKind: z.ZodOptional>; }, "strip", z.ZodTypeAny, { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }, { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { entries: { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }[]; }, { entries: { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }[]; }>; classifier: z.ZodObject<{ entries: z.ZodArray; disposition: z.ZodEnum<["structural", "behavioral"]>; /** * Stage-4 Verify-Against-Codebase confirmation — the deterministic backstop. * NON-CERTIFYING IN SLICE 1: Stage-4 is wired in slice 4, so the harness does NOT * yet require `stage4Confirmed === true` for compile-routed candidates (it checks * disposition consistency only). The field is carried now so slice 4 can enforce * it without a schema change. */ stage4Confirmed: z.ZodBoolean; /** * Whether `disposition` is a genuine classifier judgment or a safe-default on * classifier failure (always `behavioral`). Present-and-`'classified'` in normal * runs; set `'error-default'` on the safe-default path (slice 3). Read by the §8 * terminal report (slice 5) to keep a flaky-classifier error rate from * masquerading as structural-signal sparsity (Tenet 19, panel flag-5). Not an FM * condition — a diagnostic, like `stage4Confirmed`. */ dispositionSource: z.ZodEnum<["classified", "error-default", "authored-whitelist"]>; /** * Compile + Stage-4 outcome (slice 4), set by `runCompileStage` on the matched * compile-routed entry. OPTIONAL — absent until the compile stage runs (and * never set on behavioral/rag-only entries, which are never compiled). When * present it MUST be consistent with `stage4Confirmed`: `confirmed` ⟺ * `stage4Confirmed === true`; the other three outcomes ⟺ `false`. The §8 harness * locks that consistency (no new FM clause) — see `Stage4LedgerOutcomeSchema`. */ stage4Outcome: z.ZodOptional>; }, "strip", z.ZodTypeAny, { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }, { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { entries: { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }[]; }, { entries: { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }[]; }>; split: z.ZodEffects; heldOutPrs: z.ZodArray; excludedPrs: z.ZodArray; positiveControlPrs: z.ZodArray; negativeControlPrs: z.ZodArray; splitRule: z.ZodObject<{ predicate: z.ZodEffects; cutIndex: z.ZodNumber; }, "strip", z.ZodTypeAny, { predicate: string; cutIndex: number; }, { predicate: string; cutIndex: number; }>; frozenAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }>, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }, { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }>; /** The frozen corpus = `selectionRule(asOfCommit)` the cover is checked against. */ corpus: z.ZodArray; /** PR → merge-commit, for the disjoint-by-merge-commit check (rebuilds the map). */ corpusMergeCommits: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }>, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }>, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }, { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }>; apiUsage: z.ZodObject<{ entries: z.ZodArray; fetchKind: z.ZodEffects; }, "strip", z.ZodTypeAny, { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }, { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }>, "many">; /** MUST be 0 — any held-out/control content fetch during mining falsifies FM(h). */ heldOutFetchCount: z.ZodNumber; }, "strip", z.ZodTypeAny, { entries: { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }[]; heldOutFetchCount: number; }, { entries: { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }[]; heldOutFetchCount: number; }>; }, "strip", z.ZodTypeAny, { split: { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }; emission: { entries: { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }[]; extractionInputsAttestation: { seedClassesProvided: boolean; }; }; drop: { entries: { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }[]; }; classifier: { entries: { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }[]; }; apiUsage: { entries: { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }[]; heldOutFetchCount: number; }; }, { split: { split: { asOfCommit: string; trainPrs: number[]; heldOutPrs: number[]; excludedPrs: number[]; positiveControlPrs: number[]; negativeControlPrs: number[]; splitRule: { predicate: string; cutIndex: number; }; frozenAt?: string | undefined; }; corpus: number[]; corpusMergeCommits: { pr: number; mergeCommit: string; }[]; }; emission: { entries: { provenance: { mergedPr: number; reviewThread: string; commitSha: string; kind?: "mined" | undefined; }; unverified: true; classifierDisposition: "structural" | "behavioral"; routing: "compile" | "rag-only"; classifierLedgerRef: string; candidateRef: string; sourceKind?: "mixed" | "bot" | "human" | undefined; }[]; extractionInputsAttestation: { seedClassesProvided: boolean; }; }; drop: { entries: { reasonCode: "truncated" | "unreachable" | "unparseable" | "incomplete-provenance" | "outdated-rejected" | "no-draft"; sourcePr: number; sourceKind?: "mixed" | "bot" | "human" | undefined; detail?: string | undefined; noDraftCause?: "legacy-unknown" | "invoke-error" | "empty-output" | "none-sentinel" | "unparseable-shape" | "non-array" | "all-filtered" | undefined; }[]; }; classifier: { entries: { disposition: "structural" | "behavioral"; candidateRef: string; stage4Confirmed: boolean; dispositionSource: "classified" | "error-default" | "authored-whitelist"; stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined; }[]; }; apiUsage: { entries: { slice: "train" | "heldOut"; targetPr: number; fetchKind: string; }[]; heldOutFetchCount: number; }; }>; export type MinerLedgers = z.infer; //# sourceMappingURL=ledgers.d.ts.map