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.
- package/README.md +142 -67
- package/corpus/dev/README.md +20 -13
- package/corpus/dev/compile-seal-example/brief.json +1 -1
- package/corpus/dev/compile-seal-example/contract.json +1 -1
- package/corpus/dev/contracts/absent-collection-locations.json +1 -1
- package/corpus/dev/contracts/absent-sibling-groups.json +1 -1
- package/corpus/dev/contracts/absent-success-indicator.json +1 -1
- package/corpus/dev/contracts/empty-channel-roles.json +1 -1
- package/corpus/dev/contracts/empty-collection-locations.json +1 -1
- package/corpus/dev/contracts/empty-request-shapes.json +1 -1
- package/corpus/dev/contracts/empty-sibling-groups.json +1 -1
- package/corpus/dev/contracts/fragment-selection.json +1 -0
- package/corpus/dev/contracts/no-collection-quantifier.json +1 -1
- package/corpus/dev/contracts/no-operation-inventory.json +1 -1
- package/corpus/dev/contracts/no-read-back-relation.json +1 -1
- package/corpus/dev/contracts/no-state-change-marker.json +1 -1
- package/corpus/dev/contracts/no-type-violating-step.json +1 -1
- package/corpus/dev/contracts/per-key-split-oracles.json +1 -1
- package/corpus/dev/contracts/review-corpus.json +1 -0
- package/corpus/dev/contracts/satisfied-declarations.json +1 -1
- package/corpus/dev/contracts/single-required-response-key.json +1 -1
- package/corpus/dev/contracts/split-indicator-oracle.json +1 -1
- package/corpus/dev/contracts/unaddressed-parameter-sibling.json +1 -1
- package/corpus/dev/contracts/unnamed-reference-set.json +1 -1
- package/corpus/dev/contracts/wrong-cardinality-form.json +1 -1
- package/corpus/dev/index.json +1 -1
- package/dist/application/index.d.ts +2 -0
- package/dist/application/index.js +1 -0
- package/dist/application/score.d.ts +48 -0
- package/dist/application/score.js +186 -0
- package/dist/cli/arguments.d.ts +7 -3
- package/dist/cli/arguments.js +73 -5
- package/dist/cli/exit-codes.d.ts +6 -2
- package/dist/cli/exit-codes.js +8 -9
- package/dist/cli/main.js +9 -0
- package/dist/cli/render.d.ts +3 -6
- package/dist/cli/render.js +57 -5
- package/dist/cli/run.d.ts +13 -3
- package/dist/cli/run.js +136 -16
- package/dist/core/canonical/canonicalize.d.ts +12 -0
- package/dist/core/canonical/canonicalize.js +18 -4
- package/dist/core/compile/bindings.d.ts +89 -0
- package/dist/core/compile/bindings.js +334 -0
- package/dist/core/compile/compile.d.ts +17 -0
- package/dist/core/compile/compile.js +37 -1
- package/dist/core/compile/excluded-content.d.ts +11 -0
- package/dist/core/compile/excluded-content.js +42 -0
- package/dist/core/compile/expression-legality.d.ts +49 -0
- package/dist/core/compile/expression-legality.js +158 -38
- package/dist/core/compile/forbidden-inputs.d.ts +8 -1
- package/dist/core/compile/forbidden-inputs.js +16 -3
- package/dist/core/compile/interface-inventory.d.ts +57 -2
- package/dist/core/compile/interface-inventory.js +119 -13
- package/dist/core/compile/reachability.d.ts +28 -1
- package/dist/core/compile/reachability.js +167 -35
- package/dist/core/compile/schema-version.d.ts +2 -0
- package/dist/core/compile/schema-version.js +25 -0
- package/dist/core/compile/sensitivity-witness.d.ts +31 -12
- package/dist/core/compile/sensitivity-witness.js +110 -23
- package/dist/core/compile/step-reference.d.ts +2 -0
- package/dist/core/compile/step-reference.js +49 -0
- package/dist/core/coverage/operations.d.ts +62 -0
- package/dist/core/coverage/operations.js +57 -0
- package/dist/core/coverage/relevance.d.ts +4 -2
- package/dist/core/coverage/relevance.js +22 -23
- package/dist/core/coverage/satisfaction.d.ts +2 -2
- package/dist/core/coverage/satisfaction.js +73 -48
- package/dist/core/declared-inputs.d.ts +83 -4
- package/dist/core/declared-inputs.js +105 -8
- package/dist/core/emit/emit.d.ts +9 -0
- package/dist/core/emit/emit.js +214 -0
- package/dist/core/emit/private-artifact-digest.d.ts +11 -0
- package/dist/core/emit/private-artifact-digest.js +31 -0
- package/dist/core/evaluate/evidence-resolution.d.ts +10 -3
- package/dist/core/evaluate/evidence-resolution.js +74 -11
- package/dist/core/evaluate/operators.d.ts +22 -0
- package/dist/core/evaluate/operators.js +17 -1
- package/dist/core/evaluate/resolution.d.ts +14 -3
- package/dist/core/evaluate/resolution.js +63 -3
- package/dist/core/excluded-content.d.ts +65 -0
- package/dist/core/excluded-content.js +113 -0
- package/dist/core/failure-codes.d.ts +2 -2
- package/dist/core/failure-codes.js +7 -2
- package/dist/core/ingest/conditions.d.ts +201 -0
- package/dist/core/ingest/conditions.js +48 -0
- package/dist/core/ingest/index.d.ts +13 -0
- package/dist/core/ingest/index.js +11 -0
- package/dist/core/ingest/ingest.d.ts +68 -0
- package/dist/core/ingest/ingest.js +318 -0
- package/dist/core/lineage/stage-table.d.ts +21 -4
- package/dist/core/lineage/stage-table.js +35 -3
- package/dist/core/preflight/plan.d.ts +7 -5
- package/dist/core/preflight/plan.js +75 -32
- package/dist/core/preflight/projection.d.ts +6 -3
- package/dist/core/preflight/projection.js +22 -2
- package/dist/core/preflight/reduce.js +47 -7
- package/dist/core/preflight/witness-evidence.d.ts +5 -5
- package/dist/core/preflight/witness-evidence.js +73 -20
- package/dist/core/schemas/artifact.d.ts +1049 -30
- package/dist/core/schemas/constraint-ledger.js +51 -0
- package/dist/core/schemas/defect-signature.d.ts +695 -0
- package/dist/core/schemas/defect-signature.js +175 -0
- package/dist/core/schemas/eval-contract.d.ts +550 -12
- package/dist/core/schemas/eval-contract.js +32 -2
- package/dist/core/schemas/evidence-artifact.d.ts +109 -19
- package/dist/core/schemas/evidence-artifact.js +64 -8
- package/dist/core/schemas/interface.d.ts +741 -13
- package/dist/core/schemas/interface.js +120 -7
- package/dist/core/schemas/isolation-manifest.js +16 -9
- package/dist/core/schemas/plan.d.ts +329 -3
- package/dist/core/schemas/plan.js +89 -3
- package/dist/core/schemas/pointer.d.ts +47 -1
- package/dist/core/schemas/pointer.js +89 -8
- package/dist/core/schemas/port-messages.d.ts +194 -10
- package/dist/core/schemas/port-messages.js +73 -6
- package/dist/core/schemas/probe-body.d.ts +18 -0
- package/dist/core/schemas/probe-body.js +13 -0
- package/dist/core/schemas/probe-qualification.d.ts +168 -0
- package/dist/core/schemas/probe-qualification.js +106 -0
- package/dist/core/schemas/probe.d.ts +431 -0
- package/dist/core/schemas/probe.js +6 -2
- package/dist/core/schemas/scoring-policy.d.ts +1 -0
- package/dist/core/schemas/scoring-policy.js +6 -1
- package/dist/core/schemas/sealed-evaluator-brief.d.ts +1 -0
- package/dist/core/schemas/sealed-evaluator-brief.js +4 -1
- package/dist/core/schemas/sealed-run-record.d.ts +161 -12
- package/dist/core/schemas/sealed-run-record.js +92 -15
- package/dist/core/schemas/sensitivity-witness.d.ts +108 -6
- package/dist/core/schemas/sensitivity-witness.js +61 -5
- package/dist/core/score/binding-order.d.ts +31 -0
- package/dist/core/score/binding-order.js +88 -0
- package/dist/core/score/bindings.d.ts +93 -0
- package/dist/core/score/bindings.js +309 -0
- package/dist/core/score/ladder-table.d.ts +23 -0
- package/dist/core/score/ladder-table.js +109 -0
- package/dist/core/score/ladder.d.ts +229 -0
- package/dist/core/score/ladder.js +464 -0
- package/dist/core/score/mode-agreement.d.ts +30 -0
- package/dist/core/score/mode-agreement.js +16 -0
- package/dist/core/score/outcome-table.d.ts +17 -0
- package/dist/core/score/outcome-table.js +172 -0
- package/dist/core/score/outcome.d.ts +466 -0
- package/dist/core/score/outcome.js +562 -0
- package/dist/core/score/qualification.d.ts +83 -0
- package/dist/core/score/qualification.js +645 -0
- package/dist/core/score/quotation.d.ts +56 -0
- package/dist/core/score/quotation.js +226 -0
- package/dist/core/score/reduce-trials.d.ts +80 -0
- package/dist/core/score/reduce-trials.js +90 -0
- package/dist/core/score/score.d.ts +72 -0
- package/dist/core/score/score.js +607 -0
- package/dist/core/score/selection.d.ts +80 -0
- package/dist/core/score/selection.js +98 -0
- package/dist/core/score/strength.d.ts +58 -0
- package/dist/core/score/strength.js +227 -0
- package/dist/core/score/witness.d.ts +138 -0
- package/dist/core/score/witness.js +320 -0
- package/dist/core/seal/derived-reference.d.ts +2 -9
- package/dist/core/seal/derived-reference.js +293 -46
- package/dist/core/seal/plan-index.d.ts +18 -3
- package/dist/core/seal/plan-index.js +44 -8
- package/dist/core/seal/seal.js +8 -3
- package/dist/core/stage-contracts.d.ts +62 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/ports/environment-probe-port.d.ts +60 -4
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +1 -0
- package/dist/testing/probe-conformance.d.ts +29 -0
- package/dist/testing/probe-conformance.js +34 -5
- package/package.json +12 -3
- package/schemas/eval-contract.schema.json +1787 -797
- package/schemas/evidence-artifact.schema.json +126 -9
- package/schemas/isolation-manifest.schema.json +17 -10
- package/schemas/probe.schema.json +636 -5
- package/schemas/rubric.schema.json +1 -1
- package/schemas/scoring-policy.schema.json +8 -1
- package/schemas/sealed-evaluator-brief.schema.json +11 -1
- package/schemas/sealed-run-record.schema.json +314 -40
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
},
|
|
96
96
|
"evidence": {
|
|
97
97
|
"type": "string",
|
|
98
|
-
"pattern": "^\\/interactions\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/(?:(?:response-body|response-headers|stdout|stderr)(?:\\/(?:[^/~]|~[01])*)*|(?:response-status|exit-code)|call-inputs\\/(?:path|query|header|body)(?:\\/(?:[^/~]|~[01])*)*)$",
|
|
98
|
+
"pattern": "^\\/interactions\\/[a-z0-9]+(?:-[a-z0-9]+)*\\/(?:(?:response-body|response-headers|stdout|stderr)(?:\\/(?:[^/~]|~[01])*)*|(?:response-status|exit-code)|call-inputs\\/(?:path|query|header|body|argument|option|environment|stdin)(?:\\/(?:[^/~]|~[01])*)*|artifact\\/[a-z0-9]+(?:-[a-z0-9]+)*(?:\\/(?:[^/~]|~[01])*)*)$",
|
|
99
99
|
"description": "Where the criterion is answerable from. A pointer that resolves nowhere is `rubric-evidence-unreachable`, a compile-time code, and is deliberately not a schema rejection."
|
|
100
100
|
}
|
|
101
101
|
},
|
|
@@ -48,6 +48,12 @@
|
|
|
48
48
|
"maximum": 1,
|
|
49
49
|
"description": "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."
|
|
50
50
|
},
|
|
51
|
+
"catchThreshold": {
|
|
52
|
+
"type": "number",
|
|
53
|
+
"minimum": 0,
|
|
54
|
+
"maximum": 1,
|
|
55
|
+
"description": "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."
|
|
56
|
+
},
|
|
51
57
|
"minimumTrialCount": {
|
|
52
58
|
"type": "integer",
|
|
53
59
|
"minimum": 1,
|
|
@@ -80,11 +86,12 @@
|
|
|
80
86
|
"policyId",
|
|
81
87
|
"severityFloor",
|
|
82
88
|
"confidenceThreshold",
|
|
89
|
+
"catchThreshold",
|
|
83
90
|
"minimumTrialCount",
|
|
84
91
|
"reExecutionCap",
|
|
85
92
|
"remediationCap",
|
|
86
93
|
"regexMatchStepBudget"
|
|
87
94
|
],
|
|
88
95
|
"additionalProperties": false,
|
|
89
|
-
"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
|
|
96
|
+
"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."
|
|
90
97
|
}
|
|
@@ -203,6 +203,15 @@
|
|
|
203
203
|
},
|
|
204
204
|
"description": "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."
|
|
205
205
|
},
|
|
206
|
+
"principals": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"items": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
211
|
+
"description": "A kebab-case slug. Excludes \"/\" and \"~\" so an identifier can be embedded in an interaction-rooted pointer without escaping."
|
|
212
|
+
},
|
|
213
|
+
"description": "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."
|
|
214
|
+
},
|
|
206
215
|
"budgets": {
|
|
207
216
|
"type": "object",
|
|
208
217
|
"properties": {
|
|
@@ -259,10 +268,11 @@
|
|
|
259
268
|
"directions",
|
|
260
269
|
"permittedInterfaces",
|
|
261
270
|
"scopedResources",
|
|
271
|
+
"principals",
|
|
262
272
|
"budgets",
|
|
263
273
|
"safetyLimits",
|
|
264
274
|
"probeStepBound"
|
|
265
275
|
],
|
|
266
276
|
"additionalProperties": false,
|
|
267
|
-
"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,
|
|
277
|
+
"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."
|
|
268
278
|
}
|
|
@@ -38,6 +38,14 @@
|
|
|
38
38
|
"minLength": 1,
|
|
39
39
|
"description": "An opaque caller label with no product semantics, per AD-24. The prior art's five-member enum does not survive, and its own extension history is the reason: an enum a local amendment had to widen once for `self-review` will be widened again."
|
|
40
40
|
},
|
|
41
|
+
"mode": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": [
|
|
44
|
+
"production",
|
|
45
|
+
"contract-scoring"
|
|
46
|
+
],
|
|
47
|
+
"description": "AD-21's run mode, supplied by the caller on the record and never derived, recomputed, or defaulted afterwards. AD-21 requires mode to be \"fixed before ingest\", and owed item 4 records what its absence costs: the same sealed run could be relabelled after ingest and scored under the same scoring version. Required rather than optional, which makes this a BREAKING `schemaVersion` 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\". A version-1 record carries no mode, and no default may repair one into a version-2 record, because a defaulted mode is the relabelling this field exists to stop. A record presenting no mode fails to parse, which AD-28 makes a `schema-parse-failure` fault rather than an AD-21 verdict or an AD-5 code, the same routing `evaluatorRecommendation` already records for an unrecognised value. This field is where mode is read from; the evidence artifact restates it and is never the source."
|
|
48
|
+
},
|
|
41
49
|
"trialIndex": {
|
|
42
50
|
"type": "integer",
|
|
43
51
|
"minimum": 1,
|
|
@@ -124,6 +132,12 @@
|
|
|
124
132
|
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
125
133
|
"description": "A kebab-case slug. Excludes \"/\" and \"~\" so an identifier can be embedded in an interaction-rooted pointer without escaping."
|
|
126
134
|
},
|
|
135
|
+
"sequence": {
|
|
136
|
+
"type": "integer",
|
|
137
|
+
"exclusiveMinimum": 0,
|
|
138
|
+
"maximum": 9007199254740991,
|
|
139
|
+
"description": "The total order ADR-006 forbids reading off array position (owed item 2). A positive integer, unique across every observation in the same record: uniqueness is what a sorted-by-`sequence` read needs to be strictly increasing, so no separate monotonicity check is required. Neither starting at 1 nor contiguous is required across a record: only positivity and per-record uniqueness are enforced, so a record whose sequences are e.g. [5, 12, 40] is equally valid. Required rather than optional, which makes this a BREAKING `schemaVersion` bump under AD-11: adding an optional field is additive, and this field is not optional. A record with an absent or duplicated `sequence` fails to parse."
|
|
140
|
+
},
|
|
127
141
|
"operationId": {
|
|
128
142
|
"type": "string",
|
|
129
143
|
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
@@ -137,6 +151,19 @@
|
|
|
137
151
|
],
|
|
138
152
|
"description": "AD-23: `baseline` for a pre-canned or deterministic test, `evaluator-chosen` for an action the evaluator selected. The distinction is the one the product's central finding rests on: what a sealed evaluator detects beyond the pre-canned baseline. It lives on the observation, never on the finding."
|
|
139
153
|
},
|
|
154
|
+
"principal": {
|
|
155
|
+
"anyOf": [
|
|
156
|
+
{
|
|
157
|
+
"type": "string",
|
|
158
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
159
|
+
"description": "A kebab-case slug. Excludes \"/\" and \"~\" so an identifier can be embedded in an interaction-rooted pointer without escaping."
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "null"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"description": "The declared principal the harness acted as, or `null` where the run named none. Owed item 3's other half: a `{ principal }` input binding is presence-only by construction, since the contract declares a name and the harness provisions the value, so without this field two steps of one operation binding `owner` and `other-user` both match every observation and both resolve `several`. That is exactly the act-as-A-read-as-B shape the two critical-severity cross-user behaviours need, and it was unscoreable while the record said nothing about which account was used. An opaque label carrying no account identifier or credential, on `testData.principals`' own AD-18 terms."
|
|
166
|
+
},
|
|
140
167
|
"callInputs": {
|
|
141
168
|
"type": "object",
|
|
142
169
|
"properties": {
|
|
@@ -203,13 +230,81 @@
|
|
|
203
230
|
"type": "null"
|
|
204
231
|
}
|
|
205
232
|
]
|
|
233
|
+
},
|
|
234
|
+
"argument": {
|
|
235
|
+
"anyOf": [
|
|
236
|
+
{
|
|
237
|
+
"type": "object",
|
|
238
|
+
"propertyNames": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
},
|
|
241
|
+
"additionalProperties": {
|
|
242
|
+
"$ref": "#/$defs/JsonValue"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"type": "null"
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"option": {
|
|
251
|
+
"anyOf": [
|
|
252
|
+
{
|
|
253
|
+
"type": "object",
|
|
254
|
+
"propertyNames": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"additionalProperties": {
|
|
258
|
+
"$ref": "#/$defs/JsonValue"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"type": "null"
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
"environment": {
|
|
267
|
+
"anyOf": [
|
|
268
|
+
{
|
|
269
|
+
"type": "object",
|
|
270
|
+
"propertyNames": {
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"additionalProperties": {
|
|
274
|
+
"$ref": "#/$defs/JsonValue"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"type": "null"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
"stdin": {
|
|
283
|
+
"anyOf": [
|
|
284
|
+
{
|
|
285
|
+
"type": "object",
|
|
286
|
+
"propertyNames": {
|
|
287
|
+
"type": "string"
|
|
288
|
+
},
|
|
289
|
+
"additionalProperties": {
|
|
290
|
+
"$ref": "#/$defs/JsonValue"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"type": "null"
|
|
295
|
+
}
|
|
296
|
+
]
|
|
206
297
|
}
|
|
207
298
|
},
|
|
208
299
|
"required": [
|
|
209
300
|
"path",
|
|
210
301
|
"query",
|
|
211
302
|
"header",
|
|
212
|
-
"body"
|
|
303
|
+
"body",
|
|
304
|
+
"argument",
|
|
305
|
+
"option",
|
|
306
|
+
"environment",
|
|
307
|
+
"stdin"
|
|
213
308
|
],
|
|
214
309
|
"additionalProperties": false
|
|
215
310
|
},
|
|
@@ -255,24 +350,108 @@
|
|
|
255
350
|
"description": "Deliberately not bounded to a protocol range. A negative status is meaningless and excluded, but the upper end is left open: AD-19 declares four interface kinds and v0 rejects three of them at compile time under `unsupported-interface-kind`, so bounding this to HTTP would encode a protocol assumption the artifact outlives. `null` where the channel does not apply."
|
|
256
351
|
},
|
|
257
352
|
"stdout": {
|
|
258
|
-
"
|
|
353
|
+
"oneOf": [
|
|
259
354
|
{
|
|
260
|
-
"type": "
|
|
355
|
+
"type": "object",
|
|
356
|
+
"properties": {
|
|
357
|
+
"kind": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"const": "json"
|
|
360
|
+
},
|
|
361
|
+
"value": {
|
|
362
|
+
"$ref": "#/$defs/JsonValue"
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"required": [
|
|
366
|
+
"kind",
|
|
367
|
+
"value"
|
|
368
|
+
],
|
|
369
|
+
"additionalProperties": false
|
|
261
370
|
},
|
|
262
371
|
{
|
|
263
|
-
"type": "
|
|
372
|
+
"type": "object",
|
|
373
|
+
"properties": {
|
|
374
|
+
"kind": {
|
|
375
|
+
"type": "string",
|
|
376
|
+
"const": "text"
|
|
377
|
+
},
|
|
378
|
+
"value": {
|
|
379
|
+
"type": "string"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"required": [
|
|
383
|
+
"kind",
|
|
384
|
+
"value"
|
|
385
|
+
],
|
|
386
|
+
"additionalProperties": false
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"type": "object",
|
|
390
|
+
"properties": {
|
|
391
|
+
"kind": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"const": "absent"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"required": [
|
|
397
|
+
"kind"
|
|
398
|
+
],
|
|
399
|
+
"additionalProperties": false
|
|
264
400
|
}
|
|
265
|
-
]
|
|
401
|
+
],
|
|
402
|
+
"description": "AD-26's `stdout` channel, tagged rather than a bare string. An operation may nominate standard output as the channel its response descriptor describes, in which case a pointer descends into it, and an untagged string could not tell output that was JSON from output that was only ever text. `{ \"kind\": \"absent\" }` is the channel a run did not observe."
|
|
266
403
|
},
|
|
267
404
|
"stderr": {
|
|
268
|
-
"
|
|
405
|
+
"oneOf": [
|
|
269
406
|
{
|
|
270
|
-
"type": "
|
|
407
|
+
"type": "object",
|
|
408
|
+
"properties": {
|
|
409
|
+
"kind": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"const": "json"
|
|
412
|
+
},
|
|
413
|
+
"value": {
|
|
414
|
+
"$ref": "#/$defs/JsonValue"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"required": [
|
|
418
|
+
"kind",
|
|
419
|
+
"value"
|
|
420
|
+
],
|
|
421
|
+
"additionalProperties": false
|
|
271
422
|
},
|
|
272
423
|
{
|
|
273
|
-
"type": "
|
|
424
|
+
"type": "object",
|
|
425
|
+
"properties": {
|
|
426
|
+
"kind": {
|
|
427
|
+
"type": "string",
|
|
428
|
+
"const": "text"
|
|
429
|
+
},
|
|
430
|
+
"value": {
|
|
431
|
+
"type": "string"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"required": [
|
|
435
|
+
"kind",
|
|
436
|
+
"value"
|
|
437
|
+
],
|
|
438
|
+
"additionalProperties": false
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"type": "object",
|
|
442
|
+
"properties": {
|
|
443
|
+
"kind": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"const": "absent"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"required": [
|
|
449
|
+
"kind"
|
|
450
|
+
],
|
|
451
|
+
"additionalProperties": false
|
|
274
452
|
}
|
|
275
|
-
]
|
|
453
|
+
],
|
|
454
|
+
"description": "AD-26's `stderr` channel, tagged on the same terms as `stdout`."
|
|
276
455
|
},
|
|
277
456
|
"exitCode": {
|
|
278
457
|
"anyOf": [
|
|
@@ -286,22 +465,86 @@
|
|
|
286
465
|
}
|
|
287
466
|
],
|
|
288
467
|
"description": "Signed on purpose, unlike `responseStatus`: a process terminated by a signal is conventionally reported as a negative code, and this field records what was observed rather than what is tidy."
|
|
468
|
+
},
|
|
469
|
+
"artifacts": {
|
|
470
|
+
"type": "object",
|
|
471
|
+
"propertyNames": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
474
|
+
"description": "A kebab-case slug. Excludes \"/\" and \"~\" so an identifier can be embedded in an interaction-rooted pointer without escaping."
|
|
475
|
+
},
|
|
476
|
+
"additionalProperties": {
|
|
477
|
+
"oneOf": [
|
|
478
|
+
{
|
|
479
|
+
"type": "object",
|
|
480
|
+
"properties": {
|
|
481
|
+
"kind": {
|
|
482
|
+
"type": "string",
|
|
483
|
+
"const": "json"
|
|
484
|
+
},
|
|
485
|
+
"value": {
|
|
486
|
+
"$ref": "#/$defs/JsonValue"
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"required": [
|
|
490
|
+
"kind",
|
|
491
|
+
"value"
|
|
492
|
+
],
|
|
493
|
+
"additionalProperties": false
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"type": "object",
|
|
497
|
+
"properties": {
|
|
498
|
+
"kind": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"const": "text"
|
|
501
|
+
},
|
|
502
|
+
"value": {
|
|
503
|
+
"type": "string"
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"required": [
|
|
507
|
+
"kind",
|
|
508
|
+
"value"
|
|
509
|
+
],
|
|
510
|
+
"additionalProperties": false
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"type": "object",
|
|
514
|
+
"properties": {
|
|
515
|
+
"kind": {
|
|
516
|
+
"type": "string",
|
|
517
|
+
"const": "absent"
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"required": [
|
|
521
|
+
"kind"
|
|
522
|
+
],
|
|
523
|
+
"additionalProperties": false
|
|
524
|
+
}
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
"description": "AD-26's `artifact` channel, keyed by the identifier the operation declares it writes, which is the segment an artifact pointer carries before its tail. Caller-keyed and expected to be partial: a run that wrote no files carries `{}`. Tagged on the same terms as `stdout`, since a written report may be JSON, may be prose, and may not have been written at all."
|
|
289
528
|
}
|
|
290
529
|
},
|
|
291
530
|
"required": [
|
|
292
531
|
"observationId",
|
|
532
|
+
"sequence",
|
|
293
533
|
"operationId",
|
|
294
534
|
"provenance",
|
|
535
|
+
"principal",
|
|
295
536
|
"callInputs",
|
|
296
537
|
"responseBody",
|
|
297
538
|
"responseHeaders",
|
|
298
539
|
"responseStatus",
|
|
299
540
|
"stdout",
|
|
300
541
|
"stderr",
|
|
301
|
-
"exitCode"
|
|
542
|
+
"exitCode",
|
|
543
|
+
"artifacts"
|
|
302
544
|
],
|
|
303
545
|
"additionalProperties": false
|
|
304
|
-
}
|
|
546
|
+
},
|
|
547
|
+
"description": "Per-observation `sequence` uniqueness is enforced here. The published JSON Schema dialect has no keyword for uniqueness of a nested field across array items, so this constraint is Zod-only: a non-Zod consumer must reimplement it, exactly as with any other cross-item invariant this dialect cannot state."
|
|
305
548
|
},
|
|
306
549
|
"judgeResults": {
|
|
307
550
|
"type": "array",
|
|
@@ -327,7 +570,7 @@
|
|
|
327
570
|
"type": "null"
|
|
328
571
|
}
|
|
329
572
|
],
|
|
330
|
-
"description": "An integer, because AD-22 puts the scale on the rubric's own anchored levels and `ScaleLevel.level` is already `z.int()`; no second scale is minted here. `null` is the shape AD-6's `judge-error` fires on, so it must parse. That the criterion is one the cited rubric
|
|
573
|
+
"description": "An integer, because AD-22 puts the scale on the rubric's own anchored levels and `ScaleLevel.level` is already `z.int()`; no second scale is minted here. `null` is the shape AD-6's `judge-error` fires on, so it must parse. Two AD-17 rules sit over this field and only one of them is decidable from a record. That a criterion is scored at most once IS: `core/ingest` reports a repeated `rubricId`/`criterionId` pair as a `duplicate-record-identifier` condition, since a criterion scored twice is not one judge call's product whatever else the record says. That a scored criterion is one the cited rubric DECLARES is not, and never will be from inside this package: the rubric is not among ingest's declared inputs, no stage row names it, and a schema over one artifact has no second operand. That half is the caller's, on the same terms AD-12 states for the remediation cap, and it is a stated boundary rather than an unimplemented rule."
|
|
331
574
|
},
|
|
332
575
|
"note": {
|
|
333
576
|
"anyOf": [
|
|
@@ -438,6 +681,7 @@
|
|
|
438
681
|
"revisionCount",
|
|
439
682
|
"runId",
|
|
440
683
|
"conditionArm",
|
|
684
|
+
"mode",
|
|
441
685
|
"trialIndex",
|
|
442
686
|
"contractDigest",
|
|
443
687
|
"sealedBriefDigest",
|
|
@@ -454,7 +698,7 @@
|
|
|
454
698
|
"invalidReason"
|
|
455
699
|
],
|
|
456
700
|
"additionalProperties": false,
|
|
457
|
-
"description": "One sealed evaluator trial, as the caller presents it. Succeeds the prior-art `h0-run-result` schema per AD-24, keeping its run identifier, condition arm, findings, action-log reference, resource use, invalidation reason, evaluator recommendation as a closed enum, and per-finding confidence on a declared scale. Divergences: `condition` is demoted to the opaque `conditionArm`, `verdict` becomes `evaluatorRecommendation` without `NOT_APPLICABLE`, money is a decimal string, and `taskId`, `note`, and per-finding `actionIds` do not survive: the contract is pinned by `contractDigest`, an unstructured orchestrator annotation is the free-prose channel the Conventions close everywhere else, and two citation vocabularies on one finding is the ambiguity ADR-009 removed.
|
|
701
|
+
"description": "One sealed evaluator trial, as the caller presents it. Succeeds the prior-art `h0-run-result` schema per AD-24, keeping its run identifier, condition arm, findings, action-log reference, resource use, invalidation reason, evaluator recommendation as a closed enum, and per-finding confidence on a declared scale. Divergences: `condition` is demoted to the opaque `conditionArm`, `verdict` becomes `evaluatorRecommendation` without `NOT_APPLICABLE`, money is a decimal string, and `taskId`, `note`, and per-finding `actionIds` do not survive: the contract is pinned by `contractDigest`, an unstructured orchestrator annotation is the free-prose channel the Conventions close everywhere else, and two citation vocabularies on one finding is the ambiguity ADR-009 removed. The run MODE landed here as a required field under a BREAKING `schemaVersion` bump, which is where AD-21's \"fixed before ingest\" puts it; owed item 4 is now closed: mode enters AD-11's identity inputs as `ScoringVersionInputs`'s sixth field, and `core/score/ladder.ts` carries `ProductionAssessment`/`ContractAssessment` as the two assessment input types with their own total ladders. Observation ORDERING landed here too, under its own BREAKING `schemaVersion` bump: `sequence` is required and unique per record, closing owed item 2's ADR-006 gap, since array position was never a legal ordering. Version 4 opened the record to a system under test that runs behind a command: `callInputs` carries the four command channels beside the four transport ones, `stdout` and `stderr` are tagged rather than bare strings so a nominated output channel can be descended into, and `artifacts` records the files the run wrote, keyed by the identifier the operation declares.",
|
|
458
702
|
"$defs": {
|
|
459
703
|
"EvaluatorRecommendation": {
|
|
460
704
|
"type": "string",
|
|
@@ -546,22 +790,65 @@
|
|
|
546
790
|
"minItems": 1,
|
|
547
791
|
"type": "array",
|
|
548
792
|
"items": {
|
|
549
|
-
"
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
"
|
|
553
|
-
|
|
554
|
-
|
|
793
|
+
"anyOf": [
|
|
794
|
+
{
|
|
795
|
+
"type": "object",
|
|
796
|
+
"properties": {
|
|
797
|
+
"quote": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"minLength": 1,
|
|
800
|
+
"description": "The evaluator's verbatim quotation, per AD-23. Non-empty: an empty quotation quotes nothing, no AD-5 code names the condition, and under the admit-rule's second clause the schema is therefore the enforcement point. That this text appears in at least one of the finding's cited observations is NOT checked here; it is an AD-32 declared-versus-observed inconsistency that invalidates at ingest, and ADR-009 Decision 2 settles the precedence: \"cited identifiers govern the witness match; quotation audits it.\""
|
|
801
|
+
},
|
|
802
|
+
"channel": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"const": "artifact"
|
|
805
|
+
},
|
|
806
|
+
"artifactId": {
|
|
807
|
+
"type": "string",
|
|
808
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
809
|
+
"description": "Which written file the quotation came from. A channel alone does not identify one: an operation may write several, and an audit that searched all of them at once accepted a quotation lifted from a file the finding never cited, which is the opposite of what AD-23's verbatim requirement is for."
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
"required": [
|
|
813
|
+
"quote",
|
|
814
|
+
"channel",
|
|
815
|
+
"artifactId"
|
|
816
|
+
],
|
|
817
|
+
"additionalProperties": false
|
|
555
818
|
},
|
|
556
|
-
|
|
557
|
-
"
|
|
819
|
+
{
|
|
820
|
+
"type": "object",
|
|
821
|
+
"properties": {
|
|
822
|
+
"quote": {
|
|
823
|
+
"type": "string",
|
|
824
|
+
"minLength": 1,
|
|
825
|
+
"description": "The evaluator's verbatim quotation, per AD-23. Non-empty: an empty quotation quotes nothing, no AD-5 code names the condition, and under the admit-rule's second clause the schema is therefore the enforcement point. That this text appears in at least one of the finding's cited observations is NOT checked here; it is an AD-32 declared-versus-observed inconsistency that invalidates at ingest, and ADR-009 Decision 2 settles the precedence: \"cited identifiers govern the witness match; quotation audits it.\""
|
|
826
|
+
},
|
|
827
|
+
"channel": {
|
|
828
|
+
"type": "string",
|
|
829
|
+
"enum": [
|
|
830
|
+
"response-body",
|
|
831
|
+
"response-headers",
|
|
832
|
+
"response-status",
|
|
833
|
+
"call-inputs",
|
|
834
|
+
"stdout",
|
|
835
|
+
"stderr",
|
|
836
|
+
"exit-code"
|
|
837
|
+
]
|
|
838
|
+
},
|
|
839
|
+
"artifactId": {
|
|
840
|
+
"type": "null",
|
|
841
|
+
"description": "Null on every channel but `artifact`, and required rather than optional so a record cannot omit the question. Only a written file needs naming; every other channel is one thing per observation."
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"required": [
|
|
845
|
+
"quote",
|
|
846
|
+
"channel",
|
|
847
|
+
"artifactId"
|
|
848
|
+
],
|
|
849
|
+
"additionalProperties": false
|
|
558
850
|
}
|
|
559
|
-
|
|
560
|
-
"required": [
|
|
561
|
-
"quote",
|
|
562
|
-
"channel"
|
|
563
|
-
],
|
|
564
|
-
"additionalProperties": false
|
|
851
|
+
]
|
|
565
852
|
},
|
|
566
853
|
"description": "Required and non-empty on this branch alone, per AD-23. Only `defect` findings enter a detection measure, and a detection claim with no quotation is the shape AD-40 records revision 4 having no way to match."
|
|
567
854
|
}
|
|
@@ -826,19 +1113,6 @@
|
|
|
826
1113
|
],
|
|
827
1114
|
"description": "A reference to an artifact, public by path or private by opaque handle. Succeeds the prior-art `artifact-ref` schema per AD-24, with its two `if`/`then` branches re-expressed as a discriminated union per AD-13 and its `sha256` field renamed to `digest` against the shared AD-27 primitive. Alone among the twelve interchange artifacts this one carries NO `schemaVersion` and NO AD-29 lineage: it is a reference shape embedded inside other artifacts rather than one that crosses the package boundary alone, so versioning it would add a key to every finding and every manifest entry for no reader. It is in the inventory because it is published, not because it is exchanged; the exemption is asserted by a test against the registry's `carriesLineage` flag."
|
|
828
1115
|
},
|
|
829
|
-
"EvidenceChannel": {
|
|
830
|
-
"type": "string",
|
|
831
|
-
"enum": [
|
|
832
|
-
"response-body",
|
|
833
|
-
"response-headers",
|
|
834
|
-
"response-status",
|
|
835
|
-
"call-inputs",
|
|
836
|
-
"stdout",
|
|
837
|
-
"stderr",
|
|
838
|
-
"exit-code"
|
|
839
|
-
],
|
|
840
|
-
"description": "AD-26's closed evidence channel vocabulary. The same seven the interaction-rooted pointer addresses; a channel outside this set is a syntax error rather than an unreachable-evidence finding."
|
|
841
|
-
},
|
|
842
1116
|
"JsonValue": {
|
|
843
1117
|
"description": "AD-36 value domain. Every number is a finite IEEE 754 double-precision value, and every integer lies in the safe-integer range; a larger integer, and any value needing exact decimal semantics such as money, is carried as a string in its own declared format. JSON Schema cannot express finiteness, so this restriction is stated rather than encoded: producers are told the rule here instead of discovering it through a digest mismatch, and the canonical scanner rejects a violating value before any parse.",
|
|
844
1118
|
"anyOf": [
|