omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / calibration / schemas / measurement_receipt.schema.json
| 1 | { |
| 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | "$id": "turing.cal.measurement_receipt.v1", |
| 4 | "title": "Turing-profile-v1.0 measurement receipt", |
| 5 | "description": "One receipt per scored run: final (sealed), dry_run (development data, never evidence) or independent (lane D). A refused run writes a void receipt instead (void_receipt.schema.json). Written by turing-cal-eval (calibration/docs/EVALUATOR.md). Integers are exact: ub = micro-bits (1 bit = 1000000 ub). No sealed data bytes appear in a receipt.", |
| 6 | "type": "object", |
| 7 | "additionalProperties": false, |
| 8 | "required": [ |
| 9 | "schema", |
| 10 | "experiment", |
| 11 | "kind", |
| 12 | "EXP_001_COMPRESSION_BRIDGE", |
| 13 | "verdict", |
| 14 | "run_id", |
| 15 | "created_utc", |
| 16 | "started_utc", |
| 17 | "scored_utc", |
| 18 | "profile", |
| 19 | "freeze", |
| 20 | "roots", |
| 21 | "runtime_sha256", |
| 22 | "sealed", |
| 23 | "groups", |
| 24 | "criteria", |
| 25 | "refusals", |
| 26 | "deviations", |
| 27 | "signed_by", |
| 28 | "notebook" |
| 29 | ], |
| 30 | "definitions": { |
| 31 | "sha256": { |
| 32 | "type": "string", |
| 33 | "pattern": "^[0-9a-f]{64}$" |
| 34 | }, |
| 35 | "sha256_or_none": { |
| 36 | "type": "string", |
| 37 | "pattern": "^([0-9a-f]{64}|NONE)$" |
| 38 | }, |
| 39 | "ub": { |
| 40 | "type": "integer" |
| 41 | }, |
| 42 | "interval": { |
| 43 | "type": "object", |
| 44 | "additionalProperties": false, |
| 45 | "required": [ |
| 46 | "point_ub", |
| 47 | "lo_ub", |
| 48 | "hi_ub" |
| 49 | ], |
| 50 | "properties": { |
| 51 | "point_ub": { |
| 52 | "$ref": "#/definitions/ub" |
| 53 | }, |
| 54 | "lo_ub": { |
| 55 | "$ref": "#/definitions/ub" |
| 56 | }, |
| 57 | "hi_ub": { |
| 58 | "$ref": "#/definitions/ub" |
| 59 | } |
| 60 | } |
| 61 | }, |
| 62 | "coded": { |
| 63 | "type": "object", |
| 64 | "additionalProperties": false, |
| 65 | "required": [ |
| 66 | "coder", |
| 67 | "coded_bytes", |
| 68 | "coded_bits", |
| 69 | "decoded_ok", |
| 70 | "overhead_ub", |
| 71 | "inside_envelope" |
| 72 | ], |
| 73 | "properties": { |
| 74 | "coder": { |
| 75 | "type": "string" |
| 76 | }, |
| 77 | "coded_bytes": { |
| 78 | "type": "integer", |
| 79 | "minimum": 0 |
| 80 | }, |
| 81 | "coded_bits": { |
| 82 | "type": "integer", |
| 83 | "minimum": 0 |
| 84 | }, |
| 85 | "coded_sha256": { |
| 86 | "$ref": "#/definitions/sha256" |
| 87 | }, |
| 88 | "decoded_ok": { |
| 89 | "type": "boolean" |
| 90 | }, |
| 91 | "overhead_ub": { |
| 92 | "$ref": "#/definitions/ub" |
| 93 | }, |
| 94 | "inside_envelope": { |
| 95 | "type": "boolean" |
| 96 | }, |
| 97 | "t_vs_b2": { |
| 98 | "$ref": "#/definitions/interval" |
| 99 | } |
| 100 | } |
| 101 | }, |
| 102 | "candidate_result": { |
| 103 | "type": "object", |
| 104 | "additionalProperties": false, |
| 105 | "required": [ |
| 106 | "name", |
| 107 | "model_digest", |
| 108 | "lm_bits", |
| 109 | "ld_ideal_ub", |
| 110 | "per_crumb_sum_equals_file", |
| 111 | "t_vs_b2_ideal", |
| 112 | "coded" |
| 113 | ], |
| 114 | "properties": { |
| 115 | "name": { |
| 116 | "type": "string" |
| 117 | }, |
| 118 | "model_digest": { |
| 119 | "$ref": "#/definitions/sha256" |
| 120 | }, |
| 121 | "lm_bits": { |
| 122 | "type": "integer", |
| 123 | "minimum": 0 |
| 124 | }, |
| 125 | "ld_ideal_ub": { |
| 126 | "$ref": "#/definitions/ub" |
| 127 | }, |
| 128 | "per_crumb_sum_equals_file": { |
| 129 | "type": "boolean" |
| 130 | }, |
| 131 | "t_vs_b2_ideal": { |
| 132 | "$ref": "#/definitions/interval" |
| 133 | }, |
| 134 | "t_vs_other_baselines": { |
| 135 | "type": "object", |
| 136 | "additionalProperties": { |
| 137 | "$ref": "#/definitions/interval" |
| 138 | } |
| 139 | }, |
| 140 | "coded": { |
| 141 | "type": "array", |
| 142 | "items": { |
| 143 | "$ref": "#/definitions/coded" |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | }, |
| 149 | "properties": { |
| 150 | "schema": { |
| 151 | "const": "turing.cal.measurement_receipt.v1" |
| 152 | }, |
| 153 | "experiment": { |
| 154 | "type": "string" |
| 155 | }, |
| 156 | "kind": { |
| 157 | "enum": [ |
| 158 | "final", |
| 159 | "dry_run", |
| 160 | "independent" |
| 161 | ] |
| 162 | }, |
| 163 | "EXP_001_COMPRESSION_BRIDGE": { |
| 164 | "enum": [ |
| 165 | "PASS", |
| 166 | "FAIL", |
| 167 | "INCONCLUSIVE", |
| 168 | "DRY_RUN_NOT_EVIDENCE" |
| 169 | ], |
| 170 | "description": "The verdict for kind final; DRY_RUN_NOT_EVIDENCE for kind dry_run whatever the criteria say." |
| 171 | }, |
| 172 | "verdict": { |
| 173 | "enum": [ |
| 174 | "PASS", |
| 175 | "FAIL", |
| 176 | "INCONCLUSIVE" |
| 177 | ], |
| 178 | "description": "The verdict rule (FAILURE_REPORTING.md section 2) applied to the criteria; for a dry run it is informational only." |
| 179 | }, |
| 180 | "run_id": { |
| 181 | "type": "string" |
| 182 | }, |
| 183 | "started_utc": { |
| 184 | "type": "string" |
| 185 | }, |
| 186 | "scored_utc": { |
| 187 | "type": "string" |
| 188 | }, |
| 189 | "signed_by": { |
| 190 | "type": "string" |
| 191 | }, |
| 192 | "created_utc": { |
| 193 | "type": "string" |
| 194 | }, |
| 195 | "profile": { |
| 196 | "type": "object", |
| 197 | "additionalProperties": false, |
| 198 | "required": [ |
| 199 | "path", |
| 200 | "sha256", |
| 201 | "sidecar_matches" |
| 202 | ], |
| 203 | "properties": { |
| 204 | "path": { |
| 205 | "type": "string" |
| 206 | }, |
| 207 | "sha256": { |
| 208 | "$ref": "#/definitions/sha256" |
| 209 | }, |
| 210 | "sidecar_matches": { |
| 211 | "type": "boolean" |
| 212 | } |
| 213 | } |
| 214 | }, |
| 215 | "freeze": { |
| 216 | "type": "object", |
| 217 | "additionalProperties": false, |
| 218 | "required": [ |
| 219 | "commit", |
| 220 | "status", |
| 221 | "frozen_at", |
| 222 | "candidate_manifest_sha256", |
| 223 | "preregistration_sha256" |
| 224 | ], |
| 225 | "properties": { |
| 226 | "commit": { |
| 227 | "type": "string", |
| 228 | "pattern": "^([0-9a-f]{40}|NONE)$", |
| 229 | "description": "C_f, the freeze commit (dataset manifest freeze_commit); NONE only in a dry run" |
| 230 | }, |
| 231 | "origin_main_checked": { |
| 232 | "type": "string", |
| 233 | "description": "origin/main commit the ancestor check ran against; NONE in a dry run" |
| 234 | }, |
| 235 | "status": { |
| 236 | "enum": [ |
| 237 | "frozen", |
| 238 | "draft" |
| 239 | ], |
| 240 | "description": "draft only in a dry run" |
| 241 | }, |
| 242 | "frozen_at": { |
| 243 | "type": "string", |
| 244 | "description": "UTC from freeze_candidate.sh --freeze; NONE only in a dry run" |
| 245 | }, |
| 246 | "candidate_manifest_sha256": { |
| 247 | "$ref": "#/definitions/sha256" |
| 248 | }, |
| 249 | "preregistration_sha256": { |
| 250 | "$ref": "#/definitions/sha256" |
| 251 | } |
| 252 | } |
| 253 | }, |
| 254 | "roots": { |
| 255 | "type": "object", |
| 256 | "additionalProperties": false, |
| 257 | "required": [ |
| 258 | "candidate_root", |
| 259 | "dataset_root", |
| 260 | "probability_root", |
| 261 | "coding_root", |
| 262 | "analysis_root" |
| 263 | ], |
| 264 | "properties": { |
| 265 | "candidate_root": { |
| 266 | "$ref": "#/definitions/sha256" |
| 267 | }, |
| 268 | "dataset_root": { |
| 269 | "$ref": "#/definitions/sha256" |
| 270 | }, |
| 271 | "probability_root": { |
| 272 | "$ref": "#/definitions/sha256" |
| 273 | }, |
| 274 | "coding_root": { |
| 275 | "$ref": "#/definitions/sha256" |
| 276 | }, |
| 277 | "analysis_root": { |
| 278 | "$ref": "#/definitions/sha256" |
| 279 | } |
| 280 | } |
| 281 | }, |
| 282 | "runtime_sha256": { |
| 283 | "type": "object", |
| 284 | "additionalProperties": { |
| 285 | "$ref": "#/definitions/sha256" |
| 286 | } |
| 287 | }, |
| 288 | "sealed": { |
| 289 | "type": "object", |
| 290 | "additionalProperties": false, |
| 291 | "required": [ |
| 292 | "dataset_id", |
| 293 | "split", |
| 294 | "dataset_manifest_sha256", |
| 295 | "seed_commitment_sha256", |
| 296 | "manifest_sha256", |
| 297 | "complete_utc", |
| 298 | "overlap_audit_pass" |
| 299 | ], |
| 300 | "properties": { |
| 301 | "dataset_id": { |
| 302 | "type": "string" |
| 303 | }, |
| 304 | "split": { |
| 305 | "enum": [ |
| 306 | "sealed_test", |
| 307 | "development" |
| 308 | ] |
| 309 | }, |
| 310 | "dataset_manifest_sha256": { |
| 311 | "$ref": "#/definitions/sha256" |
| 312 | }, |
| 313 | "seed_commitment_sha256": { |
| 314 | "$ref": "#/definitions/sha256_or_none" |
| 315 | }, |
| 316 | "manifest_sha256": { |
| 317 | "$ref": "#/definitions/sha256_or_none" |
| 318 | }, |
| 319 | "complete_utc": { |
| 320 | "type": "string" |
| 321 | }, |
| 322 | "overlap_audit_pass": { |
| 323 | "type": "boolean" |
| 324 | } |
| 325 | } |
| 326 | }, |
| 327 | "groups": { |
| 328 | "type": "array", |
| 329 | "items": { |
| 330 | "type": "object", |
| 331 | "additionalProperties": false, |
| 332 | "required": [ |
| 333 | "g", |
| 334 | "seeds", |
| 335 | "stream_sha256", |
| 336 | "crumbs", |
| 337 | "events", |
| 338 | "bootstrap_seed", |
| 339 | "resamples", |
| 340 | "candidates" |
| 341 | ], |
| 342 | "properties": { |
| 343 | "g": { |
| 344 | "enum": [ |
| 345 | 1, |
| 346 | 2 |
| 347 | ] |
| 348 | }, |
| 349 | "seeds": { |
| 350 | "type": "array", |
| 351 | "items": { |
| 352 | "type": "integer" |
| 353 | } |
| 354 | }, |
| 355 | "stream_sha256": { |
| 356 | "type": "array", |
| 357 | "items": { |
| 358 | "$ref": "#/definitions/sha256" |
| 359 | } |
| 360 | }, |
| 361 | "crumbs": { |
| 362 | "type": "integer", |
| 363 | "minimum": 1 |
| 364 | }, |
| 365 | "events": { |
| 366 | "type": "integer", |
| 367 | "minimum": 1 |
| 368 | }, |
| 369 | "bootstrap_seed": { |
| 370 | "type": "string", |
| 371 | "pattern": "^0x[0-9A-Fa-f]{16}$" |
| 372 | }, |
| 373 | "resamples": { |
| 374 | "const": 10000 |
| 375 | }, |
| 376 | "candidates": { |
| 377 | "type": "array", |
| 378 | "items": { |
| 379 | "$ref": "#/definitions/candidate_result" |
| 380 | } |
| 381 | } |
| 382 | } |
| 383 | } |
| 384 | }, |
| 385 | "criteria": { |
| 386 | "type": "object", |
| 387 | "additionalProperties": false, |
| 388 | "required": [ |
| 389 | "S1", |
| 390 | "S2", |
| 391 | "S3", |
| 392 | "S4", |
| 393 | "S5", |
| 394 | "S6", |
| 395 | "S7", |
| 396 | "S8", |
| 397 | "S9" |
| 398 | ], |
| 399 | "patternProperties": { |
| 400 | "^S[1-9]$": { |
| 401 | "enum": [ |
| 402 | "PASS", |
| 403 | "FAIL", |
| 404 | "INCONCLUSIVE", |
| 405 | "NOT_REACHED", |
| 406 | "NOT_CHECKED" |
| 407 | ] |
| 408 | } |
| 409 | }, |
| 410 | "description": "INCONCLUSIVE only for S6, S7, S9; NOT_CHECKED only for S2 in a dry run; NOT_REACHED counts as FAIL" |
| 411 | }, |
| 412 | "refusals": { |
| 413 | "type": "array", |
| 414 | "items": { |
| 415 | "type": "object", |
| 416 | "required": [ |
| 417 | "step", |
| 418 | "code", |
| 419 | "reason" |
| 420 | ], |
| 421 | "properties": { |
| 422 | "step": { |
| 423 | "type": "string" |
| 424 | }, |
| 425 | "code": { |
| 426 | "type": "string" |
| 427 | }, |
| 428 | "reason": { |
| 429 | "type": "string" |
| 430 | } |
| 431 | } |
| 432 | } |
| 433 | }, |
| 434 | "deviations": { |
| 435 | "type": "array", |
| 436 | "items": { |
| 437 | "type": "string" |
| 438 | } |
| 439 | }, |
| 440 | "void_attempts_cited": { |
| 441 | "type": "array", |
| 442 | "items": { |
| 443 | "type": "string" |
| 444 | } |
| 445 | }, |
| 446 | "notes": { |
| 447 | "type": "string" |
| 448 | }, |
| 449 | "notebook": { |
| 450 | "type": "object", |
| 451 | "description": "Notebook record (lab protocol, notebook record): operator = git user.name of --repo, host = hostname, kernel = uname sysname release machine, commit = HEAD of --repo, tree_clean = git status --porcelain empty. A non-dry run refuses (DIRTY_TREE) unless tree_clean is true.", |
| 452 | "required": [ |
| 453 | "operator", |
| 454 | "host", |
| 455 | "kernel", |
| 456 | "commit", |
| 457 | "tree_clean" |
| 458 | ], |
| 459 | "properties": { |
| 460 | "operator": { |
| 461 | "type": "string" |
| 462 | }, |
| 463 | "host": { |
| 464 | "type": "string" |
| 465 | }, |
| 466 | "kernel": { |
| 467 | "type": "string" |
| 468 | }, |
| 469 | "commit": { |
| 470 | "type": "string", |
| 471 | "pattern": "^([0-9a-f]{40}|UNKNOWN)$" |
| 472 | }, |
| 473 | "tree_clean": { |
| 474 | "type": "boolean" |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | } |