@mmnto/totem 1.67.0 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capability/falsification.d.ts +18 -0
- package/dist/capability/falsification.d.ts.map +1 -0
- package/dist/capability/falsification.js +56 -0
- package/dist/capability/falsification.js.map +1 -0
- package/dist/capability/falsification.test.d.ts +2 -0
- package/dist/capability/falsification.test.d.ts.map +1 -0
- package/dist/capability/falsification.test.js +112 -0
- package/dist/capability/falsification.test.js.map +1 -0
- package/dist/capability/regenerate.d.ts +20 -0
- package/dist/capability/regenerate.d.ts.map +1 -0
- package/dist/capability/regenerate.js +0 -0
- package/dist/capability/regenerate.js.map +1 -0
- package/dist/capability/regenerate.test.d.ts +2 -0
- package/dist/capability/regenerate.test.d.ts.map +1 -0
- package/dist/capability/regenerate.test.js +136 -0
- package/dist/capability/regenerate.test.js.map +1 -0
- package/dist/capability/review-catch.d.ts +53 -0
- package/dist/capability/review-catch.d.ts.map +1 -0
- package/dist/capability/review-catch.js +92 -0
- package/dist/capability/review-catch.js.map +1 -0
- package/dist/capability/review-catch.test.d.ts +2 -0
- package/dist/capability/review-catch.test.d.ts.map +1 -0
- package/dist/capability/review-catch.test.js +90 -0
- package/dist/capability/review-catch.test.js.map +1 -0
- package/dist/capability/schema.d.ts +244 -0
- package/dist/capability/schema.d.ts.map +1 -0
- package/dist/capability/schema.js +141 -0
- package/dist/capability/schema.js.map +1 -0
- package/dist/capability/schema.test.d.ts +2 -0
- package/dist/capability/schema.test.d.ts.map +1 -0
- package/dist/capability/schema.test.js +93 -0
- package/dist/capability/schema.test.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/spine/candidate-rule.d.ts +84 -0
- package/dist/spine/candidate-rule.d.ts.map +1 -0
- package/dist/spine/candidate-rule.js +68 -0
- package/dist/spine/candidate-rule.js.map +1 -0
- package/dist/spine/candidate-rule.test.d.ts +2 -0
- package/dist/spine/candidate-rule.test.d.ts.map +1 -0
- package/dist/spine/candidate-rule.test.js +40 -0
- package/dist/spine/candidate-rule.test.js.map +1 -0
- package/dist/spine/classify.d.ts +93 -0
- package/dist/spine/classify.d.ts.map +1 -0
- package/dist/spine/classify.js +190 -0
- package/dist/spine/classify.js.map +1 -0
- package/dist/spine/classify.test.d.ts +2 -0
- package/dist/spine/classify.test.d.ts.map +1 -0
- package/dist/spine/classify.test.js +302 -0
- package/dist/spine/classify.test.js.map +1 -0
- package/dist/spine/compile.d.ts +62 -0
- package/dist/spine/compile.d.ts.map +1 -0
- package/dist/spine/compile.js +204 -0
- package/dist/spine/compile.js.map +1 -0
- package/dist/spine/compile.test.d.ts +2 -0
- package/dist/spine/compile.test.d.ts.map +1 -0
- package/dist/spine/compile.test.js +327 -0
- package/dist/spine/compile.test.js.map +1 -0
- package/dist/spine/extract.d.ts +146 -0
- package/dist/spine/extract.d.ts.map +1 -0
- package/dist/spine/extract.js +227 -0
- package/dist/spine/extract.js.map +1 -0
- package/dist/spine/extract.test.d.ts +2 -0
- package/dist/spine/extract.test.d.ts.map +1 -0
- package/dist/spine/extract.test.js +382 -0
- package/dist/spine/extract.test.js.map +1 -0
- package/dist/spine/ledgers.d.ts +1102 -0
- package/dist/spine/ledgers.d.ts.map +1 -0
- package/dist/spine/ledgers.js +209 -0
- package/dist/spine/ledgers.js.map +1 -0
- package/dist/spine/miner-harness.d.ts +30 -0
- package/dist/spine/miner-harness.d.ts.map +1 -0
- package/dist/spine/miner-harness.js +214 -0
- package/dist/spine/miner-harness.js.map +1 -0
- package/dist/spine/miner-harness.test.d.ts +2 -0
- package/dist/spine/miner-harness.test.d.ts.map +1 -0
- package/dist/spine/miner-harness.test.js +231 -0
- package/dist/spine/miner-harness.test.js.map +1 -0
- package/dist/spine/selection-rule.d.ts +4 -1
- package/dist/spine/selection-rule.d.ts.map +1 -1
- package/dist/spine/selection-rule.js +3 -2
- package/dist/spine/selection-rule.js.map +1 -1
- package/dist/spine/split.d.ts +149 -0
- package/dist/spine/split.d.ts.map +1 -0
- package/dist/spine/split.js +235 -0
- package/dist/spine/split.js.map +1 -0
- package/dist/spine/split.test.d.ts +2 -0
- package/dist/spine/split.test.d.ts.map +1 -0
- package/dist/spine/split.test.js +142 -0
- package/dist/spine/split.test.js.map +1 -0
- package/dist/spine/windtunnel-lock.d.ts +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,1102 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Routing off the classifier gate: structural → `compile`, behavioral → `rag-only` (never compiled). */
|
|
3
|
+
export declare const RoutingSchema: z.ZodEnum<["compile", "rag-only"]>;
|
|
4
|
+
export type Routing = z.infer<typeof RoutingSchema>;
|
|
5
|
+
/**
|
|
6
|
+
* Provenance of a classifier-ledger disposition: a genuine classifier judgment
|
|
7
|
+
* (`classified`) vs a safe-default forced by classifier failure (`error-default`,
|
|
8
|
+
* always `behavioral`/RAG-only). Reported in the §8 done-criterion so a flaky
|
|
9
|
+
* classifier's error rate is a NAMED third cause of behavioral-heavy output —
|
|
10
|
+
* never conflated with "lc structural signal is sparse" (a valid HONEST-NEGATIVE)
|
|
11
|
+
* or "the classifier mis-routed everything" (Tenet 19). It is NOT a falsifying
|
|
12
|
+
* condition (no FM clause) — a done-criterion diagnostic, like `stage4Confirmed`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const DispositionSourceSchema: z.ZodEnum<["classified", "error-default"]>;
|
|
15
|
+
export type DispositionSource = z.infer<typeof DispositionSourceSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* Compile + Stage-4 disposition of a compile-routed (structural) candidate (slice 4).
|
|
18
|
+
* Recorded additively on the classifier ledger so the §8 done-criterion (which reads
|
|
19
|
+
* the LEDGER, not the compiled `rule.status`) can distinguish the verify-stage outcomes
|
|
20
|
+
* rather than collapse them onto the `stage4Confirmed` boolean:
|
|
21
|
+
* - `confirmed` — Stage-4 found positive in-scope evidence (active rule).
|
|
22
|
+
* - `untested-no-matches` — Stage-4 ran, zero hits (neutral/inconclusive).
|
|
23
|
+
* - `archived-out-of-scope` — the §4 backstop ACTIVELY rejected a mis-structural
|
|
24
|
+
* candidate (fired on the baseline) — a classifier-over-eager
|
|
25
|
+
* signal, NOT the same as `no-matches` (Tenet 19, the
|
|
26
|
+
* compile-stage twin of `dispositionSource`).
|
|
27
|
+
* - `compile-rejected` — the pattern parsed but failed per-engine safety
|
|
28
|
+
* validation (e.g. ReDoS); never produced as a rule.
|
|
29
|
+
* Absent on entries the compile stage never touched (behavioral/rag-only, or a
|
|
30
|
+
* classify-only run). NOT a falsifying condition (no FM clause) — a done-criterion
|
|
31
|
+
* diagnostic; the harness only locks its consistency with `stage4Confirmed`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const Stage4LedgerOutcomeSchema: z.ZodEnum<["confirmed", "untested-no-matches", "archived-out-of-scope", "compile-rejected"]>;
|
|
34
|
+
export type Stage4LedgerOutcome = z.infer<typeof Stage4LedgerOutcomeSchema>;
|
|
35
|
+
export declare const EmissionLedgerEntrySchema: z.ZodObject<{
|
|
36
|
+
candidateRef: z.ZodEffects<z.ZodString, string, string>;
|
|
37
|
+
provenance: z.ZodObject<{
|
|
38
|
+
mergedPr: z.ZodNumber;
|
|
39
|
+
reviewThread: z.ZodEffects<z.ZodString, string, string>;
|
|
40
|
+
commitSha: z.ZodString;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
mergedPr: number;
|
|
43
|
+
reviewThread: string;
|
|
44
|
+
commitSha: string;
|
|
45
|
+
}, {
|
|
46
|
+
mergedPr: number;
|
|
47
|
+
reviewThread: string;
|
|
48
|
+
commitSha: string;
|
|
49
|
+
}>;
|
|
50
|
+
classifierDisposition: z.ZodEnum<["structural", "behavioral"]>;
|
|
51
|
+
routing: z.ZodEnum<["compile", "rag-only"]>;
|
|
52
|
+
classifierLedgerRef: z.ZodEffects<z.ZodString, string, string>;
|
|
53
|
+
unverified: z.ZodLiteral<true>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
provenance: {
|
|
56
|
+
mergedPr: number;
|
|
57
|
+
reviewThread: string;
|
|
58
|
+
commitSha: string;
|
|
59
|
+
};
|
|
60
|
+
unverified: true;
|
|
61
|
+
classifierDisposition: "structural" | "behavioral";
|
|
62
|
+
classifierLedgerRef: string;
|
|
63
|
+
candidateRef: string;
|
|
64
|
+
routing: "compile" | "rag-only";
|
|
65
|
+
}, {
|
|
66
|
+
provenance: {
|
|
67
|
+
mergedPr: number;
|
|
68
|
+
reviewThread: string;
|
|
69
|
+
commitSha: string;
|
|
70
|
+
};
|
|
71
|
+
unverified: true;
|
|
72
|
+
classifierDisposition: "structural" | "behavioral";
|
|
73
|
+
classifierLedgerRef: string;
|
|
74
|
+
candidateRef: string;
|
|
75
|
+
routing: "compile" | "rag-only";
|
|
76
|
+
}>;
|
|
77
|
+
export type EmissionLedgerEntry = z.infer<typeof EmissionLedgerEntrySchema>;
|
|
78
|
+
export declare const EmissionLedgerSchema: z.ZodObject<{
|
|
79
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
80
|
+
candidateRef: z.ZodEffects<z.ZodString, string, string>;
|
|
81
|
+
provenance: z.ZodObject<{
|
|
82
|
+
mergedPr: z.ZodNumber;
|
|
83
|
+
reviewThread: z.ZodEffects<z.ZodString, string, string>;
|
|
84
|
+
commitSha: z.ZodString;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
mergedPr: number;
|
|
87
|
+
reviewThread: string;
|
|
88
|
+
commitSha: string;
|
|
89
|
+
}, {
|
|
90
|
+
mergedPr: number;
|
|
91
|
+
reviewThread: string;
|
|
92
|
+
commitSha: string;
|
|
93
|
+
}>;
|
|
94
|
+
classifierDisposition: z.ZodEnum<["structural", "behavioral"]>;
|
|
95
|
+
routing: z.ZodEnum<["compile", "rag-only"]>;
|
|
96
|
+
classifierLedgerRef: z.ZodEffects<z.ZodString, string, string>;
|
|
97
|
+
unverified: z.ZodLiteral<true>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
provenance: {
|
|
100
|
+
mergedPr: number;
|
|
101
|
+
reviewThread: string;
|
|
102
|
+
commitSha: string;
|
|
103
|
+
};
|
|
104
|
+
unverified: true;
|
|
105
|
+
classifierDisposition: "structural" | "behavioral";
|
|
106
|
+
classifierLedgerRef: string;
|
|
107
|
+
candidateRef: string;
|
|
108
|
+
routing: "compile" | "rag-only";
|
|
109
|
+
}, {
|
|
110
|
+
provenance: {
|
|
111
|
+
mergedPr: number;
|
|
112
|
+
reviewThread: string;
|
|
113
|
+
commitSha: string;
|
|
114
|
+
};
|
|
115
|
+
unverified: true;
|
|
116
|
+
classifierDisposition: "structural" | "behavioral";
|
|
117
|
+
classifierLedgerRef: string;
|
|
118
|
+
candidateRef: string;
|
|
119
|
+
routing: "compile" | "rag-only";
|
|
120
|
+
}>, "many">;
|
|
121
|
+
/**
|
|
122
|
+
* Run-level seed-blindness attestation (§7). `false` = no seed class was
|
|
123
|
+
* supplied to any extraction/classification stage; `true` falsifies FM(f).
|
|
124
|
+
*/
|
|
125
|
+
extractionInputsAttestation: z.ZodObject<{
|
|
126
|
+
seedClassesProvided: z.ZodBoolean;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
seedClassesProvided: boolean;
|
|
129
|
+
}, {
|
|
130
|
+
seedClassesProvided: boolean;
|
|
131
|
+
}>;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
entries: {
|
|
134
|
+
provenance: {
|
|
135
|
+
mergedPr: number;
|
|
136
|
+
reviewThread: string;
|
|
137
|
+
commitSha: string;
|
|
138
|
+
};
|
|
139
|
+
unverified: true;
|
|
140
|
+
classifierDisposition: "structural" | "behavioral";
|
|
141
|
+
classifierLedgerRef: string;
|
|
142
|
+
candidateRef: string;
|
|
143
|
+
routing: "compile" | "rag-only";
|
|
144
|
+
}[];
|
|
145
|
+
extractionInputsAttestation: {
|
|
146
|
+
seedClassesProvided: boolean;
|
|
147
|
+
};
|
|
148
|
+
}, {
|
|
149
|
+
entries: {
|
|
150
|
+
provenance: {
|
|
151
|
+
mergedPr: number;
|
|
152
|
+
reviewThread: string;
|
|
153
|
+
commitSha: string;
|
|
154
|
+
};
|
|
155
|
+
unverified: true;
|
|
156
|
+
classifierDisposition: "structural" | "behavioral";
|
|
157
|
+
classifierLedgerRef: string;
|
|
158
|
+
candidateRef: string;
|
|
159
|
+
routing: "compile" | "rag-only";
|
|
160
|
+
}[];
|
|
161
|
+
extractionInputsAttestation: {
|
|
162
|
+
seedClassesProvided: boolean;
|
|
163
|
+
};
|
|
164
|
+
}>;
|
|
165
|
+
export type EmissionLedger = z.infer<typeof EmissionLedgerSchema>;
|
|
166
|
+
export declare const DropReasonCodeSchema: z.ZodEnum<["unreachable", "truncated", "unparseable", "incomplete-provenance", "resolved-rejected"]>;
|
|
167
|
+
export type DropReasonCode = z.infer<typeof DropReasonCodeSchema>;
|
|
168
|
+
export declare const DropLedgerEntrySchema: z.ZodObject<{
|
|
169
|
+
/**
|
|
170
|
+
* Source PR of the dropped candidate. REQUIRED — the funnel always knows which
|
|
171
|
+
* train PR it is processing (it iterates the train slice), even for an
|
|
172
|
+
* `incomplete-provenance` drop where the review-thread/SHA is missing. An
|
|
173
|
+
* unrecorded source would make the drop uncreditable and open an undetectable
|
|
174
|
+
* FM(i) train-skip gap.
|
|
175
|
+
*/
|
|
176
|
+
sourcePr: z.ZodNumber;
|
|
177
|
+
reasonCode: z.ZodEnum<["unreachable", "truncated", "unparseable", "incomplete-provenance", "resolved-rejected"]>;
|
|
178
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
181
|
+
sourcePr: number;
|
|
182
|
+
detail?: string | undefined;
|
|
183
|
+
}, {
|
|
184
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
185
|
+
sourcePr: number;
|
|
186
|
+
detail?: string | undefined;
|
|
187
|
+
}>;
|
|
188
|
+
export type DropLedgerEntry = z.infer<typeof DropLedgerEntrySchema>;
|
|
189
|
+
export declare const DropLedgerSchema: z.ZodObject<{
|
|
190
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
191
|
+
/**
|
|
192
|
+
* Source PR of the dropped candidate. REQUIRED — the funnel always knows which
|
|
193
|
+
* train PR it is processing (it iterates the train slice), even for an
|
|
194
|
+
* `incomplete-provenance` drop where the review-thread/SHA is missing. An
|
|
195
|
+
* unrecorded source would make the drop uncreditable and open an undetectable
|
|
196
|
+
* FM(i) train-skip gap.
|
|
197
|
+
*/
|
|
198
|
+
sourcePr: z.ZodNumber;
|
|
199
|
+
reasonCode: z.ZodEnum<["unreachable", "truncated", "unparseable", "incomplete-provenance", "resolved-rejected"]>;
|
|
200
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
203
|
+
sourcePr: number;
|
|
204
|
+
detail?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
207
|
+
sourcePr: number;
|
|
208
|
+
detail?: string | undefined;
|
|
209
|
+
}>, "many">;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
entries: {
|
|
212
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
213
|
+
sourcePr: number;
|
|
214
|
+
detail?: string | undefined;
|
|
215
|
+
}[];
|
|
216
|
+
}, {
|
|
217
|
+
entries: {
|
|
218
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
219
|
+
sourcePr: number;
|
|
220
|
+
detail?: string | undefined;
|
|
221
|
+
}[];
|
|
222
|
+
}>;
|
|
223
|
+
export type DropLedger = z.infer<typeof DropLedgerSchema>;
|
|
224
|
+
export declare const ClassifierLedgerEntrySchema: z.ZodObject<{
|
|
225
|
+
/**
|
|
226
|
+
* This classifier-ledger entry's own ref — the JOIN KEY that an emission entry's
|
|
227
|
+
* `classifierLedgerRef` points to (not necessarily the candidate's own
|
|
228
|
+
* `candidateRef`). Slice 1 joins on this ref + checks disposition consistency; a
|
|
229
|
+
* stricter same-candidate identity assertion is deferred to slice 2.
|
|
230
|
+
*/
|
|
231
|
+
candidateRef: z.ZodEffects<z.ZodString, string, string>;
|
|
232
|
+
disposition: z.ZodEnum<["structural", "behavioral"]>;
|
|
233
|
+
/**
|
|
234
|
+
* Stage-4 Verify-Against-Codebase confirmation — the deterministic backstop.
|
|
235
|
+
* NON-CERTIFYING IN SLICE 1: Stage-4 is wired in slice 4, so the harness does NOT
|
|
236
|
+
* yet require `stage4Confirmed === true` for compile-routed candidates (it checks
|
|
237
|
+
* disposition consistency only). The field is carried now so slice 4 can enforce
|
|
238
|
+
* it without a schema change.
|
|
239
|
+
*/
|
|
240
|
+
stage4Confirmed: z.ZodBoolean;
|
|
241
|
+
/**
|
|
242
|
+
* Whether `disposition` is a genuine classifier judgment or a safe-default on
|
|
243
|
+
* classifier failure (always `behavioral`). Present-and-`'classified'` in normal
|
|
244
|
+
* runs; set `'error-default'` on the safe-default path (slice 3). Read by the §8
|
|
245
|
+
* terminal report (slice 5) to keep a flaky-classifier error rate from
|
|
246
|
+
* masquerading as structural-signal sparsity (Tenet 19, panel flag-5). Not an FM
|
|
247
|
+
* condition — a diagnostic, like `stage4Confirmed`.
|
|
248
|
+
*/
|
|
249
|
+
dispositionSource: z.ZodEnum<["classified", "error-default"]>;
|
|
250
|
+
/**
|
|
251
|
+
* Compile + Stage-4 outcome (slice 4), set by `runCompileStage` on the matched
|
|
252
|
+
* compile-routed entry. OPTIONAL — absent until the compile stage runs (and
|
|
253
|
+
* never set on behavioral/rag-only entries, which are never compiled). When
|
|
254
|
+
* present it MUST be consistent with `stage4Confirmed`: `confirmed` ⟺
|
|
255
|
+
* `stage4Confirmed === true`; the other three outcomes ⟺ `false`. The §8 harness
|
|
256
|
+
* locks that consistency (no new FM clause) — see `Stage4LedgerOutcomeSchema`.
|
|
257
|
+
*/
|
|
258
|
+
stage4Outcome: z.ZodOptional<z.ZodEnum<["confirmed", "untested-no-matches", "archived-out-of-scope", "compile-rejected"]>>;
|
|
259
|
+
}, "strip", z.ZodTypeAny, {
|
|
260
|
+
candidateRef: string;
|
|
261
|
+
disposition: "structural" | "behavioral";
|
|
262
|
+
stage4Confirmed: boolean;
|
|
263
|
+
dispositionSource: "classified" | "error-default";
|
|
264
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
265
|
+
}, {
|
|
266
|
+
candidateRef: string;
|
|
267
|
+
disposition: "structural" | "behavioral";
|
|
268
|
+
stage4Confirmed: boolean;
|
|
269
|
+
dispositionSource: "classified" | "error-default";
|
|
270
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
271
|
+
}>;
|
|
272
|
+
export type ClassifierLedgerEntry = z.infer<typeof ClassifierLedgerEntrySchema>;
|
|
273
|
+
export declare const ClassifierLedgerSchema: z.ZodObject<{
|
|
274
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
275
|
+
/**
|
|
276
|
+
* This classifier-ledger entry's own ref — the JOIN KEY that an emission entry's
|
|
277
|
+
* `classifierLedgerRef` points to (not necessarily the candidate's own
|
|
278
|
+
* `candidateRef`). Slice 1 joins on this ref + checks disposition consistency; a
|
|
279
|
+
* stricter same-candidate identity assertion is deferred to slice 2.
|
|
280
|
+
*/
|
|
281
|
+
candidateRef: z.ZodEffects<z.ZodString, string, string>;
|
|
282
|
+
disposition: z.ZodEnum<["structural", "behavioral"]>;
|
|
283
|
+
/**
|
|
284
|
+
* Stage-4 Verify-Against-Codebase confirmation — the deterministic backstop.
|
|
285
|
+
* NON-CERTIFYING IN SLICE 1: Stage-4 is wired in slice 4, so the harness does NOT
|
|
286
|
+
* yet require `stage4Confirmed === true` for compile-routed candidates (it checks
|
|
287
|
+
* disposition consistency only). The field is carried now so slice 4 can enforce
|
|
288
|
+
* it without a schema change.
|
|
289
|
+
*/
|
|
290
|
+
stage4Confirmed: z.ZodBoolean;
|
|
291
|
+
/**
|
|
292
|
+
* Whether `disposition` is a genuine classifier judgment or a safe-default on
|
|
293
|
+
* classifier failure (always `behavioral`). Present-and-`'classified'` in normal
|
|
294
|
+
* runs; set `'error-default'` on the safe-default path (slice 3). Read by the §8
|
|
295
|
+
* terminal report (slice 5) to keep a flaky-classifier error rate from
|
|
296
|
+
* masquerading as structural-signal sparsity (Tenet 19, panel flag-5). Not an FM
|
|
297
|
+
* condition — a diagnostic, like `stage4Confirmed`.
|
|
298
|
+
*/
|
|
299
|
+
dispositionSource: z.ZodEnum<["classified", "error-default"]>;
|
|
300
|
+
/**
|
|
301
|
+
* Compile + Stage-4 outcome (slice 4), set by `runCompileStage` on the matched
|
|
302
|
+
* compile-routed entry. OPTIONAL — absent until the compile stage runs (and
|
|
303
|
+
* never set on behavioral/rag-only entries, which are never compiled). When
|
|
304
|
+
* present it MUST be consistent with `stage4Confirmed`: `confirmed` ⟺
|
|
305
|
+
* `stage4Confirmed === true`; the other three outcomes ⟺ `false`. The §8 harness
|
|
306
|
+
* locks that consistency (no new FM clause) — see `Stage4LedgerOutcomeSchema`.
|
|
307
|
+
*/
|
|
308
|
+
stage4Outcome: z.ZodOptional<z.ZodEnum<["confirmed", "untested-no-matches", "archived-out-of-scope", "compile-rejected"]>>;
|
|
309
|
+
}, "strip", z.ZodTypeAny, {
|
|
310
|
+
candidateRef: string;
|
|
311
|
+
disposition: "structural" | "behavioral";
|
|
312
|
+
stage4Confirmed: boolean;
|
|
313
|
+
dispositionSource: "classified" | "error-default";
|
|
314
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
315
|
+
}, {
|
|
316
|
+
candidateRef: string;
|
|
317
|
+
disposition: "structural" | "behavioral";
|
|
318
|
+
stage4Confirmed: boolean;
|
|
319
|
+
dispositionSource: "classified" | "error-default";
|
|
320
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
321
|
+
}>, "many">;
|
|
322
|
+
}, "strip", z.ZodTypeAny, {
|
|
323
|
+
entries: {
|
|
324
|
+
candidateRef: string;
|
|
325
|
+
disposition: "structural" | "behavioral";
|
|
326
|
+
stage4Confirmed: boolean;
|
|
327
|
+
dispositionSource: "classified" | "error-default";
|
|
328
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
329
|
+
}[];
|
|
330
|
+
}, {
|
|
331
|
+
entries: {
|
|
332
|
+
candidateRef: string;
|
|
333
|
+
disposition: "structural" | "behavioral";
|
|
334
|
+
stage4Confirmed: boolean;
|
|
335
|
+
dispositionSource: "classified" | "error-default";
|
|
336
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
337
|
+
}[];
|
|
338
|
+
}>;
|
|
339
|
+
export type ClassifierLedger = z.infer<typeof ClassifierLedgerSchema>;
|
|
340
|
+
export declare const SplitLedgerSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
341
|
+
split: z.ZodEffects<z.ZodObject<{
|
|
342
|
+
asOfCommit: z.ZodString;
|
|
343
|
+
trainPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
344
|
+
heldOutPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
345
|
+
excludedPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
346
|
+
positiveControlPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
347
|
+
negativeControlPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
348
|
+
splitRule: z.ZodObject<{
|
|
349
|
+
predicate: z.ZodEffects<z.ZodString, string, string>;
|
|
350
|
+
cutIndex: z.ZodNumber;
|
|
351
|
+
}, "strip", z.ZodTypeAny, {
|
|
352
|
+
predicate: string;
|
|
353
|
+
cutIndex: number;
|
|
354
|
+
}, {
|
|
355
|
+
predicate: string;
|
|
356
|
+
cutIndex: number;
|
|
357
|
+
}>;
|
|
358
|
+
}, "strip", z.ZodTypeAny, {
|
|
359
|
+
asOfCommit: string;
|
|
360
|
+
trainPrs: number[];
|
|
361
|
+
heldOutPrs: number[];
|
|
362
|
+
excludedPrs: number[];
|
|
363
|
+
positiveControlPrs: number[];
|
|
364
|
+
negativeControlPrs: number[];
|
|
365
|
+
splitRule: {
|
|
366
|
+
predicate: string;
|
|
367
|
+
cutIndex: number;
|
|
368
|
+
};
|
|
369
|
+
}, {
|
|
370
|
+
asOfCommit: string;
|
|
371
|
+
trainPrs: number[];
|
|
372
|
+
heldOutPrs: number[];
|
|
373
|
+
excludedPrs: number[];
|
|
374
|
+
positiveControlPrs: number[];
|
|
375
|
+
negativeControlPrs: number[];
|
|
376
|
+
splitRule: {
|
|
377
|
+
predicate: string;
|
|
378
|
+
cutIndex: number;
|
|
379
|
+
};
|
|
380
|
+
}>, {
|
|
381
|
+
asOfCommit: string;
|
|
382
|
+
trainPrs: number[];
|
|
383
|
+
heldOutPrs: number[];
|
|
384
|
+
excludedPrs: number[];
|
|
385
|
+
positiveControlPrs: number[];
|
|
386
|
+
negativeControlPrs: number[];
|
|
387
|
+
splitRule: {
|
|
388
|
+
predicate: string;
|
|
389
|
+
cutIndex: number;
|
|
390
|
+
};
|
|
391
|
+
}, {
|
|
392
|
+
asOfCommit: string;
|
|
393
|
+
trainPrs: number[];
|
|
394
|
+
heldOutPrs: number[];
|
|
395
|
+
excludedPrs: number[];
|
|
396
|
+
positiveControlPrs: number[];
|
|
397
|
+
negativeControlPrs: number[];
|
|
398
|
+
splitRule: {
|
|
399
|
+
predicate: string;
|
|
400
|
+
cutIndex: number;
|
|
401
|
+
};
|
|
402
|
+
}>;
|
|
403
|
+
/** The frozen corpus = `selectionRule(asOfCommit)` the cover is checked against. */
|
|
404
|
+
corpus: z.ZodArray<z.ZodNumber, "many">;
|
|
405
|
+
/** PR → merge-commit, for the disjoint-by-merge-commit check (rebuilds the map). */
|
|
406
|
+
corpusMergeCommits: z.ZodArray<z.ZodObject<{
|
|
407
|
+
pr: z.ZodNumber;
|
|
408
|
+
mergeCommit: z.ZodString;
|
|
409
|
+
}, "strip", z.ZodTypeAny, {
|
|
410
|
+
pr: number;
|
|
411
|
+
mergeCommit: string;
|
|
412
|
+
}, {
|
|
413
|
+
pr: number;
|
|
414
|
+
mergeCommit: string;
|
|
415
|
+
}>, "many">;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
split: {
|
|
418
|
+
asOfCommit: string;
|
|
419
|
+
trainPrs: number[];
|
|
420
|
+
heldOutPrs: number[];
|
|
421
|
+
excludedPrs: number[];
|
|
422
|
+
positiveControlPrs: number[];
|
|
423
|
+
negativeControlPrs: number[];
|
|
424
|
+
splitRule: {
|
|
425
|
+
predicate: string;
|
|
426
|
+
cutIndex: number;
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
corpus: number[];
|
|
430
|
+
corpusMergeCommits: {
|
|
431
|
+
pr: number;
|
|
432
|
+
mergeCommit: string;
|
|
433
|
+
}[];
|
|
434
|
+
}, {
|
|
435
|
+
split: {
|
|
436
|
+
asOfCommit: string;
|
|
437
|
+
trainPrs: number[];
|
|
438
|
+
heldOutPrs: number[];
|
|
439
|
+
excludedPrs: number[];
|
|
440
|
+
positiveControlPrs: number[];
|
|
441
|
+
negativeControlPrs: number[];
|
|
442
|
+
splitRule: {
|
|
443
|
+
predicate: string;
|
|
444
|
+
cutIndex: number;
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
corpus: number[];
|
|
448
|
+
corpusMergeCommits: {
|
|
449
|
+
pr: number;
|
|
450
|
+
mergeCommit: string;
|
|
451
|
+
}[];
|
|
452
|
+
}>, {
|
|
453
|
+
split: {
|
|
454
|
+
asOfCommit: string;
|
|
455
|
+
trainPrs: number[];
|
|
456
|
+
heldOutPrs: number[];
|
|
457
|
+
excludedPrs: number[];
|
|
458
|
+
positiveControlPrs: number[];
|
|
459
|
+
negativeControlPrs: number[];
|
|
460
|
+
splitRule: {
|
|
461
|
+
predicate: string;
|
|
462
|
+
cutIndex: number;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
corpus: number[];
|
|
466
|
+
corpusMergeCommits: {
|
|
467
|
+
pr: number;
|
|
468
|
+
mergeCommit: string;
|
|
469
|
+
}[];
|
|
470
|
+
}, {
|
|
471
|
+
split: {
|
|
472
|
+
asOfCommit: string;
|
|
473
|
+
trainPrs: number[];
|
|
474
|
+
heldOutPrs: number[];
|
|
475
|
+
excludedPrs: number[];
|
|
476
|
+
positiveControlPrs: number[];
|
|
477
|
+
negativeControlPrs: number[];
|
|
478
|
+
splitRule: {
|
|
479
|
+
predicate: string;
|
|
480
|
+
cutIndex: number;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
corpus: number[];
|
|
484
|
+
corpusMergeCommits: {
|
|
485
|
+
pr: number;
|
|
486
|
+
mergeCommit: string;
|
|
487
|
+
}[];
|
|
488
|
+
}>, {
|
|
489
|
+
split: {
|
|
490
|
+
asOfCommit: string;
|
|
491
|
+
trainPrs: number[];
|
|
492
|
+
heldOutPrs: number[];
|
|
493
|
+
excludedPrs: number[];
|
|
494
|
+
positiveControlPrs: number[];
|
|
495
|
+
negativeControlPrs: number[];
|
|
496
|
+
splitRule: {
|
|
497
|
+
predicate: string;
|
|
498
|
+
cutIndex: number;
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
corpus: number[];
|
|
502
|
+
corpusMergeCommits: {
|
|
503
|
+
pr: number;
|
|
504
|
+
mergeCommit: string;
|
|
505
|
+
}[];
|
|
506
|
+
}, {
|
|
507
|
+
split: {
|
|
508
|
+
asOfCommit: string;
|
|
509
|
+
trainPrs: number[];
|
|
510
|
+
heldOutPrs: number[];
|
|
511
|
+
excludedPrs: number[];
|
|
512
|
+
positiveControlPrs: number[];
|
|
513
|
+
negativeControlPrs: number[];
|
|
514
|
+
splitRule: {
|
|
515
|
+
predicate: string;
|
|
516
|
+
cutIndex: number;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
corpus: number[];
|
|
520
|
+
corpusMergeCommits: {
|
|
521
|
+
pr: number;
|
|
522
|
+
mergeCommit: string;
|
|
523
|
+
}[];
|
|
524
|
+
}>;
|
|
525
|
+
export type SplitLedger = z.infer<typeof SplitLedgerSchema>;
|
|
526
|
+
export declare const ApiFetchSliceSchema: z.ZodEnum<["train", "heldOut"]>;
|
|
527
|
+
export type ApiFetchSlice = z.infer<typeof ApiFetchSliceSchema>;
|
|
528
|
+
export declare const ApiUsageLedgerEntrySchema: z.ZodObject<{
|
|
529
|
+
targetPr: z.ZodNumber;
|
|
530
|
+
slice: z.ZodEnum<["train", "heldOut"]>;
|
|
531
|
+
fetchKind: z.ZodEffects<z.ZodString, string, string>;
|
|
532
|
+
}, "strip", z.ZodTypeAny, {
|
|
533
|
+
slice: "train" | "heldOut";
|
|
534
|
+
targetPr: number;
|
|
535
|
+
fetchKind: string;
|
|
536
|
+
}, {
|
|
537
|
+
slice: "train" | "heldOut";
|
|
538
|
+
targetPr: number;
|
|
539
|
+
fetchKind: string;
|
|
540
|
+
}>;
|
|
541
|
+
export type ApiUsageLedgerEntry = z.infer<typeof ApiUsageLedgerEntrySchema>;
|
|
542
|
+
export declare const ApiUsageLedgerSchema: z.ZodObject<{
|
|
543
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
544
|
+
targetPr: z.ZodNumber;
|
|
545
|
+
slice: z.ZodEnum<["train", "heldOut"]>;
|
|
546
|
+
fetchKind: z.ZodEffects<z.ZodString, string, string>;
|
|
547
|
+
}, "strip", z.ZodTypeAny, {
|
|
548
|
+
slice: "train" | "heldOut";
|
|
549
|
+
targetPr: number;
|
|
550
|
+
fetchKind: string;
|
|
551
|
+
}, {
|
|
552
|
+
slice: "train" | "heldOut";
|
|
553
|
+
targetPr: number;
|
|
554
|
+
fetchKind: string;
|
|
555
|
+
}>, "many">;
|
|
556
|
+
/** MUST be 0 — any held-out/control content fetch during mining falsifies FM(h). */
|
|
557
|
+
heldOutFetchCount: z.ZodNumber;
|
|
558
|
+
}, "strip", z.ZodTypeAny, {
|
|
559
|
+
entries: {
|
|
560
|
+
slice: "train" | "heldOut";
|
|
561
|
+
targetPr: number;
|
|
562
|
+
fetchKind: string;
|
|
563
|
+
}[];
|
|
564
|
+
heldOutFetchCount: number;
|
|
565
|
+
}, {
|
|
566
|
+
entries: {
|
|
567
|
+
slice: "train" | "heldOut";
|
|
568
|
+
targetPr: number;
|
|
569
|
+
fetchKind: string;
|
|
570
|
+
}[];
|
|
571
|
+
heldOutFetchCount: number;
|
|
572
|
+
}>;
|
|
573
|
+
export type ApiUsageLedger = z.infer<typeof ApiUsageLedgerSchema>;
|
|
574
|
+
export declare const MinerLedgersSchema: z.ZodObject<{
|
|
575
|
+
emission: z.ZodObject<{
|
|
576
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
577
|
+
candidateRef: z.ZodEffects<z.ZodString, string, string>;
|
|
578
|
+
provenance: z.ZodObject<{
|
|
579
|
+
mergedPr: z.ZodNumber;
|
|
580
|
+
reviewThread: z.ZodEffects<z.ZodString, string, string>;
|
|
581
|
+
commitSha: z.ZodString;
|
|
582
|
+
}, "strip", z.ZodTypeAny, {
|
|
583
|
+
mergedPr: number;
|
|
584
|
+
reviewThread: string;
|
|
585
|
+
commitSha: string;
|
|
586
|
+
}, {
|
|
587
|
+
mergedPr: number;
|
|
588
|
+
reviewThread: string;
|
|
589
|
+
commitSha: string;
|
|
590
|
+
}>;
|
|
591
|
+
classifierDisposition: z.ZodEnum<["structural", "behavioral"]>;
|
|
592
|
+
routing: z.ZodEnum<["compile", "rag-only"]>;
|
|
593
|
+
classifierLedgerRef: z.ZodEffects<z.ZodString, string, string>;
|
|
594
|
+
unverified: z.ZodLiteral<true>;
|
|
595
|
+
}, "strip", z.ZodTypeAny, {
|
|
596
|
+
provenance: {
|
|
597
|
+
mergedPr: number;
|
|
598
|
+
reviewThread: string;
|
|
599
|
+
commitSha: string;
|
|
600
|
+
};
|
|
601
|
+
unverified: true;
|
|
602
|
+
classifierDisposition: "structural" | "behavioral";
|
|
603
|
+
classifierLedgerRef: string;
|
|
604
|
+
candidateRef: string;
|
|
605
|
+
routing: "compile" | "rag-only";
|
|
606
|
+
}, {
|
|
607
|
+
provenance: {
|
|
608
|
+
mergedPr: number;
|
|
609
|
+
reviewThread: string;
|
|
610
|
+
commitSha: string;
|
|
611
|
+
};
|
|
612
|
+
unverified: true;
|
|
613
|
+
classifierDisposition: "structural" | "behavioral";
|
|
614
|
+
classifierLedgerRef: string;
|
|
615
|
+
candidateRef: string;
|
|
616
|
+
routing: "compile" | "rag-only";
|
|
617
|
+
}>, "many">;
|
|
618
|
+
/**
|
|
619
|
+
* Run-level seed-blindness attestation (§7). `false` = no seed class was
|
|
620
|
+
* supplied to any extraction/classification stage; `true` falsifies FM(f).
|
|
621
|
+
*/
|
|
622
|
+
extractionInputsAttestation: z.ZodObject<{
|
|
623
|
+
seedClassesProvided: z.ZodBoolean;
|
|
624
|
+
}, "strip", z.ZodTypeAny, {
|
|
625
|
+
seedClassesProvided: boolean;
|
|
626
|
+
}, {
|
|
627
|
+
seedClassesProvided: boolean;
|
|
628
|
+
}>;
|
|
629
|
+
}, "strip", z.ZodTypeAny, {
|
|
630
|
+
entries: {
|
|
631
|
+
provenance: {
|
|
632
|
+
mergedPr: number;
|
|
633
|
+
reviewThread: string;
|
|
634
|
+
commitSha: string;
|
|
635
|
+
};
|
|
636
|
+
unverified: true;
|
|
637
|
+
classifierDisposition: "structural" | "behavioral";
|
|
638
|
+
classifierLedgerRef: string;
|
|
639
|
+
candidateRef: string;
|
|
640
|
+
routing: "compile" | "rag-only";
|
|
641
|
+
}[];
|
|
642
|
+
extractionInputsAttestation: {
|
|
643
|
+
seedClassesProvided: boolean;
|
|
644
|
+
};
|
|
645
|
+
}, {
|
|
646
|
+
entries: {
|
|
647
|
+
provenance: {
|
|
648
|
+
mergedPr: number;
|
|
649
|
+
reviewThread: string;
|
|
650
|
+
commitSha: string;
|
|
651
|
+
};
|
|
652
|
+
unverified: true;
|
|
653
|
+
classifierDisposition: "structural" | "behavioral";
|
|
654
|
+
classifierLedgerRef: string;
|
|
655
|
+
candidateRef: string;
|
|
656
|
+
routing: "compile" | "rag-only";
|
|
657
|
+
}[];
|
|
658
|
+
extractionInputsAttestation: {
|
|
659
|
+
seedClassesProvided: boolean;
|
|
660
|
+
};
|
|
661
|
+
}>;
|
|
662
|
+
drop: z.ZodObject<{
|
|
663
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
664
|
+
/**
|
|
665
|
+
* Source PR of the dropped candidate. REQUIRED — the funnel always knows which
|
|
666
|
+
* train PR it is processing (it iterates the train slice), even for an
|
|
667
|
+
* `incomplete-provenance` drop where the review-thread/SHA is missing. An
|
|
668
|
+
* unrecorded source would make the drop uncreditable and open an undetectable
|
|
669
|
+
* FM(i) train-skip gap.
|
|
670
|
+
*/
|
|
671
|
+
sourcePr: z.ZodNumber;
|
|
672
|
+
reasonCode: z.ZodEnum<["unreachable", "truncated", "unparseable", "incomplete-provenance", "resolved-rejected"]>;
|
|
673
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
674
|
+
}, "strip", z.ZodTypeAny, {
|
|
675
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
676
|
+
sourcePr: number;
|
|
677
|
+
detail?: string | undefined;
|
|
678
|
+
}, {
|
|
679
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
680
|
+
sourcePr: number;
|
|
681
|
+
detail?: string | undefined;
|
|
682
|
+
}>, "many">;
|
|
683
|
+
}, "strip", z.ZodTypeAny, {
|
|
684
|
+
entries: {
|
|
685
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
686
|
+
sourcePr: number;
|
|
687
|
+
detail?: string | undefined;
|
|
688
|
+
}[];
|
|
689
|
+
}, {
|
|
690
|
+
entries: {
|
|
691
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
692
|
+
sourcePr: number;
|
|
693
|
+
detail?: string | undefined;
|
|
694
|
+
}[];
|
|
695
|
+
}>;
|
|
696
|
+
classifier: z.ZodObject<{
|
|
697
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
698
|
+
/**
|
|
699
|
+
* This classifier-ledger entry's own ref — the JOIN KEY that an emission entry's
|
|
700
|
+
* `classifierLedgerRef` points to (not necessarily the candidate's own
|
|
701
|
+
* `candidateRef`). Slice 1 joins on this ref + checks disposition consistency; a
|
|
702
|
+
* stricter same-candidate identity assertion is deferred to slice 2.
|
|
703
|
+
*/
|
|
704
|
+
candidateRef: z.ZodEffects<z.ZodString, string, string>;
|
|
705
|
+
disposition: z.ZodEnum<["structural", "behavioral"]>;
|
|
706
|
+
/**
|
|
707
|
+
* Stage-4 Verify-Against-Codebase confirmation — the deterministic backstop.
|
|
708
|
+
* NON-CERTIFYING IN SLICE 1: Stage-4 is wired in slice 4, so the harness does NOT
|
|
709
|
+
* yet require `stage4Confirmed === true` for compile-routed candidates (it checks
|
|
710
|
+
* disposition consistency only). The field is carried now so slice 4 can enforce
|
|
711
|
+
* it without a schema change.
|
|
712
|
+
*/
|
|
713
|
+
stage4Confirmed: z.ZodBoolean;
|
|
714
|
+
/**
|
|
715
|
+
* Whether `disposition` is a genuine classifier judgment or a safe-default on
|
|
716
|
+
* classifier failure (always `behavioral`). Present-and-`'classified'` in normal
|
|
717
|
+
* runs; set `'error-default'` on the safe-default path (slice 3). Read by the §8
|
|
718
|
+
* terminal report (slice 5) to keep a flaky-classifier error rate from
|
|
719
|
+
* masquerading as structural-signal sparsity (Tenet 19, panel flag-5). Not an FM
|
|
720
|
+
* condition — a diagnostic, like `stage4Confirmed`.
|
|
721
|
+
*/
|
|
722
|
+
dispositionSource: z.ZodEnum<["classified", "error-default"]>;
|
|
723
|
+
/**
|
|
724
|
+
* Compile + Stage-4 outcome (slice 4), set by `runCompileStage` on the matched
|
|
725
|
+
* compile-routed entry. OPTIONAL — absent until the compile stage runs (and
|
|
726
|
+
* never set on behavioral/rag-only entries, which are never compiled). When
|
|
727
|
+
* present it MUST be consistent with `stage4Confirmed`: `confirmed` ⟺
|
|
728
|
+
* `stage4Confirmed === true`; the other three outcomes ⟺ `false`. The §8 harness
|
|
729
|
+
* locks that consistency (no new FM clause) — see `Stage4LedgerOutcomeSchema`.
|
|
730
|
+
*/
|
|
731
|
+
stage4Outcome: z.ZodOptional<z.ZodEnum<["confirmed", "untested-no-matches", "archived-out-of-scope", "compile-rejected"]>>;
|
|
732
|
+
}, "strip", z.ZodTypeAny, {
|
|
733
|
+
candidateRef: string;
|
|
734
|
+
disposition: "structural" | "behavioral";
|
|
735
|
+
stage4Confirmed: boolean;
|
|
736
|
+
dispositionSource: "classified" | "error-default";
|
|
737
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
738
|
+
}, {
|
|
739
|
+
candidateRef: string;
|
|
740
|
+
disposition: "structural" | "behavioral";
|
|
741
|
+
stage4Confirmed: boolean;
|
|
742
|
+
dispositionSource: "classified" | "error-default";
|
|
743
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
744
|
+
}>, "many">;
|
|
745
|
+
}, "strip", z.ZodTypeAny, {
|
|
746
|
+
entries: {
|
|
747
|
+
candidateRef: string;
|
|
748
|
+
disposition: "structural" | "behavioral";
|
|
749
|
+
stage4Confirmed: boolean;
|
|
750
|
+
dispositionSource: "classified" | "error-default";
|
|
751
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
752
|
+
}[];
|
|
753
|
+
}, {
|
|
754
|
+
entries: {
|
|
755
|
+
candidateRef: string;
|
|
756
|
+
disposition: "structural" | "behavioral";
|
|
757
|
+
stage4Confirmed: boolean;
|
|
758
|
+
dispositionSource: "classified" | "error-default";
|
|
759
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
760
|
+
}[];
|
|
761
|
+
}>;
|
|
762
|
+
split: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
763
|
+
split: z.ZodEffects<z.ZodObject<{
|
|
764
|
+
asOfCommit: z.ZodString;
|
|
765
|
+
trainPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
766
|
+
heldOutPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
767
|
+
excludedPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
768
|
+
positiveControlPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
769
|
+
negativeControlPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
770
|
+
splitRule: z.ZodObject<{
|
|
771
|
+
predicate: z.ZodEffects<z.ZodString, string, string>;
|
|
772
|
+
cutIndex: z.ZodNumber;
|
|
773
|
+
}, "strip", z.ZodTypeAny, {
|
|
774
|
+
predicate: string;
|
|
775
|
+
cutIndex: number;
|
|
776
|
+
}, {
|
|
777
|
+
predicate: string;
|
|
778
|
+
cutIndex: number;
|
|
779
|
+
}>;
|
|
780
|
+
}, "strip", z.ZodTypeAny, {
|
|
781
|
+
asOfCommit: string;
|
|
782
|
+
trainPrs: number[];
|
|
783
|
+
heldOutPrs: number[];
|
|
784
|
+
excludedPrs: number[];
|
|
785
|
+
positiveControlPrs: number[];
|
|
786
|
+
negativeControlPrs: number[];
|
|
787
|
+
splitRule: {
|
|
788
|
+
predicate: string;
|
|
789
|
+
cutIndex: number;
|
|
790
|
+
};
|
|
791
|
+
}, {
|
|
792
|
+
asOfCommit: string;
|
|
793
|
+
trainPrs: number[];
|
|
794
|
+
heldOutPrs: number[];
|
|
795
|
+
excludedPrs: number[];
|
|
796
|
+
positiveControlPrs: number[];
|
|
797
|
+
negativeControlPrs: number[];
|
|
798
|
+
splitRule: {
|
|
799
|
+
predicate: string;
|
|
800
|
+
cutIndex: number;
|
|
801
|
+
};
|
|
802
|
+
}>, {
|
|
803
|
+
asOfCommit: string;
|
|
804
|
+
trainPrs: number[];
|
|
805
|
+
heldOutPrs: number[];
|
|
806
|
+
excludedPrs: number[];
|
|
807
|
+
positiveControlPrs: number[];
|
|
808
|
+
negativeControlPrs: number[];
|
|
809
|
+
splitRule: {
|
|
810
|
+
predicate: string;
|
|
811
|
+
cutIndex: number;
|
|
812
|
+
};
|
|
813
|
+
}, {
|
|
814
|
+
asOfCommit: string;
|
|
815
|
+
trainPrs: number[];
|
|
816
|
+
heldOutPrs: number[];
|
|
817
|
+
excludedPrs: number[];
|
|
818
|
+
positiveControlPrs: number[];
|
|
819
|
+
negativeControlPrs: number[];
|
|
820
|
+
splitRule: {
|
|
821
|
+
predicate: string;
|
|
822
|
+
cutIndex: number;
|
|
823
|
+
};
|
|
824
|
+
}>;
|
|
825
|
+
/** The frozen corpus = `selectionRule(asOfCommit)` the cover is checked against. */
|
|
826
|
+
corpus: z.ZodArray<z.ZodNumber, "many">;
|
|
827
|
+
/** PR → merge-commit, for the disjoint-by-merge-commit check (rebuilds the map). */
|
|
828
|
+
corpusMergeCommits: z.ZodArray<z.ZodObject<{
|
|
829
|
+
pr: z.ZodNumber;
|
|
830
|
+
mergeCommit: z.ZodString;
|
|
831
|
+
}, "strip", z.ZodTypeAny, {
|
|
832
|
+
pr: number;
|
|
833
|
+
mergeCommit: string;
|
|
834
|
+
}, {
|
|
835
|
+
pr: number;
|
|
836
|
+
mergeCommit: string;
|
|
837
|
+
}>, "many">;
|
|
838
|
+
}, "strip", z.ZodTypeAny, {
|
|
839
|
+
split: {
|
|
840
|
+
asOfCommit: string;
|
|
841
|
+
trainPrs: number[];
|
|
842
|
+
heldOutPrs: number[];
|
|
843
|
+
excludedPrs: number[];
|
|
844
|
+
positiveControlPrs: number[];
|
|
845
|
+
negativeControlPrs: number[];
|
|
846
|
+
splitRule: {
|
|
847
|
+
predicate: string;
|
|
848
|
+
cutIndex: number;
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
corpus: number[];
|
|
852
|
+
corpusMergeCommits: {
|
|
853
|
+
pr: number;
|
|
854
|
+
mergeCommit: string;
|
|
855
|
+
}[];
|
|
856
|
+
}, {
|
|
857
|
+
split: {
|
|
858
|
+
asOfCommit: string;
|
|
859
|
+
trainPrs: number[];
|
|
860
|
+
heldOutPrs: number[];
|
|
861
|
+
excludedPrs: number[];
|
|
862
|
+
positiveControlPrs: number[];
|
|
863
|
+
negativeControlPrs: number[];
|
|
864
|
+
splitRule: {
|
|
865
|
+
predicate: string;
|
|
866
|
+
cutIndex: number;
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
corpus: number[];
|
|
870
|
+
corpusMergeCommits: {
|
|
871
|
+
pr: number;
|
|
872
|
+
mergeCommit: string;
|
|
873
|
+
}[];
|
|
874
|
+
}>, {
|
|
875
|
+
split: {
|
|
876
|
+
asOfCommit: string;
|
|
877
|
+
trainPrs: number[];
|
|
878
|
+
heldOutPrs: number[];
|
|
879
|
+
excludedPrs: number[];
|
|
880
|
+
positiveControlPrs: number[];
|
|
881
|
+
negativeControlPrs: number[];
|
|
882
|
+
splitRule: {
|
|
883
|
+
predicate: string;
|
|
884
|
+
cutIndex: number;
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
corpus: number[];
|
|
888
|
+
corpusMergeCommits: {
|
|
889
|
+
pr: number;
|
|
890
|
+
mergeCommit: string;
|
|
891
|
+
}[];
|
|
892
|
+
}, {
|
|
893
|
+
split: {
|
|
894
|
+
asOfCommit: string;
|
|
895
|
+
trainPrs: number[];
|
|
896
|
+
heldOutPrs: number[];
|
|
897
|
+
excludedPrs: number[];
|
|
898
|
+
positiveControlPrs: number[];
|
|
899
|
+
negativeControlPrs: number[];
|
|
900
|
+
splitRule: {
|
|
901
|
+
predicate: string;
|
|
902
|
+
cutIndex: number;
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
corpus: number[];
|
|
906
|
+
corpusMergeCommits: {
|
|
907
|
+
pr: number;
|
|
908
|
+
mergeCommit: string;
|
|
909
|
+
}[];
|
|
910
|
+
}>, {
|
|
911
|
+
split: {
|
|
912
|
+
asOfCommit: string;
|
|
913
|
+
trainPrs: number[];
|
|
914
|
+
heldOutPrs: number[];
|
|
915
|
+
excludedPrs: number[];
|
|
916
|
+
positiveControlPrs: number[];
|
|
917
|
+
negativeControlPrs: number[];
|
|
918
|
+
splitRule: {
|
|
919
|
+
predicate: string;
|
|
920
|
+
cutIndex: number;
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
corpus: number[];
|
|
924
|
+
corpusMergeCommits: {
|
|
925
|
+
pr: number;
|
|
926
|
+
mergeCommit: string;
|
|
927
|
+
}[];
|
|
928
|
+
}, {
|
|
929
|
+
split: {
|
|
930
|
+
asOfCommit: string;
|
|
931
|
+
trainPrs: number[];
|
|
932
|
+
heldOutPrs: number[];
|
|
933
|
+
excludedPrs: number[];
|
|
934
|
+
positiveControlPrs: number[];
|
|
935
|
+
negativeControlPrs: number[];
|
|
936
|
+
splitRule: {
|
|
937
|
+
predicate: string;
|
|
938
|
+
cutIndex: number;
|
|
939
|
+
};
|
|
940
|
+
};
|
|
941
|
+
corpus: number[];
|
|
942
|
+
corpusMergeCommits: {
|
|
943
|
+
pr: number;
|
|
944
|
+
mergeCommit: string;
|
|
945
|
+
}[];
|
|
946
|
+
}>;
|
|
947
|
+
apiUsage: z.ZodObject<{
|
|
948
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
949
|
+
targetPr: z.ZodNumber;
|
|
950
|
+
slice: z.ZodEnum<["train", "heldOut"]>;
|
|
951
|
+
fetchKind: z.ZodEffects<z.ZodString, string, string>;
|
|
952
|
+
}, "strip", z.ZodTypeAny, {
|
|
953
|
+
slice: "train" | "heldOut";
|
|
954
|
+
targetPr: number;
|
|
955
|
+
fetchKind: string;
|
|
956
|
+
}, {
|
|
957
|
+
slice: "train" | "heldOut";
|
|
958
|
+
targetPr: number;
|
|
959
|
+
fetchKind: string;
|
|
960
|
+
}>, "many">;
|
|
961
|
+
/** MUST be 0 — any held-out/control content fetch during mining falsifies FM(h). */
|
|
962
|
+
heldOutFetchCount: z.ZodNumber;
|
|
963
|
+
}, "strip", z.ZodTypeAny, {
|
|
964
|
+
entries: {
|
|
965
|
+
slice: "train" | "heldOut";
|
|
966
|
+
targetPr: number;
|
|
967
|
+
fetchKind: string;
|
|
968
|
+
}[];
|
|
969
|
+
heldOutFetchCount: number;
|
|
970
|
+
}, {
|
|
971
|
+
entries: {
|
|
972
|
+
slice: "train" | "heldOut";
|
|
973
|
+
targetPr: number;
|
|
974
|
+
fetchKind: string;
|
|
975
|
+
}[];
|
|
976
|
+
heldOutFetchCount: number;
|
|
977
|
+
}>;
|
|
978
|
+
}, "strip", z.ZodTypeAny, {
|
|
979
|
+
split: {
|
|
980
|
+
split: {
|
|
981
|
+
asOfCommit: string;
|
|
982
|
+
trainPrs: number[];
|
|
983
|
+
heldOutPrs: number[];
|
|
984
|
+
excludedPrs: number[];
|
|
985
|
+
positiveControlPrs: number[];
|
|
986
|
+
negativeControlPrs: number[];
|
|
987
|
+
splitRule: {
|
|
988
|
+
predicate: string;
|
|
989
|
+
cutIndex: number;
|
|
990
|
+
};
|
|
991
|
+
};
|
|
992
|
+
corpus: number[];
|
|
993
|
+
corpusMergeCommits: {
|
|
994
|
+
pr: number;
|
|
995
|
+
mergeCommit: string;
|
|
996
|
+
}[];
|
|
997
|
+
};
|
|
998
|
+
emission: {
|
|
999
|
+
entries: {
|
|
1000
|
+
provenance: {
|
|
1001
|
+
mergedPr: number;
|
|
1002
|
+
reviewThread: string;
|
|
1003
|
+
commitSha: string;
|
|
1004
|
+
};
|
|
1005
|
+
unverified: true;
|
|
1006
|
+
classifierDisposition: "structural" | "behavioral";
|
|
1007
|
+
classifierLedgerRef: string;
|
|
1008
|
+
candidateRef: string;
|
|
1009
|
+
routing: "compile" | "rag-only";
|
|
1010
|
+
}[];
|
|
1011
|
+
extractionInputsAttestation: {
|
|
1012
|
+
seedClassesProvided: boolean;
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
1015
|
+
drop: {
|
|
1016
|
+
entries: {
|
|
1017
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
1018
|
+
sourcePr: number;
|
|
1019
|
+
detail?: string | undefined;
|
|
1020
|
+
}[];
|
|
1021
|
+
};
|
|
1022
|
+
classifier: {
|
|
1023
|
+
entries: {
|
|
1024
|
+
candidateRef: string;
|
|
1025
|
+
disposition: "structural" | "behavioral";
|
|
1026
|
+
stage4Confirmed: boolean;
|
|
1027
|
+
dispositionSource: "classified" | "error-default";
|
|
1028
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
1029
|
+
}[];
|
|
1030
|
+
};
|
|
1031
|
+
apiUsage: {
|
|
1032
|
+
entries: {
|
|
1033
|
+
slice: "train" | "heldOut";
|
|
1034
|
+
targetPr: number;
|
|
1035
|
+
fetchKind: string;
|
|
1036
|
+
}[];
|
|
1037
|
+
heldOutFetchCount: number;
|
|
1038
|
+
};
|
|
1039
|
+
}, {
|
|
1040
|
+
split: {
|
|
1041
|
+
split: {
|
|
1042
|
+
asOfCommit: string;
|
|
1043
|
+
trainPrs: number[];
|
|
1044
|
+
heldOutPrs: number[];
|
|
1045
|
+
excludedPrs: number[];
|
|
1046
|
+
positiveControlPrs: number[];
|
|
1047
|
+
negativeControlPrs: number[];
|
|
1048
|
+
splitRule: {
|
|
1049
|
+
predicate: string;
|
|
1050
|
+
cutIndex: number;
|
|
1051
|
+
};
|
|
1052
|
+
};
|
|
1053
|
+
corpus: number[];
|
|
1054
|
+
corpusMergeCommits: {
|
|
1055
|
+
pr: number;
|
|
1056
|
+
mergeCommit: string;
|
|
1057
|
+
}[];
|
|
1058
|
+
};
|
|
1059
|
+
emission: {
|
|
1060
|
+
entries: {
|
|
1061
|
+
provenance: {
|
|
1062
|
+
mergedPr: number;
|
|
1063
|
+
reviewThread: string;
|
|
1064
|
+
commitSha: string;
|
|
1065
|
+
};
|
|
1066
|
+
unverified: true;
|
|
1067
|
+
classifierDisposition: "structural" | "behavioral";
|
|
1068
|
+
classifierLedgerRef: string;
|
|
1069
|
+
candidateRef: string;
|
|
1070
|
+
routing: "compile" | "rag-only";
|
|
1071
|
+
}[];
|
|
1072
|
+
extractionInputsAttestation: {
|
|
1073
|
+
seedClassesProvided: boolean;
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
drop: {
|
|
1077
|
+
entries: {
|
|
1078
|
+
reasonCode: "unparseable" | "unreachable" | "truncated" | "incomplete-provenance" | "resolved-rejected";
|
|
1079
|
+
sourcePr: number;
|
|
1080
|
+
detail?: string | undefined;
|
|
1081
|
+
}[];
|
|
1082
|
+
};
|
|
1083
|
+
classifier: {
|
|
1084
|
+
entries: {
|
|
1085
|
+
candidateRef: string;
|
|
1086
|
+
disposition: "structural" | "behavioral";
|
|
1087
|
+
stage4Confirmed: boolean;
|
|
1088
|
+
dispositionSource: "classified" | "error-default";
|
|
1089
|
+
stage4Outcome?: "confirmed" | "untested-no-matches" | "archived-out-of-scope" | "compile-rejected" | undefined;
|
|
1090
|
+
}[];
|
|
1091
|
+
};
|
|
1092
|
+
apiUsage: {
|
|
1093
|
+
entries: {
|
|
1094
|
+
slice: "train" | "heldOut";
|
|
1095
|
+
targetPr: number;
|
|
1096
|
+
fetchKind: string;
|
|
1097
|
+
}[];
|
|
1098
|
+
heldOutFetchCount: number;
|
|
1099
|
+
};
|
|
1100
|
+
}>;
|
|
1101
|
+
export type MinerLedgers = z.infer<typeof MinerLedgersSchema>;
|
|
1102
|
+
//# sourceMappingURL=ledgers.d.ts.map
|