eval-quality 0.1.0 → 0.3.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.
Files changed (179) hide show
  1. package/README.md +142 -67
  2. package/corpus/dev/README.md +20 -13
  3. package/corpus/dev/compile-seal-example/brief.json +1 -1
  4. package/corpus/dev/compile-seal-example/contract.json +1 -1
  5. package/corpus/dev/contracts/absent-collection-locations.json +1 -1
  6. package/corpus/dev/contracts/absent-sibling-groups.json +1 -1
  7. package/corpus/dev/contracts/absent-success-indicator.json +1 -1
  8. package/corpus/dev/contracts/empty-channel-roles.json +1 -1
  9. package/corpus/dev/contracts/empty-collection-locations.json +1 -1
  10. package/corpus/dev/contracts/empty-request-shapes.json +1 -1
  11. package/corpus/dev/contracts/empty-sibling-groups.json +1 -1
  12. package/corpus/dev/contracts/fragment-selection.json +1 -0
  13. package/corpus/dev/contracts/no-collection-quantifier.json +1 -1
  14. package/corpus/dev/contracts/no-operation-inventory.json +1 -1
  15. package/corpus/dev/contracts/no-read-back-relation.json +1 -1
  16. package/corpus/dev/contracts/no-state-change-marker.json +1 -1
  17. package/corpus/dev/contracts/no-type-violating-step.json +1 -1
  18. package/corpus/dev/contracts/per-key-split-oracles.json +1 -1
  19. package/corpus/dev/contracts/review-corpus.json +1 -0
  20. package/corpus/dev/contracts/satisfied-declarations.json +1 -1
  21. package/corpus/dev/contracts/single-required-response-key.json +1 -1
  22. package/corpus/dev/contracts/split-indicator-oracle.json +1 -1
  23. package/corpus/dev/contracts/unaddressed-parameter-sibling.json +1 -1
  24. package/corpus/dev/contracts/unnamed-reference-set.json +1 -1
  25. package/corpus/dev/contracts/wrong-cardinality-form.json +1 -1
  26. package/corpus/dev/index.json +1 -1
  27. package/dist/application/index.d.ts +2 -0
  28. package/dist/application/index.js +1 -0
  29. package/dist/application/score.d.ts +48 -0
  30. package/dist/application/score.js +186 -0
  31. package/dist/cli/arguments.d.ts +7 -3
  32. package/dist/cli/arguments.js +73 -5
  33. package/dist/cli/exit-codes.d.ts +6 -2
  34. package/dist/cli/exit-codes.js +8 -9
  35. package/dist/cli/main.js +9 -0
  36. package/dist/cli/render.d.ts +3 -6
  37. package/dist/cli/render.js +57 -5
  38. package/dist/cli/run.d.ts +13 -3
  39. package/dist/cli/run.js +136 -16
  40. package/dist/core/canonical/canonicalize.d.ts +12 -0
  41. package/dist/core/canonical/canonicalize.js +18 -4
  42. package/dist/core/compile/bindings.d.ts +89 -0
  43. package/dist/core/compile/bindings.js +334 -0
  44. package/dist/core/compile/compile.d.ts +17 -0
  45. package/dist/core/compile/compile.js +37 -1
  46. package/dist/core/compile/excluded-content.d.ts +11 -0
  47. package/dist/core/compile/excluded-content.js +42 -0
  48. package/dist/core/compile/expression-legality.d.ts +49 -0
  49. package/dist/core/compile/expression-legality.js +158 -38
  50. package/dist/core/compile/forbidden-inputs.d.ts +8 -1
  51. package/dist/core/compile/forbidden-inputs.js +16 -3
  52. package/dist/core/compile/interface-inventory.d.ts +57 -2
  53. package/dist/core/compile/interface-inventory.js +119 -13
  54. package/dist/core/compile/reachability.d.ts +28 -1
  55. package/dist/core/compile/reachability.js +167 -35
  56. package/dist/core/compile/schema-version.d.ts +2 -0
  57. package/dist/core/compile/schema-version.js +25 -0
  58. package/dist/core/compile/sensitivity-witness.d.ts +31 -12
  59. package/dist/core/compile/sensitivity-witness.js +110 -23
  60. package/dist/core/compile/step-reference.d.ts +2 -0
  61. package/dist/core/compile/step-reference.js +49 -0
  62. package/dist/core/coverage/operations.d.ts +62 -0
  63. package/dist/core/coverage/operations.js +57 -0
  64. package/dist/core/coverage/relevance.d.ts +4 -2
  65. package/dist/core/coverage/relevance.js +22 -23
  66. package/dist/core/coverage/satisfaction.d.ts +2 -2
  67. package/dist/core/coverage/satisfaction.js +73 -48
  68. package/dist/core/declared-inputs.d.ts +83 -4
  69. package/dist/core/declared-inputs.js +105 -8
  70. package/dist/core/emit/emit.d.ts +9 -0
  71. package/dist/core/emit/emit.js +214 -0
  72. package/dist/core/emit/private-artifact-digest.d.ts +11 -0
  73. package/dist/core/emit/private-artifact-digest.js +31 -0
  74. package/dist/core/evaluate/evidence-resolution.d.ts +10 -3
  75. package/dist/core/evaluate/evidence-resolution.js +74 -11
  76. package/dist/core/evaluate/operators.d.ts +22 -0
  77. package/dist/core/evaluate/operators.js +17 -1
  78. package/dist/core/evaluate/resolution.d.ts +14 -3
  79. package/dist/core/evaluate/resolution.js +63 -3
  80. package/dist/core/excluded-content.d.ts +65 -0
  81. package/dist/core/excluded-content.js +113 -0
  82. package/dist/core/failure-codes.d.ts +2 -2
  83. package/dist/core/failure-codes.js +7 -2
  84. package/dist/core/ingest/conditions.d.ts +201 -0
  85. package/dist/core/ingest/conditions.js +48 -0
  86. package/dist/core/ingest/index.d.ts +13 -0
  87. package/dist/core/ingest/index.js +11 -0
  88. package/dist/core/ingest/ingest.d.ts +68 -0
  89. package/dist/core/ingest/ingest.js +318 -0
  90. package/dist/core/lineage/stage-table.d.ts +21 -4
  91. package/dist/core/lineage/stage-table.js +35 -3
  92. package/dist/core/preflight/plan.d.ts +7 -5
  93. package/dist/core/preflight/plan.js +75 -32
  94. package/dist/core/preflight/projection.d.ts +6 -3
  95. package/dist/core/preflight/projection.js +22 -2
  96. package/dist/core/preflight/reduce.js +47 -7
  97. package/dist/core/preflight/witness-evidence.d.ts +5 -5
  98. package/dist/core/preflight/witness-evidence.js +73 -20
  99. package/dist/core/schemas/artifact.d.ts +1049 -30
  100. package/dist/core/schemas/constraint-ledger.js +51 -0
  101. package/dist/core/schemas/defect-signature.d.ts +695 -0
  102. package/dist/core/schemas/defect-signature.js +175 -0
  103. package/dist/core/schemas/eval-contract.d.ts +550 -12
  104. package/dist/core/schemas/eval-contract.js +32 -2
  105. package/dist/core/schemas/evidence-artifact.d.ts +109 -19
  106. package/dist/core/schemas/evidence-artifact.js +64 -8
  107. package/dist/core/schemas/interface.d.ts +741 -13
  108. package/dist/core/schemas/interface.js +120 -7
  109. package/dist/core/schemas/isolation-manifest.js +16 -9
  110. package/dist/core/schemas/plan.d.ts +329 -3
  111. package/dist/core/schemas/plan.js +89 -3
  112. package/dist/core/schemas/pointer.d.ts +47 -1
  113. package/dist/core/schemas/pointer.js +89 -8
  114. package/dist/core/schemas/port-messages.d.ts +194 -10
  115. package/dist/core/schemas/port-messages.js +73 -6
  116. package/dist/core/schemas/probe-body.d.ts +18 -0
  117. package/dist/core/schemas/probe-body.js +13 -0
  118. package/dist/core/schemas/probe-qualification.d.ts +168 -0
  119. package/dist/core/schemas/probe-qualification.js +106 -0
  120. package/dist/core/schemas/probe.d.ts +431 -0
  121. package/dist/core/schemas/probe.js +6 -2
  122. package/dist/core/schemas/scoring-policy.d.ts +1 -0
  123. package/dist/core/schemas/scoring-policy.js +6 -1
  124. package/dist/core/schemas/sealed-evaluator-brief.d.ts +1 -0
  125. package/dist/core/schemas/sealed-evaluator-brief.js +4 -1
  126. package/dist/core/schemas/sealed-run-record.d.ts +161 -12
  127. package/dist/core/schemas/sealed-run-record.js +92 -15
  128. package/dist/core/schemas/sensitivity-witness.d.ts +108 -6
  129. package/dist/core/schemas/sensitivity-witness.js +61 -5
  130. package/dist/core/score/binding-order.d.ts +31 -0
  131. package/dist/core/score/binding-order.js +88 -0
  132. package/dist/core/score/bindings.d.ts +93 -0
  133. package/dist/core/score/bindings.js +309 -0
  134. package/dist/core/score/ladder-table.d.ts +23 -0
  135. package/dist/core/score/ladder-table.js +109 -0
  136. package/dist/core/score/ladder.d.ts +229 -0
  137. package/dist/core/score/ladder.js +464 -0
  138. package/dist/core/score/mode-agreement.d.ts +30 -0
  139. package/dist/core/score/mode-agreement.js +16 -0
  140. package/dist/core/score/outcome-table.d.ts +17 -0
  141. package/dist/core/score/outcome-table.js +172 -0
  142. package/dist/core/score/outcome.d.ts +466 -0
  143. package/dist/core/score/outcome.js +562 -0
  144. package/dist/core/score/qualification.d.ts +83 -0
  145. package/dist/core/score/qualification.js +645 -0
  146. package/dist/core/score/quotation.d.ts +56 -0
  147. package/dist/core/score/quotation.js +226 -0
  148. package/dist/core/score/reduce-trials.d.ts +80 -0
  149. package/dist/core/score/reduce-trials.js +90 -0
  150. package/dist/core/score/score.d.ts +72 -0
  151. package/dist/core/score/score.js +607 -0
  152. package/dist/core/score/selection.d.ts +80 -0
  153. package/dist/core/score/selection.js +98 -0
  154. package/dist/core/score/strength.d.ts +58 -0
  155. package/dist/core/score/strength.js +227 -0
  156. package/dist/core/score/witness.d.ts +138 -0
  157. package/dist/core/score/witness.js +320 -0
  158. package/dist/core/seal/derived-reference.d.ts +2 -9
  159. package/dist/core/seal/derived-reference.js +293 -46
  160. package/dist/core/seal/plan-index.d.ts +18 -3
  161. package/dist/core/seal/plan-index.js +44 -8
  162. package/dist/core/seal/seal.js +8 -3
  163. package/dist/core/stage-contracts.d.ts +62 -2
  164. package/dist/index.d.ts +1 -1
  165. package/dist/index.js +1 -1
  166. package/dist/ports/environment-probe-port.d.ts +60 -4
  167. package/dist/testing/index.d.ts +2 -0
  168. package/dist/testing/index.js +1 -0
  169. package/dist/testing/probe-conformance.d.ts +29 -0
  170. package/dist/testing/probe-conformance.js +34 -5
  171. package/package.json +12 -3
  172. package/schemas/eval-contract.schema.json +1787 -797
  173. package/schemas/evidence-artifact.schema.json +126 -9
  174. package/schemas/isolation-manifest.schema.json +17 -10
  175. package/schemas/probe.schema.json +636 -5
  176. package/schemas/rubric.schema.json +1 -1
  177. package/schemas/scoring-policy.schema.json +8 -1
  178. package/schemas/sealed-evaluator-brief.schema.json +11 -1
  179. package/schemas/sealed-run-record.schema.json +314 -40
@@ -82,6 +82,129 @@ export declare const Probe: z.ZodDiscriminatedUnion<[z.ZodObject<{
82
82
  artifactDigest: z.ZodString;
83
83
  commitDigest: z.ZodString;
84
84
  rationale: z.ZodString;
85
+ qualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
86
+ route: z.ZodLiteral<"historical">;
87
+ failBeforeEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
88
+ storage: z.ZodLiteral<"public">;
89
+ path: z.ZodString;
90
+ privateRef: z.ZodNull;
91
+ digest: z.ZodString;
92
+ }, z.core.$strict>, z.ZodObject<{
93
+ storage: z.ZodLiteral<"private">;
94
+ path: z.ZodNull;
95
+ privateRef: z.ZodString;
96
+ digest: z.ZodString;
97
+ }, z.core.$strict>], "storage">;
98
+ passAfterEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
99
+ storage: z.ZodLiteral<"public">;
100
+ path: z.ZodString;
101
+ privateRef: z.ZodNull;
102
+ digest: z.ZodString;
103
+ }, z.core.$strict>, z.ZodObject<{
104
+ storage: z.ZodLiteral<"private">;
105
+ path: z.ZodNull;
106
+ privateRef: z.ZodString;
107
+ digest: z.ZodString;
108
+ }, z.core.$strict>], "storage">;
109
+ fixCommitDigest: z.ZodString;
110
+ oracleStableAcrossRevisions: z.ZodBoolean;
111
+ }, z.core.$strict>, z.ZodObject<{
112
+ route: z.ZodLiteral<"controlled-mutation">;
113
+ mutationSource: z.ZodString;
114
+ mutationOperator: z.ZodString;
115
+ targetArtifact: z.ZodDiscriminatedUnion<[z.ZodObject<{
116
+ storage: z.ZodLiteral<"public">;
117
+ path: z.ZodString;
118
+ privateRef: z.ZodNull;
119
+ digest: z.ZodString;
120
+ }, z.core.$strict>, z.ZodObject<{
121
+ storage: z.ZodLiteral<"private">;
122
+ path: z.ZodNull;
123
+ privateRef: z.ZodString;
124
+ digest: z.ZodString;
125
+ }, z.core.$strict>], "storage">;
126
+ expectedObservableFailure: z.ZodString;
127
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
128
+ storage: z.ZodLiteral<"public">;
129
+ path: z.ZodString;
130
+ privateRef: z.ZodNull;
131
+ digest: z.ZodString;
132
+ }, z.core.$strict>, z.ZodObject<{
133
+ storage: z.ZodLiteral<"private">;
134
+ path: z.ZodNull;
135
+ privateRef: z.ZodString;
136
+ digest: z.ZodString;
137
+ }, z.core.$strict>], "storage">;
138
+ mutatedFailEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
139
+ storage: z.ZodLiteral<"public">;
140
+ path: z.ZodString;
141
+ privateRef: z.ZodNull;
142
+ digest: z.ZodString;
143
+ }, z.core.$strict>, z.ZodObject<{
144
+ storage: z.ZodLiteral<"private">;
145
+ path: z.ZodNull;
146
+ privateRef: z.ZodString;
147
+ digest: z.ZodString;
148
+ }, z.core.$strict>], "storage">;
149
+ rollbackVerified: z.ZodBoolean;
150
+ }, z.core.$strict>, z.ZodObject<{
151
+ route: z.ZodLiteral<"gameability">;
152
+ degenerateResponse: z.ZodString;
153
+ naiveOracleSatisfiedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
154
+ storage: z.ZodLiteral<"public">;
155
+ path: z.ZodString;
156
+ privateRef: z.ZodNull;
157
+ digest: z.ZodString;
158
+ }, z.core.$strict>, z.ZodObject<{
159
+ storage: z.ZodLiteral<"private">;
160
+ path: z.ZodNull;
161
+ privateRef: z.ZodString;
162
+ digest: z.ZodString;
163
+ }, z.core.$strict>], "storage">;
164
+ disciplinedOracleRejectedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
165
+ storage: z.ZodLiteral<"public">;
166
+ path: z.ZodString;
167
+ privateRef: z.ZodNull;
168
+ digest: z.ZodString;
169
+ }, z.core.$strict>, z.ZodObject<{
170
+ storage: z.ZodLiteral<"private">;
171
+ path: z.ZodNull;
172
+ privateRef: z.ZodString;
173
+ digest: z.ZodString;
174
+ }, z.core.$strict>], "storage">;
175
+ }, z.core.$strict>, z.ZodObject<{
176
+ route: z.ZodLiteral<"canary">;
177
+ indicts: z.ZodEnum<{
178
+ corpus: "corpus";
179
+ fixture: "fixture";
180
+ }>;
181
+ nonDetectionEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
182
+ storage: z.ZodLiteral<"public">;
183
+ path: z.ZodString;
184
+ privateRef: z.ZodNull;
185
+ digest: z.ZodString;
186
+ }, z.core.$strict>, z.ZodObject<{
187
+ storage: z.ZodLiteral<"private">;
188
+ path: z.ZodNull;
189
+ privateRef: z.ZodString;
190
+ digest: z.ZodString;
191
+ }, z.core.$strict>], "storage">;
192
+ }, z.core.$strict>, z.ZodObject<{
193
+ route: z.ZodLiteral<"clean-control">;
194
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
195
+ storage: z.ZodLiteral<"public">;
196
+ path: z.ZodString;
197
+ privateRef: z.ZodNull;
198
+ digest: z.ZodString;
199
+ }, z.core.$strict>, z.ZodObject<{
200
+ storage: z.ZodLiteral<"private">;
201
+ path: z.ZodNull;
202
+ privateRef: z.ZodString;
203
+ digest: z.ZodString;
204
+ }, z.core.$strict>], "storage">;
205
+ revisionCommitDigest: z.ZodString;
206
+ noKnownDefectStatement: z.ZodString;
207
+ }, z.core.$strict>], "route">;
85
208
  expectedClean: z.ZodLiteral<true>;
86
209
  defects: z.ZodArray<z.ZodObject<{
87
210
  defectId: z.ZodString;
@@ -142,6 +265,129 @@ export declare const Probe: z.ZodDiscriminatedUnion<[z.ZodObject<{
142
265
  artifactDigest: z.ZodString;
143
266
  commitDigest: z.ZodString;
144
267
  rationale: z.ZodString;
268
+ qualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
269
+ route: z.ZodLiteral<"historical">;
270
+ failBeforeEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
271
+ storage: z.ZodLiteral<"public">;
272
+ path: z.ZodString;
273
+ privateRef: z.ZodNull;
274
+ digest: z.ZodString;
275
+ }, z.core.$strict>, z.ZodObject<{
276
+ storage: z.ZodLiteral<"private">;
277
+ path: z.ZodNull;
278
+ privateRef: z.ZodString;
279
+ digest: z.ZodString;
280
+ }, z.core.$strict>], "storage">;
281
+ passAfterEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
282
+ storage: z.ZodLiteral<"public">;
283
+ path: z.ZodString;
284
+ privateRef: z.ZodNull;
285
+ digest: z.ZodString;
286
+ }, z.core.$strict>, z.ZodObject<{
287
+ storage: z.ZodLiteral<"private">;
288
+ path: z.ZodNull;
289
+ privateRef: z.ZodString;
290
+ digest: z.ZodString;
291
+ }, z.core.$strict>], "storage">;
292
+ fixCommitDigest: z.ZodString;
293
+ oracleStableAcrossRevisions: z.ZodBoolean;
294
+ }, z.core.$strict>, z.ZodObject<{
295
+ route: z.ZodLiteral<"controlled-mutation">;
296
+ mutationSource: z.ZodString;
297
+ mutationOperator: z.ZodString;
298
+ targetArtifact: z.ZodDiscriminatedUnion<[z.ZodObject<{
299
+ storage: z.ZodLiteral<"public">;
300
+ path: z.ZodString;
301
+ privateRef: z.ZodNull;
302
+ digest: z.ZodString;
303
+ }, z.core.$strict>, z.ZodObject<{
304
+ storage: z.ZodLiteral<"private">;
305
+ path: z.ZodNull;
306
+ privateRef: z.ZodString;
307
+ digest: z.ZodString;
308
+ }, z.core.$strict>], "storage">;
309
+ expectedObservableFailure: z.ZodString;
310
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
311
+ storage: z.ZodLiteral<"public">;
312
+ path: z.ZodString;
313
+ privateRef: z.ZodNull;
314
+ digest: z.ZodString;
315
+ }, z.core.$strict>, z.ZodObject<{
316
+ storage: z.ZodLiteral<"private">;
317
+ path: z.ZodNull;
318
+ privateRef: z.ZodString;
319
+ digest: z.ZodString;
320
+ }, z.core.$strict>], "storage">;
321
+ mutatedFailEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
322
+ storage: z.ZodLiteral<"public">;
323
+ path: z.ZodString;
324
+ privateRef: z.ZodNull;
325
+ digest: z.ZodString;
326
+ }, z.core.$strict>, z.ZodObject<{
327
+ storage: z.ZodLiteral<"private">;
328
+ path: z.ZodNull;
329
+ privateRef: z.ZodString;
330
+ digest: z.ZodString;
331
+ }, z.core.$strict>], "storage">;
332
+ rollbackVerified: z.ZodBoolean;
333
+ }, z.core.$strict>, z.ZodObject<{
334
+ route: z.ZodLiteral<"gameability">;
335
+ degenerateResponse: z.ZodString;
336
+ naiveOracleSatisfiedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
337
+ storage: z.ZodLiteral<"public">;
338
+ path: z.ZodString;
339
+ privateRef: z.ZodNull;
340
+ digest: z.ZodString;
341
+ }, z.core.$strict>, z.ZodObject<{
342
+ storage: z.ZodLiteral<"private">;
343
+ path: z.ZodNull;
344
+ privateRef: z.ZodString;
345
+ digest: z.ZodString;
346
+ }, z.core.$strict>], "storage">;
347
+ disciplinedOracleRejectedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
348
+ storage: z.ZodLiteral<"public">;
349
+ path: z.ZodString;
350
+ privateRef: z.ZodNull;
351
+ digest: z.ZodString;
352
+ }, z.core.$strict>, z.ZodObject<{
353
+ storage: z.ZodLiteral<"private">;
354
+ path: z.ZodNull;
355
+ privateRef: z.ZodString;
356
+ digest: z.ZodString;
357
+ }, z.core.$strict>], "storage">;
358
+ }, z.core.$strict>, z.ZodObject<{
359
+ route: z.ZodLiteral<"canary">;
360
+ indicts: z.ZodEnum<{
361
+ corpus: "corpus";
362
+ fixture: "fixture";
363
+ }>;
364
+ nonDetectionEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
365
+ storage: z.ZodLiteral<"public">;
366
+ path: z.ZodString;
367
+ privateRef: z.ZodNull;
368
+ digest: z.ZodString;
369
+ }, z.core.$strict>, z.ZodObject<{
370
+ storage: z.ZodLiteral<"private">;
371
+ path: z.ZodNull;
372
+ privateRef: z.ZodString;
373
+ digest: z.ZodString;
374
+ }, z.core.$strict>], "storage">;
375
+ }, z.core.$strict>, z.ZodObject<{
376
+ route: z.ZodLiteral<"clean-control">;
377
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
378
+ storage: z.ZodLiteral<"public">;
379
+ path: z.ZodString;
380
+ privateRef: z.ZodNull;
381
+ digest: z.ZodString;
382
+ }, z.core.$strict>, z.ZodObject<{
383
+ storage: z.ZodLiteral<"private">;
384
+ path: z.ZodNull;
385
+ privateRef: z.ZodString;
386
+ digest: z.ZodString;
387
+ }, z.core.$strict>], "storage">;
388
+ revisionCommitDigest: z.ZodString;
389
+ noKnownDefectStatement: z.ZodString;
390
+ }, z.core.$strict>], "route">;
145
391
  expectedClean: z.ZodLiteral<false>;
146
392
  defects: z.ZodArray<z.ZodObject<{
147
393
  defectId: z.ZodString;
@@ -185,5 +431,190 @@ export declare const Probe: z.ZodDiscriminatedUnion<[z.ZodObject<{
185
431
  relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
186
432
  }, z.core.$strict>>;
187
433
  }, z.core.$strict>>;
434
+ defectSignature: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
435
+ observableChannel: z.ZodEnum<{
436
+ artifact: "artifact";
437
+ "call-inputs": "call-inputs";
438
+ "exit-code": "exit-code";
439
+ "response-body": "response-body";
440
+ "response-headers": "response-headers";
441
+ "response-status": "response-status";
442
+ stderr: "stderr";
443
+ stdout: "stdout";
444
+ }>;
445
+ condition: z.ZodObject<{
446
+ selector: z.ZodObject<{
447
+ inputBinding: z.ZodObject<{
448
+ path: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
449
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
450
+ }, z.core.$strict>, z.ZodObject<{
451
+ matcher: z.ZodEnum<{
452
+ any: "any";
453
+ "type-violating": "type-violating";
454
+ }>;
455
+ }, z.core.$strict>]>>>;
456
+ query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
457
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
458
+ }, z.core.$strict>, z.ZodObject<{
459
+ matcher: z.ZodEnum<{
460
+ any: "any";
461
+ "type-violating": "type-violating";
462
+ }>;
463
+ }, z.core.$strict>]>>>;
464
+ header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
465
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
466
+ }, z.core.$strict>, z.ZodObject<{
467
+ matcher: z.ZodEnum<{
468
+ any: "any";
469
+ "type-violating": "type-violating";
470
+ }>;
471
+ }, z.core.$strict>]>>>;
472
+ body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
473
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
474
+ }, z.core.$strict>, z.ZodObject<{
475
+ matcher: z.ZodEnum<{
476
+ any: "any";
477
+ "type-violating": "type-violating";
478
+ }>;
479
+ }, z.core.$strict>]>>>;
480
+ argument: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
481
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
482
+ }, z.core.$strict>, z.ZodObject<{
483
+ matcher: z.ZodEnum<{
484
+ any: "any";
485
+ "type-violating": "type-violating";
486
+ }>;
487
+ }, z.core.$strict>]>>>;
488
+ option: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
489
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
490
+ }, z.core.$strict>, z.ZodObject<{
491
+ matcher: z.ZodEnum<{
492
+ any: "any";
493
+ "type-violating": "type-violating";
494
+ }>;
495
+ }, z.core.$strict>]>>>;
496
+ environment: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
497
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
498
+ }, z.core.$strict>, z.ZodObject<{
499
+ matcher: z.ZodEnum<{
500
+ any: "any";
501
+ "type-violating": "type-violating";
502
+ }>;
503
+ }, z.core.$strict>]>>>;
504
+ stdin: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
505
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
506
+ }, z.core.$strict>, z.ZodObject<{
507
+ matcher: z.ZodEnum<{
508
+ any: "any";
509
+ "type-violating": "type-violating";
510
+ }>;
511
+ }, z.core.$strict>]>>>;
512
+ }, z.core.$strict>;
513
+ }, z.core.$strict>;
514
+ predicate: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
515
+ }, z.core.$strict>;
516
+ interfaceKind: z.ZodEnum<{
517
+ api: "api";
518
+ mcp: "mcp";
519
+ web: "web";
520
+ }>;
521
+ method: z.ZodEnum<{
522
+ DELETE: "DELETE";
523
+ GET: "GET";
524
+ HEAD: "HEAD";
525
+ OPTIONS: "OPTIONS";
526
+ PATCH: "PATCH";
527
+ POST: "POST";
528
+ PUT: "PUT";
529
+ }>;
530
+ pathTemplate: z.ZodString;
531
+ }, z.core.$strict>, z.ZodObject<{
532
+ observableChannel: z.ZodEnum<{
533
+ artifact: "artifact";
534
+ "call-inputs": "call-inputs";
535
+ "exit-code": "exit-code";
536
+ "response-body": "response-body";
537
+ "response-headers": "response-headers";
538
+ "response-status": "response-status";
539
+ stderr: "stderr";
540
+ stdout: "stdout";
541
+ }>;
542
+ condition: z.ZodObject<{
543
+ selector: z.ZodObject<{
544
+ inputBinding: z.ZodObject<{
545
+ path: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
546
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
547
+ }, z.core.$strict>, z.ZodObject<{
548
+ matcher: z.ZodEnum<{
549
+ any: "any";
550
+ "type-violating": "type-violating";
551
+ }>;
552
+ }, z.core.$strict>]>>>;
553
+ query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
554
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
555
+ }, z.core.$strict>, z.ZodObject<{
556
+ matcher: z.ZodEnum<{
557
+ any: "any";
558
+ "type-violating": "type-violating";
559
+ }>;
560
+ }, z.core.$strict>]>>>;
561
+ header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
562
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
563
+ }, z.core.$strict>, z.ZodObject<{
564
+ matcher: z.ZodEnum<{
565
+ any: "any";
566
+ "type-violating": "type-violating";
567
+ }>;
568
+ }, z.core.$strict>]>>>;
569
+ body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
570
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
571
+ }, z.core.$strict>, z.ZodObject<{
572
+ matcher: z.ZodEnum<{
573
+ any: "any";
574
+ "type-violating": "type-violating";
575
+ }>;
576
+ }, z.core.$strict>]>>>;
577
+ argument: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
578
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
579
+ }, z.core.$strict>, z.ZodObject<{
580
+ matcher: z.ZodEnum<{
581
+ any: "any";
582
+ "type-violating": "type-violating";
583
+ }>;
584
+ }, z.core.$strict>]>>>;
585
+ option: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
586
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
587
+ }, z.core.$strict>, z.ZodObject<{
588
+ matcher: z.ZodEnum<{
589
+ any: "any";
590
+ "type-violating": "type-violating";
591
+ }>;
592
+ }, z.core.$strict>]>>>;
593
+ environment: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
594
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
595
+ }, z.core.$strict>, z.ZodObject<{
596
+ matcher: z.ZodEnum<{
597
+ any: "any";
598
+ "type-violating": "type-violating";
599
+ }>;
600
+ }, z.core.$strict>]>>>;
601
+ stdin: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
602
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
603
+ }, z.core.$strict>, z.ZodObject<{
604
+ matcher: z.ZodEnum<{
605
+ any: "any";
606
+ "type-violating": "type-violating";
607
+ }>;
608
+ }, z.core.$strict>]>>>;
609
+ }, z.core.$strict>;
610
+ }, z.core.$strict>;
611
+ predicate: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
612
+ }, z.core.$strict>;
613
+ interfaceKind: z.ZodLiteral<"cli">;
614
+ invocation: z.ZodObject<{
615
+ executable: z.ZodString;
616
+ subcommandPath: z.ZodArray<z.ZodString>;
617
+ }, z.core.$strict>;
618
+ }, z.core.$strict>]>>;
188
619
  }, z.core.$strict>], "expectedClean">;
189
620
  export type Probe = z.infer<typeof Probe>;
@@ -1,9 +1,11 @@
1
1
  /** a corpus probe: its class, its control status, and the defects it seeds. */
2
2
  import { z } from 'zod';
3
3
  import { ArtifactReference } from './artifact-reference.js';
4
+ import { DefectSignature } from './defect-signature.js';
4
5
  import { Severity } from './eval-contract.js';
5
6
  import { lineageFields } from './lineage.js';
6
7
  import { BehaviorId, DefectId, Digest, ProbeId } from './primitives.js';
8
+ import { ProbeQualification } from './probe-qualification.js';
7
9
  import { ManifestationWitness } from './sensitivity-witness.js';
8
10
  /**
9
11
  * AD-9's closed four, one per probe, in scope because AD-7's strength vector
@@ -44,6 +46,7 @@ const probeCommonFields = {
44
46
  artifactDigest: Digest,
45
47
  commitDigest: Digest,
46
48
  rationale: z.string().min(1),
49
+ qualification: ProbeQualification.describe('AD-9\'s qualification record: which of the five routes earned this probe its ground truth, and the evidence that route demands. Required on every branch and on every class, canaries included, because AD-9 closes with "an unqualified probe cannot enter a sealed set" and spells a route for all five kinds. That the route is compatible with this probe\'s class and `expectedClean` flag is a cross-field rule the export cannot carry; the corpus qualification gate enforces it and returns a reason code. Required, not optional, which with `defectSignature` below makes the probe\'s `schemaVersion` 1 -> 2 BREAKING bump under AD-11, whose rule is that "adding an optional field is a `schemaVersion` bump recorded in the field\'s own description; removing or retyping is breaking". This field is on both branches, so it alone is what stops every version-1 probe from parsing.'),
47
50
  };
48
51
  /**
49
52
  * The prior art's `expectedClean` conditional, re-expressed as a discriminated
@@ -73,10 +76,11 @@ export const Probe = z
73
76
  defects: z
74
77
  .array(Defect)
75
78
  .describe('No minimum. AD-9 states none, and a minimum would make a canary unrepresentable, since a canary indicts the fixture rather than seeding a defect.'),
79
+ defectSignature: DefectSignature.nullable().describe("AD-40's machine-readable defect signature, declared on this branch alone: a clean control seeds nothing, so its branch has no signature to carry. Nullable rather than plain, because the one class that legitimately carries none is `canary`, and a union-level refinement expressing that is dropped from the published export, which would leave Zod rejecting a probe ajv accepts. The corpus qualification gate is the enforcement point and the constraint ledger records the gap; the shipped precedent is `compile/interface-inventory.ts`, which put the principal check in the compiler for the same reason. The other half of the probe's `schemaVersion` 1 -> 2 BREAKING bump under AD-11, recorded here as that rule requires: the key is required on this branch, and `null` is the legal value a canary carries."),
76
80
  })
77
- .describe('A probe that is not a known-clean control.'),
81
+ .describe('A probe that is not a known-clean control. The one branch AD-40 gives a defect signature.'),
78
82
  ])
79
83
  .meta({
80
84
  id: 'Probe',
81
- description: "One corpus probe. Succeeds the prior-art `h0-ground-truth` schema per AD-24, carrying its system identifier, implementation digest, `expectedClean` flag, seeded defects, and rationale, and adding AD-9's probe class and AD-9's per-probe artifact and commit digests. Divergences: `implementationSha` becomes `implementationDigest`, `taskId` does not survive because the probe pins what it describes by digest, and `expectedGate` does not survive because AD-40 makes detection a signature match rather than a verdict comparison and AD-7 keeps comparisons inside the dominance vector, so carrying an expected gate would invite a comparison the architecture forbids. Two constructions are deliberately absent: AD-9's per-class QUALIFICATION record, whose five prose routes name no fields and whose acceptance criteria of record do not command it, and AD-40's machine-readable DEFECT SIGNATURE, which Owed item 7 records as having no fixture to land in because this repository contains no probe at all. Both arrive as additive `schemaVersion` bumps under AD-11 once a corpus exists to carry them. The cost is named rather than hidden: AD-9's \"an unqualified probe cannot enter a sealed set\" is enforced by nothing in v0: not this schema, not an AD-5 code, and not an AD-21 rung.",
85
+ description: "One corpus probe. Succeeds the prior-art `h0-ground-truth` schema per AD-24, carrying its system identifier, implementation digest, `expectedClean` flag, seeded defects, and rationale, and adding AD-9's probe class and AD-9's per-probe artifact and commit digests. Divergences: `implementationSha` becomes `implementationDigest`, `taskId` does not survive because the probe pins what it describes by digest, and `expectedGate` does not survive because AD-40 makes detection a signature match rather than a verdict comparison and AD-7 keeps comparisons inside the dominance vector, so carrying an expected gate would invite a comparison the architecture forbids. Two constructions landed here together under one BREAKING `schemaVersion` bump: AD-9's per-class QUALIFICATION record, as a five-route tagged union required on every branch, and AD-40's machine-readable DEFECT SIGNATURE on the `expectedClean: false` branch, carrying the interface kind, the home operation as a method and a path template, the observable channel, and the discriminating condition. Both are required rather than optional, which is what makes the bump breaking under AD-11: every corpus written against version 1 fails to parse. Version 3 opened the signature to a second interface kind: it is a union on `interfaceKind`, where the `cli` branch declares a logical invocation in place of a method and a path template, and the selector's input binding carries the four command channels beside the four transport ones. What the schema still does not decide is stated rather than hidden. AD-9's \"an unqualified probe cannot enter a sealed set\" is a corpus-construction invariant enforced by the qualification gate in `core/score/qualification.ts`, not by this schema: all eight class-and-`expectedClean` pairings parse, a route incompatible with the pair parses, and a signature-less non-canary parses, each so the gate can return a reason code carrying an artifact path instead of an anonymous parse failure. The constraint ledger carries both gaps.",
82
86
  });
@@ -20,6 +20,7 @@ export declare const ScoringPolicy: z.ZodObject<{
20
20
  material: "material";
21
21
  }>;
22
22
  confidenceThreshold: z.ZodNumber;
23
+ catchThreshold: z.ZodNumber;
23
24
  minimumTrialCount: z.ZodInt;
24
25
  reExecutionCap: z.ZodInt;
25
26
  remediationCap: z.ZodInt;
@@ -22,6 +22,11 @@ export const ScoringPolicy = z
22
22
  .min(0)
23
23
  .max(1)
24
24
  .describe('The same closed unit interval a finding\'s `confidence` uses. AD-21\'s "a finding whose confidence falls below the policy threshold" compares the two, and two different scales would make that comparison meaningless.'),
25
+ catchThreshold: z
26
+ .number()
27
+ .min(0)
28
+ .max(1)
29
+ .describe('AD-7\'s trial-set reducer: a probe counts as caught only when its caught-trial count is strictly greater than this fraction of its valid-trial count, so an exact tie never counts as caught. The published default artifact carries 0.5, the pre-registered "at least two catches in three valid repetitions" read at a valid count of three. No `.default()`, on the same reasoning `confidenceThreshold` gives. Required, not optional, which makes this the scoring policy\'s `schemaVersion` 1 -> 2 BREAKING bump under AD-11, whose rule is that "adding an optional field is a `schemaVersion` bump recorded in the field\'s own description; removing or retyping is breaking". With no default to fill it in, every version-1 policy document fails to parse.'),
25
30
  minimumTrialCount: z
26
31
  .int()
27
32
  .min(1)
@@ -47,5 +52,5 @@ export const ScoringPolicy = z
47
52
  })
48
53
  .meta({
49
54
  id: 'ScoringPolicy',
50
- description: 'The scoring policy, with no prior art. It carries the severity floor, confidence threshold, minimum trial count, re-execution cap, remediation cap, and a regex match-step budget that AD-6, AD-12, AD-4, and AD-21 read, and its digest is one of the five named inputs to AD-11\'s scoring version. It is a published artifact rather than a set of constants so that "the default" has an identity a result can name by digest.',
55
+ description: 'The scoring policy, with no prior art. It carries the severity floor, confidence threshold, catch threshold, minimum trial count, re-execution cap, remediation cap, and a regex match-step budget that AD-6, AD-7, AD-12, AD-4, and AD-21 read, and its digest is one of the six named inputs to AD-11\'s scoring version. It is a published artifact rather than a set of constants so that "the default" has an identity a result can name by digest.',
51
56
  });
@@ -69,6 +69,7 @@ export declare const SealedEvaluatorBrief: z.ZodObject<{
69
69
  reference: z.ZodString;
70
70
  kind: z.ZodString;
71
71
  }, z.core.$strict>>;
72
+ principals: z.ZodArray<z.ZodString>;
72
73
  budgets: z.ZodObject<{
73
74
  maxToolCalls: z.ZodInt;
74
75
  maxWallClockMinutes: z.ZodInt;
@@ -45,6 +45,9 @@ export const SealedEvaluatorBrief = z
45
45
  scopedResources: z
46
46
  .array(ScopedResource)
47
47
  .describe("AD-16's scoped resource references. Not nullable here, unlike on the contract: absent-versus-explicitly-empty is an AD-31 grading of a CALLER declaration, and this artifact is generated by `seal`, which always knows the answer. No scoped reference may resolve to a forbidden input; that resolution is `scoped-reference-resolves-forbidden` at compile time and is not a schema check."),
48
+ principals: z
49
+ .array(Identifier)
50
+ .describe("The names declared in the contract's `testData.principals`, sorted. Not nullable, on `scopedResources`'s reasoning above: `seal` always knows the answer, and empty is the legal spelling for a contract declaring none. Names only, no `kind`: `kind` is the author's own opaque vocabulary with no value space any AD declares, so shipping it would put uninterpretable text on the one artifact AD-16 keeps minimal. A name is an opaque label (AD-18), so it discloses no account identifier or credential, and it carries no step identifier (AD-16). Required, not optional, which makes this the sealed brief's `schemaVersion` 1 -> 2 BREAKING bump under AD-11, whose rule is that \"adding an optional field is a `schemaVersion` bump recorded in the field's own description; removing or retyping is breaking\". `[]` is the empty spelling and the key is mandatory, so no version-1 brief parses."),
48
51
  budgets: Budgets.describe("The contract's declared ceilings, carried because AD-16 says the caller who executes needs the ceilings the isolation manifest reports against. The manifest's own `resourceCeilings` is a different shape and a different concern: this is a declaration, that is a record of what the harness enforced."),
49
52
  safetyLimits: z.array(z.string()),
50
53
  probeStepBound: z
@@ -55,5 +58,5 @@ export const SealedEvaluatorBrief = z
55
58
  })
56
59
  .meta({
57
60
  id: 'SealedEvaluatorBrief',
58
- description: "The sealed evaluator brief, with no prior art. AD-16 fixes what it carries: the contract's behaviours, the generated evaluator-facing directions of AD-3, permitted interfaces, and scoped resource references, plus budgets and safety limits. It also fixes what the brief never carries: author commentary, the interaction plan, or the plan's step identifiers, and never a prescribed action sequence. Those exclusions are structural rather than conventional: this object is strict, so a brief carrying `interactionPlan`, `commentary`, or a `stepId` fails with `unrecognized_keys`, and each of the three has its own reject fixture rather than resting on strictness alone. It carries no identity field of its own, because every artifact that refers to it does so by digest.",
61
+ description: "The sealed evaluator brief, with no prior art. AD-16 fixes what it carries: the contract's behaviours, the generated evaluator-facing directions of AD-3, permitted interfaces, scoped resource references, and the declared test-data principal names, plus budgets and safety limits. It also fixes what the brief never carries: author commentary, the interaction plan, or the plan's step identifiers, and never a prescribed action sequence. Those exclusions are structural rather than conventional: this object is strict, so a brief carrying `interactionPlan`, `commentary`, or a `stepId` fails with `unrecognized_keys`, and each of the three has its own reject fixture rather than resting on strictness alone. It carries no identity field of its own, because every artifact that refers to it does so by digest.",
59
62
  });