@bjoernrochel/sevro 0.1.0-rc.1
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 +159 -0
- package/README.md +71 -0
- package/docs/advisory-fixture.md +23 -0
- package/docs/builtin-graders-v1.md +77 -0
- package/docs/cache-ownership-validation.md +49 -0
- package/docs/claude-continuation-validation.md +47 -0
- package/docs/codex-host.md +134 -0
- package/docs/concurrency-validation.md +86 -0
- package/docs/configuration-root-validation.md +70 -0
- package/docs/development-cli.md +327 -0
- package/docs/engine-slice.md +114 -0
- package/docs/extension-protocol-v1.md +292 -0
- package/docs/fixture-cleanup-validation.md +70 -0
- package/docs/identity-v1.md +65 -0
- package/docs/native-controls.md +29 -0
- package/docs/releases.md +88 -0
- package/docs/report-v1.md +32 -0
- package/docs/results-v1.md +118 -0
- package/examples/basic/graded.json +13 -0
- package/examples/basic/host.ts +8 -0
- package/examples/basic/prompt-only.json +7 -0
- package/package.json +45 -0
- package/schemas/cli-result-v1.schema.json +184 -0
- package/schemas/extension-v1.schema.json +659 -0
- package/schemas/report-v1.schema.json +164 -0
- package/schemas/run-evidence-v1.schema.json +510 -0
- package/src/advisory-fixture.ts +282 -0
- package/src/advisory.ts +105 -0
- package/src/cli.ts +837 -0
- package/src/engine.ts +2341 -0
- package/src/extension-client.ts +257 -0
- package/src/extension-session.ts +335 -0
- package/src/fixture-bin.ts +87 -0
- package/src/fixture-cleanup.ts +38 -0
- package/src/fixture-setup.ts +163 -0
- package/src/generated-fixture.ts +220 -0
- package/src/git-hooks.ts +63 -0
- package/src/graders/git-head.ts +176 -0
- package/src/graders/output.ts +359 -0
- package/src/graders/semantic.ts +120 -0
- package/src/graders/shell.ts +277 -0
- package/src/hosts/claude-continuation.ts +94 -0
- package/src/hosts/claude-credential.ts +73 -0
- package/src/hosts/claude-events.ts +128 -0
- package/src/hosts/claude-nested-skills.ts +218 -0
- package/src/hosts/claude-repository-invocation.ts +239 -0
- package/src/hosts/claude-settings.ts +50 -0
- package/src/hosts/claude-tool-calls.ts +159 -0
- package/src/hosts/claude.ts +511 -0
- package/src/hosts/codex-configuration.ts +85 -0
- package/src/hosts/codex-events.ts +102 -0
- package/src/hosts/codex-native-calls.ts +702 -0
- package/src/hosts/codex-profile.ts +78 -0
- package/src/hosts/codex-skill-reads.ts +345 -0
- package/src/hosts/codex.ts +769 -0
- package/src/hosts/isolation-roots.ts +60 -0
- package/src/hosts/mac-sandbox.ts +108 -0
- package/src/hosts/native-controls.ts +124 -0
- package/src/hosts/protected-worktrees.ts +56 -0
- package/src/hosts/workspace-fingerprint.ts +55 -0
- package/src/identity.ts +156 -0
- package/src/instrumentation.ts +106 -0
- package/src/preparation.ts +211 -0
- package/src/provenance.ts +244 -0
- package/src/report.ts +351 -0
- package/src/repository-fixture.ts +286 -0
- package/src/results.ts +160 -0
- package/src/run-owner.ts +276 -0
- package/src/schema.ts +28 -0
- package/src/storage.ts +23 -0
- package/src/trial-scheduler.ts +27 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:sevro:schema:report:v1",
|
|
4
|
+
"title": "Sevro report v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["format", "inputs", "rows", "summary"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"format": { "const": "sevro.report.v1" },
|
|
9
|
+
"inputs": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"minItems": 1,
|
|
12
|
+
"items": { "$ref": "#/$defs/input" }
|
|
13
|
+
},
|
|
14
|
+
"rows": { "type": "array", "items": { "$ref": "#/$defs/row" } },
|
|
15
|
+
"summary": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["cases", "passed", "failed", "notAssessed"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"cases": { "type": "integer", "minimum": 0 },
|
|
20
|
+
"passed": { "type": "integer", "minimum": 0 },
|
|
21
|
+
"failed": { "type": "integer", "minimum": 0 },
|
|
22
|
+
"notAssessed": { "type": "integer", "minimum": 0 }
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"$defs": {
|
|
29
|
+
"path": { "type": "string", "minLength": 1 },
|
|
30
|
+
"digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
31
|
+
"state": {
|
|
32
|
+
"enum": [
|
|
33
|
+
"completed",
|
|
34
|
+
"failed",
|
|
35
|
+
"cancelled",
|
|
36
|
+
"not_run",
|
|
37
|
+
"error",
|
|
38
|
+
"unavailable",
|
|
39
|
+
"not_requested"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"verdict": { "enum": ["passed", "failed", "not_assessed"] },
|
|
43
|
+
"input": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": [
|
|
46
|
+
"resultFile",
|
|
47
|
+
"execution",
|
|
48
|
+
"grading",
|
|
49
|
+
"task",
|
|
50
|
+
"exitCode",
|
|
51
|
+
"caseCount"
|
|
52
|
+
],
|
|
53
|
+
"properties": {
|
|
54
|
+
"resultFile": { "$ref": "#/$defs/path" },
|
|
55
|
+
"execution": {
|
|
56
|
+
"enum": ["completed", "failed", "cancelled", "not_run"]
|
|
57
|
+
},
|
|
58
|
+
"grading": {
|
|
59
|
+
"enum": ["completed", "error", "unavailable", "not_requested"]
|
|
60
|
+
},
|
|
61
|
+
"task": { "$ref": "#/$defs/verdict" },
|
|
62
|
+
"exitCode": { "enum": [0, 1, 2, 3, 4, 64, 70, 130, 143] },
|
|
63
|
+
"caseCount": { "type": "integer", "minimum": 0 }
|
|
64
|
+
},
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
},
|
|
67
|
+
"route": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": ["host", "model", "effort"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"host": { "type": "string", "minLength": 1 },
|
|
72
|
+
"model": { "type": "string", "minLength": 1 },
|
|
73
|
+
"effort": { "type": "string", "minLength": 1 }
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"outcome": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": ["trial", "id", "status"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"trial": { "type": "integer", "minimum": 1 },
|
|
82
|
+
"id": { "type": "string", "minLength": 1 },
|
|
83
|
+
"status": { "enum": ["passed", "failed", "unavailable"] }
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"row": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": [
|
|
90
|
+
"resultFile",
|
|
91
|
+
"evidencePath",
|
|
92
|
+
"runId",
|
|
93
|
+
"caseId",
|
|
94
|
+
"execution",
|
|
95
|
+
"grading",
|
|
96
|
+
"task",
|
|
97
|
+
"exitCode",
|
|
98
|
+
"trialCount",
|
|
99
|
+
"taskPassRate",
|
|
100
|
+
"candidateDurationMs",
|
|
101
|
+
"inputTokens",
|
|
102
|
+
"outputTokens",
|
|
103
|
+
"costUsd",
|
|
104
|
+
"runnerBuildDigest",
|
|
105
|
+
"evaluationDigest",
|
|
106
|
+
"requestedCondition",
|
|
107
|
+
"actualCondition",
|
|
108
|
+
"candidateRoute",
|
|
109
|
+
"routes",
|
|
110
|
+
"domainOutcomes"
|
|
111
|
+
],
|
|
112
|
+
"properties": {
|
|
113
|
+
"resultFile": { "$ref": "#/$defs/path" },
|
|
114
|
+
"evidencePath": { "type": ["string", "null"] },
|
|
115
|
+
"runId": { "type": ["string", "null"] },
|
|
116
|
+
"caseId": { "type": "string", "minLength": 1 },
|
|
117
|
+
"execution": { "$ref": "#/$defs/state" },
|
|
118
|
+
"grading": { "$ref": "#/$defs/state" },
|
|
119
|
+
"task": { "$ref": "#/$defs/verdict" },
|
|
120
|
+
"exitCode": { "enum": [0, 1, 2, 3, 4, 64, 70, 130, 143] },
|
|
121
|
+
"trialCount": { "type": "integer", "minimum": 0 },
|
|
122
|
+
"taskPassRate": {
|
|
123
|
+
"type": ["number", "null"],
|
|
124
|
+
"minimum": 0,
|
|
125
|
+
"maximum": 1
|
|
126
|
+
},
|
|
127
|
+
"candidateDurationMs": { "type": ["number", "null"], "minimum": 0 },
|
|
128
|
+
"inputTokens": { "type": ["integer", "null"], "minimum": 0 },
|
|
129
|
+
"outputTokens": { "type": ["integer", "null"], "minimum": 0 },
|
|
130
|
+
"costUsd": { "type": ["number", "null"], "minimum": 0 },
|
|
131
|
+
"runnerBuildDigest": {
|
|
132
|
+
"oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
133
|
+
},
|
|
134
|
+
"evaluationDigest": {
|
|
135
|
+
"oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
136
|
+
},
|
|
137
|
+
"requestedCondition": { "enum": ["passive", "enforced", null] },
|
|
138
|
+
"actualCondition": { "enum": ["passive", "enforced", "unknown", null] },
|
|
139
|
+
"candidateRoute": {
|
|
140
|
+
"oneOf": [{ "$ref": "#/$defs/route" }, { "type": "null" }]
|
|
141
|
+
},
|
|
142
|
+
"routes": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"items": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"required": ["role", "host", "model", "effort"],
|
|
147
|
+
"properties": {
|
|
148
|
+
"role": { "enum": ["candidate", "semantic", "advisory"] },
|
|
149
|
+
"host": { "type": "string", "minLength": 1 },
|
|
150
|
+
"model": { "type": "string", "minLength": 1 },
|
|
151
|
+
"effort": { "type": "string", "minLength": 1 }
|
|
152
|
+
},
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"domainOutcomes": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": { "$ref": "#/$defs/outcome" }
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"additionalProperties": false
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:sevro:schema:run-evidence:v1",
|
|
4
|
+
"title": "Sevro retained run evidence v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"format",
|
|
8
|
+
"runId",
|
|
9
|
+
"evaluationIdentity",
|
|
10
|
+
"configuration",
|
|
11
|
+
"runner",
|
|
12
|
+
"project",
|
|
13
|
+
"extension",
|
|
14
|
+
"condition",
|
|
15
|
+
"graders",
|
|
16
|
+
"routes",
|
|
17
|
+
"result",
|
|
18
|
+
"trials"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"format": { "const": "sevro.run-evidence.v1" },
|
|
22
|
+
"runId": { "type": "string", "minLength": 1 },
|
|
23
|
+
"evaluationIdentity": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"required": ["algorithm", "digest", "dimensions"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"algorithm": { "const": "sevro.identity.v1" },
|
|
28
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
29
|
+
"dimensions": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": [
|
|
32
|
+
"runnerBuildDigest",
|
|
33
|
+
"projectDigest",
|
|
34
|
+
"configurationDigest",
|
|
35
|
+
"extensionDigest",
|
|
36
|
+
"extensionProtocol",
|
|
37
|
+
"caseDigest",
|
|
38
|
+
"fixtureDigest",
|
|
39
|
+
"checksDigest",
|
|
40
|
+
"requiredEvidenceDigest",
|
|
41
|
+
"evaluatorDigest",
|
|
42
|
+
"graderDigest",
|
|
43
|
+
"instrumentationDigest",
|
|
44
|
+
"routeDigest",
|
|
45
|
+
"condition",
|
|
46
|
+
"trialCount",
|
|
47
|
+
"passThreshold"
|
|
48
|
+
],
|
|
49
|
+
"properties": {
|
|
50
|
+
"runnerBuildDigest": { "$ref": "#/$defs/digest" },
|
|
51
|
+
"projectDigest": { "$ref": "#/$defs/digest" },
|
|
52
|
+
"configurationDigest": { "$ref": "#/$defs/digest" },
|
|
53
|
+
"extensionDigest": {
|
|
54
|
+
"oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
55
|
+
},
|
|
56
|
+
"extensionProtocol": { "enum": ["sevro.extension.v1", null] },
|
|
57
|
+
"caseDigest": { "$ref": "#/$defs/digest" },
|
|
58
|
+
"fixtureDigest": { "$ref": "#/$defs/digest" },
|
|
59
|
+
"checksDigest": { "$ref": "#/$defs/digest" },
|
|
60
|
+
"requiredEvidenceDigest": { "$ref": "#/$defs/digest" },
|
|
61
|
+
"evaluatorDigest": { "$ref": "#/$defs/digest" },
|
|
62
|
+
"graderDigest": { "$ref": "#/$defs/digest" },
|
|
63
|
+
"instrumentationDigest": { "$ref": "#/$defs/digest" },
|
|
64
|
+
"routeDigest": { "$ref": "#/$defs/digest" },
|
|
65
|
+
"condition": { "enum": ["passive", "enforced"] },
|
|
66
|
+
"trialCount": { "type": "integer", "minimum": 1 },
|
|
67
|
+
"passThreshold": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"exclusiveMinimum": 0,
|
|
70
|
+
"maximum": 1
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
},
|
|
78
|
+
"configuration": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"required": ["digest", "redacted"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
83
|
+
"redacted": { "type": "object" }
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"runner": { "$ref": "#/$defs/runner" },
|
|
88
|
+
"project": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"required": ["root", "revision", "dirtyPatchDigest"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"root": { "$ref": "#/$defs/fileUrl" },
|
|
93
|
+
"revision": { "type": ["string", "null"] },
|
|
94
|
+
"dirtyPatchDigest": {
|
|
95
|
+
"oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
},
|
|
100
|
+
"extension": {
|
|
101
|
+
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/extension" }]
|
|
102
|
+
},
|
|
103
|
+
"condition": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"required": [
|
|
106
|
+
"requested",
|
|
107
|
+
"actual",
|
|
108
|
+
"requestedInstrumentation",
|
|
109
|
+
"appliedInstrumentation"
|
|
110
|
+
],
|
|
111
|
+
"properties": {
|
|
112
|
+
"requested": { "enum": ["passive", "enforced"] },
|
|
113
|
+
"actual": { "enum": ["passive", "enforced", "unknown"] },
|
|
114
|
+
"requestedInstrumentation": { "$ref": "#/$defs/instrumentationList" },
|
|
115
|
+
"appliedInstrumentation": { "$ref": "#/$defs/instrumentationList" }
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
},
|
|
119
|
+
"graders": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"required": ["active", "replacedDefaults"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"active": { "type": "array", "items": { "$ref": "#/$defs/grader" } },
|
|
124
|
+
"replacedDefaults": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": { "type": "string", "minLength": 1 },
|
|
127
|
+
"uniqueItems": true
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"additionalProperties": false
|
|
131
|
+
},
|
|
132
|
+
"routes": { "type": "array", "items": { "$ref": "#/$defs/route" } },
|
|
133
|
+
"result": { "$ref": "urn:sevro:schema:cli-result:v1" },
|
|
134
|
+
"trials": { "type": "array", "items": { "$ref": "#/$defs/trialEvidence" } },
|
|
135
|
+
"diagnostic": { "$ref": "#/$defs/diagnostic" }
|
|
136
|
+
},
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"$defs": {
|
|
139
|
+
"digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
140
|
+
"fileUrl": { "type": "string", "pattern": "^file:///" },
|
|
141
|
+
"runner": {
|
|
142
|
+
"oneOf": [
|
|
143
|
+
{
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": ["source", "packageName", "version", "buildDigest"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"source": { "const": "package" },
|
|
148
|
+
"packageName": { "type": "string", "minLength": 1 },
|
|
149
|
+
"version": { "type": "string", "minLength": 1 },
|
|
150
|
+
"buildDigest": { "$ref": "#/$defs/digest" }
|
|
151
|
+
},
|
|
152
|
+
"additionalProperties": false
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "object",
|
|
156
|
+
"required": [
|
|
157
|
+
"source",
|
|
158
|
+
"root",
|
|
159
|
+
"revision",
|
|
160
|
+
"dirtyPatchDigest",
|
|
161
|
+
"buildDigest"
|
|
162
|
+
],
|
|
163
|
+
"properties": {
|
|
164
|
+
"source": { "const": "checkout" },
|
|
165
|
+
"root": { "$ref": "#/$defs/fileUrl" },
|
|
166
|
+
"revision": { "type": "string", "minLength": 1 },
|
|
167
|
+
"dirtyPatchDigest": {
|
|
168
|
+
"oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
169
|
+
},
|
|
170
|
+
"buildDigest": { "$ref": "#/$defs/digest" }
|
|
171
|
+
},
|
|
172
|
+
"additionalProperties": false
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"extension": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"required": [
|
|
179
|
+
"id",
|
|
180
|
+
"version",
|
|
181
|
+
"sourceDigest",
|
|
182
|
+
"configurationDigest",
|
|
183
|
+
"protocol",
|
|
184
|
+
"capabilities",
|
|
185
|
+
"replacements"
|
|
186
|
+
],
|
|
187
|
+
"properties": {
|
|
188
|
+
"id": { "type": "string", "minLength": 1 },
|
|
189
|
+
"version": { "type": "string", "minLength": 1 },
|
|
190
|
+
"sourceDigest": { "$ref": "#/$defs/digest" },
|
|
191
|
+
"configurationDigest": { "$ref": "#/$defs/digest" },
|
|
192
|
+
"protocol": { "const": "sevro.extension.v1" },
|
|
193
|
+
"capabilities": {
|
|
194
|
+
"type": "array",
|
|
195
|
+
"items": { "type": "string", "minLength": 1 },
|
|
196
|
+
"uniqueItems": true
|
|
197
|
+
},
|
|
198
|
+
"replacements": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"required": ["graders", "taskVerdictPolicy"],
|
|
201
|
+
"properties": {
|
|
202
|
+
"graders": {
|
|
203
|
+
"type": "array",
|
|
204
|
+
"items": { "type": "string", "minLength": 1 },
|
|
205
|
+
"uniqueItems": true
|
|
206
|
+
},
|
|
207
|
+
"taskVerdictPolicy": { "type": ["string", "null"] }
|
|
208
|
+
},
|
|
209
|
+
"additionalProperties": false
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"additionalProperties": false
|
|
213
|
+
},
|
|
214
|
+
"instrumentationList": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"items": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"required": ["id", "configuration"],
|
|
219
|
+
"properties": {
|
|
220
|
+
"id": { "type": "string", "minLength": 1 },
|
|
221
|
+
"configuration": { "type": "object" }
|
|
222
|
+
},
|
|
223
|
+
"additionalProperties": false
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"grader": {
|
|
227
|
+
"type": "object",
|
|
228
|
+
"required": ["id", "source", "version"],
|
|
229
|
+
"properties": {
|
|
230
|
+
"id": { "type": "string", "minLength": 1 },
|
|
231
|
+
"source": { "enum": ["builtin", "extension"] },
|
|
232
|
+
"version": { "type": "string", "minLength": 1 }
|
|
233
|
+
},
|
|
234
|
+
"additionalProperties": false
|
|
235
|
+
},
|
|
236
|
+
"route": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"required": ["role", "host", "model", "effort"],
|
|
239
|
+
"properties": {
|
|
240
|
+
"role": { "enum": ["candidate", "semantic", "advisory"] },
|
|
241
|
+
"host": { "type": "string", "minLength": 1 },
|
|
242
|
+
"model": { "type": "string", "minLength": 1 },
|
|
243
|
+
"effort": { "type": "string", "minLength": 1 }
|
|
244
|
+
},
|
|
245
|
+
"additionalProperties": false
|
|
246
|
+
},
|
|
247
|
+
"advisoryReview": {
|
|
248
|
+
"oneOf": [
|
|
249
|
+
{ "type": "null" },
|
|
250
|
+
{
|
|
251
|
+
"type": "object",
|
|
252
|
+
"required": ["status", "assessment", "usage", "rawResult"],
|
|
253
|
+
"properties": {
|
|
254
|
+
"status": { "enum": ["completed", "failed", "not_run"] },
|
|
255
|
+
"assessment": {
|
|
256
|
+
"oneOf": [
|
|
257
|
+
{ "type": "null" },
|
|
258
|
+
{
|
|
259
|
+
"type": "object",
|
|
260
|
+
"required": [
|
|
261
|
+
"verdict",
|
|
262
|
+
"overallScore",
|
|
263
|
+
"dimensions",
|
|
264
|
+
"strengths",
|
|
265
|
+
"weaknesses",
|
|
266
|
+
"summary"
|
|
267
|
+
],
|
|
268
|
+
"properties": {
|
|
269
|
+
"verdict": { "enum": ["pass", "fail"] },
|
|
270
|
+
"overallScore": {
|
|
271
|
+
"type": "integer",
|
|
272
|
+
"minimum": 1,
|
|
273
|
+
"maximum": 5
|
|
274
|
+
},
|
|
275
|
+
"dimensions": {
|
|
276
|
+
"type": "object",
|
|
277
|
+
"required": [
|
|
278
|
+
"correctness",
|
|
279
|
+
"maintainability",
|
|
280
|
+
"testQuality",
|
|
281
|
+
"scopeDiscipline"
|
|
282
|
+
],
|
|
283
|
+
"properties": {
|
|
284
|
+
"correctness": {
|
|
285
|
+
"type": "integer",
|
|
286
|
+
"minimum": 1,
|
|
287
|
+
"maximum": 5
|
|
288
|
+
},
|
|
289
|
+
"maintainability": {
|
|
290
|
+
"type": "integer",
|
|
291
|
+
"minimum": 1,
|
|
292
|
+
"maximum": 5
|
|
293
|
+
},
|
|
294
|
+
"testQuality": {
|
|
295
|
+
"type": "integer",
|
|
296
|
+
"minimum": 1,
|
|
297
|
+
"maximum": 5
|
|
298
|
+
},
|
|
299
|
+
"scopeDiscipline": {
|
|
300
|
+
"type": "integer",
|
|
301
|
+
"minimum": 1,
|
|
302
|
+
"maximum": 5
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"additionalProperties": false
|
|
306
|
+
},
|
|
307
|
+
"strengths": {
|
|
308
|
+
"type": "array",
|
|
309
|
+
"items": { "type": "string" }
|
|
310
|
+
},
|
|
311
|
+
"weaknesses": {
|
|
312
|
+
"type": "array",
|
|
313
|
+
"items": { "type": "string" }
|
|
314
|
+
},
|
|
315
|
+
"summary": { "type": "string", "minLength": 1 }
|
|
316
|
+
},
|
|
317
|
+
"additionalProperties": false
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
"usage": {
|
|
322
|
+
"type": "object",
|
|
323
|
+
"required": [
|
|
324
|
+
"inputTokens",
|
|
325
|
+
"outputTokens",
|
|
326
|
+
"costUsd",
|
|
327
|
+
"complete"
|
|
328
|
+
],
|
|
329
|
+
"properties": {
|
|
330
|
+
"inputTokens": { "type": ["integer", "null"], "minimum": 0 },
|
|
331
|
+
"outputTokens": { "type": ["integer", "null"], "minimum": 0 },
|
|
332
|
+
"costUsd": { "type": ["number", "null"], "minimum": 0 },
|
|
333
|
+
"complete": { "type": "boolean" }
|
|
334
|
+
},
|
|
335
|
+
"additionalProperties": false
|
|
336
|
+
},
|
|
337
|
+
"rawResult": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"required": ["source", "path", "sha256"],
|
|
340
|
+
"properties": {
|
|
341
|
+
"source": { "type": "string", "minLength": 1 },
|
|
342
|
+
"path": {
|
|
343
|
+
"oneOf": [{ "$ref": "#/$defs/fileUrl" }, { "type": "null" }]
|
|
344
|
+
},
|
|
345
|
+
"sha256": {
|
|
346
|
+
"oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"additionalProperties": false
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"additionalProperties": false
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
"trialEvidence": {
|
|
357
|
+
"type": "object",
|
|
358
|
+
"required": [
|
|
359
|
+
"caseId",
|
|
360
|
+
"trial",
|
|
361
|
+
"executionMode",
|
|
362
|
+
"condition",
|
|
363
|
+
"observationCompleteness",
|
|
364
|
+
"observations",
|
|
365
|
+
"metrics",
|
|
366
|
+
"taskVerdictPolicy",
|
|
367
|
+
"routes",
|
|
368
|
+
"usage",
|
|
369
|
+
"rawResult",
|
|
370
|
+
"artifactRefs"
|
|
371
|
+
],
|
|
372
|
+
"properties": {
|
|
373
|
+
"caseId": { "type": "string", "minLength": 1 },
|
|
374
|
+
"trial": { "type": "integer", "minimum": 1 },
|
|
375
|
+
"executionMode": { "enum": ["executed", "dry", "unknown"] },
|
|
376
|
+
"candidateDurationMs": { "type": ["number", "null"], "minimum": 0 },
|
|
377
|
+
"condition": {
|
|
378
|
+
"type": "object",
|
|
379
|
+
"required": ["requested", "actual", "appliedInstrumentation"],
|
|
380
|
+
"properties": {
|
|
381
|
+
"requested": { "enum": ["passive", "enforced"] },
|
|
382
|
+
"actual": { "enum": ["passive", "enforced", "unknown"] },
|
|
383
|
+
"appliedInstrumentation": { "$ref": "#/$defs/instrumentationList" }
|
|
384
|
+
},
|
|
385
|
+
"additionalProperties": false
|
|
386
|
+
},
|
|
387
|
+
"observationCompleteness": {
|
|
388
|
+
"enum": ["complete", "partial", "unavailable"]
|
|
389
|
+
},
|
|
390
|
+
"observations": {
|
|
391
|
+
"type": "array",
|
|
392
|
+
"items": {
|
|
393
|
+
"type": "object",
|
|
394
|
+
"required": ["id", "source", "completeness", "data"],
|
|
395
|
+
"properties": {
|
|
396
|
+
"id": { "type": "string", "minLength": 1 },
|
|
397
|
+
"source": { "type": "string", "minLength": 1 },
|
|
398
|
+
"completeness": {
|
|
399
|
+
"enum": ["complete", "partial", "unavailable"]
|
|
400
|
+
},
|
|
401
|
+
"data": { "type": "object" }
|
|
402
|
+
},
|
|
403
|
+
"additionalProperties": false
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"metrics": {
|
|
407
|
+
"type": "array",
|
|
408
|
+
"items": { "$ref": "#/$defs/metric" }
|
|
409
|
+
},
|
|
410
|
+
"domainOutcomes": {
|
|
411
|
+
"type": "array",
|
|
412
|
+
"items": {
|
|
413
|
+
"type": "object",
|
|
414
|
+
"required": ["id", "status", "evidenceRefs"],
|
|
415
|
+
"properties": {
|
|
416
|
+
"id": { "type": "string", "minLength": 1 },
|
|
417
|
+
"status": { "enum": ["passed", "failed", "unavailable"] },
|
|
418
|
+
"detail": { "type": "string", "maxLength": 4096 },
|
|
419
|
+
"evidenceRefs": {
|
|
420
|
+
"type": "array",
|
|
421
|
+
"items": { "type": "string", "minLength": 1 },
|
|
422
|
+
"uniqueItems": true
|
|
423
|
+
},
|
|
424
|
+
"data": { "type": "object" }
|
|
425
|
+
},
|
|
426
|
+
"additionalProperties": false
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"taskVerdictPolicy": {
|
|
430
|
+
"oneOf": [
|
|
431
|
+
{ "type": "null" },
|
|
432
|
+
{
|
|
433
|
+
"type": "object",
|
|
434
|
+
"required": ["id", "recommendation"],
|
|
435
|
+
"properties": {
|
|
436
|
+
"id": { "type": "string", "minLength": 1 },
|
|
437
|
+
"recommendation": {
|
|
438
|
+
"enum": ["passed", "failed", "not_assessed", null]
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"additionalProperties": false
|
|
442
|
+
}
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
"advisoryReview": { "$ref": "#/$defs/advisoryReview" },
|
|
446
|
+
"routes": { "type": "array", "items": { "$ref": "#/$defs/route" } },
|
|
447
|
+
"usage": {
|
|
448
|
+
"type": "object",
|
|
449
|
+
"required": ["inputTokens", "outputTokens", "costUsd", "complete"],
|
|
450
|
+
"properties": {
|
|
451
|
+
"inputTokens": { "type": ["integer", "null"], "minimum": 0 },
|
|
452
|
+
"outputTokens": { "type": ["integer", "null"], "minimum": 0 },
|
|
453
|
+
"costUsd": { "type": ["number", "null"], "minimum": 0 },
|
|
454
|
+
"complete": { "type": "boolean" }
|
|
455
|
+
},
|
|
456
|
+
"additionalProperties": false
|
|
457
|
+
},
|
|
458
|
+
"rawResult": {
|
|
459
|
+
"type": "object",
|
|
460
|
+
"required": ["source", "path", "sha256"],
|
|
461
|
+
"properties": {
|
|
462
|
+
"source": { "type": "string", "minLength": 1 },
|
|
463
|
+
"path": {
|
|
464
|
+
"oneOf": [{ "$ref": "#/$defs/fileUrl" }, { "type": "null" }]
|
|
465
|
+
},
|
|
466
|
+
"sha256": {
|
|
467
|
+
"oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"additionalProperties": false
|
|
471
|
+
},
|
|
472
|
+
"artifactRefs": {
|
|
473
|
+
"type": "array",
|
|
474
|
+
"items": {
|
|
475
|
+
"type": "object",
|
|
476
|
+
"required": ["id", "path", "sha256"],
|
|
477
|
+
"properties": {
|
|
478
|
+
"id": { "type": "string", "minLength": 1 },
|
|
479
|
+
"path": { "$ref": "#/$defs/fileUrl" },
|
|
480
|
+
"sha256": { "$ref": "#/$defs/digest" },
|
|
481
|
+
"gitExclude": { "type": "boolean" },
|
|
482
|
+
"executable": { "type": "boolean" }
|
|
483
|
+
},
|
|
484
|
+
"additionalProperties": false
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
"additionalProperties": false
|
|
489
|
+
},
|
|
490
|
+
"diagnostic": {
|
|
491
|
+
"type": "object",
|
|
492
|
+
"required": ["code", "message"],
|
|
493
|
+
"properties": {
|
|
494
|
+
"code": { "type": "string", "minLength": 1 },
|
|
495
|
+
"message": { "type": "string", "minLength": 1, "maxLength": 4096 }
|
|
496
|
+
},
|
|
497
|
+
"additionalProperties": false
|
|
498
|
+
},
|
|
499
|
+
"metric": {
|
|
500
|
+
"type": "object",
|
|
501
|
+
"required": ["id", "value", "unit"],
|
|
502
|
+
"properties": {
|
|
503
|
+
"id": { "type": "string", "minLength": 1 },
|
|
504
|
+
"value": { "type": ["number", "null"] },
|
|
505
|
+
"unit": { "type": "string", "minLength": 1 }
|
|
506
|
+
},
|
|
507
|
+
"additionalProperties": false
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|