eval-quality 0.1.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/LICENSE +190 -0
- package/README.md +355 -0
- package/corpus/dev/README.md +36 -0
- package/corpus/dev/compile-seal-example/brief.json +1 -0
- package/corpus/dev/compile-seal-example/contract.json +1 -0
- package/corpus/dev/contracts/absent-collection-locations.json +1 -0
- package/corpus/dev/contracts/absent-sibling-groups.json +1 -0
- package/corpus/dev/contracts/absent-success-indicator.json +1 -0
- package/corpus/dev/contracts/empty-channel-roles.json +1 -0
- package/corpus/dev/contracts/empty-collection-locations.json +1 -0
- package/corpus/dev/contracts/empty-request-shapes.json +1 -0
- package/corpus/dev/contracts/empty-sibling-groups.json +1 -0
- package/corpus/dev/contracts/no-collection-quantifier.json +1 -0
- package/corpus/dev/contracts/no-operation-inventory.json +1 -0
- package/corpus/dev/contracts/no-read-back-relation.json +1 -0
- package/corpus/dev/contracts/no-state-change-marker.json +1 -0
- package/corpus/dev/contracts/no-type-violating-step.json +1 -0
- package/corpus/dev/contracts/per-key-split-oracles.json +1 -0
- package/corpus/dev/contracts/satisfied-declarations.json +1 -0
- package/corpus/dev/contracts/single-required-response-key.json +1 -0
- package/corpus/dev/contracts/split-indicator-oracle.json +1 -0
- package/corpus/dev/contracts/unaddressed-parameter-sibling.json +1 -0
- package/corpus/dev/contracts/unnamed-reference-set.json +1 -0
- package/corpus/dev/contracts/wrong-cardinality-form.json +1 -0
- package/corpus/dev/index.json +1 -0
- package/dist/adapters/index.d.ts +12 -0
- package/dist/adapters/index.js +3 -0
- package/dist/adapters/local-corpus-adapter.d.ts +7 -0
- package/dist/adapters/local-corpus-adapter.js +78 -0
- package/dist/adapters/node-file-system-adapter.d.ts +7 -0
- package/dist/adapters/node-file-system-adapter.js +39 -0
- package/dist/adapters/port-boundary.d.ts +18 -0
- package/dist/adapters/port-boundary.js +83 -0
- package/dist/adapters/system-clock-adapter.d.ts +10 -0
- package/dist/adapters/system-clock-adapter.js +18 -0
- package/dist/application/compile.d.ts +4 -0
- package/dist/application/compile.js +24 -0
- package/dist/application/diagnostics.d.ts +22 -0
- package/dist/application/diagnostics.js +18 -0
- package/dist/application/index.d.ts +23 -0
- package/dist/application/index.js +17 -0
- package/dist/application/invoke-port.d.ts +2 -0
- package/dist/application/invoke-port.js +45 -0
- package/dist/application/preflight.d.ts +27 -0
- package/dist/application/preflight.js +131 -0
- package/dist/application/seal.d.ts +4 -0
- package/dist/application/seal.js +28 -0
- package/dist/application/serialize.d.ts +6 -0
- package/dist/application/serialize.js +9 -0
- package/dist/cli/arguments.d.ts +28 -0
- package/dist/cli/arguments.js +167 -0
- package/dist/cli/exit-codes.d.ts +36 -0
- package/dist/cli/exit-codes.js +39 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +143 -0
- package/dist/cli/render.d.ts +26 -0
- package/dist/cli/render.js +53 -0
- package/dist/cli/run.d.ts +41 -0
- package/dist/cli/run.js +203 -0
- package/dist/core/canonical/canonicalize.d.ts +1 -0
- package/dist/core/canonical/canonicalize.js +113 -0
- package/dist/core/canonical/digest.d.ts +7 -0
- package/dist/core/canonical/digest.js +81 -0
- package/dist/core/canonical/scan-json.d.ts +1 -0
- package/dist/core/canonical/scan-json.js +298 -0
- package/dist/core/canonical/value-domain.d.ts +4 -0
- package/dist/core/canonical/value-domain.js +113 -0
- package/dist/core/compile/compile.d.ts +24 -0
- package/dist/core/compile/compile.js +67 -0
- package/dist/core/compile/declarations.d.ts +5 -0
- package/dist/core/compile/declarations.js +22 -0
- package/dist/core/compile/expression-legality.d.ts +14 -0
- package/dist/core/compile/expression-legality.js +346 -0
- package/dist/core/compile/forbidden-inputs.d.ts +5 -0
- package/dist/core/compile/forbidden-inputs.js +19 -0
- package/dist/core/compile/interface-inventory.d.ts +10 -0
- package/dist/core/compile/interface-inventory.js +55 -0
- package/dist/core/compile/oracle-alignment.d.ts +14 -0
- package/dist/core/compile/oracle-alignment.js +93 -0
- package/dist/core/compile/reachability.d.ts +17 -0
- package/dist/core/compile/reachability.js +177 -0
- package/dist/core/compile/rubrics.d.ts +55 -0
- package/dist/core/compile/rubrics.js +198 -0
- package/dist/core/compile/scripting-bound.d.ts +5 -0
- package/dist/core/compile/scripting-bound.js +151 -0
- package/dist/core/compile/sensitivity-witness.d.ts +73 -0
- package/dist/core/compile/sensitivity-witness.js +232 -0
- package/dist/core/compile/waivers.d.ts +3 -0
- package/dist/core/compile/waivers.js +21 -0
- package/dist/core/coverage/coverage.d.ts +18 -0
- package/dist/core/coverage/coverage.js +47 -0
- package/dist/core/coverage/relevance.d.ts +75 -0
- package/dist/core/coverage/relevance.js +186 -0
- package/dist/core/coverage/rules.d.ts +7 -0
- package/dist/core/coverage/rules.js +18 -0
- package/dist/core/coverage/satisfaction.d.ts +107 -0
- package/dist/core/coverage/satisfaction.js +415 -0
- package/dist/core/coverage/table.d.ts +26 -0
- package/dist/core/coverage/table.js +222 -0
- package/dist/core/declared-inputs.d.ts +16 -0
- package/dist/core/declared-inputs.js +18 -0
- package/dist/core/evaluate/evidence-resolution.d.ts +54 -0
- package/dist/core/evaluate/evidence-resolution.js +153 -0
- package/dist/core/evaluate/operators.d.ts +87 -0
- package/dist/core/evaluate/operators.js +350 -0
- package/dist/core/evaluate/resolution.d.ts +40 -0
- package/dist/core/evaluate/resolution.js +336 -0
- package/dist/core/evaluate/resolved-value.d.ts +9 -0
- package/dist/core/evaluate/resolved-value.js +6 -0
- package/dist/core/failure-codes.d.ts +18 -0
- package/dist/core/failure-codes.js +50 -0
- package/dist/core/lineage/chain.d.ts +49 -0
- package/dist/core/lineage/chain.js +210 -0
- package/dist/core/lineage/freeze.d.ts +12 -0
- package/dist/core/lineage/freeze.js +35 -0
- package/dist/core/lineage/stage-table.d.ts +43 -0
- package/dist/core/lineage/stage-table.js +106 -0
- package/dist/core/preflight/plan.d.ts +67 -0
- package/dist/core/preflight/plan.js +313 -0
- package/dist/core/preflight/projection.d.ts +40 -0
- package/dist/core/preflight/projection.js +96 -0
- package/dist/core/preflight/reduce.d.ts +8 -0
- package/dist/core/preflight/reduce.js +180 -0
- package/dist/core/preflight/witness-evidence.d.ts +42 -0
- package/dist/core/preflight/witness-evidence.js +88 -0
- package/dist/core/probe/target-policy.d.ts +63 -0
- package/dist/core/probe/target-policy.js +328 -0
- package/dist/core/schemas/artifact-reference.d.ts +19 -0
- package/dist/core/schemas/artifact-reference.js +30 -0
- package/dist/core/schemas/artifact.d.ts +1153 -0
- package/dist/core/schemas/artifact.js +84 -0
- package/dist/core/schemas/constraint-ledger.d.ts +57 -0
- package/dist/core/schemas/constraint-ledger.js +143 -0
- package/dist/core/schemas/eval-contract.d.ts +402 -0
- package/dist/core/schemas/eval-contract.js +147 -0
- package/dist/core/schemas/evaluator-configuration.d.ts +37 -0
- package/dist/core/schemas/evaluator-configuration.js +43 -0
- package/dist/core/schemas/evidence-artifact.d.ts +471 -0
- package/dist/core/schemas/evidence-artifact.js +232 -0
- package/dist/core/schemas/expression.d.ts +197 -0
- package/dist/core/schemas/expression.js +284 -0
- package/dist/core/schemas/faults.d.ts +9 -0
- package/dist/core/schemas/faults.js +32 -0
- package/dist/core/schemas/interface.d.ts +417 -0
- package/dist/core/schemas/interface.js +115 -0
- package/dist/core/schemas/isolation-manifest.d.ts +136 -0
- package/dist/core/schemas/isolation-manifest.js +92 -0
- package/dist/core/schemas/lineage.d.ts +21 -0
- package/dist/core/schemas/lineage.js +28 -0
- package/dist/core/schemas/oracle.d.ts +72 -0
- package/dist/core/schemas/oracle.js +35 -0
- package/dist/core/schemas/plan.d.ts +115 -0
- package/dist/core/schemas/plan.js +58 -0
- package/dist/core/schemas/pointer.d.ts +63 -0
- package/dist/core/schemas/pointer.js +94 -0
- package/dist/core/schemas/port-messages.d.ts +103 -0
- package/dist/core/schemas/port-messages.js +90 -0
- package/dist/core/schemas/preflight-verdict.d.ts +60 -0
- package/dist/core/schemas/preflight-verdict.js +38 -0
- package/dist/core/schemas/primitives.d.ts +78 -0
- package/dist/core/schemas/primitives.js +121 -0
- package/dist/core/schemas/private-artifact-manifest.d.ts +56 -0
- package/dist/core/schemas/private-artifact-manifest.js +46 -0
- package/dist/core/schemas/probe-body.d.ts +25 -0
- package/dist/core/schemas/probe-body.js +23 -0
- package/dist/core/schemas/probe-policy.d.ts +76 -0
- package/dist/core/schemas/probe-policy.js +33 -0
- package/dist/core/schemas/probe.d.ts +189 -0
- package/dist/core/schemas/probe.js +82 -0
- package/dist/core/schemas/publish.d.ts +30 -0
- package/dist/core/schemas/publish.js +135 -0
- package/dist/core/schemas/reference-set.d.ts +18 -0
- package/dist/core/schemas/reference-set.js +27 -0
- package/dist/core/schemas/rubric.d.ts +62 -0
- package/dist/core/schemas/rubric.js +68 -0
- package/dist/core/schemas/scoring-policy.d.ts +28 -0
- package/dist/core/schemas/scoring-policy.js +51 -0
- package/dist/core/schemas/sealed-evaluator-brief.d.ts +80 -0
- package/dist/core/schemas/sealed-evaluator-brief.js +59 -0
- package/dist/core/schemas/sealed-run-record.d.ts +382 -0
- package/dist/core/schemas/sealed-run-record.js +215 -0
- package/dist/core/schemas/sensitivity-witness.d.ts +138 -0
- package/dist/core/schemas/sensitivity-witness.js +86 -0
- package/dist/core/schemas/verdict.d.ts +25 -0
- package/dist/core/schemas/verdict.js +20 -0
- package/dist/core/schemas/waiver.d.ts +17 -0
- package/dist/core/schemas/waiver.js +24 -0
- package/dist/core/seal/derived-reference.d.ts +36 -0
- package/dist/core/seal/derived-reference.js +383 -0
- package/dist/core/seal/direction-prose.d.ts +13 -0
- package/dist/core/seal/direction-prose.js +120 -0
- package/dist/core/seal/plan-index.d.ts +63 -0
- package/dist/core/seal/plan-index.js +155 -0
- package/dist/core/seal/scripting-audit.d.ts +15 -0
- package/dist/core/seal/scripting-audit.js +51 -0
- package/dist/core/seal/seal.d.ts +18 -0
- package/dist/core/seal/seal.js +155 -0
- package/dist/core/stage-contracts.d.ts +30 -0
- package/dist/core/stage-contracts.js +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +22 -0
- package/dist/ports/clock-port.d.ts +13 -0
- package/dist/ports/clock-port.js +7 -0
- package/dist/ports/corpus-port.d.ts +16 -0
- package/dist/ports/corpus-port.js +7 -0
- package/dist/ports/environment-probe-port.d.ts +76 -0
- package/dist/ports/environment-probe-port.js +32 -0
- package/dist/ports/file-system-port.d.ts +27 -0
- package/dist/ports/file-system-port.js +11 -0
- package/dist/ports/port.d.ts +33 -0
- package/dist/ports/port.js +14 -0
- package/dist/testing/conformance.d.ts +88 -0
- package/dist/testing/conformance.js +281 -0
- package/dist/testing/index.d.ts +26 -0
- package/dist/testing/index.js +18 -0
- package/dist/testing/probe-conformance.d.ts +45 -0
- package/dist/testing/probe-conformance.js +186 -0
- package/package.json +130 -0
- package/schemas/artifact-reference.schema.json +64 -0
- package/schemas/eval-contract.schema.json +2145 -0
- package/schemas/evaluator-configuration.schema.json +199 -0
- package/schemas/evidence-artifact.schema.json +1229 -0
- package/schemas/isolation-manifest.schema.json +394 -0
- package/schemas/preflight-verdict.schema.json +114 -0
- package/schemas/private-artifact-manifest.schema.json +103 -0
- package/schemas/probe.schema.json +1151 -0
- package/schemas/rubric.schema.json +148 -0
- package/schemas/scoring-policy.schema.json +90 -0
- package/schemas/sealed-evaluator-brief.schema.json +268 -0
- package/schemas/sealed-run-record.schema.json +875 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:eval-quality:schema:rubric",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^R-[0-9]{3,}$"
|
|
9
|
+
},
|
|
10
|
+
"scaleLevels": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"level": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": -9007199254740991,
|
|
20
|
+
"maximum": 9007199254740991,
|
|
21
|
+
"description": "The ordinal this level sits at. A repeated ordinal is the one half the compiler closes, failing under `rubric-unanchored`, since two levels at one ordinal make the ordinal address two anchors. Magnitude, sign, ordering, and contiguity stay free everywhere, because a scale running -2 to 2 or 1, 3, 5 is an ordinary authoring choice."
|
|
22
|
+
},
|
|
23
|
+
"anchor": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The observable condition that anchors this level. AD-22 calls an unanchored scale a compile-time failure under `rubric-unanchored`, so the anchor is a declared field rather than a convention."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": [
|
|
29
|
+
"level",
|
|
30
|
+
"anchor"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "null"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"description": "`null` and `[]` are both the unanchored shape `rubric-unanchored` fires on, and both must parse."
|
|
40
|
+
},
|
|
41
|
+
"failureModePenalties": {
|
|
42
|
+
"anyOf": [
|
|
43
|
+
{
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"name": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1
|
|
51
|
+
},
|
|
52
|
+
"description": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "AD-22 requires named failure-mode penalties and states no magnitude. None is invented here: a penalty weight would be a scoring semantic no module below `score` has authority to mint, and AD-7 keeps weighted composites out of the reported result. AD-22's compile checks ship without one, so a penalty carries a name and a description and nothing else."
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"name",
|
|
59
|
+
"description"
|
|
60
|
+
],
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "null"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"description": "Missing named penalties is `rubric-unanchored`, not a parse failure."
|
|
69
|
+
},
|
|
70
|
+
"maxLength": {
|
|
71
|
+
"anyOf": [
|
|
72
|
+
{
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"minimum": 1,
|
|
75
|
+
"maximum": 9007199254740991
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "null"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"description": "An unbounded length is `null`, which is one of the shapes `rubric-unanchored` fires on."
|
|
82
|
+
},
|
|
83
|
+
"criteria": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"id": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^RC-[0-9]{3,}$"
|
|
91
|
+
},
|
|
92
|
+
"text": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "A criterion whose wording matches the compiler's closed stated-reasoning vocabulary fails compilation under `rubric-scores-reasoning-prose`, so such a criterion must stay representable here. A blank text parses for the same reason and fails under `rubric-unanchored`."
|
|
95
|
+
},
|
|
96
|
+
"evidence": {
|
|
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])*)*)$",
|
|
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
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"id",
|
|
104
|
+
"text",
|
|
105
|
+
"evidence"
|
|
106
|
+
],
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"schemaVersion": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"minimum": 1,
|
|
113
|
+
"maximum": 9007199254740991,
|
|
114
|
+
"description": "AD-11 requires an integer under this exact name. Deliberately not `z.literal(1)`: the literal exports as `{\"type\":\"number\",\"const\":1}`, losing `integer` for a non-TypeScript consumer, and it would turn a version-2 artifact into an anonymous schema-parse failure instead of AD-28's dedicated `schema-version-mismatch` fault. Version equality belongs to the reader that throws that fault."
|
|
115
|
+
},
|
|
116
|
+
"parentDigest": {
|
|
117
|
+
"anyOf": [
|
|
118
|
+
{
|
|
119
|
+
"type": "string",
|
|
120
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
121
|
+
"description": "AD-27 digest: \"sha256:\" plus 64 lowercase hexadecimal characters."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "null"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"description": "AD-29 lineage. `null` if and only if `revisionCount` is 0. That biconditional is stated here rather than refined: a refinement is silently dropped from the published schema, so a non-TypeScript consumer would never see it, and the constraint ledger records it as not expressible."
|
|
128
|
+
},
|
|
129
|
+
"revisionCount": {
|
|
130
|
+
"type": "integer",
|
|
131
|
+
"minimum": 0,
|
|
132
|
+
"maximum": 9007199254740991,
|
|
133
|
+
"description": "AD-29: one greater than the parent artifact's."
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": [
|
|
137
|
+
"id",
|
|
138
|
+
"scaleLevels",
|
|
139
|
+
"failureModePenalties",
|
|
140
|
+
"maxLength",
|
|
141
|
+
"criteria",
|
|
142
|
+
"schemaVersion",
|
|
143
|
+
"parentDigest",
|
|
144
|
+
"revisionCount"
|
|
145
|
+
],
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"description": "A published rubric, with no prior art: the experiments' evaluator-result and trace-label schemas belong to the deferred semantic layer and their names are not reused. AD-22's compile checks cover anchored scale levels, named failure-mode penalties, a bounded length, criteria that state a question, addressable rubric and criterion identifiers, and wording that matches the compiler's closed stated-reasoning vocabulary. All of them fire under `rubric-unanchored`, `rubric-evidence-unreachable`, and `rubric-scores-reasoning-prose` at compile time, so every shape those codes fire on parses here."
|
|
148
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:eval-quality:schema:scoring-policy",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"schemaVersion": {
|
|
7
|
+
"type": "integer",
|
|
8
|
+
"minimum": 1,
|
|
9
|
+
"maximum": 9007199254740991,
|
|
10
|
+
"description": "AD-11 requires an integer under this exact name. Deliberately not `z.literal(1)`: the literal exports as `{\"type\":\"number\",\"const\":1}`, losing `integer` for a non-TypeScript consumer, and it would turn a version-2 artifact into an anonymous schema-parse failure instead of AD-28's dedicated `schema-version-mismatch` fault. Version equality belongs to the reader that throws that fault."
|
|
11
|
+
},
|
|
12
|
+
"parentDigest": {
|
|
13
|
+
"anyOf": [
|
|
14
|
+
{
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
17
|
+
"description": "AD-27 digest: \"sha256:\" plus 64 lowercase hexadecimal characters."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "null"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"description": "AD-29 lineage. `null` if and only if `revisionCount` is 0. That biconditional is stated here rather than refined: a refinement is silently dropped from the published schema, so a non-TypeScript consumer would never see it, and the constraint ledger records it as not expressible."
|
|
24
|
+
},
|
|
25
|
+
"revisionCount": {
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"minimum": 0,
|
|
28
|
+
"maximum": 9007199254740991,
|
|
29
|
+
"description": "AD-29: one greater than the parent artifact's."
|
|
30
|
+
},
|
|
31
|
+
"policyId": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
34
|
+
"description": "A kebab-case slug. Excludes \"/\" and \"~\" so an identifier can be embedded in an interaction-rooted pointer without escaping."
|
|
35
|
+
},
|
|
36
|
+
"severityFloor": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": [
|
|
39
|
+
"low",
|
|
40
|
+
"material",
|
|
41
|
+
"critical"
|
|
42
|
+
],
|
|
43
|
+
"description": "AD-21 routes on this: a behavioural failure at or above the floor is FAIL and one below it is CONCERNS, and AD-7 makes it the one severity that constrains the dominance relation."
|
|
44
|
+
},
|
|
45
|
+
"confidenceThreshold": {
|
|
46
|
+
"type": "number",
|
|
47
|
+
"minimum": 0,
|
|
48
|
+
"maximum": 1,
|
|
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
|
+
},
|
|
51
|
+
"minimumTrialCount": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 1,
|
|
54
|
+
"maximum": 9007199254740991,
|
|
55
|
+
"description": "AD-6: repeated runs are trials, never retries. The published default artifact carries 3, \"because that is what the instrument behind the measured effect used\"; that number is recorded here and is deliberately not a schema default."
|
|
56
|
+
},
|
|
57
|
+
"reExecutionCap": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 0,
|
|
60
|
+
"maximum": 9007199254740991,
|
|
61
|
+
"description": "AD-6: exceeding the cap resolves under AD-21 as a statement that the harness is unfit, never that the contract is weak. The published default artifact carries 2."
|
|
62
|
+
},
|
|
63
|
+
"remediationCap": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"maximum": 9007199254740991,
|
|
67
|
+
"description": "AD-12's remediation cap. The published default artifact carries 3. AD-12 states the package validates rather than enforces it, which is why the Evidence Artifact records the cap's source as caller-attested."
|
|
68
|
+
},
|
|
69
|
+
"regexMatchStepBudget": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"minimum": 1,
|
|
72
|
+
"maximum": 9007199254740991,
|
|
73
|
+
"description": "AD-4: \"a match-step budget from the scoring policy whose breach is a fault, not an outcome state.\" The budget bounds a pure, static, pre-execution complexity estimate over the declared pattern and the candidate string length, never a literal engine-internal step count, and that length is whatever the system under test returned, which the contract author does not control. The structural nested-quantifier rejection stays unconditional and independent of this value, so a generous ceiling here does not weaken that real backstop. The published default artifact carries 1000000."
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"schemaVersion",
|
|
78
|
+
"parentDigest",
|
|
79
|
+
"revisionCount",
|
|
80
|
+
"policyId",
|
|
81
|
+
"severityFloor",
|
|
82
|
+
"confidenceThreshold",
|
|
83
|
+
"minimumTrialCount",
|
|
84
|
+
"reExecutionCap",
|
|
85
|
+
"remediationCap",
|
|
86
|
+
"regexMatchStepBudget"
|
|
87
|
+
],
|
|
88
|
+
"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 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."
|
|
90
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:eval-quality:schema:sealed-evaluator-brief",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"schemaVersion": {
|
|
7
|
+
"type": "integer",
|
|
8
|
+
"minimum": 1,
|
|
9
|
+
"maximum": 9007199254740991,
|
|
10
|
+
"description": "AD-11 requires an integer under this exact name. Deliberately not `z.literal(1)`: the literal exports as `{\"type\":\"number\",\"const\":1}`, losing `integer` for a non-TypeScript consumer, and it would turn a version-2 artifact into an anonymous schema-parse failure instead of AD-28's dedicated `schema-version-mismatch` fault. Version equality belongs to the reader that throws that fault."
|
|
11
|
+
},
|
|
12
|
+
"parentDigest": {
|
|
13
|
+
"anyOf": [
|
|
14
|
+
{
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
17
|
+
"description": "AD-27 digest: \"sha256:\" plus 64 lowercase hexadecimal characters."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "null"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"description": "AD-29 lineage. `null` if and only if `revisionCount` is 0. That biconditional is stated here rather than refined: a refinement is silently dropped from the published schema, so a non-TypeScript consumer would never see it, and the constraint ledger records it as not expressible."
|
|
24
|
+
},
|
|
25
|
+
"revisionCount": {
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"minimum": 0,
|
|
28
|
+
"maximum": 9007199254740991,
|
|
29
|
+
"description": "AD-29: one greater than the parent artifact's."
|
|
30
|
+
},
|
|
31
|
+
"contractDigest": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
34
|
+
"description": "Binds this brief to the contract it seals. The brief carries no contract identifier of its own and no identity field at all: every artifact that refers to a brief does so by `sealedBriefDigest`, so an identifier would be a second name nothing reads."
|
|
35
|
+
},
|
|
36
|
+
"behaviors": {
|
|
37
|
+
"minItems": 1,
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"id": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^B-[0-9]{3,}$"
|
|
45
|
+
},
|
|
46
|
+
"description": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"severity": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": [
|
|
52
|
+
"low",
|
|
53
|
+
"material",
|
|
54
|
+
"critical"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"observableSuccessCriterion": {
|
|
58
|
+
"anyOf": [
|
|
59
|
+
{
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "null"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"description": "AD-19: what observable condition means this behaviour was met, which is not the nominated success indicator of any one operation. `null` is the shape `no-observable-success-criterion` fires on, and that code fires on exactly this condition and never on an empty oracle list."
|
|
67
|
+
},
|
|
68
|
+
"requirementLinks": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"scheme": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1
|
|
76
|
+
},
|
|
77
|
+
"id": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"scheme",
|
|
84
|
+
"id"
|
|
85
|
+
],
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
},
|
|
88
|
+
"description": "Coin flip (c), settled: requirement and risk linkage lives per behaviour rather than at contract level, because `missing-requirement-linkage` fires when \"a behaviour declares no requirement or risk identifier\" and a contract-level array cannot make that predicate decidable per behaviour. Empty is legal, and both link arrays empty is exactly what the code fires on; a schema demanding non-empty makes it fire never."
|
|
89
|
+
},
|
|
90
|
+
"riskLinks": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"scheme": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"minLength": 1
|
|
98
|
+
},
|
|
99
|
+
"id": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"scheme",
|
|
106
|
+
"id"
|
|
107
|
+
],
|
|
108
|
+
"additionalProperties": false
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"oracles": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"pattern": "^O-[0-9]{3,}$"
|
|
116
|
+
},
|
|
117
|
+
"description": "Identifiers of the oracles this behaviour is discharged by. Deliberately not refined against the contract's declared oracles: no AD-5 code names a behaviour citing an undeclared oracle, so it joins the cross-field rules with no code, unenforced in v0 rather than silently pushed into the schema."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"required": [
|
|
121
|
+
"id",
|
|
122
|
+
"description",
|
|
123
|
+
"severity",
|
|
124
|
+
"observableSuccessCriterion",
|
|
125
|
+
"requirementLinks",
|
|
126
|
+
"riskLinks",
|
|
127
|
+
"oracles"
|
|
128
|
+
],
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
},
|
|
131
|
+
"description": "The contract's behaviours, carried through unchanged. At least one, on the contract's own reasoning: a brief with no behaviour directs nothing."
|
|
132
|
+
},
|
|
133
|
+
"directions": {
|
|
134
|
+
"minItems": 1,
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"properties": {
|
|
139
|
+
"oracleId": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"pattern": "^O-[0-9]{3,}$"
|
|
142
|
+
},
|
|
143
|
+
"text": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"minLength": 1,
|
|
146
|
+
"description": "The generated prose. `seal` renders each evidence target as a descriptive reference derived from the step's operation and selection predicate, such as \"the response you obtained when you sent an invalid identifier\", never as the step identifier itself; the mapping from step to phrase is one-way. It never carries a prescribed action sequence."
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": [
|
|
150
|
+
"oracleId",
|
|
151
|
+
"text"
|
|
152
|
+
],
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
},
|
|
155
|
+
"description": "AD-3's generated evaluator-facing directions, one per discharged oracle. At least one, on the same reasoning as `behaviors` above: a brief with no direction verifies nothing."
|
|
156
|
+
},
|
|
157
|
+
"permittedInterfaces": {
|
|
158
|
+
"type": "array",
|
|
159
|
+
"items": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"properties": {
|
|
162
|
+
"logicalId": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
165
|
+
"description": "AD-35 binds the brief as it binds the contract: a logical interface identifier only, never a URL, host, or port. The brief is the artifact that actually reaches the executing caller, so a URL leaking onto it defeats the mapping AD-35 keeps outside the package."
|
|
166
|
+
},
|
|
167
|
+
"kind": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"enum": [
|
|
170
|
+
"api",
|
|
171
|
+
"web",
|
|
172
|
+
"cli",
|
|
173
|
+
"mcp"
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"logicalId",
|
|
179
|
+
"kind"
|
|
180
|
+
],
|
|
181
|
+
"additionalProperties": false
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"scopedResources": {
|
|
185
|
+
"type": "array",
|
|
186
|
+
"items": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"properties": {
|
|
189
|
+
"reference": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 1
|
|
192
|
+
},
|
|
193
|
+
"kind": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"minLength": 1
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"required": [
|
|
199
|
+
"reference",
|
|
200
|
+
"kind"
|
|
201
|
+
],
|
|
202
|
+
"additionalProperties": false
|
|
203
|
+
},
|
|
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
|
+
},
|
|
206
|
+
"budgets": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"properties": {
|
|
209
|
+
"maxToolCalls": {
|
|
210
|
+
"type": "integer",
|
|
211
|
+
"minimum": 0,
|
|
212
|
+
"maximum": 9007199254740991
|
|
213
|
+
},
|
|
214
|
+
"maxWallClockMinutes": {
|
|
215
|
+
"type": "integer",
|
|
216
|
+
"minimum": 0,
|
|
217
|
+
"maximum": 9007199254740991
|
|
218
|
+
},
|
|
219
|
+
"maxCostUsd": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
|
|
222
|
+
"description": "Money, so AD-36 carries it as a string in a declared format rather than as a JSON number. Constrained to the unsigned form: a negative ceiling is not a ceiling."
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"required": [
|
|
226
|
+
"maxToolCalls",
|
|
227
|
+
"maxWallClockMinutes",
|
|
228
|
+
"maxCostUsd"
|
|
229
|
+
],
|
|
230
|
+
"additionalProperties": false,
|
|
231
|
+
"description": "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."
|
|
232
|
+
},
|
|
233
|
+
"safetyLimits": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"type": "string"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"probeStepBound": {
|
|
240
|
+
"anyOf": [
|
|
241
|
+
{
|
|
242
|
+
"type": "integer",
|
|
243
|
+
"minimum": 0,
|
|
244
|
+
"maximum": 9007199254740991
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "null"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"description": "AD-16's declared bound on enumerated probe steps, carried through from the contract. The brief-side scripting audit reads it after generation and fires `brief-exceeds-scripting-bound` on any single direction whose rendered text carries more markers than the bound; counts are never summed across directions."
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"required": [
|
|
254
|
+
"schemaVersion",
|
|
255
|
+
"parentDigest",
|
|
256
|
+
"revisionCount",
|
|
257
|
+
"contractDigest",
|
|
258
|
+
"behaviors",
|
|
259
|
+
"directions",
|
|
260
|
+
"permittedInterfaces",
|
|
261
|
+
"scopedResources",
|
|
262
|
+
"budgets",
|
|
263
|
+
"safetyLimits",
|
|
264
|
+
"probeStepBound"
|
|
265
|
+
],
|
|
266
|
+
"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, 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."
|
|
268
|
+
}
|