assertledger 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/CONTRIBUTING.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.fr.md +236 -0
  4. package/README.md +224 -0
  5. package/SECURITY.md +51 -0
  6. package/benchmarks/agentic-profile/README.md +15 -0
  7. package/benchmarks/agentic-profile/public/README.md +5 -0
  8. package/benchmarks/self-hosted-core/README.md +113 -0
  9. package/benchmarks/self-hosted-core/adapter.mjs +293 -0
  10. package/benchmarks/self-hosted-core/builder.ts +193 -0
  11. package/benchmarks/self-hosted-core/campaign.ts +233 -0
  12. package/benchmarks/self-hosted-core/existing-tests-builder.ts +217 -0
  13. package/benchmarks/self-hosted-core/existing-tests.ts +146 -0
  14. package/benchmarks/self-hosted-core/liveness.test.mjs +8 -0
  15. package/conformance/v1/bundle.json +104 -0
  16. package/conformance/v1/expected/canonical-order-a.json +4 -0
  17. package/conformance/v1/expected/canonical-order-b.json +4 -0
  18. package/conformance/v1/expected/create-benchmark-v1-measured.json +575 -0
  19. package/conformance/v1/expected/create-profile-v1-qualified.json +280 -0
  20. package/conformance/v1/expected/decide-collection-failure-non-kill.json +192 -0
  21. package/conformance/v1/expected/decide-compile-failure-non-kill.json +192 -0
  22. package/conformance/v1/expected/decide-infra-error-non-kill.json +192 -0
  23. package/conformance/v1/expected/decide-no-test-discovered-non-kill.json +192 -0
  24. package/conformance/v1/expected/decide-process-crash-non-kill.json +192 -0
  25. package/conformance/v1/expected/decide-timeout-non-kill.json +192 -0
  26. package/conformance/v1/expected/decide-verified.json +192 -0
  27. package/conformance/v1/expected/replay-benchmark-v1-resealed-summary-forgery.json +12 -0
  28. package/conformance/v1/expected/replay-evidence-raw-tamper.json +6 -0
  29. package/conformance/v1/expected/replay-evidence-resealed-semantic-forgery.json +6 -0
  30. package/conformance/v1/inputs/canonical-order-a.json +8 -0
  31. package/conformance/v1/inputs/canonical-order-b.json +8 -0
  32. package/conformance/v1/inputs/create-benchmark-v1-measured.json +459 -0
  33. package/conformance/v1/inputs/create-profile-v1-qualified.json +228 -0
  34. package/conformance/v1/inputs/decide-collection-failure-non-kill.json +143 -0
  35. package/conformance/v1/inputs/decide-compile-failure-non-kill.json +143 -0
  36. package/conformance/v1/inputs/decide-infra-error-non-kill.json +143 -0
  37. package/conformance/v1/inputs/decide-no-test-discovered-non-kill.json +143 -0
  38. package/conformance/v1/inputs/decide-process-crash-non-kill.json +143 -0
  39. package/conformance/v1/inputs/decide-timeout-non-kill.json +143 -0
  40. package/conformance/v1/inputs/decide-verified.json +143 -0
  41. package/conformance/v1/inputs/replay-benchmark-v1-resealed-summary-forgery.json +575 -0
  42. package/conformance/v1/inputs/replay-evidence-raw-tamper.json +201 -0
  43. package/conformance/v1/inputs/replay-evidence-resealed-semantic-forgery.json +192 -0
  44. package/conformance/v1/schemas/expected-digests.json +175 -0
  45. package/dist/cli.d.ts +9 -0
  46. package/dist/cli.d.ts.map +1 -0
  47. package/dist/cli.js +951 -0
  48. package/dist/cli.js.map +1 -0
  49. package/dist/contracts/diagnostics.d.ts +18 -0
  50. package/dist/contracts/diagnostics.d.ts.map +1 -0
  51. package/dist/contracts/diagnostics.js +13 -0
  52. package/dist/contracts/diagnostics.js.map +1 -0
  53. package/dist/contracts/index.d.ts +3908 -0
  54. package/dist/contracts/index.d.ts.map +1 -0
  55. package/dist/contracts/index.js +2569 -0
  56. package/dist/contracts/index.js.map +1 -0
  57. package/dist/contracts/runtime-doctor.d.ts +107 -0
  58. package/dist/contracts/runtime-doctor.d.ts.map +1 -0
  59. package/dist/contracts/runtime-doctor.js +91 -0
  60. package/dist/contracts/runtime-doctor.js.map +1 -0
  61. package/dist/core/index.d.ts +200 -0
  62. package/dist/core/index.d.ts.map +1 -0
  63. package/dist/core/index.js +2587 -0
  64. package/dist/core/index.js.map +1 -0
  65. package/dist/diagnostics.d.ts +7 -0
  66. package/dist/diagnostics.d.ts.map +1 -0
  67. package/dist/diagnostics.js +252 -0
  68. package/dist/diagnostics.js.map +1 -0
  69. package/dist/engine/adapters/node-test-profile.d.ts +14 -0
  70. package/dist/engine/adapters/node-test-profile.d.ts.map +1 -0
  71. package/dist/engine/adapters/node-test-profile.js +14 -0
  72. package/dist/engine/adapters/node-test-profile.js.map +1 -0
  73. package/dist/engine/adapters/node-test-runtime.d.ts +39 -0
  74. package/dist/engine/adapters/node-test-runtime.d.ts.map +1 -0
  75. package/dist/engine/adapters/node-test-runtime.js +173 -0
  76. package/dist/engine/adapters/node-test-runtime.js.map +1 -0
  77. package/dist/engine/adapters/runtime-facts.d.ts +26 -0
  78. package/dist/engine/adapters/runtime-facts.d.ts.map +1 -0
  79. package/dist/engine/adapters/runtime-facts.js +73 -0
  80. package/dist/engine/adapters/runtime-facts.js.map +1 -0
  81. package/dist/engine/connection.d.ts +22 -0
  82. package/dist/engine/connection.d.ts.map +1 -0
  83. package/dist/engine/connection.js +343 -0
  84. package/dist/engine/connection.js.map +1 -0
  85. package/dist/engine/git-regression.d.ts +25 -0
  86. package/dist/engine/git-regression.d.ts.map +1 -0
  87. package/dist/engine/git-regression.js +803 -0
  88. package/dist/engine/git-regression.js.map +1 -0
  89. package/dist/engine/index.d.ts +55 -0
  90. package/dist/engine/index.d.ts.map +1 -0
  91. package/dist/engine/index.js +2782 -0
  92. package/dist/engine/index.js.map +1 -0
  93. package/dist/engine/node-test-reporter.d.ts +2 -0
  94. package/dist/engine/node-test-reporter.d.ts.map +1 -0
  95. package/dist/engine/node-test-reporter.js +70 -0
  96. package/dist/engine/node-test-reporter.js.map +1 -0
  97. package/dist/engine/runtime-doctor.d.ts +16 -0
  98. package/dist/engine/runtime-doctor.d.ts.map +1 -0
  99. package/dist/engine/runtime-doctor.js +100 -0
  100. package/dist/engine/runtime-doctor.js.map +1 -0
  101. package/dist/evaluation/agentic-corpus.d.ts +161 -0
  102. package/dist/evaluation/agentic-corpus.d.ts.map +1 -0
  103. package/dist/evaluation/agentic-corpus.js +710 -0
  104. package/dist/evaluation/agentic-corpus.js.map +1 -0
  105. package/dist/index.d.ts +8 -0
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.js +8 -0
  108. package/dist/index.js.map +1 -0
  109. package/dist/mcp/index.d.ts +13 -0
  110. package/dist/mcp/index.d.ts.map +1 -0
  111. package/dist/mcp/index.js +391 -0
  112. package/dist/mcp/index.js.map +1 -0
  113. package/dist/mcp/stdio.d.ts +3 -0
  114. package/dist/mcp/stdio.d.ts.map +1 -0
  115. package/dist/mcp/stdio.js +13 -0
  116. package/dist/mcp/stdio.js.map +1 -0
  117. package/dist/sdk/index.d.ts +52 -0
  118. package/dist/sdk/index.d.ts.map +1 -0
  119. package/dist/sdk/index.js +224 -0
  120. package/dist/sdk/index.js.map +1 -0
  121. package/dist/version.d.ts +2 -0
  122. package/dist/version.d.ts.map +1 -0
  123. package/dist/version.js +10 -0
  124. package/dist/version.js.map +1 -0
  125. package/docs/adapter-protocol.md +196 -0
  126. package/docs/agentic-benchmark.md +118 -0
  127. package/docs/agentic-corpus-experiment-h3.md +89 -0
  128. package/docs/agentic-corpus-plan.md +105 -0
  129. package/docs/agentic-corpus-provenance.md +59 -0
  130. package/docs/agentic-test-profile-pilot.md +57 -0
  131. package/docs/agentic-test-profile-v2.md +116 -0
  132. package/docs/agentic-test-profile.md +274 -0
  133. package/docs/architecture.md +157 -0
  134. package/docs/ci.md +37 -0
  135. package/docs/client-connections.md +61 -0
  136. package/docs/conformance-v1.md +72 -0
  137. package/docs/decisions/0001-typescript-runtime.md +24 -0
  138. package/docs/developer-experience.md +55 -0
  139. package/docs/diagnostics.md +35 -0
  140. package/docs/distribution.md +40 -0
  141. package/docs/git-regression.md +39 -0
  142. package/docs/migration-repository-validation-order.md +35 -0
  143. package/docs/migration-testforge-to-assertledger.md +64 -0
  144. package/docs/project-intent.md +173 -0
  145. package/docs/proof-model.md +116 -0
  146. package/docs/reference.md +336 -0
  147. package/docs/release-1.0.md +63 -0
  148. package/docs/repository-audit.md +52 -0
  149. package/docs/repository-init.md +60 -0
  150. package/docs/research-basis.md +27 -0
  151. package/docs/roadmap.md +74 -0
  152. package/docs/runtime-doctor.md +65 -0
  153. package/docs/testexplora-calibration.md +71 -0
  154. package/examples/agentic-benchmark/benchmark-request.mjs +19 -0
  155. package/examples/agentic-benchmark/structured-phase-adapter-fixture.mjs +35 -0
  156. package/examples/agentic-profile/profile-benchmark.mjs +34 -0
  157. package/examples/agentic-profile/profile-manifest.mjs +28 -0
  158. package/examples/git-history/README.md +44 -0
  159. package/examples/git-history/create-demo.mjs +128 -0
  160. package/examples/git-history/escape-string-regexp/LICENSE +9 -0
  161. package/examples/git-history/escape-string-regexp/before.cjs.txt +11 -0
  162. package/examples/git-history/escape-string-regexp/fixed.cjs.txt +13 -0
  163. package/examples/git-history/escape-string-regexp/provenance.json +28 -0
  164. package/examples/node-test/repository/package.json +5 -0
  165. package/examples/node-test/repository/src/is-even.js +3 -0
  166. package/examples/node-test/repository/tests/base.test.js +6 -0
  167. package/examples/node-test/request.json +93 -0
  168. package/integrations/skill/SKILL.md +51 -0
  169. package/package.json +88 -0
  170. package/schemas/agentic-benchmark-acquisition-replay-result.v1.json +70 -0
  171. package/schemas/agentic-benchmark-acquisition-request.v1.json +564 -0
  172. package/schemas/agentic-benchmark-acquisition-result.v1.json +1409 -0
  173. package/schemas/agentic-benchmark-artifact.v1.json +1251 -0
  174. package/schemas/agentic-benchmark-replay-result.v1.json +84 -0
  175. package/schemas/agentic-benchmark-request.v1.json +1034 -0
  176. package/schemas/agentic-corpus-allocation-commitment-replay-result.v1.json +58 -0
  177. package/schemas/agentic-corpus-allocation-commitment.v1.json +141 -0
  178. package/schemas/agentic-corpus-allocation-replay-result.v1.json +34 -0
  179. package/schemas/agentic-corpus-allocation-request.v1.json +65 -0
  180. package/schemas/agentic-corpus-allocation-reveal.v1.json +66 -0
  181. package/schemas/agentic-corpus-allocation.v1.json +167 -0
  182. package/schemas/agentic-corpus-experiment-artifact.v1.json +329 -0
  183. package/schemas/agentic-corpus-experiment-plan-replay-result.v1.json +50 -0
  184. package/schemas/agentic-corpus-experiment-plan.v1.json +424 -0
  185. package/schemas/agentic-corpus-experiment-replay-request.v1.json +336 -0
  186. package/schemas/agentic-corpus-experiment-replay-result.v1.json +106 -0
  187. package/schemas/agentic-corpus-experiment-request.v1.json +204 -0
  188. package/schemas/agentic-corpus-provenance.v1.json +143 -0
  189. package/schemas/agentic-corpus-trust-policy.v1.json +133 -0
  190. package/schemas/agentic-profile-replay-result.v1.json +56 -0
  191. package/schemas/agentic-profile-replay-result.v2.json +63 -0
  192. package/schemas/agentic-profile-report.v1.json +961 -0
  193. package/schemas/agentic-profile-report.v2.json +1674 -0
  194. package/schemas/agentic-profile-request.v1.json +671 -0
  195. package/schemas/agentic-profile-request.v2.json +1338 -0
  196. package/schemas/evidence-manifest.v1.json +636 -0
  197. package/schemas/replay-result.v1.json +49 -0
  198. package/schemas/repository-analysis.v1.json +119 -0
  199. package/schemas/repository-audit.v1.json +811 -0
  200. package/schemas/repository-init-config.v1.json +183 -0
  201. package/schemas/repository-init-lock.v1.json +162 -0
  202. package/schemas/repository-init-result.v1.json +212 -0
  203. package/schemas/verification-request.v1.json +389 -0
@@ -0,0 +1,1034 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "$ref": "#/$defs/__schema0"
7
+ },
8
+ "sourceManifest": {
9
+ "$ref": "#/$defs/__schema1"
10
+ },
11
+ "referenceWorldId": {
12
+ "$ref": "#/$defs/__schema7"
13
+ },
14
+ "policy": {
15
+ "$ref": "#/$defs/__schema11"
16
+ },
17
+ "protocol": {
18
+ "$ref": "#/$defs/__schema12"
19
+ },
20
+ "fingerprint": {
21
+ "$ref": "#/$defs/__schema13"
22
+ },
23
+ "runs": {
24
+ "$ref": "#/$defs/__schema15"
25
+ }
26
+ },
27
+ "required": [
28
+ "schemaVersion",
29
+ "sourceManifest",
30
+ "referenceWorldId",
31
+ "policy",
32
+ "protocol",
33
+ "fingerprint",
34
+ "runs"
35
+ ],
36
+ "additionalProperties": false,
37
+ "title": "TestForge Agentic Benchmark request",
38
+ "description": "A replay-valid source manifest and raw cold/warm benchmark observations.",
39
+ "$defs": {
40
+ "__schema0": {
41
+ "type": "string",
42
+ "const": "1.0.0"
43
+ },
44
+ "__schema1": {
45
+ "type": "object",
46
+ "properties": {
47
+ "schemaVersion": {
48
+ "type": "string",
49
+ "const": "1.0.0"
50
+ },
51
+ "repositoryDigest": {
52
+ "anyOf": [
53
+ {
54
+ "$ref": "#/$defs/__schema2"
55
+ },
56
+ {
57
+ "type": "string",
58
+ "const": "invalid"
59
+ }
60
+ ]
61
+ },
62
+ "evidenceContext": {
63
+ "type": "object",
64
+ "properties": {
65
+ "engine": {
66
+ "type": "object",
67
+ "properties": {
68
+ "name": {
69
+ "type": "string",
70
+ "minLength": 1,
71
+ "maxLength": 128
72
+ },
73
+ "version": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 128
77
+ }
78
+ },
79
+ "required": ["name", "version"],
80
+ "additionalProperties": false
81
+ },
82
+ "adapter": {
83
+ "type": "object",
84
+ "properties": {
85
+ "name": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "maxLength": 128
89
+ },
90
+ "version": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 128
94
+ },
95
+ "configuration": {
96
+ "$ref": "#/$defs/__schema3"
97
+ }
98
+ },
99
+ "required": ["name", "version", "configuration"],
100
+ "additionalProperties": false
101
+ },
102
+ "execution": {
103
+ "type": "object",
104
+ "properties": {
105
+ "isolation": {
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "maxLength": 128
109
+ },
110
+ "environmentAllowlist": {
111
+ "maxItems": 100,
112
+ "type": "array",
113
+ "items": {
114
+ "$ref": "#/$defs/__schema4"
115
+ }
116
+ },
117
+ "budgets": {
118
+ "$ref": "#/$defs/__schema5"
119
+ },
120
+ "candidateRoots": {
121
+ "maxItems": 100,
122
+ "type": "array",
123
+ "items": {
124
+ "$ref": "#/$defs/__schema6"
125
+ }
126
+ }
127
+ },
128
+ "required": ["isolation", "environmentAllowlist", "budgets", "candidateRoots"],
129
+ "additionalProperties": false
130
+ },
131
+ "worlds": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "object",
135
+ "properties": {
136
+ "id": {
137
+ "$ref": "#/$defs/__schema7"
138
+ },
139
+ "provenance": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "maxLength": 1024
143
+ },
144
+ "digest": {
145
+ "$ref": "#/$defs/__schema2"
146
+ }
147
+ },
148
+ "required": ["id", "provenance", "digest"],
149
+ "additionalProperties": false
150
+ }
151
+ }
152
+ },
153
+ "required": ["engine", "adapter", "execution", "worlds"],
154
+ "additionalProperties": false
155
+ },
156
+ "policy": {
157
+ "anyOf": [
158
+ {
159
+ "type": "object",
160
+ "properties": {
161
+ "policyVersion": {
162
+ "type": "string",
163
+ "const": "1.0.0"
164
+ },
165
+ "requiredAttempts": {
166
+ "type": "integer",
167
+ "minimum": 1,
168
+ "maximum": 1000
169
+ },
170
+ "minimumTargetWeightPermille": {
171
+ "type": "integer",
172
+ "minimum": 1,
173
+ "maximum": 1000
174
+ },
175
+ "maximumSelectedCandidates": {
176
+ "type": "integer",
177
+ "minimum": 1,
178
+ "maximum": 1000
179
+ },
180
+ "acceptedTargetOutcomes": {
181
+ "minItems": 1,
182
+ "maxItems": 1,
183
+ "type": "array",
184
+ "items": {
185
+ "$ref": "#/$defs/__schema8"
186
+ }
187
+ }
188
+ },
189
+ "required": [
190
+ "policyVersion",
191
+ "requiredAttempts",
192
+ "minimumTargetWeightPermille",
193
+ "maximumSelectedCandidates",
194
+ "acceptedTargetOutcomes"
195
+ ],
196
+ "additionalProperties": false
197
+ },
198
+ {
199
+ "type": "object",
200
+ "properties": {
201
+ "policyVersion": {
202
+ "type": "string",
203
+ "const": "invalid"
204
+ },
205
+ "requiredAttempts": {
206
+ "type": "number",
207
+ "const": 1
208
+ },
209
+ "minimumTargetWeightPermille": {
210
+ "type": "number",
211
+ "const": 1000
212
+ },
213
+ "maximumSelectedCandidates": {
214
+ "type": "number",
215
+ "const": 0
216
+ },
217
+ "acceptedTargetOutcomes": {
218
+ "maxItems": 0,
219
+ "type": "array",
220
+ "items": {
221
+ "$ref": "#/$defs/__schema9"
222
+ }
223
+ }
224
+ },
225
+ "required": [
226
+ "policyVersion",
227
+ "requiredAttempts",
228
+ "minimumTargetWeightPermille",
229
+ "maximumSelectedCandidates",
230
+ "acceptedTargetOutcomes"
231
+ ],
232
+ "additionalProperties": false
233
+ }
234
+ ]
235
+ },
236
+ "worlds": {
237
+ "type": "array",
238
+ "items": {
239
+ "type": "object",
240
+ "properties": {
241
+ "id": {
242
+ "$ref": "#/$defs/__schema7"
243
+ },
244
+ "kind": {
245
+ "type": "string",
246
+ "enum": ["REFERENCE", "TARGET", "NEUTRAL"]
247
+ },
248
+ "required": {
249
+ "type": "boolean"
250
+ },
251
+ "weight": {
252
+ "type": "integer",
253
+ "minimum": 0,
254
+ "maximum": 1000000
255
+ }
256
+ },
257
+ "required": ["id", "kind", "required", "weight"],
258
+ "additionalProperties": false
259
+ }
260
+ },
261
+ "candidates": {
262
+ "type": "array",
263
+ "items": {
264
+ "type": "object",
265
+ "properties": {
266
+ "id": {
267
+ "$ref": "#/$defs/__schema7"
268
+ },
269
+ "digest": {
270
+ "$ref": "#/$defs/__schema2"
271
+ },
272
+ "sizeBytes": {
273
+ "type": "integer",
274
+ "minimum": 0,
275
+ "maximum": 9007199254740991
276
+ },
277
+ "status": {
278
+ "type": "string",
279
+ "enum": ["ELIGIBLE", "UNSTABLE", "INCONCLUSIVE", "INVALID", "WEAK_ORACLE"]
280
+ },
281
+ "killedTargetIds": {
282
+ "type": "array",
283
+ "items": {
284
+ "$ref": "#/$defs/__schema7"
285
+ }
286
+ },
287
+ "targetWeightKilled": {
288
+ "type": "integer",
289
+ "minimum": 0,
290
+ "maximum": 9007199254740991
291
+ },
292
+ "gates": {
293
+ "type": "array",
294
+ "items": {
295
+ "type": "object",
296
+ "properties": {
297
+ "name": {
298
+ "type": "string",
299
+ "enum": [
300
+ "COMPLETENESS",
301
+ "STABILITY",
302
+ "DISCOVERY",
303
+ "REFERENCE",
304
+ "NEUTRAL",
305
+ "TARGET_STRENGTH"
306
+ ]
307
+ },
308
+ "status": {
309
+ "type": "string",
310
+ "enum": ["PASSED", "FAILED", "NOT_RUN"]
311
+ },
312
+ "evidenceRunIds": {
313
+ "type": "array",
314
+ "items": {
315
+ "type": "string",
316
+ "minLength": 1,
317
+ "maxLength": 512
318
+ }
319
+ },
320
+ "reasonCodes": {
321
+ "type": "array",
322
+ "items": {
323
+ "$ref": "#/$defs/__schema10"
324
+ }
325
+ }
326
+ },
327
+ "required": ["name", "status", "evidenceRunIds", "reasonCodes"],
328
+ "additionalProperties": false
329
+ }
330
+ },
331
+ "reasonCodes": {
332
+ "type": "array",
333
+ "items": {
334
+ "$ref": "#/$defs/__schema10"
335
+ }
336
+ }
337
+ },
338
+ "required": [
339
+ "id",
340
+ "digest",
341
+ "sizeBytes",
342
+ "status",
343
+ "killedTargetIds",
344
+ "targetWeightKilled",
345
+ "gates",
346
+ "reasonCodes"
347
+ ],
348
+ "additionalProperties": false
349
+ }
350
+ },
351
+ "observations": {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "object",
355
+ "properties": {
356
+ "runId": {
357
+ "type": "string",
358
+ "minLength": 1,
359
+ "maxLength": 512
360
+ },
361
+ "candidateId": {
362
+ "anyOf": [
363
+ {
364
+ "$ref": "#/$defs/__schema7"
365
+ },
366
+ {
367
+ "type": "null"
368
+ }
369
+ ]
370
+ },
371
+ "worldId": {
372
+ "$ref": "#/$defs/__schema7"
373
+ },
374
+ "attempt": {
375
+ "type": "integer",
376
+ "minimum": 1,
377
+ "maximum": 9007199254740991
378
+ },
379
+ "outcome": {
380
+ "type": "string",
381
+ "enum": [
382
+ "PASS",
383
+ "ASSERTION_FAILURE",
384
+ "COLLECTION_FAILURE",
385
+ "COMPILE_FAILURE",
386
+ "PROCESS_CRASH",
387
+ "TIMEOUT",
388
+ "INFRA_ERROR",
389
+ "NO_TEST_DISCOVERED"
390
+ ]
391
+ },
392
+ "testsDiscovered": {
393
+ "type": "integer",
394
+ "minimum": 0,
395
+ "maximum": 9007199254740991
396
+ },
397
+ "candidateTestsDiscovered": {
398
+ "type": "integer",
399
+ "minimum": 0,
400
+ "maximum": 9007199254740991
401
+ },
402
+ "attributed": {
403
+ "type": "boolean"
404
+ },
405
+ "durationMs": {
406
+ "type": "number",
407
+ "minimum": 0
408
+ },
409
+ "exitCode": {
410
+ "anyOf": [
411
+ {
412
+ "type": "integer",
413
+ "minimum": 0,
414
+ "maximum": 9007199254740991
415
+ },
416
+ {
417
+ "type": "null"
418
+ }
419
+ ]
420
+ },
421
+ "stdoutDigest": {
422
+ "$ref": "#/$defs/__schema2"
423
+ },
424
+ "stderrDigest": {
425
+ "$ref": "#/$defs/__schema2"
426
+ }
427
+ },
428
+ "required": [
429
+ "runId",
430
+ "candidateId",
431
+ "worldId",
432
+ "attempt",
433
+ "outcome",
434
+ "testsDiscovered",
435
+ "candidateTestsDiscovered",
436
+ "attributed"
437
+ ],
438
+ "additionalProperties": false
439
+ }
440
+ },
441
+ "decision": {
442
+ "type": "object",
443
+ "properties": {
444
+ "status": {
445
+ "type": "string",
446
+ "enum": ["VERIFIED", "REJECTED", "INCONCLUSIVE", "ENGINE_ERROR"]
447
+ },
448
+ "selectedCandidateIds": {
449
+ "type": "array",
450
+ "items": {
451
+ "$ref": "#/$defs/__schema7"
452
+ }
453
+ },
454
+ "reasonCodes": {
455
+ "type": "array",
456
+ "items": {
457
+ "$ref": "#/$defs/__schema10"
458
+ }
459
+ }
460
+ },
461
+ "required": ["status", "selectedCandidateIds", "reasonCodes"],
462
+ "additionalProperties": false
463
+ },
464
+ "decisionDigest": {
465
+ "$ref": "#/$defs/__schema2"
466
+ },
467
+ "artifactDigest": {
468
+ "$ref": "#/$defs/__schema2"
469
+ },
470
+ "adapter": {
471
+ "oneOf": [
472
+ {
473
+ "type": "object",
474
+ "properties": {
475
+ "kind": {
476
+ "type": "string",
477
+ "const": "node-test"
478
+ }
479
+ },
480
+ "required": ["kind"],
481
+ "additionalProperties": false
482
+ },
483
+ {
484
+ "type": "object",
485
+ "properties": {
486
+ "kind": {
487
+ "type": "string",
488
+ "const": "testforge-command"
489
+ },
490
+ "protocolVersion": {
491
+ "type": "string",
492
+ "const": "1.0.0"
493
+ }
494
+ },
495
+ "required": ["kind", "protocolVersion"],
496
+ "additionalProperties": false
497
+ }
498
+ ]
499
+ },
500
+ "isolation": {
501
+ "type": "object",
502
+ "properties": {
503
+ "kind": {
504
+ "type": "string",
505
+ "const": "trusted-local"
506
+ },
507
+ "level": {
508
+ "type": "string",
509
+ "const": "UNSANDBOXED"
510
+ },
511
+ "acknowledgedUnsafeExecution": {
512
+ "type": "boolean",
513
+ "const": true
514
+ }
515
+ },
516
+ "required": ["kind", "level", "acknowledgedUnsafeExecution"],
517
+ "additionalProperties": false
518
+ },
519
+ "limitations": {
520
+ "type": "array",
521
+ "items": {
522
+ "type": "string",
523
+ "minLength": 1,
524
+ "maxLength": 2048
525
+ }
526
+ }
527
+ },
528
+ "required": [
529
+ "schemaVersion",
530
+ "repositoryDigest",
531
+ "evidenceContext",
532
+ "policy",
533
+ "worlds",
534
+ "candidates",
535
+ "observations",
536
+ "decision",
537
+ "decisionDigest",
538
+ "artifactDigest",
539
+ "adapter",
540
+ "isolation",
541
+ "limitations"
542
+ ],
543
+ "additionalProperties": false
544
+ },
545
+ "__schema2": {
546
+ "type": "string",
547
+ "pattern": "^sha256:[a-f0-9]{64}$"
548
+ },
549
+ "__schema3": {
550
+ "anyOf": [
551
+ {
552
+ "type": "string"
553
+ },
554
+ {
555
+ "type": "number"
556
+ },
557
+ {
558
+ "type": "boolean"
559
+ },
560
+ {
561
+ "type": "null"
562
+ },
563
+ {
564
+ "type": "array",
565
+ "items": {
566
+ "$ref": "#/$defs/__schema3"
567
+ }
568
+ },
569
+ {
570
+ "type": "object",
571
+ "propertyNames": {
572
+ "type": "string"
573
+ },
574
+ "additionalProperties": {
575
+ "$ref": "#/$defs/__schema3"
576
+ }
577
+ }
578
+ ]
579
+ },
580
+ "__schema4": {
581
+ "type": "string",
582
+ "minLength": 1,
583
+ "maxLength": 128
584
+ },
585
+ "__schema5": {
586
+ "anyOf": [
587
+ {
588
+ "type": "string"
589
+ },
590
+ {
591
+ "type": "number"
592
+ },
593
+ {
594
+ "type": "boolean"
595
+ },
596
+ {
597
+ "type": "null"
598
+ },
599
+ {
600
+ "type": "array",
601
+ "items": {
602
+ "$ref": "#/$defs/__schema5"
603
+ }
604
+ },
605
+ {
606
+ "type": "object",
607
+ "propertyNames": {
608
+ "type": "string"
609
+ },
610
+ "additionalProperties": {
611
+ "$ref": "#/$defs/__schema5"
612
+ }
613
+ }
614
+ ]
615
+ },
616
+ "__schema6": {
617
+ "type": "string",
618
+ "minLength": 1,
619
+ "maxLength": 512
620
+ },
621
+ "__schema7": {
622
+ "type": "string",
623
+ "minLength": 1,
624
+ "maxLength": 128,
625
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
626
+ },
627
+ "__schema8": {
628
+ "type": "string",
629
+ "const": "ASSERTION_FAILURE"
630
+ },
631
+ "__schema9": {
632
+ "type": "string",
633
+ "const": "ASSERTION_FAILURE"
634
+ },
635
+ "__schema10": {
636
+ "type": "string",
637
+ "minLength": 1,
638
+ "maxLength": 128,
639
+ "pattern": "^[A-Z][A-Z0-9_]*$"
640
+ },
641
+ "__schema11": {
642
+ "type": "object",
643
+ "properties": {
644
+ "benchmarkVersion": {
645
+ "type": "string",
646
+ "const": "1.0.0"
647
+ },
648
+ "minimumMeasuredSamplesPerRegime": {
649
+ "type": "integer",
650
+ "minimum": 1,
651
+ "maximum": 1000
652
+ },
653
+ "coldMeasuredSamples": {
654
+ "type": "integer",
655
+ "minimum": 1,
656
+ "maximum": 1000
657
+ },
658
+ "warmupSamples": {
659
+ "type": "integer",
660
+ "minimum": 1,
661
+ "maximum": 1000
662
+ },
663
+ "warmMeasuredSamples": {
664
+ "type": "integer",
665
+ "minimum": 1,
666
+ "maximum": 1000
667
+ },
668
+ "maximumExecutions": {
669
+ "type": "integer",
670
+ "minimum": 1,
671
+ "maximum": 1000000
672
+ }
673
+ },
674
+ "required": [
675
+ "benchmarkVersion",
676
+ "minimumMeasuredSamplesPerRegime",
677
+ "coldMeasuredSamples",
678
+ "warmupSamples",
679
+ "warmMeasuredSamples",
680
+ "maximumExecutions"
681
+ ],
682
+ "additionalProperties": false
683
+ },
684
+ "__schema12": {
685
+ "type": "object",
686
+ "properties": {
687
+ "protocolVersion": {
688
+ "type": "string",
689
+ "const": "1.0.0"
690
+ },
691
+ "clock": {
692
+ "type": "string",
693
+ "const": "MONOTONIC"
694
+ },
695
+ "unit": {
696
+ "type": "string",
697
+ "const": "MICROSECOND"
698
+ },
699
+ "quantile": {
700
+ "type": "string",
701
+ "const": "NEAREST_RANK"
702
+ },
703
+ "phases": {
704
+ "type": "array",
705
+ "prefixItems": [
706
+ {
707
+ "type": "string",
708
+ "const": "PREPARATION"
709
+ },
710
+ {
711
+ "type": "string",
712
+ "const": "STARTUP"
713
+ },
714
+ {
715
+ "type": "string",
716
+ "const": "COMPILE_OR_COLLECTION"
717
+ },
718
+ {
719
+ "type": "string",
720
+ "const": "EXECUTION"
721
+ }
722
+ ]
723
+ },
724
+ "coldDefinition": {
725
+ "type": "string",
726
+ "const": "FRESH_WORKSPACE_FRESH_PROCESS_RESET_DECLARED_CACHES"
727
+ },
728
+ "warmDefinition": {
729
+ "type": "string",
730
+ "const": "FRESH_WORKSPACE_FRESH_PROCESS_RETAIN_DECLARED_CACHES"
731
+ }
732
+ },
733
+ "required": [
734
+ "protocolVersion",
735
+ "clock",
736
+ "unit",
737
+ "quantile",
738
+ "phases",
739
+ "coldDefinition",
740
+ "warmDefinition"
741
+ ],
742
+ "additionalProperties": false
743
+ },
744
+ "__schema13": {
745
+ "type": "object",
746
+ "properties": {
747
+ "environmentId": {
748
+ "$ref": "#/$defs/__schema7"
749
+ },
750
+ "os": {
751
+ "type": "object",
752
+ "properties": {
753
+ "platform": {
754
+ "type": "string",
755
+ "minLength": 1,
756
+ "maxLength": 128
757
+ },
758
+ "release": {
759
+ "type": "string",
760
+ "minLength": 1,
761
+ "maxLength": 128
762
+ },
763
+ "arch": {
764
+ "type": "string",
765
+ "minLength": 1,
766
+ "maxLength": 128
767
+ }
768
+ },
769
+ "required": ["platform", "release", "arch"],
770
+ "additionalProperties": false
771
+ },
772
+ "cpu": {
773
+ "type": "object",
774
+ "properties": {
775
+ "arch": {
776
+ "type": "string",
777
+ "minLength": 1,
778
+ "maxLength": 128
779
+ },
780
+ "model": {
781
+ "type": "string",
782
+ "minLength": 1,
783
+ "maxLength": 512
784
+ },
785
+ "logicalCores": {
786
+ "type": "integer",
787
+ "minimum": 1,
788
+ "maximum": 1000000
789
+ }
790
+ },
791
+ "required": ["arch", "model", "logicalCores"],
792
+ "additionalProperties": false
793
+ },
794
+ "logicalCpuLimit": {
795
+ "anyOf": [
796
+ {
797
+ "type": "integer",
798
+ "minimum": 1,
799
+ "maximum": 1000000
800
+ },
801
+ {
802
+ "type": "null"
803
+ }
804
+ ]
805
+ },
806
+ "memoryLimitBytes": {
807
+ "anyOf": [
808
+ {
809
+ "type": "integer",
810
+ "minimum": 1,
811
+ "maximum": 9007199254740991
812
+ },
813
+ {
814
+ "type": "null"
815
+ }
816
+ ]
817
+ },
818
+ "executionBoundary": {
819
+ "type": "string",
820
+ "const": "UNSANDBOXED"
821
+ },
822
+ "tools": {
823
+ "minItems": 1,
824
+ "maxItems": 100,
825
+ "type": "array",
826
+ "items": {
827
+ "$ref": "#/$defs/__schema14"
828
+ }
829
+ },
830
+ "dependencyGraphDigest": {
831
+ "$ref": "#/$defs/__schema2"
832
+ },
833
+ "phaseReporterDigest": {
834
+ "$ref": "#/$defs/__schema2"
835
+ }
836
+ },
837
+ "required": [
838
+ "environmentId",
839
+ "os",
840
+ "cpu",
841
+ "logicalCpuLimit",
842
+ "memoryLimitBytes",
843
+ "executionBoundary",
844
+ "tools",
845
+ "dependencyGraphDigest",
846
+ "phaseReporterDigest"
847
+ ],
848
+ "additionalProperties": false
849
+ },
850
+ "__schema14": {
851
+ "type": "object",
852
+ "properties": {
853
+ "role": {
854
+ "$ref": "#/$defs/__schema7"
855
+ },
856
+ "name": {
857
+ "type": "string",
858
+ "minLength": 1,
859
+ "maxLength": 256
860
+ },
861
+ "version": {
862
+ "type": "string",
863
+ "minLength": 1,
864
+ "maxLength": 256
865
+ },
866
+ "digest": {
867
+ "$ref": "#/$defs/__schema2"
868
+ },
869
+ "configurationDigest": {
870
+ "$ref": "#/$defs/__schema2"
871
+ }
872
+ },
873
+ "required": ["role", "name", "version", "digest", "configurationDigest"],
874
+ "additionalProperties": false
875
+ },
876
+ "__schema15": {
877
+ "maxItems": 1000000,
878
+ "type": "array",
879
+ "items": {
880
+ "$ref": "#/$defs/__schema16"
881
+ }
882
+ },
883
+ "__schema16": {
884
+ "oneOf": [
885
+ {
886
+ "type": "object",
887
+ "properties": {
888
+ "candidateId": {
889
+ "$ref": "#/$defs/__schema7"
890
+ },
891
+ "candidateDigest": {
892
+ "$ref": "#/$defs/__schema2"
893
+ },
894
+ "regime": {
895
+ "$ref": "#/$defs/__schema17"
896
+ },
897
+ "role": {
898
+ "$ref": "#/$defs/__schema18"
899
+ },
900
+ "ordinal": {
901
+ "$ref": "#/$defs/__schema19"
902
+ },
903
+ "status": {
904
+ "type": "string",
905
+ "const": "COMPLETE"
906
+ },
907
+ "outcome": {
908
+ "type": "string",
909
+ "const": "PASS"
910
+ },
911
+ "phases": {
912
+ "minItems": 4,
913
+ "maxItems": 4,
914
+ "type": "array",
915
+ "items": {
916
+ "$ref": "#/$defs/__schema20"
917
+ }
918
+ },
919
+ "totalUs": {
920
+ "type": "integer",
921
+ "minimum": 0,
922
+ "maximum": 9007199254740991
923
+ },
924
+ "cpuTimeUs": {
925
+ "type": "integer",
926
+ "minimum": 0,
927
+ "maximum": 9007199254740991
928
+ }
929
+ },
930
+ "required": [
931
+ "candidateId",
932
+ "candidateDigest",
933
+ "regime",
934
+ "role",
935
+ "ordinal",
936
+ "status",
937
+ "outcome",
938
+ "phases",
939
+ "totalUs"
940
+ ],
941
+ "additionalProperties": false
942
+ },
943
+ {
944
+ "type": "object",
945
+ "properties": {
946
+ "candidateId": {
947
+ "$ref": "#/$defs/__schema7"
948
+ },
949
+ "candidateDigest": {
950
+ "$ref": "#/$defs/__schema2"
951
+ },
952
+ "regime": {
953
+ "$ref": "#/$defs/__schema17"
954
+ },
955
+ "role": {
956
+ "$ref": "#/$defs/__schema18"
957
+ },
958
+ "ordinal": {
959
+ "$ref": "#/$defs/__schema19"
960
+ },
961
+ "status": {
962
+ "type": "string",
963
+ "const": "INCOMPLETE"
964
+ },
965
+ "outcome": {
966
+ "type": "string",
967
+ "enum": [
968
+ "ASSERTION_FAILURE",
969
+ "COLLECTION_FAILURE",
970
+ "COMPILE_FAILURE",
971
+ "PROCESS_CRASH",
972
+ "TIMEOUT",
973
+ "INFRA_ERROR",
974
+ "NO_TEST_DISCOVERED"
975
+ ]
976
+ },
977
+ "phases": {
978
+ "type": "null"
979
+ },
980
+ "totalUs": {
981
+ "type": "null"
982
+ },
983
+ "cpuTimeUs": {
984
+ "type": "null"
985
+ }
986
+ },
987
+ "required": [
988
+ "candidateId",
989
+ "candidateDigest",
990
+ "regime",
991
+ "role",
992
+ "ordinal",
993
+ "status",
994
+ "outcome",
995
+ "phases",
996
+ "totalUs",
997
+ "cpuTimeUs"
998
+ ],
999
+ "additionalProperties": false
1000
+ }
1001
+ ]
1002
+ },
1003
+ "__schema17": {
1004
+ "type": "string",
1005
+ "enum": ["COLD", "WARM"]
1006
+ },
1007
+ "__schema18": {
1008
+ "type": "string",
1009
+ "enum": ["WARMUP", "MEASUREMENT"]
1010
+ },
1011
+ "__schema19": {
1012
+ "type": "integer",
1013
+ "minimum": 1,
1014
+ "maximum": 1000000
1015
+ },
1016
+ "__schema20": {
1017
+ "type": "object",
1018
+ "properties": {
1019
+ "phase": {
1020
+ "type": "string",
1021
+ "enum": ["PREPARATION", "STARTUP", "COMPILE_OR_COLLECTION", "EXECUTION"]
1022
+ },
1023
+ "durationUs": {
1024
+ "type": "integer",
1025
+ "minimum": 0,
1026
+ "maximum": 9007199254740991
1027
+ }
1028
+ },
1029
+ "required": ["phase", "durationUs"],
1030
+ "additionalProperties": false
1031
+ }
1032
+ },
1033
+ "$id": "https://testforge.dev/schemas/agentic-benchmark-request.v1.json"
1034
+ }