eval-quality 0.1.0 → 0.2.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 (133) hide show
  1. package/README.md +142 -67
  2. package/corpus/dev/README.md +17 -11
  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/no-collection-quantifier.json +1 -1
  13. package/corpus/dev/contracts/no-operation-inventory.json +1 -1
  14. package/corpus/dev/contracts/no-read-back-relation.json +1 -1
  15. package/corpus/dev/contracts/no-state-change-marker.json +1 -1
  16. package/corpus/dev/contracts/no-type-violating-step.json +1 -1
  17. package/corpus/dev/contracts/per-key-split-oracles.json +1 -1
  18. package/corpus/dev/contracts/satisfied-declarations.json +1 -1
  19. package/corpus/dev/contracts/single-required-response-key.json +1 -1
  20. package/corpus/dev/contracts/split-indicator-oracle.json +1 -1
  21. package/corpus/dev/contracts/unaddressed-parameter-sibling.json +1 -1
  22. package/corpus/dev/contracts/unnamed-reference-set.json +1 -1
  23. package/corpus/dev/contracts/wrong-cardinality-form.json +1 -1
  24. package/corpus/dev/index.json +1 -1
  25. package/dist/application/index.d.ts +2 -0
  26. package/dist/application/index.js +1 -0
  27. package/dist/application/score.d.ts +48 -0
  28. package/dist/application/score.js +186 -0
  29. package/dist/cli/arguments.d.ts +7 -3
  30. package/dist/cli/arguments.js +73 -5
  31. package/dist/cli/exit-codes.d.ts +6 -2
  32. package/dist/cli/exit-codes.js +8 -9
  33. package/dist/cli/main.js +9 -0
  34. package/dist/cli/render.d.ts +1 -1
  35. package/dist/cli/render.js +6 -4
  36. package/dist/cli/run.d.ts +13 -3
  37. package/dist/cli/run.js +136 -16
  38. package/dist/core/canonical/canonicalize.d.ts +12 -0
  39. package/dist/core/canonical/canonicalize.js +18 -4
  40. package/dist/core/compile/bindings.d.ts +70 -0
  41. package/dist/core/compile/bindings.js +317 -0
  42. package/dist/core/compile/compile.d.ts +5 -0
  43. package/dist/core/compile/compile.js +9 -0
  44. package/dist/core/compile/expression-legality.d.ts +49 -0
  45. package/dist/core/compile/expression-legality.js +105 -31
  46. package/dist/core/compile/forbidden-inputs.d.ts +8 -1
  47. package/dist/core/compile/forbidden-inputs.js +16 -3
  48. package/dist/core/compile/interface-inventory.d.ts +23 -1
  49. package/dist/core/compile/interface-inventory.js +32 -3
  50. package/dist/core/compile/reachability.d.ts +18 -1
  51. package/dist/core/compile/reachability.js +46 -1
  52. package/dist/core/compile/sensitivity-witness.d.ts +1 -1
  53. package/dist/core/compile/sensitivity-witness.js +1 -1
  54. package/dist/core/emit/emit.d.ts +9 -0
  55. package/dist/core/emit/emit.js +214 -0
  56. package/dist/core/emit/private-artifact-digest.d.ts +11 -0
  57. package/dist/core/emit/private-artifact-digest.js +31 -0
  58. package/dist/core/evaluate/evidence-resolution.d.ts +11 -1
  59. package/dist/core/evaluate/evidence-resolution.js +4 -1
  60. package/dist/core/failure-codes.d.ts +2 -2
  61. package/dist/core/failure-codes.js +4 -2
  62. package/dist/core/ingest/conditions.d.ts +201 -0
  63. package/dist/core/ingest/conditions.js +48 -0
  64. package/dist/core/ingest/index.d.ts +13 -0
  65. package/dist/core/ingest/index.js +11 -0
  66. package/dist/core/ingest/ingest.d.ts +68 -0
  67. package/dist/core/ingest/ingest.js +310 -0
  68. package/dist/core/lineage/stage-table.d.ts +21 -4
  69. package/dist/core/lineage/stage-table.js +35 -3
  70. package/dist/core/preflight/witness-evidence.js +10 -0
  71. package/dist/core/schemas/artifact.d.ts +385 -14
  72. package/dist/core/schemas/constraint-ledger.js +40 -0
  73. package/dist/core/schemas/defect-signature.d.ts +273 -0
  74. package/dist/core/schemas/defect-signature.js +127 -0
  75. package/dist/core/schemas/eval-contract.d.ts +33 -0
  76. package/dist/core/schemas/eval-contract.js +14 -0
  77. package/dist/core/schemas/evidence-artifact.d.ts +99 -19
  78. package/dist/core/schemas/evidence-artifact.js +64 -8
  79. package/dist/core/schemas/plan.d.ts +112 -0
  80. package/dist/core/schemas/plan.js +67 -2
  81. package/dist/core/schemas/probe-qualification.d.ts +168 -0
  82. package/dist/core/schemas/probe-qualification.js +106 -0
  83. package/dist/core/schemas/probe.d.ts +312 -0
  84. package/dist/core/schemas/probe.js +6 -2
  85. package/dist/core/schemas/scoring-policy.d.ts +1 -0
  86. package/dist/core/schemas/scoring-policy.js +6 -1
  87. package/dist/core/schemas/sealed-evaluator-brief.d.ts +1 -0
  88. package/dist/core/schemas/sealed-evaluator-brief.js +4 -1
  89. package/dist/core/schemas/sealed-run-record.d.ts +30 -3
  90. package/dist/core/schemas/sealed-run-record.js +37 -5
  91. package/dist/core/score/binding-order.d.ts +31 -0
  92. package/dist/core/score/binding-order.js +88 -0
  93. package/dist/core/score/bindings.d.ts +93 -0
  94. package/dist/core/score/bindings.js +297 -0
  95. package/dist/core/score/ladder-table.d.ts +23 -0
  96. package/dist/core/score/ladder-table.js +109 -0
  97. package/dist/core/score/ladder.d.ts +229 -0
  98. package/dist/core/score/ladder.js +464 -0
  99. package/dist/core/score/mode-agreement.d.ts +30 -0
  100. package/dist/core/score/mode-agreement.js +16 -0
  101. package/dist/core/score/outcome-table.d.ts +17 -0
  102. package/dist/core/score/outcome-table.js +172 -0
  103. package/dist/core/score/outcome.d.ts +466 -0
  104. package/dist/core/score/outcome.js +562 -0
  105. package/dist/core/score/qualification.d.ts +83 -0
  106. package/dist/core/score/qualification.js +615 -0
  107. package/dist/core/score/quotation.d.ts +79 -0
  108. package/dist/core/score/quotation.js +201 -0
  109. package/dist/core/score/reduce-trials.d.ts +80 -0
  110. package/dist/core/score/reduce-trials.js +90 -0
  111. package/dist/core/score/score.d.ts +72 -0
  112. package/dist/core/score/score.js +581 -0
  113. package/dist/core/score/selection.d.ts +80 -0
  114. package/dist/core/score/selection.js +98 -0
  115. package/dist/core/score/strength.d.ts +49 -0
  116. package/dist/core/score/strength.js +193 -0
  117. package/dist/core/score/witness.d.ts +117 -0
  118. package/dist/core/score/witness.js +315 -0
  119. package/dist/core/seal/derived-reference.d.ts +1 -1
  120. package/dist/core/seal/derived-reference.js +236 -28
  121. package/dist/core/seal/seal.js +8 -3
  122. package/dist/core/stage-contracts.d.ts +62 -2
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.js +1 -1
  125. package/dist/testing/index.d.ts +2 -0
  126. package/dist/testing/index.js +1 -0
  127. package/package.json +12 -3
  128. package/schemas/eval-contract.schema.json +100 -2
  129. package/schemas/evidence-artifact.schema.json +96 -9
  130. package/schemas/probe.schema.json +508 -3
  131. package/schemas/scoring-policy.schema.json +8 -1
  132. package/schemas/sealed-evaluator-brief.schema.json +11 -1
  133. package/schemas/sealed-run-record.schema.json +19 -2
@@ -255,6 +255,10 @@ export declare const INTERCHANGE_ARTIFACTS: {
255
255
  any: "any";
256
256
  "type-violating": "type-violating";
257
257
  }>;
258
+ }, z.core.$strict>, z.ZodObject<{
259
+ captured: z.ZodString;
260
+ }, z.core.$strict>, z.ZodObject<{
261
+ principal: z.ZodString;
258
262
  }, z.core.$strict>]>>>;
259
263
  query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
260
264
  literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
@@ -263,6 +267,10 @@ export declare const INTERCHANGE_ARTIFACTS: {
263
267
  any: "any";
264
268
  "type-violating": "type-violating";
265
269
  }>;
270
+ }, z.core.$strict>, z.ZodObject<{
271
+ captured: z.ZodString;
272
+ }, z.core.$strict>, z.ZodObject<{
273
+ principal: z.ZodString;
266
274
  }, z.core.$strict>]>>>;
267
275
  header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
268
276
  literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
@@ -271,6 +279,10 @@ export declare const INTERCHANGE_ARTIFACTS: {
271
279
  any: "any";
272
280
  "type-violating": "type-violating";
273
281
  }>;
282
+ }, z.core.$strict>, z.ZodObject<{
283
+ captured: z.ZodString;
284
+ }, z.core.$strict>, z.ZodObject<{
285
+ principal: z.ZodString;
274
286
  }, z.core.$strict>]>>>;
275
287
  body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
276
288
  literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
@@ -279,9 +291,18 @@ export declare const INTERCHANGE_ARTIFACTS: {
279
291
  any: "any";
280
292
  "type-violating": "type-violating";
281
293
  }>;
294
+ }, z.core.$strict>, z.ZodObject<{
295
+ captured: z.ZodString;
296
+ }, z.core.$strict>, z.ZodObject<{
297
+ principal: z.ZodString;
282
298
  }, z.core.$strict>]>>>;
283
299
  }, z.core.$strict>;
284
300
  after: z.ZodNullable<z.ZodString>;
301
+ cardinality: z.ZodEnum<{
302
+ any: "any";
303
+ "at-most-one": "at-most-one";
304
+ "exactly-one": "exactly-one";
305
+ }>;
285
306
  }, z.core.$strict>>;
286
307
  scopedResources: z.ZodNullable<z.ZodArray<z.ZodObject<{
287
308
  reference: z.ZodString;
@@ -299,6 +320,12 @@ export declare const INTERCHANGE_ARTIFACTS: {
299
320
  testData: z.ZodObject<{
300
321
  setup: z.ZodNullable<z.ZodString>;
301
322
  cleanup: z.ZodNullable<z.ZodString>;
323
+ principals: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
324
+ kind: z.ZodString;
325
+ }, z.core.$strict>>>;
326
+ resources: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
327
+ kind: z.ZodString;
328
+ }, z.core.$strict>>>;
302
329
  }, z.core.$strict>;
303
330
  budgets: z.ZodObject<{
304
331
  maxToolCalls: z.ZodInt;
@@ -394,6 +421,7 @@ export declare const INTERCHANGE_ARTIFACTS: {
394
421
  reference: z.ZodString;
395
422
  kind: z.ZodString;
396
423
  }, z.core.$strict>>;
424
+ principals: z.ZodArray<z.ZodString>;
397
425
  budgets: z.ZodObject<{
398
426
  maxToolCalls: z.ZodInt;
399
427
  maxWallClockMinutes: z.ZodInt;
@@ -412,6 +440,10 @@ export declare const INTERCHANGE_ARTIFACTS: {
412
440
  revisionCount: z.ZodInt;
413
441
  runId: z.ZodString;
414
442
  conditionArm: z.ZodString;
443
+ mode: z.ZodEnum<{
444
+ "contract-scoring": "contract-scoring";
445
+ production: "production";
446
+ }>;
415
447
  trialIndex: z.ZodInt;
416
448
  contractDigest: z.ZodString;
417
449
  sealedBriefDigest: z.ZodString;
@@ -521,6 +553,7 @@ export declare const INTERCHANGE_ARTIFACTS: {
521
553
  }, z.core.$strict>], "findingType">>;
522
554
  observations: z.ZodArray<z.ZodObject<{
523
555
  observationId: z.ZodString;
556
+ sequence: z.ZodInt;
524
557
  operationId: z.ZodString;
525
558
  provenance: z.ZodEnum<{
526
559
  baseline: "baseline";
@@ -695,6 +728,129 @@ export declare const INTERCHANGE_ARTIFACTS: {
695
728
  artifactDigest: z.ZodString;
696
729
  commitDigest: z.ZodString;
697
730
  rationale: z.ZodString;
731
+ qualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
732
+ route: z.ZodLiteral<"historical">;
733
+ failBeforeEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
734
+ storage: z.ZodLiteral<"public">;
735
+ path: z.ZodString;
736
+ privateRef: z.ZodNull;
737
+ digest: z.ZodString;
738
+ }, z.core.$strict>, z.ZodObject<{
739
+ storage: z.ZodLiteral<"private">;
740
+ path: z.ZodNull;
741
+ privateRef: z.ZodString;
742
+ digest: z.ZodString;
743
+ }, z.core.$strict>], "storage">;
744
+ passAfterEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
745
+ storage: z.ZodLiteral<"public">;
746
+ path: z.ZodString;
747
+ privateRef: z.ZodNull;
748
+ digest: z.ZodString;
749
+ }, z.core.$strict>, z.ZodObject<{
750
+ storage: z.ZodLiteral<"private">;
751
+ path: z.ZodNull;
752
+ privateRef: z.ZodString;
753
+ digest: z.ZodString;
754
+ }, z.core.$strict>], "storage">;
755
+ fixCommitDigest: z.ZodString;
756
+ oracleStableAcrossRevisions: z.ZodBoolean;
757
+ }, z.core.$strict>, z.ZodObject<{
758
+ route: z.ZodLiteral<"controlled-mutation">;
759
+ mutationSource: z.ZodString;
760
+ mutationOperator: z.ZodString;
761
+ targetArtifact: z.ZodDiscriminatedUnion<[z.ZodObject<{
762
+ storage: z.ZodLiteral<"public">;
763
+ path: z.ZodString;
764
+ privateRef: z.ZodNull;
765
+ digest: z.ZodString;
766
+ }, z.core.$strict>, z.ZodObject<{
767
+ storage: z.ZodLiteral<"private">;
768
+ path: z.ZodNull;
769
+ privateRef: z.ZodString;
770
+ digest: z.ZodString;
771
+ }, z.core.$strict>], "storage">;
772
+ expectedObservableFailure: z.ZodString;
773
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
774
+ storage: z.ZodLiteral<"public">;
775
+ path: z.ZodString;
776
+ privateRef: z.ZodNull;
777
+ digest: z.ZodString;
778
+ }, z.core.$strict>, z.ZodObject<{
779
+ storage: z.ZodLiteral<"private">;
780
+ path: z.ZodNull;
781
+ privateRef: z.ZodString;
782
+ digest: z.ZodString;
783
+ }, z.core.$strict>], "storage">;
784
+ mutatedFailEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
785
+ storage: z.ZodLiteral<"public">;
786
+ path: z.ZodString;
787
+ privateRef: z.ZodNull;
788
+ digest: z.ZodString;
789
+ }, z.core.$strict>, z.ZodObject<{
790
+ storage: z.ZodLiteral<"private">;
791
+ path: z.ZodNull;
792
+ privateRef: z.ZodString;
793
+ digest: z.ZodString;
794
+ }, z.core.$strict>], "storage">;
795
+ rollbackVerified: z.ZodBoolean;
796
+ }, z.core.$strict>, z.ZodObject<{
797
+ route: z.ZodLiteral<"gameability">;
798
+ degenerateResponse: z.ZodString;
799
+ naiveOracleSatisfiedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
800
+ storage: z.ZodLiteral<"public">;
801
+ path: z.ZodString;
802
+ privateRef: z.ZodNull;
803
+ digest: z.ZodString;
804
+ }, z.core.$strict>, z.ZodObject<{
805
+ storage: z.ZodLiteral<"private">;
806
+ path: z.ZodNull;
807
+ privateRef: z.ZodString;
808
+ digest: z.ZodString;
809
+ }, z.core.$strict>], "storage">;
810
+ disciplinedOracleRejectedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
811
+ storage: z.ZodLiteral<"public">;
812
+ path: z.ZodString;
813
+ privateRef: z.ZodNull;
814
+ digest: z.ZodString;
815
+ }, z.core.$strict>, z.ZodObject<{
816
+ storage: z.ZodLiteral<"private">;
817
+ path: z.ZodNull;
818
+ privateRef: z.ZodString;
819
+ digest: z.ZodString;
820
+ }, z.core.$strict>], "storage">;
821
+ }, z.core.$strict>, z.ZodObject<{
822
+ route: z.ZodLiteral<"canary">;
823
+ indicts: z.ZodEnum<{
824
+ corpus: "corpus";
825
+ fixture: "fixture";
826
+ }>;
827
+ nonDetectionEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
828
+ storage: z.ZodLiteral<"public">;
829
+ path: z.ZodString;
830
+ privateRef: z.ZodNull;
831
+ digest: z.ZodString;
832
+ }, z.core.$strict>, z.ZodObject<{
833
+ storage: z.ZodLiteral<"private">;
834
+ path: z.ZodNull;
835
+ privateRef: z.ZodString;
836
+ digest: z.ZodString;
837
+ }, z.core.$strict>], "storage">;
838
+ }, z.core.$strict>, z.ZodObject<{
839
+ route: z.ZodLiteral<"clean-control">;
840
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
841
+ storage: z.ZodLiteral<"public">;
842
+ path: z.ZodString;
843
+ privateRef: z.ZodNull;
844
+ digest: z.ZodString;
845
+ }, z.core.$strict>, z.ZodObject<{
846
+ storage: z.ZodLiteral<"private">;
847
+ path: z.ZodNull;
848
+ privateRef: z.ZodString;
849
+ digest: z.ZodString;
850
+ }, z.core.$strict>], "storage">;
851
+ revisionCommitDigest: z.ZodString;
852
+ noKnownDefectStatement: z.ZodString;
853
+ }, z.core.$strict>], "route">;
698
854
  expectedClean: z.ZodLiteral<true>;
699
855
  defects: z.ZodArray<z.ZodObject<{
700
856
  defectId: z.ZodString;
@@ -755,6 +911,129 @@ export declare const INTERCHANGE_ARTIFACTS: {
755
911
  artifactDigest: z.ZodString;
756
912
  commitDigest: z.ZodString;
757
913
  rationale: z.ZodString;
914
+ qualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
915
+ route: z.ZodLiteral<"historical">;
916
+ failBeforeEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
917
+ storage: z.ZodLiteral<"public">;
918
+ path: z.ZodString;
919
+ privateRef: z.ZodNull;
920
+ digest: z.ZodString;
921
+ }, z.core.$strict>, z.ZodObject<{
922
+ storage: z.ZodLiteral<"private">;
923
+ path: z.ZodNull;
924
+ privateRef: z.ZodString;
925
+ digest: z.ZodString;
926
+ }, z.core.$strict>], "storage">;
927
+ passAfterEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
928
+ storage: z.ZodLiteral<"public">;
929
+ path: z.ZodString;
930
+ privateRef: z.ZodNull;
931
+ digest: z.ZodString;
932
+ }, z.core.$strict>, z.ZodObject<{
933
+ storage: z.ZodLiteral<"private">;
934
+ path: z.ZodNull;
935
+ privateRef: z.ZodString;
936
+ digest: z.ZodString;
937
+ }, z.core.$strict>], "storage">;
938
+ fixCommitDigest: z.ZodString;
939
+ oracleStableAcrossRevisions: z.ZodBoolean;
940
+ }, z.core.$strict>, z.ZodObject<{
941
+ route: z.ZodLiteral<"controlled-mutation">;
942
+ mutationSource: z.ZodString;
943
+ mutationOperator: z.ZodString;
944
+ targetArtifact: z.ZodDiscriminatedUnion<[z.ZodObject<{
945
+ storage: z.ZodLiteral<"public">;
946
+ path: z.ZodString;
947
+ privateRef: z.ZodNull;
948
+ digest: z.ZodString;
949
+ }, z.core.$strict>, z.ZodObject<{
950
+ storage: z.ZodLiteral<"private">;
951
+ path: z.ZodNull;
952
+ privateRef: z.ZodString;
953
+ digest: z.ZodString;
954
+ }, z.core.$strict>], "storage">;
955
+ expectedObservableFailure: z.ZodString;
956
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
957
+ storage: z.ZodLiteral<"public">;
958
+ path: z.ZodString;
959
+ privateRef: z.ZodNull;
960
+ digest: z.ZodString;
961
+ }, z.core.$strict>, z.ZodObject<{
962
+ storage: z.ZodLiteral<"private">;
963
+ path: z.ZodNull;
964
+ privateRef: z.ZodString;
965
+ digest: z.ZodString;
966
+ }, z.core.$strict>], "storage">;
967
+ mutatedFailEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
968
+ storage: z.ZodLiteral<"public">;
969
+ path: z.ZodString;
970
+ privateRef: z.ZodNull;
971
+ digest: z.ZodString;
972
+ }, z.core.$strict>, z.ZodObject<{
973
+ storage: z.ZodLiteral<"private">;
974
+ path: z.ZodNull;
975
+ privateRef: z.ZodString;
976
+ digest: z.ZodString;
977
+ }, z.core.$strict>], "storage">;
978
+ rollbackVerified: z.ZodBoolean;
979
+ }, z.core.$strict>, z.ZodObject<{
980
+ route: z.ZodLiteral<"gameability">;
981
+ degenerateResponse: z.ZodString;
982
+ naiveOracleSatisfiedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
983
+ storage: z.ZodLiteral<"public">;
984
+ path: z.ZodString;
985
+ privateRef: z.ZodNull;
986
+ digest: z.ZodString;
987
+ }, z.core.$strict>, z.ZodObject<{
988
+ storage: z.ZodLiteral<"private">;
989
+ path: z.ZodNull;
990
+ privateRef: z.ZodString;
991
+ digest: z.ZodString;
992
+ }, z.core.$strict>], "storage">;
993
+ disciplinedOracleRejectedEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
994
+ storage: z.ZodLiteral<"public">;
995
+ path: z.ZodString;
996
+ privateRef: z.ZodNull;
997
+ digest: z.ZodString;
998
+ }, z.core.$strict>, z.ZodObject<{
999
+ storage: z.ZodLiteral<"private">;
1000
+ path: z.ZodNull;
1001
+ privateRef: z.ZodString;
1002
+ digest: z.ZodString;
1003
+ }, z.core.$strict>], "storage">;
1004
+ }, z.core.$strict>, z.ZodObject<{
1005
+ route: z.ZodLiteral<"canary">;
1006
+ indicts: z.ZodEnum<{
1007
+ corpus: "corpus";
1008
+ fixture: "fixture";
1009
+ }>;
1010
+ nonDetectionEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
1011
+ storage: z.ZodLiteral<"public">;
1012
+ path: z.ZodString;
1013
+ privateRef: z.ZodNull;
1014
+ digest: z.ZodString;
1015
+ }, z.core.$strict>, z.ZodObject<{
1016
+ storage: z.ZodLiteral<"private">;
1017
+ path: z.ZodNull;
1018
+ privateRef: z.ZodString;
1019
+ digest: z.ZodString;
1020
+ }, z.core.$strict>], "storage">;
1021
+ }, z.core.$strict>, z.ZodObject<{
1022
+ route: z.ZodLiteral<"clean-control">;
1023
+ baselinePassEvidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
1024
+ storage: z.ZodLiteral<"public">;
1025
+ path: z.ZodString;
1026
+ privateRef: z.ZodNull;
1027
+ digest: z.ZodString;
1028
+ }, z.core.$strict>, z.ZodObject<{
1029
+ storage: z.ZodLiteral<"private">;
1030
+ path: z.ZodNull;
1031
+ privateRef: z.ZodString;
1032
+ digest: z.ZodString;
1033
+ }, z.core.$strict>], "storage">;
1034
+ revisionCommitDigest: z.ZodString;
1035
+ noKnownDefectStatement: z.ZodString;
1036
+ }, z.core.$strict>], "route">;
758
1037
  expectedClean: z.ZodLiteral<false>;
759
1038
  defects: z.ZodArray<z.ZodObject<{
760
1039
  defectId: z.ZodString;
@@ -798,6 +1077,72 @@ export declare const INTERCHANGE_ARTIFACTS: {
798
1077
  relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
799
1078
  }, z.core.$strict>>;
800
1079
  }, z.core.$strict>>;
1080
+ defectSignature: z.ZodNullable<z.ZodObject<{
1081
+ interfaceKind: z.ZodEnum<{
1082
+ api: "api";
1083
+ cli: "cli";
1084
+ mcp: "mcp";
1085
+ web: "web";
1086
+ }>;
1087
+ method: z.ZodEnum<{
1088
+ DELETE: "DELETE";
1089
+ GET: "GET";
1090
+ HEAD: "HEAD";
1091
+ OPTIONS: "OPTIONS";
1092
+ PATCH: "PATCH";
1093
+ POST: "POST";
1094
+ PUT: "PUT";
1095
+ }>;
1096
+ pathTemplate: z.ZodString;
1097
+ observableChannel: z.ZodEnum<{
1098
+ "call-inputs": "call-inputs";
1099
+ "exit-code": "exit-code";
1100
+ "response-body": "response-body";
1101
+ "response-headers": "response-headers";
1102
+ "response-status": "response-status";
1103
+ stderr: "stderr";
1104
+ stdout: "stdout";
1105
+ }>;
1106
+ condition: z.ZodObject<{
1107
+ selector: z.ZodObject<{
1108
+ inputBinding: z.ZodObject<{
1109
+ path: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
1110
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
1111
+ }, z.core.$strict>, z.ZodObject<{
1112
+ matcher: z.ZodEnum<{
1113
+ any: "any";
1114
+ "type-violating": "type-violating";
1115
+ }>;
1116
+ }, z.core.$strict>]>>>;
1117
+ query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
1118
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
1119
+ }, z.core.$strict>, z.ZodObject<{
1120
+ matcher: z.ZodEnum<{
1121
+ any: "any";
1122
+ "type-violating": "type-violating";
1123
+ }>;
1124
+ }, z.core.$strict>]>>>;
1125
+ header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
1126
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
1127
+ }, z.core.$strict>, z.ZodObject<{
1128
+ matcher: z.ZodEnum<{
1129
+ any: "any";
1130
+ "type-violating": "type-violating";
1131
+ }>;
1132
+ }, z.core.$strict>]>>>;
1133
+ body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
1134
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
1135
+ }, z.core.$strict>, z.ZodObject<{
1136
+ matcher: z.ZodEnum<{
1137
+ any: "any";
1138
+ "type-violating": "type-violating";
1139
+ }>;
1140
+ }, z.core.$strict>]>>>;
1141
+ }, z.core.$strict>;
1142
+ }, z.core.$strict>;
1143
+ predicate: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
1144
+ }, z.core.$strict>;
1145
+ }, z.core.$strict>>;
801
1146
  }, z.core.$strict>], "expectedClean">;
802
1147
  readonly priorArt: 'h0-ground-truth';
803
1148
  readonly carriesLineage: true;
@@ -883,6 +1228,7 @@ export declare const INTERCHANGE_ARTIFACTS: {
883
1228
  material: "material";
884
1229
  }>;
885
1230
  confidenceThreshold: z.ZodNumber;
1231
+ catchThreshold: z.ZodNumber;
886
1232
  minimumTrialCount: z.ZodInt;
887
1233
  reExecutionCap: z.ZodInt;
888
1234
  remediationCap: z.ZodInt;
@@ -898,13 +1244,6 @@ export declare const INTERCHANGE_ARTIFACTS: {
898
1244
  revisionCount: z.ZodInt;
899
1245
  runId: z.ZodString;
900
1246
  scoringVersion: z.ZodString;
901
- scoringVersionInputs: z.ZodObject<{
902
- contractSchemaVersion: z.ZodInt;
903
- corpusDigest: z.ZodString;
904
- fixtureDigest: z.ZodString;
905
- evaluatorConfigurationDigest: z.ZodString;
906
- scoringPolicyDigest: z.ZodString;
907
- }, z.core.$strict>;
908
1247
  comparabilityKey: z.ZodString;
909
1248
  excludedProbeIds: z.ZodArray<z.ZodString>;
910
1249
  exitCode: z.ZodInt;
@@ -914,6 +1253,7 @@ export declare const INTERCHANGE_ARTIFACTS: {
914
1253
  corpusDigest: "corpusDigest";
915
1254
  evaluatorConfigurationDigest: "evaluatorConfigurationDigest";
916
1255
  fixtureDigest: "fixtureDigest";
1256
+ mode: "mode";
917
1257
  scoringPolicyDigest: "scoringPolicyDigest";
918
1258
  }>>;
919
1259
  trials: z.ZodObject<{
@@ -1008,6 +1348,14 @@ export declare const INTERCHANGE_ARTIFACTS: {
1008
1348
  noGap: z.ZodBoolean;
1009
1349
  }, z.core.$strict>;
1010
1350
  }, z.core.$strict>;
1351
+ scoringVersionInputs: z.ZodObject<{
1352
+ contractSchemaVersion: z.ZodInt;
1353
+ corpusDigest: z.ZodString;
1354
+ fixtureDigest: z.ZodString;
1355
+ evaluatorConfigurationDigest: z.ZodString;
1356
+ scoringPolicyDigest: z.ZodString;
1357
+ mode: z.ZodLiteral<"production">;
1358
+ }, z.core.$strict>;
1011
1359
  mode: z.ZodLiteral<"production">;
1012
1360
  productionVerdict: z.ZodEnum<{
1013
1361
  CONCERNS: "CONCERNS";
@@ -1021,13 +1369,6 @@ export declare const INTERCHANGE_ARTIFACTS: {
1021
1369
  revisionCount: z.ZodInt;
1022
1370
  runId: z.ZodString;
1023
1371
  scoringVersion: z.ZodString;
1024
- scoringVersionInputs: z.ZodObject<{
1025
- contractSchemaVersion: z.ZodInt;
1026
- corpusDigest: z.ZodString;
1027
- fixtureDigest: z.ZodString;
1028
- evaluatorConfigurationDigest: z.ZodString;
1029
- scoringPolicyDigest: z.ZodString;
1030
- }, z.core.$strict>;
1031
1372
  comparabilityKey: z.ZodString;
1032
1373
  excludedProbeIds: z.ZodArray<z.ZodString>;
1033
1374
  exitCode: z.ZodInt;
@@ -1037,6 +1378,7 @@ export declare const INTERCHANGE_ARTIFACTS: {
1037
1378
  corpusDigest: "corpusDigest";
1038
1379
  evaluatorConfigurationDigest: "evaluatorConfigurationDigest";
1039
1380
  fixtureDigest: "fixtureDigest";
1381
+ mode: "mode";
1040
1382
  scoringPolicyDigest: "scoringPolicyDigest";
1041
1383
  }>>;
1042
1384
  trials: z.ZodObject<{
@@ -1131,6 +1473,14 @@ export declare const INTERCHANGE_ARTIFACTS: {
1131
1473
  noGap: z.ZodBoolean;
1132
1474
  }, z.core.$strict>;
1133
1475
  }, z.core.$strict>;
1476
+ scoringVersionInputs: z.ZodObject<{
1477
+ contractSchemaVersion: z.ZodInt;
1478
+ corpusDigest: z.ZodString;
1479
+ fixtureDigest: z.ZodString;
1480
+ evaluatorConfigurationDigest: z.ZodString;
1481
+ scoringPolicyDigest: z.ZodString;
1482
+ mode: z.ZodLiteral<"contract-scoring">;
1483
+ }, z.core.$strict>;
1134
1484
  mode: z.ZodLiteral<"contract-scoring">;
1135
1485
  contractVerdict: z.ZodEnum<{
1136
1486
  CONCERNS: "CONCERNS";
@@ -1138,6 +1488,27 @@ export declare const INTERCHANGE_ARTIFACTS: {
1138
1488
  PASS: "PASS";
1139
1489
  WAIVED: "WAIVED";
1140
1490
  }>;
1491
+ uncitedFindingGaps: z.ZodArray<z.ZodObject<{
1492
+ findingId: z.ZodString;
1493
+ observationIds: z.ZodArray<z.ZodString>;
1494
+ quotedEvidence: z.ZodArray<z.ZodObject<{
1495
+ quote: z.ZodString;
1496
+ channel: z.ZodEnum<{
1497
+ "call-inputs": "call-inputs";
1498
+ "exit-code": "exit-code";
1499
+ "response-body": "response-body";
1500
+ "response-headers": "response-headers";
1501
+ "response-status": "response-status";
1502
+ stderr: "stderr";
1503
+ stdout: "stdout";
1504
+ }>;
1505
+ }, z.core.$strict>>;
1506
+ severity: z.ZodEnum<{
1507
+ critical: "critical";
1508
+ low: "low";
1509
+ material: "material";
1510
+ }>;
1511
+ }, z.core.$strict>>;
1141
1512
  systemRecommendationRecorded: z.ZodEnum<{
1142
1513
  CONCERNS: "CONCERNS";
1143
1514
  FAIL: "FAIL";
@@ -1,7 +1,9 @@
1
1
  /** the constraints the published JSON Schema cannot carry unaided. */
2
2
  import { INTERCHANGE_ARTIFACTS, } from './artifact.js';
3
+ import { PROBE_BINDING_CHANNEL_NON_EMPTY } from './defect-signature.js';
3
4
  import { TUPLE_ARITY } from './expression.js';
4
5
  import { BINDING_CHANNEL_NON_EMPTY } from './plan.js';
6
+ import { OBSERVATION_SEQUENCE_UNIQUE } from './sealed-run-record.js';
5
7
  // Verified on the pin: z.tuple([a, b]) exports `prefixItems` alone (no
6
8
  // minItems, maxItems, or items), so the published schema accepts the
7
9
  // one-operand and three-operand `equality` that Zod rejects. Arity is the one
@@ -139,5 +141,43 @@ export const CONSTRAINT_LEDGER = [
139
141
  operandTypeEntry,
140
142
  ...lineageEntries,
141
143
  ...secretsProhibitionEntries,
144
+ {
145
+ id: OBSERVATION_SEQUENCE_UNIQUE,
146
+ location: { kind: 'root', artifact: 'sealed-run-record' },
147
+ branch: null,
148
+ field: 'observations',
149
+ statement: "Every observation's `sequence` is unique within the record (ADR-006, owed item 2).",
150
+ disposition: {
151
+ kind: 'not-expressible',
152
+ reason: "Uniqueness of a nested field across sibling array items has no draft-2020-12 keyword: `uniqueItems` compares whole items structurally and nothing in the dialect can name one property path and require distinctness on it alone. Unlike the lineage biconditional above, this constraint IS enforced by Zod (a `.refine()` on `observations`), because owed item 2 requires it schema-enforced and the AD-13 differential corpus never manufactures two observations sharing a `sequence`: the generated mutant walk is keyword-driven (it perturbs one occurrence at a time) and never clones or duplicates an `observations` array item, since that field carries no `maxItems` for the generator's clone-to-exceed step to fire against. The gap is therefore real but inert against the corpus this repository generates, and is stated in `Observation.sequence`'s own description for a non-Zod consumer to reimplement. This safety argument holds only while `observations` carries no `maxItems`: adding one later starts the clone-to-exceed step firing against this field, and this entry must be re-verified then.",
153
+ },
154
+ },
155
+ {
156
+ id: 'defect-signature-required',
157
+ location: { kind: 'root', artifact: 'probe' },
158
+ branch: null,
159
+ field: null,
160
+ statement: 'Every probe that is not a known-clean control carries an AD-40 defect signature, except a probe whose class is `canary`, which carries `null`. AD-9\'s "an unqualified probe cannot enter a sealed set" and AD-9\'s route-per-class pairing are the same kind of rule and are enforced beside it.',
161
+ disposition: {
162
+ kind: 'not-expressible',
163
+ reason: 'A union-level `superRefine` is the only Zod spelling, and a refinement exports byte-identically, so Zod would reject a signature-less non-canary probe that ajv accepts. Unlike the observation-sequence entry above, that disagreement is not inert against the corpus this repository generates: the mutant generator manufactures the witness trivially from the accept fixture by nulling one field, and the published-schema differential check exists to fail on exactly such a disagreement. So the schema admits the shape and `qualifyProbe` (`core/score/qualification.ts`) returns a reason code, following `compile/interface-inventory.ts`, which put the declared-principal check in the compiler for the same reason. This argument holds only while the published export drops refinements: a Zod release that emitted a union-level refinement into the document, or a decision to inject a conditional here, makes the gate-side placement a choice rather than a necessity, and this entry must be re-verified then.',
164
+ },
165
+ },
166
+ {
167
+ id: PROBE_BINDING_CHANNEL_NON_EMPTY,
168
+ location: {
169
+ kind: 'definition',
170
+ artifact: 'probe',
171
+ name: 'ProbeInputBindingChannel',
172
+ },
173
+ branch: null,
174
+ field: null,
175
+ statement: "A declared channel of a defect signature's selector names at least one parameter. An unbound channel is `null`, never `{}`. Inject at the definition root, exactly as the contract-side channel does: `minProperties` is ignored on a non-object instance, so it constrains the object branch and leaves the null branch alone.",
176
+ disposition: {
177
+ kind: 'inject',
178
+ dialect: 'draft-2020-12',
179
+ keywords: { minProperties: 1 },
180
+ },
181
+ },
142
182
  ];
143
183
  export const constraintLedgerEntry = (id) => CONSTRAINT_LEDGER.find((entry) => entry.id === id);