@mmnto/totem 1.88.0 → 1.90.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/README.md +27 -0
- package/dist/embedders/embedder.d.ts.map +1 -1
- package/dist/embedders/embedder.js +11 -1
- package/dist/embedders/embedder.js.map +1 -1
- package/dist/embedders/embedder.test.js +48 -2
- package/dist/embedders/embedder.test.js.map +1 -1
- package/dist/embedders/gemini-embedder.d.ts +31 -0
- package/dist/embedders/gemini-embedder.d.ts.map +1 -1
- package/dist/embedders/gemini-embedder.js +1 -1
- package/dist/embedders/gemini-embedder.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/orchestration-resolver.d.ts +31 -0
- package/dist/orchestration-resolver.d.ts.map +1 -1
- package/dist/orchestration-resolver.js +33 -0
- package/dist/orchestration-resolver.js.map +1 -1
- package/dist/orchestration-resolver.test.js +11 -1
- package/dist/orchestration-resolver.test.js.map +1 -1
- package/dist/sarif.d.ts +17 -0
- package/dist/sarif.d.ts.map +1 -1
- package/dist/sarif.js +71 -5
- package/dist/sarif.js.map +1 -1
- package/dist/sarif.test.js +94 -1
- package/dist/sarif.test.js.map +1 -1
- package/dist/spine/authored-controls.d.ts +8 -0
- package/dist/spine/authored-controls.d.ts.map +1 -1
- package/dist/spine/authored-controls.js +15 -5
- package/dist/spine/authored-controls.js.map +1 -1
- package/dist/spine/authored-controls.test.js +31 -0
- package/dist/spine/authored-controls.test.js.map +1 -1
- package/dist/spine/authored-freeze-gates.d.ts +45 -0
- package/dist/spine/authored-freeze-gates.d.ts.map +1 -0
- package/dist/spine/authored-freeze-gates.js +167 -0
- package/dist/spine/authored-freeze-gates.js.map +1 -0
- package/dist/spine/authored-freeze-gates.test.d.ts +2 -0
- package/dist/spine/authored-freeze-gates.test.d.ts.map +1 -0
- package/dist/spine/authored-freeze-gates.test.js +159 -0
- package/dist/spine/authored-freeze-gates.test.js.map +1 -0
- package/dist/spine/authored-rule.d.ts +10 -0
- package/dist/spine/authored-rule.d.ts.map +1 -1
- package/dist/spine/authored-rule.js +11 -0
- package/dist/spine/authored-rule.js.map +1 -1
- package/dist/spine/authoring-ledger.d.ts +28 -0
- package/dist/spine/authoring-ledger.d.ts.map +1 -1
- package/dist/spine/authoring-ledger.js +27 -0
- package/dist/spine/authoring-ledger.js.map +1 -1
- package/dist/spine/authoring-ledger.test.js +8 -0
- package/dist/spine/authoring-ledger.test.js.map +1 -1
- package/dist/spine/cert-corpus-seed.d.ts +38 -8
- package/dist/spine/cert-corpus-seed.d.ts.map +1 -1
- package/dist/spine/cert-corpus-seed.js +52 -1
- package/dist/spine/cert-corpus-seed.js.map +1 -1
- package/dist/spine/cert-corpus-seed.test.js +76 -0
- package/dist/spine/cert-corpus-seed.test.js.map +1 -1
- package/dist/spine/frozen-split.d.ts +541 -0
- package/dist/spine/frozen-split.d.ts.map +1 -0
- package/dist/spine/frozen-split.js +205 -0
- package/dist/spine/frozen-split.js.map +1 -0
- package/dist/spine/frozen-split.test.d.ts +2 -0
- package/dist/spine/frozen-split.test.d.ts.map +1 -0
- package/dist/spine/frozen-split.test.js +89 -0
- package/dist/spine/frozen-split.test.js.map +1 -0
- package/dist/spine/gate2-eligibility.d.ts +33 -0
- package/dist/spine/gate2-eligibility.d.ts.map +1 -0
- package/dist/spine/gate2-eligibility.js +54 -0
- package/dist/spine/gate2-eligibility.js.map +1 -0
- package/dist/spine/gate2-eligibility.test.d.ts +2 -0
- package/dist/spine/gate2-eligibility.test.d.ts.map +1 -0
- package/dist/spine/gate2-eligibility.test.js +252 -0
- package/dist/spine/gate2-eligibility.test.js.map +1 -0
- package/dist/spine/ledgers.d.ts +24 -0
- package/dist/spine/ledgers.d.ts.map +1 -1
- package/dist/spine/split.d.ts +16 -0
- package/dist/spine/split.d.ts.map +1 -1
- package/dist/spine/split.js +13 -0
- package/dist/spine/split.js.map +1 -1
- package/dist/spine/windtunnel-firing.d.ts +6 -2
- package/dist/spine/windtunnel-firing.d.ts.map +1 -1
- package/dist/spine/windtunnel-firing.js.map +1 -1
- package/dist/spine/windtunnel-lock.d.ts +4 -4
- package/dist/spine/windtunnel-scorer-authored.d.ts +25 -4
- package/dist/spine/windtunnel-scorer-authored.d.ts.map +1 -1
- package/dist/spine/windtunnel-scorer-authored.js +65 -13
- package/dist/spine/windtunnel-scorer-authored.js.map +1 -1
- package/dist/spine/windtunnel-scorer-authored.test.js +103 -1
- package/dist/spine/windtunnel-scorer-authored.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type SplitArtifact } from './split.js';
|
|
3
|
+
/** The content-addressed frozen-split reference form (codex fold-3). */
|
|
4
|
+
export declare const SPLIT_REF_RE: RegExp;
|
|
5
|
+
/** Filename of the frozen split artifact inside its gate dir (the tracked-public home). */
|
|
6
|
+
export declare const FROZEN_SPLIT_FILE = "frozen-split.json";
|
|
7
|
+
/**
|
|
8
|
+
* The selection-rule derivation PINS — the exact inputs the freeze derived the
|
|
9
|
+
* corpus from, recorded so materialize can RE-DERIVE the split and assert byte
|
|
10
|
+
* equality (detect-never-repair; re-derivation is a detector, never a source).
|
|
11
|
+
*/
|
|
12
|
+
export declare const SelectionPinsSchema: z.ZodObject<{
|
|
13
|
+
predicate: z.ZodEffects<z.ZodString, string, string>;
|
|
14
|
+
window: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<"all">;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
type: "all";
|
|
18
|
+
}, {
|
|
19
|
+
type: "all";
|
|
20
|
+
}>, z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<"bounded">;
|
|
22
|
+
n: z.ZodNumber;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
type: "bounded";
|
|
25
|
+
n: number;
|
|
26
|
+
}, {
|
|
27
|
+
type: "bounded";
|
|
28
|
+
n: number;
|
|
29
|
+
}>]>;
|
|
30
|
+
codePathClassifier: z.ZodObject<{
|
|
31
|
+
includeGlobs: z.ZodArray<z.ZodString, "many">;
|
|
32
|
+
excludeGlobs: z.ZodArray<z.ZodString, "many">;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
includeGlobs: string[];
|
|
35
|
+
excludeGlobs: string[];
|
|
36
|
+
}, {
|
|
37
|
+
includeGlobs: string[];
|
|
38
|
+
excludeGlobs: string[];
|
|
39
|
+
}>;
|
|
40
|
+
excludeRevertPairs: z.ZodBoolean;
|
|
41
|
+
excludeBotPrs: z.ZodBoolean;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
predicate: string;
|
|
44
|
+
window: {
|
|
45
|
+
type: "all";
|
|
46
|
+
} | {
|
|
47
|
+
type: "bounded";
|
|
48
|
+
n: number;
|
|
49
|
+
};
|
|
50
|
+
codePathClassifier: {
|
|
51
|
+
includeGlobs: string[];
|
|
52
|
+
excludeGlobs: string[];
|
|
53
|
+
};
|
|
54
|
+
excludeRevertPairs: boolean;
|
|
55
|
+
excludeBotPrs: boolean;
|
|
56
|
+
}, {
|
|
57
|
+
predicate: string;
|
|
58
|
+
window: {
|
|
59
|
+
type: "all";
|
|
60
|
+
} | {
|
|
61
|
+
type: "bounded";
|
|
62
|
+
n: number;
|
|
63
|
+
};
|
|
64
|
+
codePathClassifier: {
|
|
65
|
+
includeGlobs: string[];
|
|
66
|
+
excludeGlobs: string[];
|
|
67
|
+
};
|
|
68
|
+
excludeRevertPairs: boolean;
|
|
69
|
+
excludeBotPrs: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
export type SelectionPins = z.infer<typeof SelectionPinsSchema>;
|
|
72
|
+
/**
|
|
73
|
+
* The `totem spine freeze-split` INPUT (the curated freeze decisions). Everything
|
|
74
|
+
* else — `asOfCommit` (lc HEAD at freeze, Q3 derived-at-freeze), the corpus, the
|
|
75
|
+
* split membership, `frozenAt`, the stamps — is DERIVED at freeze and pinned in
|
|
76
|
+
* the artifact. `cutIndex` is the recorded build-choice under the held-out ≥ 0.5
|
|
77
|
+
* floor (#804).
|
|
78
|
+
*/
|
|
79
|
+
export declare const FreezeSplitParamsSchema: z.ZodObject<{
|
|
80
|
+
gate: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
81
|
+
repo: z.ZodEffects<z.ZodString, string, string>;
|
|
82
|
+
selectionRule: z.ZodObject<{
|
|
83
|
+
predicate: z.ZodEffects<z.ZodString, string, string>;
|
|
84
|
+
window: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<"all">;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
type: "all";
|
|
88
|
+
}, {
|
|
89
|
+
type: "all";
|
|
90
|
+
}>, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"bounded">;
|
|
92
|
+
n: z.ZodNumber;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
type: "bounded";
|
|
95
|
+
n: number;
|
|
96
|
+
}, {
|
|
97
|
+
type: "bounded";
|
|
98
|
+
n: number;
|
|
99
|
+
}>]>;
|
|
100
|
+
codePathClassifier: z.ZodObject<{
|
|
101
|
+
includeGlobs: z.ZodArray<z.ZodString, "many">;
|
|
102
|
+
excludeGlobs: z.ZodArray<z.ZodString, "many">;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
includeGlobs: string[];
|
|
105
|
+
excludeGlobs: string[];
|
|
106
|
+
}, {
|
|
107
|
+
includeGlobs: string[];
|
|
108
|
+
excludeGlobs: string[];
|
|
109
|
+
}>;
|
|
110
|
+
excludeRevertPairs: z.ZodBoolean;
|
|
111
|
+
excludeBotPrs: z.ZodBoolean;
|
|
112
|
+
}, "strict", z.ZodTypeAny, {
|
|
113
|
+
predicate: string;
|
|
114
|
+
window: {
|
|
115
|
+
type: "all";
|
|
116
|
+
} | {
|
|
117
|
+
type: "bounded";
|
|
118
|
+
n: number;
|
|
119
|
+
};
|
|
120
|
+
codePathClassifier: {
|
|
121
|
+
includeGlobs: string[];
|
|
122
|
+
excludeGlobs: string[];
|
|
123
|
+
};
|
|
124
|
+
excludeRevertPairs: boolean;
|
|
125
|
+
excludeBotPrs: boolean;
|
|
126
|
+
}, {
|
|
127
|
+
predicate: string;
|
|
128
|
+
window: {
|
|
129
|
+
type: "all";
|
|
130
|
+
} | {
|
|
131
|
+
type: "bounded";
|
|
132
|
+
n: number;
|
|
133
|
+
};
|
|
134
|
+
codePathClassifier: {
|
|
135
|
+
includeGlobs: string[];
|
|
136
|
+
excludeGlobs: string[];
|
|
137
|
+
};
|
|
138
|
+
excludeRevertPairs: boolean;
|
|
139
|
+
excludeBotPrs: boolean;
|
|
140
|
+
}>;
|
|
141
|
+
split: z.ZodObject<{
|
|
142
|
+
cutIndex: z.ZodNumber;
|
|
143
|
+
excludedPrs: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
excludedPrs: number[];
|
|
146
|
+
cutIndex: number;
|
|
147
|
+
}, {
|
|
148
|
+
cutIndex: number;
|
|
149
|
+
excludedPrs?: number[] | undefined;
|
|
150
|
+
}>;
|
|
151
|
+
label: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, "strict", z.ZodTypeAny, {
|
|
153
|
+
split: {
|
|
154
|
+
excludedPrs: number[];
|
|
155
|
+
cutIndex: number;
|
|
156
|
+
};
|
|
157
|
+
repo: string;
|
|
158
|
+
gate: string;
|
|
159
|
+
selectionRule: {
|
|
160
|
+
predicate: string;
|
|
161
|
+
window: {
|
|
162
|
+
type: "all";
|
|
163
|
+
} | {
|
|
164
|
+
type: "bounded";
|
|
165
|
+
n: number;
|
|
166
|
+
};
|
|
167
|
+
codePathClassifier: {
|
|
168
|
+
includeGlobs: string[];
|
|
169
|
+
excludeGlobs: string[];
|
|
170
|
+
};
|
|
171
|
+
excludeRevertPairs: boolean;
|
|
172
|
+
excludeBotPrs: boolean;
|
|
173
|
+
};
|
|
174
|
+
label?: string | undefined;
|
|
175
|
+
}, {
|
|
176
|
+
split: {
|
|
177
|
+
cutIndex: number;
|
|
178
|
+
excludedPrs?: number[] | undefined;
|
|
179
|
+
};
|
|
180
|
+
repo: string;
|
|
181
|
+
gate: string;
|
|
182
|
+
selectionRule: {
|
|
183
|
+
predicate: string;
|
|
184
|
+
window: {
|
|
185
|
+
type: "all";
|
|
186
|
+
} | {
|
|
187
|
+
type: "bounded";
|
|
188
|
+
n: number;
|
|
189
|
+
};
|
|
190
|
+
codePathClassifier: {
|
|
191
|
+
includeGlobs: string[];
|
|
192
|
+
excludeGlobs: string[];
|
|
193
|
+
};
|
|
194
|
+
excludeRevertPairs: boolean;
|
|
195
|
+
excludeBotPrs: boolean;
|
|
196
|
+
};
|
|
197
|
+
label?: string | undefined;
|
|
198
|
+
}>;
|
|
199
|
+
export type FreezeSplitParams = z.infer<typeof FreezeSplitParamsSchema>;
|
|
200
|
+
/**
|
|
201
|
+
* The frozen split artifact. `.strict()` — an unknown field is tamper/corruption,
|
|
202
|
+
* never silently carried. `split.frozenAt` is REQUIRED here (the freeze IS the
|
|
203
|
+
* event that mints it) even though `SplitArtifactSchema` keeps it optional for
|
|
204
|
+
* the mined/legacy shape.
|
|
205
|
+
*/
|
|
206
|
+
export declare const FrozenSplitArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
207
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
208
|
+
gate: z.ZodEffects<z.ZodString, string, string>;
|
|
209
|
+
repo: z.ZodEffects<z.ZodString, string, string>;
|
|
210
|
+
selectionPins: z.ZodObject<{
|
|
211
|
+
predicate: z.ZodEffects<z.ZodString, string, string>;
|
|
212
|
+
window: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"all">;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
type: "all";
|
|
216
|
+
}, {
|
|
217
|
+
type: "all";
|
|
218
|
+
}>, z.ZodObject<{
|
|
219
|
+
type: z.ZodLiteral<"bounded">;
|
|
220
|
+
n: z.ZodNumber;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
type: "bounded";
|
|
223
|
+
n: number;
|
|
224
|
+
}, {
|
|
225
|
+
type: "bounded";
|
|
226
|
+
n: number;
|
|
227
|
+
}>]>;
|
|
228
|
+
codePathClassifier: z.ZodObject<{
|
|
229
|
+
includeGlobs: z.ZodArray<z.ZodString, "many">;
|
|
230
|
+
excludeGlobs: z.ZodArray<z.ZodString, "many">;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
includeGlobs: string[];
|
|
233
|
+
excludeGlobs: string[];
|
|
234
|
+
}, {
|
|
235
|
+
includeGlobs: string[];
|
|
236
|
+
excludeGlobs: string[];
|
|
237
|
+
}>;
|
|
238
|
+
excludeRevertPairs: z.ZodBoolean;
|
|
239
|
+
excludeBotPrs: z.ZodBoolean;
|
|
240
|
+
}, "strict", z.ZodTypeAny, {
|
|
241
|
+
predicate: string;
|
|
242
|
+
window: {
|
|
243
|
+
type: "all";
|
|
244
|
+
} | {
|
|
245
|
+
type: "bounded";
|
|
246
|
+
n: number;
|
|
247
|
+
};
|
|
248
|
+
codePathClassifier: {
|
|
249
|
+
includeGlobs: string[];
|
|
250
|
+
excludeGlobs: string[];
|
|
251
|
+
};
|
|
252
|
+
excludeRevertPairs: boolean;
|
|
253
|
+
excludeBotPrs: boolean;
|
|
254
|
+
}, {
|
|
255
|
+
predicate: string;
|
|
256
|
+
window: {
|
|
257
|
+
type: "all";
|
|
258
|
+
} | {
|
|
259
|
+
type: "bounded";
|
|
260
|
+
n: number;
|
|
261
|
+
};
|
|
262
|
+
codePathClassifier: {
|
|
263
|
+
includeGlobs: string[];
|
|
264
|
+
excludeGlobs: string[];
|
|
265
|
+
};
|
|
266
|
+
excludeRevertPairs: boolean;
|
|
267
|
+
excludeBotPrs: boolean;
|
|
268
|
+
}>;
|
|
269
|
+
/** The resolved split (single home for membership + `frozenAt`; `asOfCommit` lives inside). */
|
|
270
|
+
split: z.ZodEffects<z.ZodObject<{
|
|
271
|
+
asOfCommit: z.ZodString;
|
|
272
|
+
trainPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
273
|
+
heldOutPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
274
|
+
excludedPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
275
|
+
positiveControlPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
276
|
+
negativeControlPrs: z.ZodArray<z.ZodNumber, "many">;
|
|
277
|
+
splitRule: z.ZodObject<{
|
|
278
|
+
predicate: z.ZodEffects<z.ZodString, string, string>;
|
|
279
|
+
cutIndex: z.ZodNumber;
|
|
280
|
+
}, "strip", z.ZodTypeAny, {
|
|
281
|
+
predicate: string;
|
|
282
|
+
cutIndex: number;
|
|
283
|
+
}, {
|
|
284
|
+
predicate: string;
|
|
285
|
+
cutIndex: number;
|
|
286
|
+
}>;
|
|
287
|
+
frozenAt: z.ZodOptional<z.ZodString>;
|
|
288
|
+
}, "strip", z.ZodTypeAny, {
|
|
289
|
+
asOfCommit: string;
|
|
290
|
+
trainPrs: number[];
|
|
291
|
+
heldOutPrs: number[];
|
|
292
|
+
excludedPrs: number[];
|
|
293
|
+
positiveControlPrs: number[];
|
|
294
|
+
negativeControlPrs: number[];
|
|
295
|
+
splitRule: {
|
|
296
|
+
predicate: string;
|
|
297
|
+
cutIndex: number;
|
|
298
|
+
};
|
|
299
|
+
frozenAt?: string | undefined;
|
|
300
|
+
}, {
|
|
301
|
+
asOfCommit: string;
|
|
302
|
+
trainPrs: number[];
|
|
303
|
+
heldOutPrs: number[];
|
|
304
|
+
excludedPrs: number[];
|
|
305
|
+
positiveControlPrs: number[];
|
|
306
|
+
negativeControlPrs: number[];
|
|
307
|
+
splitRule: {
|
|
308
|
+
predicate: string;
|
|
309
|
+
cutIndex: number;
|
|
310
|
+
};
|
|
311
|
+
frozenAt?: string | undefined;
|
|
312
|
+
}>, {
|
|
313
|
+
asOfCommit: string;
|
|
314
|
+
trainPrs: number[];
|
|
315
|
+
heldOutPrs: number[];
|
|
316
|
+
excludedPrs: number[];
|
|
317
|
+
positiveControlPrs: number[];
|
|
318
|
+
negativeControlPrs: number[];
|
|
319
|
+
splitRule: {
|
|
320
|
+
predicate: string;
|
|
321
|
+
cutIndex: number;
|
|
322
|
+
};
|
|
323
|
+
frozenAt?: string | undefined;
|
|
324
|
+
}, {
|
|
325
|
+
asOfCommit: string;
|
|
326
|
+
trainPrs: number[];
|
|
327
|
+
heldOutPrs: number[];
|
|
328
|
+
excludedPrs: number[];
|
|
329
|
+
positiveControlPrs: number[];
|
|
330
|
+
negativeControlPrs: number[];
|
|
331
|
+
splitRule: {
|
|
332
|
+
predicate: string;
|
|
333
|
+
cutIndex: number;
|
|
334
|
+
};
|
|
335
|
+
frozenAt?: string | undefined;
|
|
336
|
+
}>;
|
|
337
|
+
/**
|
|
338
|
+
* The LAST train PR's merge commit — the §5.4 author-sandbox root derives
|
|
339
|
+
* from THIS (an lc worktree at the cut boundary), never from an
|
|
340
|
+
* author-supplied knob (the judgedBy≠author independence axiom applied to
|
|
341
|
+
* config — codex sandbox note).
|
|
342
|
+
*/
|
|
343
|
+
cutBoundarySha: z.ZodString;
|
|
344
|
+
/** sha256 over the canonical corpus enumeration (PRs + merge commits) — the (b) commitment leg. */
|
|
345
|
+
corpusIntegrity: z.ZodString;
|
|
346
|
+
/** Content address of the canonical payload (all fields except splitRef/freezeCommitment/label). */
|
|
347
|
+
splitRef: z.ZodString;
|
|
348
|
+
/** `sha256(splitRef · frozenAt · corpusIntegrity)` — chained into every ledger entry's material. */
|
|
349
|
+
freezeCommitment: z.ZodString;
|
|
350
|
+
/** Optional human handle — NEVER load-bearing (resolution goes by `splitRef`). */
|
|
351
|
+
label: z.ZodOptional<z.ZodString>;
|
|
352
|
+
}, "strict", z.ZodTypeAny, {
|
|
353
|
+
split: {
|
|
354
|
+
asOfCommit: string;
|
|
355
|
+
trainPrs: number[];
|
|
356
|
+
heldOutPrs: number[];
|
|
357
|
+
excludedPrs: number[];
|
|
358
|
+
positiveControlPrs: number[];
|
|
359
|
+
negativeControlPrs: number[];
|
|
360
|
+
splitRule: {
|
|
361
|
+
predicate: string;
|
|
362
|
+
cutIndex: number;
|
|
363
|
+
};
|
|
364
|
+
frozenAt?: string | undefined;
|
|
365
|
+
};
|
|
366
|
+
schemaVersion: 1;
|
|
367
|
+
repo: string;
|
|
368
|
+
splitRef: string;
|
|
369
|
+
freezeCommitment: string;
|
|
370
|
+
gate: string;
|
|
371
|
+
selectionPins: {
|
|
372
|
+
predicate: string;
|
|
373
|
+
window: {
|
|
374
|
+
type: "all";
|
|
375
|
+
} | {
|
|
376
|
+
type: "bounded";
|
|
377
|
+
n: number;
|
|
378
|
+
};
|
|
379
|
+
codePathClassifier: {
|
|
380
|
+
includeGlobs: string[];
|
|
381
|
+
excludeGlobs: string[];
|
|
382
|
+
};
|
|
383
|
+
excludeRevertPairs: boolean;
|
|
384
|
+
excludeBotPrs: boolean;
|
|
385
|
+
};
|
|
386
|
+
cutBoundarySha: string;
|
|
387
|
+
corpusIntegrity: string;
|
|
388
|
+
label?: string | undefined;
|
|
389
|
+
}, {
|
|
390
|
+
split: {
|
|
391
|
+
asOfCommit: string;
|
|
392
|
+
trainPrs: number[];
|
|
393
|
+
heldOutPrs: number[];
|
|
394
|
+
excludedPrs: number[];
|
|
395
|
+
positiveControlPrs: number[];
|
|
396
|
+
negativeControlPrs: number[];
|
|
397
|
+
splitRule: {
|
|
398
|
+
predicate: string;
|
|
399
|
+
cutIndex: number;
|
|
400
|
+
};
|
|
401
|
+
frozenAt?: string | undefined;
|
|
402
|
+
};
|
|
403
|
+
schemaVersion: 1;
|
|
404
|
+
repo: string;
|
|
405
|
+
splitRef: string;
|
|
406
|
+
freezeCommitment: string;
|
|
407
|
+
gate: string;
|
|
408
|
+
selectionPins: {
|
|
409
|
+
predicate: string;
|
|
410
|
+
window: {
|
|
411
|
+
type: "all";
|
|
412
|
+
} | {
|
|
413
|
+
type: "bounded";
|
|
414
|
+
n: number;
|
|
415
|
+
};
|
|
416
|
+
codePathClassifier: {
|
|
417
|
+
includeGlobs: string[];
|
|
418
|
+
excludeGlobs: string[];
|
|
419
|
+
};
|
|
420
|
+
excludeRevertPairs: boolean;
|
|
421
|
+
excludeBotPrs: boolean;
|
|
422
|
+
};
|
|
423
|
+
cutBoundarySha: string;
|
|
424
|
+
corpusIntegrity: string;
|
|
425
|
+
label?: string | undefined;
|
|
426
|
+
}>, {
|
|
427
|
+
split: {
|
|
428
|
+
asOfCommit: string;
|
|
429
|
+
trainPrs: number[];
|
|
430
|
+
heldOutPrs: number[];
|
|
431
|
+
excludedPrs: number[];
|
|
432
|
+
positiveControlPrs: number[];
|
|
433
|
+
negativeControlPrs: number[];
|
|
434
|
+
splitRule: {
|
|
435
|
+
predicate: string;
|
|
436
|
+
cutIndex: number;
|
|
437
|
+
};
|
|
438
|
+
frozenAt?: string | undefined;
|
|
439
|
+
};
|
|
440
|
+
schemaVersion: 1;
|
|
441
|
+
repo: string;
|
|
442
|
+
splitRef: string;
|
|
443
|
+
freezeCommitment: string;
|
|
444
|
+
gate: string;
|
|
445
|
+
selectionPins: {
|
|
446
|
+
predicate: string;
|
|
447
|
+
window: {
|
|
448
|
+
type: "all";
|
|
449
|
+
} | {
|
|
450
|
+
type: "bounded";
|
|
451
|
+
n: number;
|
|
452
|
+
};
|
|
453
|
+
codePathClassifier: {
|
|
454
|
+
includeGlobs: string[];
|
|
455
|
+
excludeGlobs: string[];
|
|
456
|
+
};
|
|
457
|
+
excludeRevertPairs: boolean;
|
|
458
|
+
excludeBotPrs: boolean;
|
|
459
|
+
};
|
|
460
|
+
cutBoundarySha: string;
|
|
461
|
+
corpusIntegrity: string;
|
|
462
|
+
label?: string | undefined;
|
|
463
|
+
}, {
|
|
464
|
+
split: {
|
|
465
|
+
asOfCommit: string;
|
|
466
|
+
trainPrs: number[];
|
|
467
|
+
heldOutPrs: number[];
|
|
468
|
+
excludedPrs: number[];
|
|
469
|
+
positiveControlPrs: number[];
|
|
470
|
+
negativeControlPrs: number[];
|
|
471
|
+
splitRule: {
|
|
472
|
+
predicate: string;
|
|
473
|
+
cutIndex: number;
|
|
474
|
+
};
|
|
475
|
+
frozenAt?: string | undefined;
|
|
476
|
+
};
|
|
477
|
+
schemaVersion: 1;
|
|
478
|
+
repo: string;
|
|
479
|
+
splitRef: string;
|
|
480
|
+
freezeCommitment: string;
|
|
481
|
+
gate: string;
|
|
482
|
+
selectionPins: {
|
|
483
|
+
predicate: string;
|
|
484
|
+
window: {
|
|
485
|
+
type: "all";
|
|
486
|
+
} | {
|
|
487
|
+
type: "bounded";
|
|
488
|
+
n: number;
|
|
489
|
+
};
|
|
490
|
+
codePathClassifier: {
|
|
491
|
+
includeGlobs: string[];
|
|
492
|
+
excludeGlobs: string[];
|
|
493
|
+
};
|
|
494
|
+
excludeRevertPairs: boolean;
|
|
495
|
+
excludeBotPrs: boolean;
|
|
496
|
+
};
|
|
497
|
+
cutBoundarySha: string;
|
|
498
|
+
corpusIntegrity: string;
|
|
499
|
+
label?: string | undefined;
|
|
500
|
+
}>;
|
|
501
|
+
export type FrozenSplitArtifact = z.infer<typeof FrozenSplitArtifactSchema>;
|
|
502
|
+
/** The freeze-time inputs `assembleFrozenSplitArtifact` derives the stamps from. */
|
|
503
|
+
export interface FrozenSplitAssembly {
|
|
504
|
+
gate: string;
|
|
505
|
+
repo: string;
|
|
506
|
+
selectionPins: SelectionPins;
|
|
507
|
+
split: SplitArtifact;
|
|
508
|
+
cutBoundarySha: string;
|
|
509
|
+
corpusIntegrity: string;
|
|
510
|
+
label?: string;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* sha256 over the canonical corpus enumeration: the sorted PR list + each PR's
|
|
514
|
+
* merge commit. Deterministic from the pinned inputs; a post-freeze change to
|
|
515
|
+
* either (t7 content injection) breaks the commitment chain loudly.
|
|
516
|
+
*/
|
|
517
|
+
export declare function computeCorpusIntegrity(corpus: readonly number[], mergeCommitByPr: ReadonlyMap<number, string>): string;
|
|
518
|
+
/** `split:<sha256(canonical payload)>` — codex fold-3: the ref is the artifact's content address. */
|
|
519
|
+
export declare function computeFrozenSplitRef(a: FrozenSplitAssembly): string;
|
|
520
|
+
/** The (b) hash-commitment: `sha256(splitRef · frozenAt · corpusIntegrity)` over the canonical tuple. */
|
|
521
|
+
export declare function computeFreezeCommitment(splitRef: string, frozenAt: string, corpusIntegrity: string): string;
|
|
522
|
+
/**
|
|
523
|
+
* Derive splitRef + freezeCommitment from the freeze-time inputs and return the
|
|
524
|
+
* validated artifact. Throws (Zod) if the assembly is malformed — a malformed
|
|
525
|
+
* freeze never produces an artifact (Tenet 4).
|
|
526
|
+
*/
|
|
527
|
+
export declare function assembleFrozenSplitArtifact(a: FrozenSplitAssembly): FrozenSplitArtifact;
|
|
528
|
+
/** Result of recomputing an artifact's content address + commitment from its own fields. */
|
|
529
|
+
export interface FreezeIntegrityCheck {
|
|
530
|
+
ok: boolean;
|
|
531
|
+
expectedSplitRef: string;
|
|
532
|
+
expectedCommitment: string;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Recompute splitRef + freezeCommitment from the artifact's own payload and
|
|
536
|
+
* compare — the pure half of tamper detection (any in-place edit to a pinned
|
|
537
|
+
* field breaks one or both). Consumers throw a distinct fail-loud row on `!ok`;
|
|
538
|
+
* this stays a sensor (Tenet 13).
|
|
539
|
+
*/
|
|
540
|
+
export declare function verifyFreezeIntegrity(artifact: FrozenSplitArtifact): FreezeIntegrityCheck;
|
|
541
|
+
//# sourceMappingURL=frozen-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frozen-split.d.ts","sourceRoot":"","sources":["../../src/spine/frozen-split.ts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