automated-qa 0.11.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 (187) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +9 -0
  3. package/README.md +100 -0
  4. package/SKILL.md +65 -0
  5. package/agent/prebuilt/darwin-universal/qa-agent +0 -0
  6. package/agent/prebuilt/linux-arm64/qa-agent +0 -0
  7. package/agent/prebuilt/linux-x64/qa-agent +0 -0
  8. package/agent/release-manifest.json +31 -0
  9. package/bin/autonomous-cache.mjs +2 -0
  10. package/bin/bench-generate.mjs +232 -0
  11. package/bin/bench-graph-query.mjs +2 -0
  12. package/bin/bench-score.mjs +10 -0
  13. package/bin/classify.mjs +15 -0
  14. package/bin/coherence-playwright.mjs +1 -0
  15. package/bin/coherence-runner.mjs +6 -0
  16. package/bin/crud-runner.mjs +12 -0
  17. package/bin/experiment-executor.mjs +10 -0
  18. package/bin/experiment-runner.mjs +3 -0
  19. package/bin/inventory.mjs +17 -0
  20. package/bin/probe.js +879 -0
  21. package/bin/qa.mjs +16 -0
  22. package/bin/rules.mjs +5 -0
  23. package/bin/run-benchmarks.mjs +2 -0
  24. package/bin/runtime-packs.mjs +3 -0
  25. package/bin/semantic-explorer.mjs +3 -0
  26. package/bin/shadow-collector.mjs +3 -0
  27. package/bin/shadow-replay.mjs +6 -0
  28. package/bin/soak-marathon.mjs +15 -0
  29. package/bin/sweep.mjs +43 -0
  30. package/bin/validate-priors.mjs +3 -0
  31. package/bin/verify-artifacts.mjs +3 -0
  32. package/bin/verify-manifest.mjs +2 -0
  33. package/install-skill.sh +45 -0
  34. package/lib/qa/agent-availability.mjs +1 -0
  35. package/lib/qa/agent-result.mjs +1 -0
  36. package/lib/qa/analysis.mjs +5 -0
  37. package/lib/qa/atlas-coverage.mjs +11 -0
  38. package/lib/qa/atlas-v1.mjs +1 -0
  39. package/lib/qa/atlas.mjs +2 -0
  40. package/lib/qa/auth/coordinator.mjs +1 -0
  41. package/lib/qa/auth/launcher.mjs +3 -0
  42. package/lib/qa/auth/lease.mjs +1 -0
  43. package/lib/qa/auth/oracle.mjs +1 -0
  44. package/lib/qa/auth/personas.mjs +3 -0
  45. package/lib/qa/autonomous-cache.mjs +3 -0
  46. package/lib/qa/block-ledger.mjs +1 -0
  47. package/lib/qa/capture-report.mjs +63 -0
  48. package/lib/qa/ci.mjs +11 -0
  49. package/lib/qa/cli.mjs +538 -0
  50. package/lib/qa/coherence/analyze.mjs +1 -0
  51. package/lib/qa/coherence/cache-key.mjs +6 -0
  52. package/lib/qa/coherence/causes.mjs +1 -0
  53. package/lib/qa/coherence/concurrency.mjs +1 -0
  54. package/lib/qa/coherence/contracts.mjs +1 -0
  55. package/lib/qa/coherence/entity-aliases.mjs +1 -0
  56. package/lib/qa/coherence/enums.mjs +1 -0
  57. package/lib/qa/coherence/family-report.mjs +1 -0
  58. package/lib/qa/coherence/flow-pool.mjs +1 -0
  59. package/lib/qa/coherence/graph.mjs +1 -0
  60. package/lib/qa/coherence/identity.mjs +1 -0
  61. package/lib/qa/coherence/ir.mjs +4 -0
  62. package/lib/qa/coherence/navigation.mjs +1 -0
  63. package/lib/qa/coherence/observe.mjs +2 -0
  64. package/lib/qa/coherence/offline.mjs +1 -0
  65. package/lib/qa/coherence/plan-join.mjs +1 -0
  66. package/lib/qa/coherence/provenance.mjs +2 -0
  67. package/lib/qa/coherence/report.mjs +1 -0
  68. package/lib/qa/coherence/representations.mjs +1 -0
  69. package/lib/qa/coherence/risk.mjs +2 -0
  70. package/lib/qa/coherence/structural-js.mjs +11 -0
  71. package/lib/qa/coherence/symbols.mjs +6 -0
  72. package/lib/qa/coherence/tanstack.mjs +4 -0
  73. package/lib/qa/coherence/views.mjs +1 -0
  74. package/lib/qa/coherence-planner.mjs +1 -0
  75. package/lib/qa/command-catalog.mjs +2 -0
  76. package/lib/qa/commands/dev.mjs +1 -0
  77. package/lib/qa/commands/fix.mjs +1 -0
  78. package/lib/qa/commands/impl/analysis.mjs +1 -0
  79. package/lib/qa/commands/impl/atlas.mjs +1 -0
  80. package/lib/qa/commands/impl/coherence.mjs +1 -0
  81. package/lib/qa/commands/impl/crud.mjs +2 -0
  82. package/lib/qa/commands/impl/doctor.mjs +1 -0
  83. package/lib/qa/commands/impl/experiments.mjs +1 -0
  84. package/lib/qa/commands/impl/fp.mjs +1 -0
  85. package/lib/qa/commands/impl/graph.mjs +1 -0
  86. package/lib/qa/commands/impl/invariants.mjs +1 -0
  87. package/lib/qa/commands/impl/lanes.mjs +7 -0
  88. package/lib/qa/commands/impl/ledger.mjs +11 -0
  89. package/lib/qa/commands/impl/loop.mjs +1 -0
  90. package/lib/qa/commands/impl/marathon.mjs +1 -0
  91. package/lib/qa/commands/impl/next.mjs +38 -0
  92. package/lib/qa/commands/impl/report.mjs +4 -0
  93. package/lib/qa/commands/impl/research.mjs +4 -0
  94. package/lib/qa/commands/impl/selftest.mjs +1 -0
  95. package/lib/qa/commands/impl/serve.mjs +1 -0
  96. package/lib/qa/commands/impl/shadow.mjs +1 -0
  97. package/lib/qa/commands/impl/stability.mjs +1 -0
  98. package/lib/qa/commands/impl/triage.mjs +1 -0
  99. package/lib/qa/commands/impl/validate.mjs +4 -0
  100. package/lib/qa/commands/impl/version.mjs +1 -0
  101. package/lib/qa/commands/impl/watch.mjs +1 -0
  102. package/lib/qa/commands/init.mjs +6 -0
  103. package/lib/qa/commands/measure.mjs +1 -0
  104. package/lib/qa/commands/run.mjs +1 -0
  105. package/lib/qa/commands/show.mjs +1 -0
  106. package/lib/qa/commands/verify.mjs +6 -0
  107. package/lib/qa/deepening.mjs +1 -0
  108. package/lib/qa/denominators.mjs +1 -0
  109. package/lib/qa/depth.mjs +4 -0
  110. package/lib/qa/doctor.mjs +2 -0
  111. package/lib/qa/experiments-default.mjs +1 -0
  112. package/lib/qa/fix-lanes.mjs +3 -0
  113. package/lib/qa/forced-states.mjs +1 -0
  114. package/lib/qa/fp.mjs +2 -0
  115. package/lib/qa/fs.mjs +6 -0
  116. package/lib/qa/graph-schema.mjs +2 -0
  117. package/lib/qa/graph.mjs +3 -0
  118. package/lib/qa/harness-plan.mjs +3 -0
  119. package/lib/qa/init.mjs +5 -0
  120. package/lib/qa/integrity.mjs +1 -0
  121. package/lib/qa/invariants.mjs +84 -0
  122. package/lib/qa/jcs.mjs +1 -0
  123. package/lib/qa/lanes.mjs +1 -0
  124. package/lib/qa/loop.mjs +7 -0
  125. package/lib/qa/marathon-coherence.mjs +1 -0
  126. package/lib/qa/marathon-phases.mjs +1 -0
  127. package/lib/qa/marathon-wait.mjs +3 -0
  128. package/lib/qa/marathon.mjs +5 -0
  129. package/lib/qa/mode-coverage.mjs +1 -0
  130. package/lib/qa/mutation-policy.mjs +1 -0
  131. package/lib/qa/pattern-ledger.mjs +3 -0
  132. package/lib/qa/pending.mjs +1 -0
  133. package/lib/qa/proc.mjs +4 -0
  134. package/lib/qa/recommend.mjs +1 -0
  135. package/lib/qa/release-manifest.mjs +1 -0
  136. package/lib/qa/report-html.mjs +178 -0
  137. package/lib/qa/reports.mjs +2 -0
  138. package/lib/qa/request-evidence.mjs +1 -0
  139. package/lib/qa/research.mjs +20 -0
  140. package/lib/qa/routing.mjs +1 -0
  141. package/lib/qa/runs.mjs +1 -0
  142. package/lib/qa/schema.mjs +1 -0
  143. package/lib/qa/serve.mjs +4 -0
  144. package/lib/qa/server.mjs +1 -0
  145. package/lib/qa/source-snapshot.mjs +3 -0
  146. package/lib/qa/stability.mjs +3 -0
  147. package/lib/qa/state-evidence.mjs +1 -0
  148. package/lib/qa/sweep-incremental.mjs +1 -0
  149. package/lib/qa/triage.mjs +2 -0
  150. package/lib/qa/verdict.mjs +1 -0
  151. package/lib/qa/watch.mjs +2 -0
  152. package/package.json +62 -0
  153. package/references/ATLAS-COVERAGE.md +231 -0
  154. package/references/atlas-v1.md +318 -0
  155. package/references/atlas.md +338 -0
  156. package/references/verify.crud.example.json +1 -0
  157. package/references/verify.impact.example.json +1 -0
  158. package/references/verify.shadow.example.json +1 -0
  159. package/schemas/agent-result.schema.json +135 -0
  160. package/schemas/analysis.schema.json +15 -0
  161. package/schemas/classify.schema.json +61 -0
  162. package/schemas/coherence-ir.schema.json +1585 -0
  163. package/schemas/coherence-observed.schema.json +1171 -0
  164. package/schemas/coherence-plan.schema.json +77 -0
  165. package/schemas/coherence-risk.schema.json +46 -0
  166. package/schemas/crud-observed.schema.json +118 -0
  167. package/schemas/experiment-execution.schema.json +82 -0
  168. package/schemas/graph-edge.schema.json +22 -0
  169. package/schemas/graph-node.schema.json +81 -0
  170. package/schemas/graph.schema.json +2493 -0
  171. package/schemas/identity-oracle.schema.json +19 -0
  172. package/schemas/inventory.schema.json +2167 -0
  173. package/schemas/lanes-plan.schema.json +52 -0
  174. package/schemas/next.schema.json +54 -0
  175. package/schemas/personas.schema.json +52 -0
  176. package/schemas/research.schema.json +192 -0
  177. package/schemas/run.schema.json +160 -0
  178. package/schemas/shadow-replay.schema.json +68 -0
  179. package/schemas/stability.schema.json +92 -0
  180. package/schemas/sweep.schema.json +239 -0
  181. package/schemas/v1/agent-result.schema.json +106 -0
  182. package/schemas/v1/run.schema.json +96 -0
  183. package/schemas/verify-crud.schema.json +37 -0
  184. package/schemas/verify-read-only.schema.json +37 -0
  185. package/templates/github-workflow.yml +80 -0
  186. package/templates/pre-commit.sample +22 -0
  187. package/verify.sh +385 -0
@@ -0,0 +1,2167 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontend-verify.dev/schemas/inventory.schema.json",
4
+ "title": "inventory.json",
5
+ "description": "bin/inventory.mjs \u2014 static route/data inventory and the mutation -> entity -> route sync graph.",
6
+ "type": "object",
7
+ "required": [
8
+ "root",
9
+ "generated",
10
+ "counts",
11
+ "routes",
12
+ "matrix",
13
+ "resourceMatrix",
14
+ "syncRisks",
15
+ "syncRisksWaived",
16
+ "duplicateSources",
17
+ "cache"
18
+ ],
19
+ "additionalProperties": true,
20
+ "properties": {
21
+ "root": {
22
+ "type": "string"
23
+ },
24
+ "routing": {
25
+ "type": "object",
26
+ "description": "How the application maps a route path to a browser URL. `path` (the default) means <base><path>; `hash` means <base>/#<path>, detected from the router's own API (createHashRouter, HashRouter, useHashLocation, createWebHashHistory, createHashHistory) and never from a `#/` string. Route paths in `routes` stay logical in both modes.",
27
+ "required": [
28
+ "mode",
29
+ "evidence"
30
+ ],
31
+ "additionalProperties": true,
32
+ "properties": {
33
+ "mode": {
34
+ "type": "string",
35
+ "enum": [
36
+ "path",
37
+ "hash"
38
+ ]
39
+ },
40
+ "evidence": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "required": [
45
+ "file",
46
+ "line",
47
+ "match"
48
+ ],
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "file": {
52
+ "type": "string"
53
+ },
54
+ "line": {
55
+ "type": "integer",
56
+ "minimum": 1
57
+ },
58
+ "match": {
59
+ "type": "string"
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "note": {
65
+ "type": "string"
66
+ }
67
+ }
68
+ },
69
+ "cache": {
70
+ "$ref": "#/$defs/cache"
71
+ },
72
+ "atlasVersion": {
73
+ "type": "integer",
74
+ "enum": [
75
+ 1,
76
+ 2
77
+ ]
78
+ },
79
+ "generated": {
80
+ "type": "string"
81
+ },
82
+ "counts": {
83
+ "type": "object",
84
+ "required": [
85
+ "files",
86
+ "routes",
87
+ "entities",
88
+ "queries",
89
+ "queryUsages",
90
+ "mutations",
91
+ "syncRisks",
92
+ "syncRisksWaived",
93
+ "duplicateSources"
94
+ ],
95
+ "additionalProperties": true,
96
+ "properties": {
97
+ "files": {
98
+ "type": "integer",
99
+ "minimum": 0
100
+ },
101
+ "routes": {
102
+ "type": "integer",
103
+ "minimum": 0
104
+ },
105
+ "entities": {
106
+ "type": "integer",
107
+ "minimum": 0
108
+ },
109
+ "queries": {
110
+ "type": "integer",
111
+ "minimum": 0
112
+ },
113
+ "queryUsages": {
114
+ "type": "integer",
115
+ "minimum": 0
116
+ },
117
+ "mutations": {
118
+ "type": "integer",
119
+ "minimum": 0
120
+ },
121
+ "syncRisks": {
122
+ "type": "integer",
123
+ "minimum": 0
124
+ },
125
+ "syncRisksWaived": {
126
+ "type": "integer",
127
+ "minimum": 0
128
+ },
129
+ "duplicateSources": {
130
+ "type": "integer",
131
+ "minimum": 0
132
+ }
133
+ }
134
+ },
135
+ "routes": {
136
+ "type": "array",
137
+ "items": {
138
+ "$ref": "#/$defs/route"
139
+ }
140
+ },
141
+ "matrix": {
142
+ "type": "object",
143
+ "additionalProperties": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "string"
147
+ }
148
+ }
149
+ },
150
+ "resourceMatrix": {
151
+ "type": "object",
152
+ "additionalProperties": {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "string"
156
+ }
157
+ }
158
+ },
159
+ "syncRisks": {
160
+ "type": "array",
161
+ "items": {
162
+ "$ref": "#/$defs/syncRisk"
163
+ }
164
+ },
165
+ "syncRisksWaived": {
166
+ "type": "array",
167
+ "items": {
168
+ "$ref": "#/$defs/syncRisk"
169
+ }
170
+ },
171
+ "duplicateSources": {
172
+ "type": "array",
173
+ "items": {
174
+ "$ref": "#/$defs/duplicateSource"
175
+ }
176
+ },
177
+ "coherence": {
178
+ "oneOf": [
179
+ {
180
+ "type": "object",
181
+ "required": [
182
+ "schemaVersion",
183
+ "coverage",
184
+ "resourceFamilies",
185
+ "cacheKeys",
186
+ "cacheOperations",
187
+ "reads",
188
+ "mutations",
189
+ "invalidations",
190
+ "operationReadPairs",
191
+ "surfaces",
192
+ "ownershipEdges",
193
+ "candidates",
194
+ "graph"
195
+ ],
196
+ "additionalProperties": false,
197
+ "properties": {
198
+ "schemaVersion": {
199
+ "const": 4
200
+ },
201
+ "coverage": {
202
+ "type": "object",
203
+ "required": [
204
+ "status",
205
+ "reason",
206
+ "counts",
207
+ "unresolved"
208
+ ],
209
+ "additionalProperties": false,
210
+ "properties": {
211
+ "status": {
212
+ "enum": [
213
+ "measured",
214
+ "partial",
215
+ "unmeasured"
216
+ ]
217
+ },
218
+ "reason": {
219
+ "type": [
220
+ "string",
221
+ "null"
222
+ ]
223
+ },
224
+ "counts": {
225
+ "type": "object",
226
+ "additionalProperties": {
227
+ "type": "integer",
228
+ "minimum": 0
229
+ }
230
+ },
231
+ "unjoinedWriterFamilies": {
232
+ "description": "The endpoint families of every `family-join` row, deduplicated and sorted. Present on every current (v4) document; absent from legacy v3, which predates the join. A non-empty list is why `status` is `partial` rather than `measured`.",
233
+ "type": "array",
234
+ "items": {
235
+ "type": "string",
236
+ "minLength": 1
237
+ }
238
+ },
239
+ "unresolved": {
240
+ "type": "array",
241
+ "items": {
242
+ "$ref": "#/$defs/coherenceUnresolvedV3"
243
+ }
244
+ }
245
+ }
246
+ },
247
+ "resourceFamilies": {
248
+ "type": "array",
249
+ "items": {
250
+ "$ref": "#/$defs/coherenceFamily"
251
+ }
252
+ },
253
+ "cacheKeys": {
254
+ "type": "array",
255
+ "items": {
256
+ "$ref": "#/$defs/coherenceCacheKey"
257
+ }
258
+ },
259
+ "cacheOperations": {
260
+ "type": "array",
261
+ "items": {
262
+ "$ref": "#/$defs/coherenceCacheOperationStrict"
263
+ }
264
+ },
265
+ "reads": {
266
+ "type": "array",
267
+ "items": {
268
+ "$ref": "#/$defs/coherenceReadV3"
269
+ }
270
+ },
271
+ "mutations": {
272
+ "type": "array",
273
+ "items": {
274
+ "$ref": "#/$defs/coherenceMutationV3"
275
+ }
276
+ },
277
+ "invalidations": {
278
+ "type": "array",
279
+ "maxItems": 0
280
+ },
281
+ "operationReadPairs": {
282
+ "type": "array",
283
+ "items": {
284
+ "$ref": "#/$defs/coherenceOperationReadPair"
285
+ }
286
+ },
287
+ "surfaces": {
288
+ "type": "array",
289
+ "items": {
290
+ "$ref": "#/$defs/coherenceSurface"
291
+ }
292
+ },
293
+ "ownershipEdges": {
294
+ "type": "array",
295
+ "items": {
296
+ "$ref": "#/$defs/coherenceOwnershipEdge"
297
+ }
298
+ },
299
+ "candidates": {
300
+ "type": "array"
301
+ },
302
+ "units": {
303
+ "type": "array",
304
+ "items": {
305
+ "$ref": "#/$defs/coherenceUnit"
306
+ }
307
+ },
308
+ "graph": {
309
+ "type": "object",
310
+ "description": "The semantic-graph v2 root; graph.schema.json is its full contract.",
311
+ "required": [
312
+ "artifact",
313
+ "schemaVersion",
314
+ "coverage",
315
+ "nodes",
316
+ "edges"
317
+ ],
318
+ "properties": {
319
+ "artifact": {
320
+ "const": "frontend-verify.semantic-graph"
321
+ },
322
+ "schemaVersion": {
323
+ "const": 2
324
+ }
325
+ }
326
+ }
327
+ },
328
+ "description": "CURRENT (v4). One semantic graph v2 is REQUIRED; every compatibility array is a checked projection of it. Schema validity is necessary and not sufficient -- the graph must also pass graph.schema.json and validateSemanticGraph, which qa dev validate runs at this boundary."
329
+ },
330
+ {
331
+ "type": "object",
332
+ "required": [
333
+ "schemaVersion",
334
+ "coverage",
335
+ "resourceFamilies",
336
+ "reads",
337
+ "mutations",
338
+ "invalidations",
339
+ "surfaces",
340
+ "candidates"
341
+ ],
342
+ "additionalProperties": true,
343
+ "properties": {
344
+ "schemaVersion": {
345
+ "const": 1
346
+ }
347
+ },
348
+ "description": "LEGACY (v1), non-proof. Readable for migration and query only: it carries no semantic graph, so nothing in it satisfies a current join, obligation, or measured denominator. validateCoherenceIrIdentities returns {current:false} for it."
349
+ },
350
+ {
351
+ "type": "object",
352
+ "required": [
353
+ "schemaVersion",
354
+ "coverage",
355
+ "resourceFamilies",
356
+ "reads",
357
+ "mutations",
358
+ "invalidations",
359
+ "surfaces",
360
+ "ownershipEdges",
361
+ "candidates"
362
+ ],
363
+ "additionalProperties": false,
364
+ "properties": {
365
+ "schemaVersion": {
366
+ "const": 2
367
+ },
368
+ "coverage": {
369
+ "type": "object",
370
+ "required": [
371
+ "status",
372
+ "reason",
373
+ "counts",
374
+ "unresolved"
375
+ ],
376
+ "additionalProperties": false,
377
+ "properties": {
378
+ "status": {
379
+ "type": "string",
380
+ "enum": [
381
+ "measured",
382
+ "partial",
383
+ "unmeasured"
384
+ ]
385
+ },
386
+ "reason": {
387
+ "type": [
388
+ "string",
389
+ "null"
390
+ ]
391
+ },
392
+ "counts": {
393
+ "type": "object",
394
+ "required": [
395
+ "ownershipEdgesDiscovered",
396
+ "ownershipEdgesResolved",
397
+ "ownershipEdgesUnresolved",
398
+ "ambiguousMutationOccurrences"
399
+ ],
400
+ "additionalProperties": {
401
+ "type": "integer",
402
+ "minimum": 0
403
+ },
404
+ "properties": {
405
+ "ownershipEdgesDiscovered": {
406
+ "type": "integer",
407
+ "minimum": 0
408
+ },
409
+ "ownershipEdgesResolved": {
410
+ "type": "integer",
411
+ "minimum": 0
412
+ },
413
+ "ownershipEdgesUnresolved": {
414
+ "type": "integer",
415
+ "minimum": 0
416
+ },
417
+ "ambiguousMutationOccurrences": {
418
+ "type": "integer",
419
+ "minimum": 0
420
+ }
421
+ }
422
+ },
423
+ "unresolved": {
424
+ "type": "array",
425
+ "items": {
426
+ "$ref": "#/$defs/coherenceUnresolved"
427
+ }
428
+ }
429
+ }
430
+ },
431
+ "resourceFamilies": {
432
+ "type": "array",
433
+ "items": {
434
+ "$ref": "#/$defs/coherenceFamily"
435
+ }
436
+ },
437
+ "reads": {
438
+ "type": "array",
439
+ "items": {
440
+ "$ref": "#/$defs/coherenceRead"
441
+ }
442
+ },
443
+ "mutations": {
444
+ "type": "array",
445
+ "items": {
446
+ "$ref": "#/$defs/coherenceMutation"
447
+ }
448
+ },
449
+ "invalidations": {
450
+ "type": "array"
451
+ },
452
+ "surfaces": {
453
+ "type": "array",
454
+ "items": {
455
+ "$ref": "#/$defs/coherenceSurface"
456
+ }
457
+ },
458
+ "ownershipEdges": {
459
+ "type": "array",
460
+ "items": {
461
+ "$ref": "#/$defs/coherenceOwnershipEdge"
462
+ }
463
+ },
464
+ "candidates": {
465
+ "type": "array"
466
+ },
467
+ "units": {
468
+ "type": "array",
469
+ "items": {
470
+ "$ref": "#/$defs/coherenceUnit"
471
+ }
472
+ }
473
+ },
474
+ "description": "LEGACY (v2), non-proof. Readable for migration and query only: it carries no semantic graph, so nothing in it satisfies a current join, obligation, or measured denominator. validateCoherenceIrIdentities returns {current:false} for it."
475
+ },
476
+ {
477
+ "type": "object",
478
+ "required": [
479
+ "schemaVersion",
480
+ "coverage",
481
+ "resourceFamilies",
482
+ "cacheKeys",
483
+ "cacheOperations",
484
+ "reads",
485
+ "mutations",
486
+ "invalidations",
487
+ "operationReadPairs",
488
+ "surfaces",
489
+ "ownershipEdges",
490
+ "candidates"
491
+ ],
492
+ "additionalProperties": false,
493
+ "properties": {
494
+ "schemaVersion": {
495
+ "const": 3
496
+ },
497
+ "coverage": {
498
+ "type": "object",
499
+ "required": [
500
+ "status",
501
+ "reason",
502
+ "counts",
503
+ "unresolved"
504
+ ],
505
+ "additionalProperties": false,
506
+ "properties": {
507
+ "status": {
508
+ "enum": [
509
+ "measured",
510
+ "partial",
511
+ "unmeasured"
512
+ ]
513
+ },
514
+ "reason": {
515
+ "type": [
516
+ "string",
517
+ "null"
518
+ ]
519
+ },
520
+ "counts": {
521
+ "type": "object",
522
+ "additionalProperties": {
523
+ "type": "integer",
524
+ "minimum": 0
525
+ }
526
+ },
527
+ "unresolved": {
528
+ "type": "array",
529
+ "items": {
530
+ "$ref": "#/$defs/coherenceUnresolvedV3"
531
+ }
532
+ }
533
+ }
534
+ },
535
+ "resourceFamilies": {
536
+ "type": "array",
537
+ "items": {
538
+ "$ref": "#/$defs/coherenceFamily"
539
+ }
540
+ },
541
+ "cacheKeys": {
542
+ "type": "array",
543
+ "items": {
544
+ "$ref": "#/$defs/coherenceCacheKey"
545
+ }
546
+ },
547
+ "cacheOperations": {
548
+ "type": "array",
549
+ "items": {
550
+ "$ref": "#/$defs/coherenceCacheOperationStrict"
551
+ }
552
+ },
553
+ "reads": {
554
+ "type": "array",
555
+ "items": {
556
+ "$ref": "#/$defs/coherenceReadV3"
557
+ }
558
+ },
559
+ "mutations": {
560
+ "type": "array",
561
+ "items": {
562
+ "$ref": "#/$defs/coherenceMutationV3"
563
+ }
564
+ },
565
+ "invalidations": {
566
+ "type": "array",
567
+ "maxItems": 0
568
+ },
569
+ "operationReadPairs": {
570
+ "type": "array",
571
+ "items": {
572
+ "$ref": "#/$defs/coherenceOperationReadPair"
573
+ }
574
+ },
575
+ "surfaces": {
576
+ "type": "array",
577
+ "items": {
578
+ "$ref": "#/$defs/coherenceSurface"
579
+ }
580
+ },
581
+ "ownershipEdges": {
582
+ "type": "array",
583
+ "items": {
584
+ "$ref": "#/$defs/coherenceOwnershipEdge"
585
+ }
586
+ },
587
+ "candidates": {
588
+ "type": "array"
589
+ },
590
+ "units": {
591
+ "type": "array",
592
+ "items": {
593
+ "$ref": "#/$defs/coherenceUnit"
594
+ }
595
+ }
596
+ },
597
+ "description": "LEGACY (v3), non-proof. Readable for migration and query only: it carries no semantic graph, so nothing in it satisfies a current join, obligation, or measured denominator. validateCoherenceIrIdentities returns {current:false} for it."
598
+ }
599
+ ],
600
+ "description": "Embedded coherence IR. Exactly one branch matches: the current v4 root, or one of the explicitly legacy v1/v2/v3 roots, which are never current proof."
601
+ }
602
+ },
603
+ "$defs": {
604
+ "coherenceId": {
605
+ "type": "string",
606
+ "pattern": "^[a-f0-9]{64}$"
607
+ },
608
+ "coherenceMutation": {
609
+ "type": "object",
610
+ "required": [
611
+ "id",
612
+ "material"
613
+ ],
614
+ "additionalProperties": false,
615
+ "properties": {
616
+ "id": {
617
+ "$ref": "#/$defs/coherenceId"
618
+ },
619
+ "material": {
620
+ "type": "object",
621
+ "required": [
622
+ "namespace",
623
+ "version",
624
+ "sourceRef",
625
+ "endpoint"
626
+ ],
627
+ "additionalProperties": false,
628
+ "properties": {
629
+ "namespace": {
630
+ "const": "coherence/mutation"
631
+ },
632
+ "version": {
633
+ "const": 1
634
+ },
635
+ "sourceRef": {
636
+ "type": "object",
637
+ "required": [
638
+ "file",
639
+ "line"
640
+ ],
641
+ "additionalProperties": false,
642
+ "properties": {
643
+ "file": {
644
+ "type": "string"
645
+ },
646
+ "line": {
647
+ "type": "integer",
648
+ "minimum": 0
649
+ }
650
+ }
651
+ },
652
+ "endpoint": {
653
+ "type": [
654
+ "string",
655
+ "null"
656
+ ]
657
+ }
658
+ }
659
+ },
660
+ "file": {
661
+ "type": "string"
662
+ },
663
+ "line": {
664
+ "type": "integer",
665
+ "minimum": 0
666
+ },
667
+ "hook": {
668
+ "type": [
669
+ "string",
670
+ "null"
671
+ ]
672
+ },
673
+ "endpoint": {
674
+ "type": [
675
+ "string",
676
+ "null"
677
+ ]
678
+ },
679
+ "family": {
680
+ "type": [
681
+ "string",
682
+ "null"
683
+ ]
684
+ },
685
+ "writes": {
686
+ "type": "array"
687
+ },
688
+ "invalidations": {
689
+ "type": "array"
690
+ },
691
+ "confidence": {
692
+ "type": "string"
693
+ }
694
+ }
695
+ },
696
+ "coherenceJcsValue": {
697
+ "anyOf": [
698
+ {
699
+ "type": [
700
+ "string",
701
+ "boolean",
702
+ "null"
703
+ ]
704
+ },
705
+ {
706
+ "type": "number",
707
+ "minimum": -9007199254740991,
708
+ "maximum": 9007199254740991
709
+ },
710
+ {
711
+ "type": "array",
712
+ "items": {
713
+ "$ref": "#/$defs/coherenceJcsValue"
714
+ }
715
+ },
716
+ {
717
+ "type": "object",
718
+ "additionalProperties": {
719
+ "$ref": "#/$defs/coherenceJcsValue"
720
+ }
721
+ }
722
+ ]
723
+ },
724
+ "coherenceKeyOrigin": {
725
+ "type": "object",
726
+ "required": [
727
+ "file",
728
+ "start",
729
+ "end",
730
+ "line",
731
+ "column"
732
+ ],
733
+ "additionalProperties": false,
734
+ "properties": {
735
+ "file": {
736
+ "type": "string"
737
+ },
738
+ "start": {
739
+ "type": "integer",
740
+ "minimum": 0
741
+ },
742
+ "end": {
743
+ "type": "integer",
744
+ "minimum": 1
745
+ },
746
+ "line": {
747
+ "type": "integer",
748
+ "minimum": 1
749
+ },
750
+ "column": {
751
+ "type": "integer",
752
+ "minimum": 1
753
+ }
754
+ }
755
+ },
756
+ "coherenceLiteralTerm": {
757
+ "type": "object",
758
+ "required": [
759
+ "kind",
760
+ "value"
761
+ ],
762
+ "additionalProperties": false,
763
+ "properties": {
764
+ "kind": {
765
+ "const": "literal"
766
+ },
767
+ "value": {
768
+ "$ref": "#/$defs/coherenceJcsValue"
769
+ },
770
+ "origin": {
771
+ "$ref": "#/$defs/coherenceKeyOrigin"
772
+ }
773
+ }
774
+ },
775
+ "coherenceSymbolicTerm": {
776
+ "type": "object",
777
+ "required": [
778
+ "kind",
779
+ "expression",
780
+ "ownerSymbol",
781
+ "targetSymbol",
782
+ "origin",
783
+ "resolutionPath",
784
+ "resolution",
785
+ "reason"
786
+ ],
787
+ "additionalProperties": false,
788
+ "properties": {
789
+ "kind": {
790
+ "enum": [
791
+ "parameter",
792
+ "wildcard",
793
+ "call",
794
+ "unknown"
795
+ ]
796
+ },
797
+ "expression": {
798
+ "type": "string"
799
+ },
800
+ "ownerSymbol": {
801
+ "type": [
802
+ "string",
803
+ "null"
804
+ ]
805
+ },
806
+ "targetSymbol": {
807
+ "type": [
808
+ "string",
809
+ "null"
810
+ ]
811
+ },
812
+ "origin": {
813
+ "$ref": "#/$defs/coherenceKeyOrigin"
814
+ },
815
+ "resolutionPath": {
816
+ "type": "array",
817
+ "maxItems": 26,
818
+ "items": {
819
+ "type": "string"
820
+ }
821
+ },
822
+ "resolution": {
823
+ "const": "unresolved"
824
+ },
825
+ "reason": {
826
+ "type": "string"
827
+ }
828
+ }
829
+ },
830
+ "coherenceKeyTerm": {
831
+ "oneOf": [
832
+ {
833
+ "$ref": "#/$defs/coherenceLiteralTerm"
834
+ },
835
+ {
836
+ "$ref": "#/$defs/coherenceSymbolicTerm"
837
+ }
838
+ ]
839
+ },
840
+ "coherenceCacheKey": {
841
+ "type": "object",
842
+ "required": [
843
+ "id",
844
+ "material",
845
+ "provenance"
846
+ ],
847
+ "additionalProperties": false,
848
+ "properties": {
849
+ "id": {
850
+ "$ref": "#/$defs/coherenceId"
851
+ },
852
+ "material": {
853
+ "type": "object",
854
+ "required": [
855
+ "namespace",
856
+ "version",
857
+ "segments"
858
+ ],
859
+ "additionalProperties": false,
860
+ "properties": {
861
+ "namespace": {
862
+ "const": "coherence/cache-key"
863
+ },
864
+ "version": {
865
+ "const": 1
866
+ },
867
+ "segments": {
868
+ "type": "array",
869
+ "items": {
870
+ "$ref": "#/$defs/coherenceKeyTerm"
871
+ }
872
+ }
873
+ }
874
+ },
875
+ "provenance": {
876
+ "type": "array",
877
+ "minItems": 1,
878
+ "items": {
879
+ "type": "object"
880
+ }
881
+ }
882
+ }
883
+ },
884
+ "coherenceCacheOperationStrict": {
885
+ "type": "object",
886
+ "required": [
887
+ "id",
888
+ "material",
889
+ "provenance"
890
+ ],
891
+ "additionalProperties": false,
892
+ "properties": {
893
+ "id": {
894
+ "$ref": "#/$defs/coherenceId"
895
+ },
896
+ "material": {
897
+ "type": "object",
898
+ "required": [
899
+ "namespace",
900
+ "version",
901
+ "sourceRef",
902
+ "receiver",
903
+ "operation",
904
+ "keyId",
905
+ "keyMatch",
906
+ "exact",
907
+ "predicate",
908
+ "filters",
909
+ "effects"
910
+ ],
911
+ "additionalProperties": false,
912
+ "properties": {
913
+ "namespace": {
914
+ "const": "coherence/cache-operation"
915
+ },
916
+ "version": {
917
+ "const": 1
918
+ },
919
+ "sourceRef": {
920
+ "type": "object",
921
+ "required": [
922
+ "file",
923
+ "start",
924
+ "end"
925
+ ],
926
+ "additionalProperties": false,
927
+ "properties": {
928
+ "file": {
929
+ "type": "string"
930
+ },
931
+ "start": {
932
+ "type": "integer",
933
+ "minimum": 0
934
+ },
935
+ "end": {
936
+ "type": "integer",
937
+ "minimum": 1
938
+ }
939
+ }
940
+ },
941
+ "receiver": {
942
+ "type": "object",
943
+ "required": [
944
+ "expression",
945
+ "ownerSymbol",
946
+ "targetSymbol",
947
+ "kind",
948
+ "resolution",
949
+ "reason"
950
+ ],
951
+ "additionalProperties": false,
952
+ "properties": {
953
+ "expression": {
954
+ "type": "string"
955
+ },
956
+ "ownerSymbol": {
957
+ "type": [
958
+ "string",
959
+ "null"
960
+ ]
961
+ },
962
+ "targetSymbol": {
963
+ "type": [
964
+ "string",
965
+ "null"
966
+ ]
967
+ },
968
+ "kind": {
969
+ "enum": [
970
+ "query-client",
971
+ "query-cache",
972
+ "unknown"
973
+ ]
974
+ },
975
+ "resolution": {
976
+ "enum": [
977
+ "resolved",
978
+ "unresolved"
979
+ ]
980
+ },
981
+ "reason": {
982
+ "enum": [
983
+ null,
984
+ "unsupported-client"
985
+ ]
986
+ }
987
+ }
988
+ },
989
+ "operation": {
990
+ "enum": [
991
+ "invalidateQueries",
992
+ "refetchQueries",
993
+ "resetQueries",
994
+ "removeQueries",
995
+ "setQueryData",
996
+ "setQueriesData",
997
+ "clear"
998
+ ]
999
+ },
1000
+ "keyId": {
1001
+ "type": [
1002
+ "string",
1003
+ "null"
1004
+ ],
1005
+ "pattern": "^[a-f0-9]{64}$"
1006
+ },
1007
+ "keyMatch": {
1008
+ "enum": [
1009
+ "all",
1010
+ "prefix",
1011
+ "exact",
1012
+ "unknown"
1013
+ ]
1014
+ },
1015
+ "exact": {
1016
+ "type": [
1017
+ "boolean",
1018
+ "null"
1019
+ ]
1020
+ },
1021
+ "predicate": {
1022
+ "anyOf": [
1023
+ {
1024
+ "type": "null"
1025
+ },
1026
+ {
1027
+ "$ref": "#/$defs/coherenceKeyTerm"
1028
+ }
1029
+ ]
1030
+ },
1031
+ "filters": {
1032
+ "type": "object",
1033
+ "additionalProperties": false,
1034
+ "properties": {
1035
+ "type": {},
1036
+ "stale": {},
1037
+ "fetchStatus": {},
1038
+ "refetchType": {}
1039
+ }
1040
+ },
1041
+ "effects": {
1042
+ "type": "array",
1043
+ "items": {
1044
+ "type": "object",
1045
+ "required": [
1046
+ "kind",
1047
+ "scope"
1048
+ ],
1049
+ "additionalProperties": false,
1050
+ "properties": {
1051
+ "kind": {
1052
+ "enum": [
1053
+ "invalidate",
1054
+ "refetch",
1055
+ "reset",
1056
+ "remove",
1057
+ "update",
1058
+ "clear-query-cache",
1059
+ "clear-mutation-cache"
1060
+ ]
1061
+ },
1062
+ "scope": {
1063
+ "type": "string"
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ }
1069
+ },
1070
+ "provenance": {
1071
+ "type": "array",
1072
+ "minItems": 1,
1073
+ "items": {
1074
+ "type": "object"
1075
+ }
1076
+ }
1077
+ }
1078
+ },
1079
+ "coherenceMutationV3": {
1080
+ "type": "object",
1081
+ "required": [
1082
+ "id",
1083
+ "material",
1084
+ "file",
1085
+ "line",
1086
+ "endpoint",
1087
+ "family",
1088
+ "writes",
1089
+ "operationIds",
1090
+ "confidence"
1091
+ ],
1092
+ "additionalProperties": false,
1093
+ "properties": {
1094
+ "id": {
1095
+ "$ref": "#/$defs/coherenceId"
1096
+ },
1097
+ "material": {
1098
+ "type": "object",
1099
+ "required": [
1100
+ "namespace",
1101
+ "version",
1102
+ "sourceRef",
1103
+ "endpoint"
1104
+ ],
1105
+ "additionalProperties": false,
1106
+ "properties": {
1107
+ "namespace": {
1108
+ "const": "coherence/mutation"
1109
+ },
1110
+ "version": {
1111
+ "const": 1
1112
+ },
1113
+ "sourceRef": {
1114
+ "type": "object",
1115
+ "required": [
1116
+ "file",
1117
+ "line"
1118
+ ],
1119
+ "additionalProperties": false,
1120
+ "properties": {
1121
+ "file": {
1122
+ "type": "string"
1123
+ },
1124
+ "line": {
1125
+ "type": "integer",
1126
+ "minimum": 0
1127
+ }
1128
+ }
1129
+ },
1130
+ "endpoint": {
1131
+ "type": [
1132
+ "string",
1133
+ "null"
1134
+ ]
1135
+ }
1136
+ }
1137
+ },
1138
+ "file": {
1139
+ "type": "string"
1140
+ },
1141
+ "line": {
1142
+ "type": "integer",
1143
+ "minimum": 0
1144
+ },
1145
+ "hook": {
1146
+ "type": [
1147
+ "string",
1148
+ "null"
1149
+ ]
1150
+ },
1151
+ "endpoint": {
1152
+ "type": [
1153
+ "string",
1154
+ "null"
1155
+ ]
1156
+ },
1157
+ "family": {
1158
+ "type": [
1159
+ "string",
1160
+ "null"
1161
+ ]
1162
+ },
1163
+ "familySource": {
1164
+ "description": "WHICH join produced `family`: `declaration` is a repo-declared entity alias (a claim, not measured evidence -- analyze.mjs downgrades any candidate resting on one to `uncertain`), `endpoint` is derived from the endpoint itself, `unresolved` means no family could be attributed. Present on every current row; absent from legacy v3, which predates entity aliases.",
1165
+ "enum": [
1166
+ "declaration",
1167
+ "endpoint",
1168
+ "unresolved"
1169
+ ]
1170
+ },
1171
+ "writes": {
1172
+ "type": "array"
1173
+ },
1174
+ "operationIds": {
1175
+ "type": "array",
1176
+ "items": {
1177
+ "$ref": "#/$defs/coherenceId"
1178
+ }
1179
+ },
1180
+ "confidence": {
1181
+ "enum": [
1182
+ "exact",
1183
+ "resolved",
1184
+ "coarse",
1185
+ "unresolved"
1186
+ ]
1187
+ }
1188
+ }
1189
+ },
1190
+ "coherenceReadV3": {
1191
+ "type": "object",
1192
+ "required": [
1193
+ "id",
1194
+ "keyId",
1195
+ "file",
1196
+ "line",
1197
+ "pattern",
1198
+ "endpoint",
1199
+ "family",
1200
+ "confidence"
1201
+ ],
1202
+ "additionalProperties": false,
1203
+ "properties": {
1204
+ "id": {
1205
+ "$ref": "#/$defs/coherenceEvidenceId"
1206
+ },
1207
+ "keyId": {
1208
+ "$ref": "#/$defs/coherenceId"
1209
+ },
1210
+ "file": {
1211
+ "type": "string"
1212
+ },
1213
+ "line": {
1214
+ "type": "integer",
1215
+ "minimum": 0
1216
+ },
1217
+ "span": {
1218
+ "anyOf": [
1219
+ {
1220
+ "$ref": "#/$defs/coherenceSourceSpan"
1221
+ },
1222
+ {
1223
+ "type": "null"
1224
+ }
1225
+ ]
1226
+ },
1227
+ "pattern": {
1228
+ "type": "object",
1229
+ "required": [
1230
+ "segments"
1231
+ ],
1232
+ "additionalProperties": false,
1233
+ "properties": {
1234
+ "segments": {
1235
+ "type": "array",
1236
+ "items": {
1237
+ "$ref": "#/$defs/coherenceKeyTerm"
1238
+ }
1239
+ }
1240
+ }
1241
+ },
1242
+ "endpoint": {
1243
+ "type": [
1244
+ "string",
1245
+ "null"
1246
+ ]
1247
+ },
1248
+ "family": {
1249
+ "type": [
1250
+ "string",
1251
+ "null"
1252
+ ]
1253
+ },
1254
+ "familySource": {
1255
+ "description": "WHICH join produced `family`: `declaration` is a repo-declared entity alias (a claim, not measured evidence -- analyze.mjs downgrades any candidate resting on one to `uncertain`), `endpoint` is derived from the endpoint itself, `unresolved` means no family could be attributed. Present on every current row; absent from legacy v3, which predates entity aliases.",
1256
+ "enum": [
1257
+ "declaration",
1258
+ "endpoint",
1259
+ "unresolved"
1260
+ ]
1261
+ },
1262
+ "confidence": {
1263
+ "enum": [
1264
+ "exact",
1265
+ "resolved",
1266
+ "coarse",
1267
+ "unresolved"
1268
+ ]
1269
+ }
1270
+ }
1271
+ },
1272
+ "coherenceOperationReadPair": {
1273
+ "type": "object",
1274
+ "required": [
1275
+ "id",
1276
+ "operationId",
1277
+ "readId",
1278
+ "keyCoverage",
1279
+ "effectCoverage",
1280
+ "mandatory"
1281
+ ],
1282
+ "additionalProperties": false,
1283
+ "properties": {
1284
+ "id": {
1285
+ "type": "string",
1286
+ "pattern": "^[a-f0-9]{64}:sha256:[a-f0-9]{64}$"
1287
+ },
1288
+ "operationId": {
1289
+ "$ref": "#/$defs/coherenceId"
1290
+ },
1291
+ "readId": {
1292
+ "$ref": "#/$defs/coherenceEvidenceId"
1293
+ },
1294
+ "keyCoverage": {
1295
+ "enum": [
1296
+ "covered",
1297
+ "not-covered",
1298
+ "unresolved"
1299
+ ]
1300
+ },
1301
+ "effectCoverage": {
1302
+ "enum": [
1303
+ "covered",
1304
+ "not-covered",
1305
+ "unresolved"
1306
+ ]
1307
+ },
1308
+ "mandatory": {
1309
+ "type": "boolean"
1310
+ }
1311
+ }
1312
+ },
1313
+ "coherenceSurface": {
1314
+ "type": "object",
1315
+ "required": [
1316
+ "id",
1317
+ "material",
1318
+ "route",
1319
+ "file",
1320
+ "component",
1321
+ "readIds",
1322
+ "families",
1323
+ "confidence",
1324
+ "kind"
1325
+ ],
1326
+ "additionalProperties": false,
1327
+ "properties": {
1328
+ "id": {
1329
+ "$ref": "#/$defs/coherenceId"
1330
+ },
1331
+ "material": {
1332
+ "type": "object",
1333
+ "required": [
1334
+ "namespace",
1335
+ "version",
1336
+ "route",
1337
+ "component",
1338
+ "sourceRef"
1339
+ ],
1340
+ "additionalProperties": false,
1341
+ "properties": {
1342
+ "namespace": {
1343
+ "const": "coherence/surface"
1344
+ },
1345
+ "version": {
1346
+ "const": 1
1347
+ },
1348
+ "route": {
1349
+ "type": "string"
1350
+ },
1351
+ "component": {
1352
+ "type": [
1353
+ "string",
1354
+ "null"
1355
+ ]
1356
+ },
1357
+ "sourceRef": {
1358
+ "type": "object",
1359
+ "required": [
1360
+ "file",
1361
+ "line"
1362
+ ],
1363
+ "additionalProperties": false,
1364
+ "properties": {
1365
+ "file": {
1366
+ "type": [
1367
+ "string",
1368
+ "null"
1369
+ ]
1370
+ },
1371
+ "line": {
1372
+ "type": "integer",
1373
+ "minimum": 0
1374
+ }
1375
+ }
1376
+ }
1377
+ }
1378
+ },
1379
+ "route": {
1380
+ "type": "string"
1381
+ },
1382
+ "file": {
1383
+ "type": [
1384
+ "string",
1385
+ "null"
1386
+ ]
1387
+ },
1388
+ "component": {
1389
+ "type": [
1390
+ "string",
1391
+ "null"
1392
+ ]
1393
+ },
1394
+ "readIds": {
1395
+ "type": "array",
1396
+ "items": {
1397
+ "$ref": "#/$defs/coherenceEvidenceId"
1398
+ }
1399
+ },
1400
+ "families": {
1401
+ "type": "array",
1402
+ "items": {
1403
+ "type": "string"
1404
+ }
1405
+ },
1406
+ "confidence": {
1407
+ "enum": [
1408
+ "exact",
1409
+ "resolved",
1410
+ "coarse",
1411
+ "unresolved"
1412
+ ]
1413
+ },
1414
+ "kind": {
1415
+ "enum": [
1416
+ "route",
1417
+ "component",
1418
+ "modal",
1419
+ "drawer",
1420
+ "tab",
1421
+ "wizard-step",
1422
+ "embedded-widget"
1423
+ ]
1424
+ }
1425
+ }
1426
+ },
1427
+ "coherenceFamily": {
1428
+ "type": "object",
1429
+ "required": [
1430
+ "id",
1431
+ "material"
1432
+ ],
1433
+ "additionalProperties": false,
1434
+ "properties": {
1435
+ "id": {
1436
+ "$ref": "#/$defs/coherenceId"
1437
+ },
1438
+ "material": {
1439
+ "type": "object",
1440
+ "required": [
1441
+ "namespace",
1442
+ "version",
1443
+ "endpointFamily"
1444
+ ],
1445
+ "additionalProperties": false,
1446
+ "properties": {
1447
+ "namespace": {
1448
+ "const": "coherence/family"
1449
+ },
1450
+ "version": {
1451
+ "const": 1
1452
+ },
1453
+ "endpointFamily": {
1454
+ "type": "string"
1455
+ }
1456
+ }
1457
+ },
1458
+ "family": {
1459
+ "type": "string"
1460
+ },
1461
+ "mutationIds": {
1462
+ "type": "array"
1463
+ },
1464
+ "readIds": {
1465
+ "type": "array"
1466
+ },
1467
+ "surfaceIds": {
1468
+ "type": "array"
1469
+ },
1470
+ "keyTerms": {
1471
+ "type": "array"
1472
+ },
1473
+ "invalidations": {
1474
+ "type": "integer"
1475
+ },
1476
+ "invalidationsUnresolved": {
1477
+ "type": "integer"
1478
+ },
1479
+ "readsUnresolvedKey": {
1480
+ "type": "integer"
1481
+ }
1482
+ }
1483
+ },
1484
+ "coherenceEvidenceId": {
1485
+ "type": "string",
1486
+ "pattern": "^sha256:[a-f0-9]{64}$"
1487
+ },
1488
+ "coherenceSourceSpan": {
1489
+ "type": "object",
1490
+ "required": [
1491
+ "file",
1492
+ "start",
1493
+ "end",
1494
+ "line",
1495
+ "column"
1496
+ ],
1497
+ "additionalProperties": false,
1498
+ "properties": {
1499
+ "file": {
1500
+ "type": "string"
1501
+ },
1502
+ "start": {
1503
+ "type": "integer",
1504
+ "minimum": 0
1505
+ },
1506
+ "end": {
1507
+ "type": "integer",
1508
+ "minimum": 1
1509
+ },
1510
+ "line": {
1511
+ "type": "integer",
1512
+ "minimum": 1
1513
+ },
1514
+ "column": {
1515
+ "type": "integer",
1516
+ "minimum": 1
1517
+ }
1518
+ }
1519
+ },
1520
+ "coherenceRead": {
1521
+ "type": "object",
1522
+ "required": [
1523
+ "id",
1524
+ "file",
1525
+ "line",
1526
+ "span",
1527
+ "pattern",
1528
+ "endpoint",
1529
+ "family",
1530
+ "confidence"
1531
+ ],
1532
+ "additionalProperties": false,
1533
+ "properties": {
1534
+ "id": {
1535
+ "$ref": "#/$defs/coherenceEvidenceId"
1536
+ },
1537
+ "file": {
1538
+ "type": "string"
1539
+ },
1540
+ "line": {
1541
+ "type": "integer",
1542
+ "minimum": 0
1543
+ },
1544
+ "span": {
1545
+ "$ref": "#/$defs/coherenceSourceSpan"
1546
+ },
1547
+ "pattern": {
1548
+ "type": "object"
1549
+ },
1550
+ "endpoint": {
1551
+ "type": [
1552
+ "string",
1553
+ "null"
1554
+ ]
1555
+ },
1556
+ "family": {
1557
+ "type": [
1558
+ "string",
1559
+ "null"
1560
+ ]
1561
+ },
1562
+ "confidence": {
1563
+ "enum": [
1564
+ "exact",
1565
+ "resolved",
1566
+ "coarse",
1567
+ "unresolved"
1568
+ ]
1569
+ }
1570
+ }
1571
+ },
1572
+ "coherenceUnresolved": {
1573
+ "type": "object",
1574
+ "required": [
1575
+ "id",
1576
+ "file",
1577
+ "line",
1578
+ "kind",
1579
+ "reason"
1580
+ ],
1581
+ "additionalProperties": false,
1582
+ "properties": {
1583
+ "id": {
1584
+ "type": "string"
1585
+ },
1586
+ "file": {
1587
+ "type": "string"
1588
+ },
1589
+ "line": {
1590
+ "type": "integer",
1591
+ "minimum": 0
1592
+ },
1593
+ "kind": {
1594
+ "enum": [
1595
+ "read",
1596
+ "write",
1597
+ "ownership"
1598
+ ]
1599
+ },
1600
+ "reason": {
1601
+ "type": "string"
1602
+ },
1603
+ "span": {
1604
+ "$ref": "#/$defs/coherenceSourceSpan"
1605
+ }
1606
+ }
1607
+ },
1608
+ "coherenceUnresolvedV3": {
1609
+ "type": "object",
1610
+ "required": [
1611
+ "id",
1612
+ "file",
1613
+ "line",
1614
+ "kind",
1615
+ "reason"
1616
+ ],
1617
+ "additionalProperties": false,
1618
+ "properties": {
1619
+ "id": {
1620
+ "type": "string"
1621
+ },
1622
+ "file": {
1623
+ "type": "string"
1624
+ },
1625
+ "line": {
1626
+ "type": "integer",
1627
+ "minimum": 0
1628
+ },
1629
+ "kind": {
1630
+ "description": "`family-join` is a RESOLVED write whose family no surface reads. It is deliberately not `write`: identity.mjs ledgers `write` as exactly the writes that could not be resolved, so a resolved write listed there would both trip that ledger and overstate the unknown write surface. What is unresolved is the join to a reader surface, so the row names that relation.",
1631
+ "enum": [
1632
+ "read",
1633
+ "write",
1634
+ "family-join",
1635
+ "ownership",
1636
+ "cache-key",
1637
+ "cache-operation"
1638
+ ]
1639
+ },
1640
+ "family": {
1641
+ "description": "The endpoint family of a `family-join` row. Only that kind carries one.",
1642
+ "type": "string",
1643
+ "minLength": 1
1644
+ },
1645
+ "reason": {
1646
+ "type": "string"
1647
+ },
1648
+ "span": {
1649
+ "$ref": "#/$defs/coherenceSourceSpan"
1650
+ }
1651
+ }
1652
+ },
1653
+ "coherenceOwnershipEdge": {
1654
+ "type": "object",
1655
+ "required": [
1656
+ "surfaceId",
1657
+ "readId",
1658
+ "confidence",
1659
+ "resolution",
1660
+ "reason",
1661
+ "source",
1662
+ "provenance",
1663
+ "path"
1664
+ ],
1665
+ "additionalProperties": false,
1666
+ "properties": {
1667
+ "surfaceId": {
1668
+ "$ref": "#/$defs/coherenceId"
1669
+ },
1670
+ "readId": {
1671
+ "type": [
1672
+ "string",
1673
+ "null"
1674
+ ]
1675
+ },
1676
+ "confidence": {
1677
+ "enum": [
1678
+ "resolved",
1679
+ "unresolved"
1680
+ ]
1681
+ },
1682
+ "resolution": {
1683
+ "enum": [
1684
+ "resolved",
1685
+ "unresolved"
1686
+ ]
1687
+ },
1688
+ "reason": {
1689
+ "enum": [
1690
+ null,
1691
+ "dynamic-import",
1692
+ "namespace-spread",
1693
+ "export-star",
1694
+ "computed-member",
1695
+ "ambiguous-alias",
1696
+ "unresolved-module",
1697
+ "unsupported-syntax"
1698
+ ]
1699
+ },
1700
+ "source": {
1701
+ "$ref": "#/$defs/coherenceSourceSpan"
1702
+ },
1703
+ "provenance": {
1704
+ "type": "object",
1705
+ "required": [
1706
+ "adapter",
1707
+ "method"
1708
+ ],
1709
+ "additionalProperties": false,
1710
+ "properties": {
1711
+ "adapter": {
1712
+ "const": "structural-js"
1713
+ },
1714
+ "method": {
1715
+ "const": "symbol-traversal"
1716
+ }
1717
+ }
1718
+ },
1719
+ "path": {
1720
+ "type": "array",
1721
+ "minItems": 2,
1722
+ "maxItems": 26,
1723
+ "items": {
1724
+ "type": "string",
1725
+ "minLength": 1
1726
+ }
1727
+ }
1728
+ },
1729
+ "oneOf": [
1730
+ {
1731
+ "properties": {
1732
+ "resolution": {
1733
+ "const": "resolved"
1734
+ },
1735
+ "confidence": {
1736
+ "const": "resolved"
1737
+ },
1738
+ "readId": {
1739
+ "$ref": "#/$defs/coherenceEvidenceId"
1740
+ },
1741
+ "reason": {
1742
+ "const": null
1743
+ }
1744
+ }
1745
+ },
1746
+ {
1747
+ "properties": {
1748
+ "resolution": {
1749
+ "const": "unresolved"
1750
+ },
1751
+ "confidence": {
1752
+ "const": "unresolved"
1753
+ },
1754
+ "readId": {
1755
+ "const": null
1756
+ },
1757
+ "reason": {
1758
+ "enum": [
1759
+ "dynamic-import",
1760
+ "namespace-spread",
1761
+ "export-star",
1762
+ "computed-member",
1763
+ "ambiguous-alias",
1764
+ "unresolved-module",
1765
+ "unsupported-syntax"
1766
+ ]
1767
+ }
1768
+ }
1769
+ }
1770
+ ]
1771
+ },
1772
+ "coherenceModuleRef": {
1773
+ "type": "object",
1774
+ "required": [
1775
+ "specifier",
1776
+ "kind",
1777
+ "resolvedFile",
1778
+ "span"
1779
+ ],
1780
+ "additionalProperties": false,
1781
+ "properties": {
1782
+ "specifier": {
1783
+ "type": "string",
1784
+ "minLength": 1
1785
+ },
1786
+ "kind": {
1787
+ "enum": [
1788
+ "static-import",
1789
+ "dynamic-import",
1790
+ "named-reexport",
1791
+ "export-star"
1792
+ ]
1793
+ },
1794
+ "resolvedFile": {
1795
+ "type": [
1796
+ "string",
1797
+ "null"
1798
+ ]
1799
+ },
1800
+ "span": {
1801
+ "$ref": "#/$defs/coherenceSourceSpan"
1802
+ }
1803
+ }
1804
+ },
1805
+ "coherenceUnit": {
1806
+ "type": "object",
1807
+ "required": [
1808
+ "file",
1809
+ "imports",
1810
+ "moduleRefs"
1811
+ ],
1812
+ "additionalProperties": false,
1813
+ "properties": {
1814
+ "file": {
1815
+ "type": "string"
1816
+ },
1817
+ "imports": {
1818
+ "type": "array",
1819
+ "items": {
1820
+ "type": "string"
1821
+ }
1822
+ },
1823
+ "moduleRefs": {
1824
+ "type": "array",
1825
+ "items": {
1826
+ "$ref": "#/$defs/coherenceModuleRef"
1827
+ }
1828
+ }
1829
+ }
1830
+ },
1831
+ "cache": {
1832
+ "type": "object",
1833
+ "description": "the content-identity cache lib/qa/source-snapshot.mjs computes -- see CLAUDE.md 'Outputs are byte-stable'.",
1834
+ "required": [
1835
+ "hit",
1836
+ "identity",
1837
+ "schemaVersion",
1838
+ "sourceDigest",
1839
+ "computedAt"
1840
+ ],
1841
+ "additionalProperties": true,
1842
+ "properties": {
1843
+ "hit": {
1844
+ "type": "boolean"
1845
+ },
1846
+ "identity": {
1847
+ "type": [
1848
+ "string",
1849
+ "null"
1850
+ ]
1851
+ },
1852
+ "schemaVersion": {
1853
+ "type": "integer",
1854
+ "minimum": 1
1855
+ },
1856
+ "sourceDigest": {
1857
+ "type": "string"
1858
+ },
1859
+ "computedAt": {
1860
+ "type": "string"
1861
+ },
1862
+ "reusedAt": {
1863
+ "type": "string"
1864
+ }
1865
+ }
1866
+ },
1867
+ "route": {
1868
+ "type": "object",
1869
+ "required": [
1870
+ "path",
1871
+ "file",
1872
+ "kind",
1873
+ "modules",
1874
+ "entities",
1875
+ "queries",
1876
+ "mutations"
1877
+ ],
1878
+ "additionalProperties": true,
1879
+ "properties": {
1880
+ "path": {
1881
+ "type": "string"
1882
+ },
1883
+ "file": {
1884
+ "type": "string"
1885
+ },
1886
+ "kind": {
1887
+ "type": "string",
1888
+ "enum": [
1889
+ "next-app",
1890
+ "next-pages",
1891
+ "react-router",
1892
+ "route-config",
1893
+ "file-router",
1894
+ "remix",
1895
+ "sveltekit",
1896
+ "astro",
1897
+ "vue-pages",
1898
+ "expo-router",
1899
+ "declared"
1900
+ ]
1901
+ },
1902
+ "component": {
1903
+ "type": [
1904
+ "string",
1905
+ "null"
1906
+ ]
1907
+ },
1908
+ "modules": {
1909
+ "type": "integer",
1910
+ "minimum": 0
1911
+ },
1912
+ "entities": {
1913
+ "type": "array",
1914
+ "items": {
1915
+ "type": "string"
1916
+ }
1917
+ },
1918
+ "queries": {
1919
+ "type": "array",
1920
+ "items": {
1921
+ "$ref": "#/$defs/query"
1922
+ }
1923
+ },
1924
+ "mutations": {
1925
+ "type": "array",
1926
+ "items": {
1927
+ "$ref": "#/$defs/mutation"
1928
+ }
1929
+ },
1930
+ "files": {
1931
+ "type": "array",
1932
+ "items": {
1933
+ "type": "string"
1934
+ },
1935
+ "description": "repo-relative files reachable from the route entry (capped at 400)"
1936
+ }
1937
+ }
1938
+ },
1939
+ "query": {
1940
+ "type": "object",
1941
+ "required": [
1942
+ "key",
1943
+ "file",
1944
+ "line"
1945
+ ],
1946
+ "additionalProperties": true,
1947
+ "properties": {
1948
+ "entity": {
1949
+ "type": [
1950
+ "string",
1951
+ "null"
1952
+ ]
1953
+ },
1954
+ "key": {
1955
+ "type": "string"
1956
+ },
1957
+ "endpoint": {
1958
+ "type": [
1959
+ "string",
1960
+ "null"
1961
+ ]
1962
+ },
1963
+ "hook": {
1964
+ "type": [
1965
+ "string",
1966
+ "null"
1967
+ ]
1968
+ },
1969
+ "via": {
1970
+ "type": "string"
1971
+ },
1972
+ "verb": {
1973
+ "type": [
1974
+ "string",
1975
+ "null"
1976
+ ]
1977
+ },
1978
+ "file": {
1979
+ "type": "string"
1980
+ },
1981
+ "line": {
1982
+ "type": "integer",
1983
+ "minimum": 1
1984
+ }
1985
+ }
1986
+ },
1987
+ "mutation": {
1988
+ "type": "object",
1989
+ "required": [
1990
+ "invalidates",
1991
+ "clearsCache",
1992
+ "clearsIndirectly",
1993
+ "nonWrite",
1994
+ "file",
1995
+ "line"
1996
+ ],
1997
+ "additionalProperties": true,
1998
+ "properties": {
1999
+ "writes": {
2000
+ "type": [
2001
+ "string",
2002
+ "null"
2003
+ ]
2004
+ },
2005
+ "verb": {
2006
+ "type": [
2007
+ "string",
2008
+ "null"
2009
+ ]
2010
+ },
2011
+ "endpoint": {
2012
+ "type": [
2013
+ "string",
2014
+ "null"
2015
+ ]
2016
+ },
2017
+ "fnName": {
2018
+ "type": "string"
2019
+ },
2020
+ "hook": {
2021
+ "type": [
2022
+ "string",
2023
+ "null"
2024
+ ]
2025
+ },
2026
+ "invalidates": {
2027
+ "type": "array",
2028
+ "items": {
2029
+ "type": "string"
2030
+ }
2031
+ },
2032
+ "via": {
2033
+ "type": "string",
2034
+ "description": "How the mutation was found. `raw-write` marks the raw client-write fallback, used when the repo has no mutation-hook layer at all: its endpoint and verb are measured, its cache semantics are NOT read, so clearsCache/invalidates carry no evidence and it is never judged for staleness, and syncRiskCoverage stays `unmeasured` while these are the only mutations found. Otherwise `via` is the repo-declared wrapper hook the mutation was found through (collectWrappers in bin/inventory.mjs captures the identifier, so the value cannot be enumerated ahead of time -- it is whatever the target repo named its data layer).",
2035
+ "pattern": "^(raw-write|use[A-Z][A-Za-z0-9_]*)$"
2036
+ },
2037
+ "clearsCache": {
2038
+ "type": "boolean"
2039
+ },
2040
+ "clearsIndirectly": {
2041
+ "type": "boolean"
2042
+ },
2043
+ "nonWrite": {
2044
+ "type": "boolean"
2045
+ },
2046
+ "file": {
2047
+ "type": "string"
2048
+ },
2049
+ "line": {
2050
+ "type": "integer",
2051
+ "minimum": 1
2052
+ },
2053
+ "route": {
2054
+ "type": "string"
2055
+ }
2056
+ }
2057
+ },
2058
+ "syncRisk": {
2059
+ "type": "object",
2060
+ "required": [
2061
+ "severity",
2062
+ "kind",
2063
+ "route",
2064
+ "mutation",
2065
+ "invalidates",
2066
+ "detail"
2067
+ ],
2068
+ "additionalProperties": true,
2069
+ "properties": {
2070
+ "severity": {
2071
+ "type": "string",
2072
+ "enum": [
2073
+ "P0",
2074
+ "P1",
2075
+ "P2",
2076
+ "P3"
2077
+ ]
2078
+ },
2079
+ "kind": {
2080
+ "type": "string",
2081
+ "enum": [
2082
+ "no-invalidation",
2083
+ "partial-invalidation"
2084
+ ]
2085
+ },
2086
+ "unresolved": {
2087
+ "type": "boolean"
2088
+ },
2089
+ "route": {
2090
+ "type": "string"
2091
+ },
2092
+ "entity": {
2093
+ "type": [
2094
+ "string",
2095
+ "null"
2096
+ ]
2097
+ },
2098
+ "hook": {
2099
+ "type": [
2100
+ "string",
2101
+ "null"
2102
+ ]
2103
+ },
2104
+ "mutation": {
2105
+ "type": "string"
2106
+ },
2107
+ "verb": {
2108
+ "type": [
2109
+ "string",
2110
+ "null"
2111
+ ]
2112
+ },
2113
+ "endpoint": {
2114
+ "type": [
2115
+ "string",
2116
+ "null"
2117
+ ]
2118
+ },
2119
+ "invalidates": {
2120
+ "type": "array",
2121
+ "items": {
2122
+ "type": "string"
2123
+ }
2124
+ },
2125
+ "staleRoutes": {
2126
+ "type": [
2127
+ "array",
2128
+ "null"
2129
+ ],
2130
+ "items": {
2131
+ "type": "string"
2132
+ }
2133
+ },
2134
+ "detail": {
2135
+ "type": "string"
2136
+ }
2137
+ }
2138
+ },
2139
+ "duplicateSource": {
2140
+ "type": "object",
2141
+ "required": [
2142
+ "entity",
2143
+ "endpoint",
2144
+ "keys",
2145
+ "detail"
2146
+ ],
2147
+ "additionalProperties": true,
2148
+ "properties": {
2149
+ "entity": {
2150
+ "type": "string"
2151
+ },
2152
+ "endpoint": {
2153
+ "type": "string"
2154
+ },
2155
+ "keys": {
2156
+ "type": "array",
2157
+ "items": {
2158
+ "type": "string"
2159
+ }
2160
+ },
2161
+ "detail": {
2162
+ "type": "string"
2163
+ }
2164
+ }
2165
+ }
2166
+ }
2167
+ }