@consiliency/contract 0.6.4 → 0.7.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/README.md +50 -2
- package/conformance/registries/authority-key-registry.test.json +48 -0
- package/conformance/vectors/authority-algorithm-confusion.json +1 -1
- package/conformance/vectors/authority-bad-signature.json +1 -1
- package/conformance/vectors/authority-cert-digest-mismatch.json +1 -1
- package/conformance/vectors/authority-chain-appended-still-verifies.json +1 -1
- package/conformance/vectors/authority-core-validity-expired.json +1 -1
- package/conformance/vectors/authority-forged-self-minted.json +1 -1
- package/conformance/vectors/authority-key-expired.json +1 -1
- package/conformance/vectors/authority-key-revoked.json +1 -1
- package/conformance/vectors/authority-missing-signature.json +1 -1
- package/conformance/vectors/authority-signer-approver-mismatch.json +1 -1
- package/conformance/vectors/authority-unknown-key-id.json +1 -1
- package/conformance/vectors/authority-valid.json +1 -1
- package/conformance/vectors/authority-wrong-key-valid-id.json +1 -1
- package/core/authority-canon/provenance.json +1 -1
- package/core/contract.json +24 -4
- package/core/registries/authority-key-registry.json +3 -3
- package/core/registries/protected-source-categories.json +86 -0
- package/core/schemas/git-discipline-protocol.schema.json +1 -1
- package/core/schemas/protected-source-category.schema.json +29 -0
- package/core/schemas/version-skew-protocol.schema.json +3 -3
- package/core/supervised-run/admitted-launch-envelope.schema.json +226 -0
- package/core/supervised-run/admitted-launch-envelope.v2.schema.json +880 -0
- package/core/supervised-run/conformance/README.md +55 -0
- package/core/supervised-run/conformance/README.v2.md +297 -0
- package/core/supervised-run/conformance/SHA256SUMS +10 -0
- package/core/supervised-run/conformance/envelope.v2.apply.vectors.json +1938 -0
- package/core/supervised-run/conformance/envelope.v2.canonical.vectors.json +2088 -0
- package/core/supervised-run/conformance/envelope.v2.vectors.json +16359 -0
- package/core/supervised-run/conformance/envelope.vectors.json +557 -0
- package/core/supervised-run/conformance/run-status.vectors.json +2150 -0
- package/core/supervised-run/provenance.json +116 -0
- package/core/supervised-run/run-status.schema.json +768 -0
- package/package.json +1 -1
- package/src/index.d.ts +3 -1
- package/src/index.js +8 -1
|
@@ -0,0 +1,768 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:contract:supervised_run_status.v1",
|
|
4
|
+
"title": "supervised_run_status.v1 (provisional)",
|
|
5
|
+
"description": "Per-attempt run journal line, derived projection, bounded page and reader view. Harness-neutral and language-neutral. The journal is authoritative; the projection is replaceable and derived. Run status is a status record: it carries runtime state and native result references only, never a work outcome or requirement evidence. Status: provisional until the owning contract revision completes; a change needs reconciliation with every consumer.",
|
|
6
|
+
"$ref": "#/$defs/journal_line",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"sha256": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
11
|
+
},
|
|
12
|
+
"unit_id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 200
|
|
16
|
+
},
|
|
17
|
+
"attempt_identity": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": [
|
|
21
|
+
"assignment_digest",
|
|
22
|
+
"envelope_digest",
|
|
23
|
+
"run_id",
|
|
24
|
+
"attempt_id"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"assignment_digest": {
|
|
28
|
+
"$ref": "#/$defs/sha256"
|
|
29
|
+
},
|
|
30
|
+
"envelope_digest": {
|
|
31
|
+
"$ref": "#/$defs/sha256"
|
|
32
|
+
},
|
|
33
|
+
"run_id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 128
|
|
37
|
+
},
|
|
38
|
+
"attempt_id": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 128
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"units": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": [
|
|
49
|
+
"target_unit_ids",
|
|
50
|
+
"readonly_neighbor_unit_ids",
|
|
51
|
+
"snapshot_ref"
|
|
52
|
+
],
|
|
53
|
+
"properties": {
|
|
54
|
+
"target_unit_ids": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"minItems": 1,
|
|
57
|
+
"items": {
|
|
58
|
+
"$ref": "#/$defs/unit_id"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"readonly_neighbor_unit_ids": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"$ref": "#/$defs/unit_id"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"snapshot_ref": {
|
|
68
|
+
"$ref": "#/$defs/sha256"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"writer": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": [
|
|
76
|
+
"harness_id",
|
|
77
|
+
"harness_version",
|
|
78
|
+
"writer_instance_id",
|
|
79
|
+
"owner_pid",
|
|
80
|
+
"process_start_time"
|
|
81
|
+
],
|
|
82
|
+
"properties": {
|
|
83
|
+
"harness_id": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"minLength": 1
|
|
86
|
+
},
|
|
87
|
+
"harness_version": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
},
|
|
91
|
+
"writer_instance_id": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1
|
|
94
|
+
},
|
|
95
|
+
"owner_pid": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"minimum": 1
|
|
98
|
+
},
|
|
99
|
+
"process_start_time": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"ref": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": [
|
|
109
|
+
"kind",
|
|
110
|
+
"sha256",
|
|
111
|
+
"locator"
|
|
112
|
+
],
|
|
113
|
+
"properties": {
|
|
114
|
+
"kind": {
|
|
115
|
+
"enum": [
|
|
116
|
+
"proposal_bytes",
|
|
117
|
+
"evidence_envelope",
|
|
118
|
+
"stdout",
|
|
119
|
+
"stderr",
|
|
120
|
+
"attempt_evidence_directory"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"sha256": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "A digest only. Inline content here is raw_output_in_record."
|
|
126
|
+
},
|
|
127
|
+
"locator": {
|
|
128
|
+
"type": [
|
|
129
|
+
"string",
|
|
130
|
+
"null"
|
|
131
|
+
],
|
|
132
|
+
"description": "Repository-relative locator or null; a locator is never authority."
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"journal_line": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": [
|
|
140
|
+
"schema",
|
|
141
|
+
"version",
|
|
142
|
+
"line_kind",
|
|
143
|
+
"seq",
|
|
144
|
+
"attempt",
|
|
145
|
+
"units",
|
|
146
|
+
"writer",
|
|
147
|
+
"observed_at",
|
|
148
|
+
"redaction_posture",
|
|
149
|
+
"body"
|
|
150
|
+
],
|
|
151
|
+
"properties": {
|
|
152
|
+
"schema": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "Must be supervised_run_status.v1; any other value is journal_unknown_version (checked semantically so a reader reaches its typed refusal)."
|
|
155
|
+
},
|
|
156
|
+
"version": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "Line format version; must be 1."
|
|
159
|
+
},
|
|
160
|
+
"line_kind": {
|
|
161
|
+
"enum": [
|
|
162
|
+
"header",
|
|
163
|
+
"event",
|
|
164
|
+
"state",
|
|
165
|
+
"terminal"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"seq": {
|
|
169
|
+
"type": "integer",
|
|
170
|
+
"minimum": 0,
|
|
171
|
+
"description": "Per-attempt, monotonic from 0 and gapless across segments. The only ordering."
|
|
172
|
+
},
|
|
173
|
+
"attempt": {
|
|
174
|
+
"$ref": "#/$defs/attempt_identity"
|
|
175
|
+
},
|
|
176
|
+
"units": {
|
|
177
|
+
"$ref": "#/$defs/units"
|
|
178
|
+
},
|
|
179
|
+
"writer": {
|
|
180
|
+
"$ref": "#/$defs/writer"
|
|
181
|
+
},
|
|
182
|
+
"observed_at": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "Informational wall-clock time; never used for ordering."
|
|
185
|
+
},
|
|
186
|
+
"redaction_posture": {
|
|
187
|
+
"const": "digests_and_repo_relative_locators_only"
|
|
188
|
+
},
|
|
189
|
+
"body": {
|
|
190
|
+
"oneOf": [
|
|
191
|
+
{
|
|
192
|
+
"$ref": "#/$defs/header_body"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"$ref": "#/$defs/event_body"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"$ref": "#/$defs/state_body"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"$ref": "#/$defs/terminal_body"
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"header_body": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"additionalProperties": false,
|
|
210
|
+
"required": [
|
|
211
|
+
"body_kind",
|
|
212
|
+
"segment_index",
|
|
213
|
+
"previous_segment_sha256",
|
|
214
|
+
"previous_last_seq"
|
|
215
|
+
],
|
|
216
|
+
"properties": {
|
|
217
|
+
"body_kind": {
|
|
218
|
+
"const": "header"
|
|
219
|
+
},
|
|
220
|
+
"segment_index": {
|
|
221
|
+
"type": "integer",
|
|
222
|
+
"minimum": 0
|
|
223
|
+
},
|
|
224
|
+
"previous_segment_sha256": {
|
|
225
|
+
"anyOf": [
|
|
226
|
+
{
|
|
227
|
+
"$ref": "#/$defs/sha256"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"type": "null"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"previous_last_seq": {
|
|
235
|
+
"type": [
|
|
236
|
+
"integer",
|
|
237
|
+
"null"
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"event_body": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"required": [
|
|
246
|
+
"body_kind",
|
|
247
|
+
"message",
|
|
248
|
+
"refs"
|
|
249
|
+
],
|
|
250
|
+
"properties": {
|
|
251
|
+
"body_kind": {
|
|
252
|
+
"const": "event"
|
|
253
|
+
},
|
|
254
|
+
"message": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"additionalProperties": false,
|
|
257
|
+
"required": [
|
|
258
|
+
"label",
|
|
259
|
+
"text"
|
|
260
|
+
],
|
|
261
|
+
"properties": {
|
|
262
|
+
"label": {
|
|
263
|
+
"const": "untrusted_display_text"
|
|
264
|
+
},
|
|
265
|
+
"text": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"description": "Sanitized, at most 200 characters, no line breaks; rendered as plain text, never as markup or commands."
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"refs": {
|
|
272
|
+
"type": "array",
|
|
273
|
+
"items": {
|
|
274
|
+
"$ref": "#/$defs/ref"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"state_body": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"additionalProperties": false,
|
|
282
|
+
"required": [
|
|
283
|
+
"body_kind",
|
|
284
|
+
"state",
|
|
285
|
+
"worker_invocations"
|
|
286
|
+
],
|
|
287
|
+
"properties": {
|
|
288
|
+
"body_kind": {
|
|
289
|
+
"const": "state"
|
|
290
|
+
},
|
|
291
|
+
"state": {
|
|
292
|
+
"enum": [
|
|
293
|
+
"queued",
|
|
294
|
+
"running",
|
|
295
|
+
"cancelling"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"worker_invocations": {
|
|
299
|
+
"type": "integer",
|
|
300
|
+
"minimum": 0
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"terminal_body": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"additionalProperties": false,
|
|
307
|
+
"required": [
|
|
308
|
+
"body_kind",
|
|
309
|
+
"state",
|
|
310
|
+
"worker_invocations",
|
|
311
|
+
"termination",
|
|
312
|
+
"refusal",
|
|
313
|
+
"result_binding"
|
|
314
|
+
],
|
|
315
|
+
"properties": {
|
|
316
|
+
"body_kind": {
|
|
317
|
+
"const": "terminal"
|
|
318
|
+
},
|
|
319
|
+
"state": {
|
|
320
|
+
"enum": [
|
|
321
|
+
"finished",
|
|
322
|
+
"refused"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"worker_invocations": {
|
|
326
|
+
"type": "integer",
|
|
327
|
+
"minimum": 0
|
|
328
|
+
},
|
|
329
|
+
"termination": {
|
|
330
|
+
"anyOf": [
|
|
331
|
+
{
|
|
332
|
+
"type": "null"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"type": "object",
|
|
336
|
+
"additionalProperties": false,
|
|
337
|
+
"required": [
|
|
338
|
+
"reason",
|
|
339
|
+
"signal",
|
|
340
|
+
"by"
|
|
341
|
+
],
|
|
342
|
+
"properties": {
|
|
343
|
+
"reason": {
|
|
344
|
+
"enum": [
|
|
345
|
+
"completed",
|
|
346
|
+
"cancelled",
|
|
347
|
+
"timed_out",
|
|
348
|
+
"failed_to_start"
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
"signal": {
|
|
352
|
+
"type": [
|
|
353
|
+
"string",
|
|
354
|
+
"null"
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
"by": {
|
|
358
|
+
"enum": [
|
|
359
|
+
"worker",
|
|
360
|
+
"harness",
|
|
361
|
+
"operator"
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
"refusal": {
|
|
369
|
+
"anyOf": [
|
|
370
|
+
{
|
|
371
|
+
"type": "null"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"type": "object",
|
|
375
|
+
"additionalProperties": false,
|
|
376
|
+
"required": [
|
|
377
|
+
"reason",
|
|
378
|
+
"constraint",
|
|
379
|
+
"tier"
|
|
380
|
+
],
|
|
381
|
+
"properties": {
|
|
382
|
+
"reason": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"minLength": 1
|
|
385
|
+
},
|
|
386
|
+
"constraint": {
|
|
387
|
+
"type": [
|
|
388
|
+
"string",
|
|
389
|
+
"null"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"tier": {
|
|
393
|
+
"type": [
|
|
394
|
+
"string",
|
|
395
|
+
"null"
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
"result_binding": {
|
|
403
|
+
"anyOf": [
|
|
404
|
+
{
|
|
405
|
+
"type": "null"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"type": "object",
|
|
409
|
+
"additionalProperties": false,
|
|
410
|
+
"required": [
|
|
411
|
+
"envelope_digest",
|
|
412
|
+
"run_id",
|
|
413
|
+
"attempt_id",
|
|
414
|
+
"proposal_bytes_digest",
|
|
415
|
+
"evidence_envelope_digest"
|
|
416
|
+
],
|
|
417
|
+
"properties": {
|
|
418
|
+
"envelope_digest": {
|
|
419
|
+
"$ref": "#/$defs/sha256"
|
|
420
|
+
},
|
|
421
|
+
"run_id": {
|
|
422
|
+
"type": "string"
|
|
423
|
+
},
|
|
424
|
+
"attempt_id": {
|
|
425
|
+
"type": "string"
|
|
426
|
+
},
|
|
427
|
+
"proposal_bytes_digest": {
|
|
428
|
+
"anyOf": [
|
|
429
|
+
{
|
|
430
|
+
"$ref": "#/$defs/sha256"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"type": "null"
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
"evidence_envelope_digest": {
|
|
438
|
+
"$ref": "#/$defs/sha256"
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"projection": {
|
|
447
|
+
"type": "object",
|
|
448
|
+
"additionalProperties": false,
|
|
449
|
+
"required": [
|
|
450
|
+
"schema",
|
|
451
|
+
"assignment_digest",
|
|
452
|
+
"attempts"
|
|
453
|
+
],
|
|
454
|
+
"properties": {
|
|
455
|
+
"schema": {
|
|
456
|
+
"const": "supervised_run_status.v1/projection"
|
|
457
|
+
},
|
|
458
|
+
"assignment_digest": {
|
|
459
|
+
"$ref": "#/$defs/sha256"
|
|
460
|
+
},
|
|
461
|
+
"attempts": {
|
|
462
|
+
"type": "array",
|
|
463
|
+
"items": {
|
|
464
|
+
"type": "object",
|
|
465
|
+
"additionalProperties": false,
|
|
466
|
+
"required": [
|
|
467
|
+
"attempt",
|
|
468
|
+
"state",
|
|
469
|
+
"journal_seq",
|
|
470
|
+
"segment_index",
|
|
471
|
+
"segment_sha256"
|
|
472
|
+
],
|
|
473
|
+
"properties": {
|
|
474
|
+
"attempt": {
|
|
475
|
+
"$ref": "#/$defs/attempt_identity"
|
|
476
|
+
},
|
|
477
|
+
"state": {
|
|
478
|
+
"enum": [
|
|
479
|
+
"queued",
|
|
480
|
+
"running",
|
|
481
|
+
"cancelling",
|
|
482
|
+
"finished",
|
|
483
|
+
"refused"
|
|
484
|
+
]
|
|
485
|
+
},
|
|
486
|
+
"journal_seq": {
|
|
487
|
+
"type": "integer",
|
|
488
|
+
"minimum": 0
|
|
489
|
+
},
|
|
490
|
+
"segment_index": {
|
|
491
|
+
"type": "integer",
|
|
492
|
+
"minimum": 0
|
|
493
|
+
},
|
|
494
|
+
"segment_sha256": {
|
|
495
|
+
"$ref": "#/$defs/sha256"
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"page_request": {
|
|
503
|
+
"type": "object",
|
|
504
|
+
"additionalProperties": false,
|
|
505
|
+
"required": [
|
|
506
|
+
"assignment_digest",
|
|
507
|
+
"page_size",
|
|
508
|
+
"cursor"
|
|
509
|
+
],
|
|
510
|
+
"properties": {
|
|
511
|
+
"assignment_digest": {
|
|
512
|
+
"$ref": "#/$defs/sha256"
|
|
513
|
+
},
|
|
514
|
+
"page_size": {
|
|
515
|
+
"type": [
|
|
516
|
+
"integer",
|
|
517
|
+
"null"
|
|
518
|
+
],
|
|
519
|
+
"description": "Required and at most 100; null is read_unbounded (checked semantically)."
|
|
520
|
+
},
|
|
521
|
+
"cursor": {
|
|
522
|
+
"type": [
|
|
523
|
+
"string",
|
|
524
|
+
"null"
|
|
525
|
+
]
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"page": {
|
|
530
|
+
"type": "object",
|
|
531
|
+
"additionalProperties": false,
|
|
532
|
+
"required": [
|
|
533
|
+
"events",
|
|
534
|
+
"has_more",
|
|
535
|
+
"omitted"
|
|
536
|
+
],
|
|
537
|
+
"properties": {
|
|
538
|
+
"events": {
|
|
539
|
+
"type": "array",
|
|
540
|
+
"items": {
|
|
541
|
+
"$ref": "#/$defs/journal_line"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"has_more": {
|
|
545
|
+
"type": [
|
|
546
|
+
"boolean",
|
|
547
|
+
"null"
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
"omitted": {
|
|
551
|
+
"anyOf": [
|
|
552
|
+
{
|
|
553
|
+
"type": "null"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"type": "object",
|
|
557
|
+
"additionalProperties": false,
|
|
558
|
+
"required": [
|
|
559
|
+
"before",
|
|
560
|
+
"after",
|
|
561
|
+
"retention_dropped"
|
|
562
|
+
],
|
|
563
|
+
"properties": {
|
|
564
|
+
"before": {
|
|
565
|
+
"type": "integer",
|
|
566
|
+
"minimum": 0
|
|
567
|
+
},
|
|
568
|
+
"after": {
|
|
569
|
+
"type": "integer",
|
|
570
|
+
"minimum": 0
|
|
571
|
+
},
|
|
572
|
+
"retention_dropped": {
|
|
573
|
+
"type": "integer",
|
|
574
|
+
"minimum": 0
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"reader_view": {
|
|
583
|
+
"type": "object",
|
|
584
|
+
"additionalProperties": false,
|
|
585
|
+
"description": "What a reader shows for one attempt: three separate fields from three producers.",
|
|
586
|
+
"required": [
|
|
587
|
+
"row",
|
|
588
|
+
"run_record",
|
|
589
|
+
"display"
|
|
590
|
+
],
|
|
591
|
+
"properties": {
|
|
592
|
+
"row": {
|
|
593
|
+
"type": "object",
|
|
594
|
+
"additionalProperties": false,
|
|
595
|
+
"required": [
|
|
596
|
+
"assignment_digest",
|
|
597
|
+
"snapshot_ref"
|
|
598
|
+
],
|
|
599
|
+
"properties": {
|
|
600
|
+
"assignment_digest": {
|
|
601
|
+
"$ref": "#/$defs/sha256"
|
|
602
|
+
},
|
|
603
|
+
"snapshot_ref": {
|
|
604
|
+
"$ref": "#/$defs/sha256"
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"run_record": {
|
|
609
|
+
"type": "object",
|
|
610
|
+
"additionalProperties": false,
|
|
611
|
+
"required": [
|
|
612
|
+
"attempt",
|
|
613
|
+
"units",
|
|
614
|
+
"state",
|
|
615
|
+
"termination_reason"
|
|
616
|
+
],
|
|
617
|
+
"properties": {
|
|
618
|
+
"attempt": {
|
|
619
|
+
"$ref": "#/$defs/attempt_identity"
|
|
620
|
+
},
|
|
621
|
+
"units": {
|
|
622
|
+
"$ref": "#/$defs/units"
|
|
623
|
+
},
|
|
624
|
+
"state": {
|
|
625
|
+
"enum": [
|
|
626
|
+
"queued",
|
|
627
|
+
"running",
|
|
628
|
+
"cancelling",
|
|
629
|
+
"finished",
|
|
630
|
+
"refused"
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
"termination_reason": {
|
|
634
|
+
"type": [
|
|
635
|
+
"string",
|
|
636
|
+
"null"
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
"display": {
|
|
642
|
+
"type": "object",
|
|
643
|
+
"additionalProperties": false,
|
|
644
|
+
"required": [
|
|
645
|
+
"runtime_state",
|
|
646
|
+
"work_outcome",
|
|
647
|
+
"evidence"
|
|
648
|
+
],
|
|
649
|
+
"properties": {
|
|
650
|
+
"runtime_state": {
|
|
651
|
+
"type": "string"
|
|
652
|
+
},
|
|
653
|
+
"work_outcome": {
|
|
654
|
+
"anyOf": [
|
|
655
|
+
{
|
|
656
|
+
"type": "null"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"type": "object",
|
|
660
|
+
"additionalProperties": false,
|
|
661
|
+
"required": [
|
|
662
|
+
"value",
|
|
663
|
+
"source",
|
|
664
|
+
"ref"
|
|
665
|
+
],
|
|
666
|
+
"properties": {
|
|
667
|
+
"value": {
|
|
668
|
+
"type": "string"
|
|
669
|
+
},
|
|
670
|
+
"source": {
|
|
671
|
+
"enum": [
|
|
672
|
+
"work_result_reducer",
|
|
673
|
+
"run_status"
|
|
674
|
+
]
|
|
675
|
+
},
|
|
676
|
+
"ref": {
|
|
677
|
+
"anyOf": [
|
|
678
|
+
{
|
|
679
|
+
"$ref": "#/$defs/sha256"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"type": "null"
|
|
683
|
+
}
|
|
684
|
+
]
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
]
|
|
689
|
+
},
|
|
690
|
+
"evidence": {
|
|
691
|
+
"anyOf": [
|
|
692
|
+
{
|
|
693
|
+
"type": "null"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"type": "object",
|
|
697
|
+
"additionalProperties": false,
|
|
698
|
+
"required": [
|
|
699
|
+
"source",
|
|
700
|
+
"ref"
|
|
701
|
+
],
|
|
702
|
+
"properties": {
|
|
703
|
+
"source": {
|
|
704
|
+
"enum": [
|
|
705
|
+
"requirement_admission",
|
|
706
|
+
"run_status"
|
|
707
|
+
]
|
|
708
|
+
},
|
|
709
|
+
"ref": {
|
|
710
|
+
"$ref": "#/$defs/sha256"
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
]
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"x-canonicalization": "Segment bytes are the lines joined by LF, each object line serialized as RFC 8785 (JCS) and each string line taken as its exact text, with a final LF unless the segment ends in a torn line. segment sha256 is over those UTF-8 bytes.",
|
|
722
|
+
"x-journal-rules": {
|
|
723
|
+
"location": "one immutable, append-only journal per attempt in the harness's per-user state directory (mode 0700), never in the target repository; local filesystems only",
|
|
724
|
+
"writers": "one writer per attempt file, under a lock, with atomic line appends and fsync",
|
|
725
|
+
"segments": "<attempt>/<nnnn>.jsonl read in index order; each begins with a header naming the previous segment's sha256 and last seq",
|
|
726
|
+
"lifecycle": {
|
|
727
|
+
"queued": [
|
|
728
|
+
"running",
|
|
729
|
+
"refused"
|
|
730
|
+
],
|
|
731
|
+
"running": [
|
|
732
|
+
"cancelling",
|
|
733
|
+
"finished"
|
|
734
|
+
],
|
|
735
|
+
"cancelling": [
|
|
736
|
+
"finished"
|
|
737
|
+
],
|
|
738
|
+
"finished": [],
|
|
739
|
+
"refused": []
|
|
740
|
+
},
|
|
741
|
+
"bounds": {
|
|
742
|
+
"page_size_max": 100,
|
|
743
|
+
"event_message_max_chars": 200,
|
|
744
|
+
"per_attempt_event_cap": 10000,
|
|
745
|
+
"attempts_per_page_max": 20
|
|
746
|
+
},
|
|
747
|
+
"liveness": "for a non-terminal attempt the reader checks the recorded owner pid and process start time; an owner that is not live is shown stale and unknown, never running"
|
|
748
|
+
},
|
|
749
|
+
"x-semantic-rules": {
|
|
750
|
+
"journal_torn_line": "the last line has no terminating LF or does not parse; the attempt is shown unknown and the reader never truncates or repairs",
|
|
751
|
+
"journal_malformed_line": "a line other than the last does not parse",
|
|
752
|
+
"journal_unknown_version": "schema is not supervised_run_status.v1 or version is not 1",
|
|
753
|
+
"journal_foreign_writer": "a line's writer differs from the first header's writer",
|
|
754
|
+
"attempt_overwritten": "seq regresses or skips, a segment index is missing, or a header's previous_segment_sha256/previous_last_seq does not match the previous segment",
|
|
755
|
+
"attempt_provenance_mismatch": "a line's attempt identity differs from the header's, or a terminal result_binding differs from the line's attempt identity",
|
|
756
|
+
"attempt_evidence_copied": "a later attempt must not repeat an earlier attempt's evidence-envelope digest; equal proposal-bytes digests remain legitimate when each attempt binds its own envelope, run id and attempt id",
|
|
757
|
+
"refused_after_launch": "a refused terminal follows a running state or records worker_invocations above 0",
|
|
758
|
+
"lifecycle_invalid": "a state transition outside x-journal-rules.lifecycle, or finished without termination, or refused without refusal",
|
|
759
|
+
"raw_output_in_record": "a ref sha256 that is not a 64-hex digest, an event message over 200 characters or with a line break or control character, or any string over 512 characters",
|
|
760
|
+
"locator_not_repo_relative": "a locator that is empty, absolute, contains a '..' segment or a backslash",
|
|
761
|
+
"projection_behind_journal": "a projection attempt whose journal_seq is behind the journal tail, or an attempt missing from the projection; shown stale",
|
|
762
|
+
"projection_not_from_journal": "a projection attempt ahead of the journal, or naming a segment digest the journal does not have",
|
|
763
|
+
"owner_not_live": "a non-terminal attempt whose recorded owner is not live; shown stale and unknown, never running",
|
|
764
|
+
"run_record_foreign": "a run record whose assignment digest or snapshot reference differs from the row it is joined to",
|
|
765
|
+
"runtime_not_work_outcome": "a work outcome or evidence link whose source is run status; termination reason completed is runtime data only",
|
|
766
|
+
"read_unbounded": "a page request without a page size or above 100, a page with more events than requested, or a page without has_more and omitted counts"
|
|
767
|
+
}
|
|
768
|
+
}
|