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,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontend-verify.dev/schemas/lanes-plan.schema.json",
4
+ "title": "lanes/plan.json",
5
+ "description": "lib/qa/fix-lanes.mjs emptyPlan()/transition() + lib/qa/commands/lanes.mjs -- the fix-lane plan: batches of defect classes tracked through PR status.",
6
+ "type": "object",
7
+ "required": ["schema_version", "run", "base", "flags", "baselineCounts", "batches", "classes", "excluded"],
8
+ "additionalProperties": true,
9
+ "properties": {
10
+ "schema_version": { "const": 1 },
11
+ "run": { "type": "string", "minLength": 1 },
12
+ "base": { "type": ["string", "null"] },
13
+ "flags": { "type": "array", "items": { "type": "string" } },
14
+ "baselineCounts": { "type": "object", "required": ["total"], "additionalProperties": true, "properties": { "total": { "type": "integer", "minimum": 0 } } },
15
+ "batches": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } },
16
+ "classes": { "type": "object", "additionalProperties": { "$ref": "#/$defs/laneClass" } },
17
+ "excluded": { "type": "array", "items": { "$ref": "#/$defs/excludedFinding" } },
18
+ "updatedAt": { "type": ["string", "null"] }
19
+ },
20
+ "$defs": {
21
+ "laneClass": {
22
+ "type": "object",
23
+ "required": ["id", "kind", "severity", "fids", "routes", "files", "status", "attempts", "pr"],
24
+ "additionalProperties": true,
25
+ "properties": {
26
+ "id": { "type": "string", "minLength": 1 },
27
+ "kind": { "type": "string" },
28
+ "severity": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
29
+ "fids": { "type": "array", "items": { "type": "string" } },
30
+ "routes": { "type": "array", "items": { "type": "string" } },
31
+ "files": { "type": "array", "items": { "type": "string" } },
32
+ "component": { "type": ["string", "null"] },
33
+ "atlas": { "type": ["string", "null"] },
34
+ "unresolved": { "type": "boolean" },
35
+ "status": { "type": "string", "enum": ["queued", "fixing", "gate", "open", "merged", "retry", "blocked", "conflict"] },
36
+ "attempts": { "type": "array" },
37
+ "pr": { "type": ["string", "null"] },
38
+ "worktree": { "type": ["string", "null"] },
39
+ "branch": { "type": ["string", "null"] }
40
+ }
41
+ },
42
+ "excludedFinding": {
43
+ "type": "object",
44
+ "required": ["fid", "reason"],
45
+ "additionalProperties": true,
46
+ "properties": {
47
+ "fid": { "type": "string" },
48
+ "reason": { "type": "string", "enum": ["waived", "known-fp", "blocked", "ghost"] }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontend-verify.dev/schemas/next.schema.json",
4
+ "title": "next.json",
5
+ "description": "lib/qa/commands/next.mjs buildBrief() — the one finding to fix now, written to .verify/next.json.",
6
+ "type": "object",
7
+ "required": ["run", "fid", "fids", "phase", "kind", "severity", "where", "routes", "files", "count", "leverage", "determinism", "sharedSurface", "detail"],
8
+ "additionalProperties": true,
9
+ "properties": {
10
+ "run": { "type": "string", "minLength": 1 },
11
+ "fid": { "type": "string", "minLength": 1 },
12
+ "fids": { "type": "array", "items": { "type": "string" } },
13
+ "phase": { "type": "string" },
14
+ "kind": { "type": "string" },
15
+ "severity": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
16
+ "where": { "type": "string" },
17
+ "file": { "type": ["string", "null"] },
18
+ "line": { "type": ["integer", "null"] },
19
+ "route": { "type": ["string", "null"] },
20
+ "at": { "type": ["string", "null"] },
21
+ "routes": { "type": "array", "items": { "type": "string" } },
22
+ "files": { "type": "array", "items": { "type": "string" } },
23
+ "count": { "type": "integer", "minimum": 0 },
24
+ "leverage": { "type": "integer", "minimum": 0 },
25
+ "determinism": { "type": "string", "enum": ["flaky", "unresolved", "stable"] },
26
+ "sharedSurface": { "type": "boolean" },
27
+ "detail": { "type": "string" },
28
+ "atlas": { "type": ["string", "null"] },
29
+ "atlasText": { "type": ["string", "null"] },
30
+ "hint": { "type": ["string", "null"] },
31
+ "repro": { "type": ["string", "null"] },
32
+ "waiver": { "type": ["string", "null"] },
33
+ "knownFp": { "type": ["boolean", "null"] },
34
+ "staleRoutes": { "type": ["array", "null"], "items": { "type": "string" } },
35
+ "endpoint": { "type": ["string", "null"] },
36
+ "hook": { "type": ["string", "null"] },
37
+ "members": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "required": ["fid", "detail"],
42
+ "additionalProperties": true,
43
+ "properties": {
44
+ "fid": { "type": "string" },
45
+ "route": { "type": ["string", "null"] },
46
+ "file": { "type": ["string", "null"] },
47
+ "line": { "type": ["integer", "null"] },
48
+ "at": { "type": ["string", "null"] },
49
+ "detail": { "type": "string" }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontend-verify.dev/schemas/personas.schema.json",
4
+ "title": "verify.roles.json",
5
+ "description": "lib/qa/auth/personas.mjs loadPersonas()/validatePersonas() -- the committed persona file. Ownership and expected identity only; never a credential store. See ARCHITECTURE.md, section Lanes -- the other half of the denominator.",
6
+ "$defs": {
7
+ "personaName": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" }
8
+ },
9
+ "type": "object",
10
+ "propertyNames": { "$ref": "#/$defs/personaName" },
11
+ "additionalProperties": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "owns": { "type": "array", "items": { "type": "string", "pattern": "^/(?!/)" } },
16
+ "excludes": { "type": "array", "items": { "type": "string", "pattern": "^/(?!/)" } },
17
+ "expect": {
18
+ "type": "object",
19
+ "required": ["provisioning"],
20
+ "additionalProperties": false,
21
+ "oneOf": [
22
+ {
23
+ "properties": {
24
+ "provisioning": { "const": "independently-provisioned" },
25
+ "with": false
26
+ }
27
+ },
28
+ {
29
+ "required": ["with", "effectivePrincipal"],
30
+ "properties": { "provisioning": { "const": "shares-authentication-with" } }
31
+ },
32
+ {
33
+ "properties": {
34
+ "provisioning": { "const": "anonymous" },
35
+ "with": false,
36
+ "effectivePrincipal": false
37
+ }
38
+ }
39
+ ],
40
+ "properties": {
41
+ "provisioning": { "type": "string", "enum": ["independently-provisioned", "shares-authentication-with", "anonymous"] },
42
+ "with": { "$ref": "#/$defs/personaName" },
43
+ "effectivePrincipal": { "type": "string", "minLength": 1 },
44
+ "delegationContext": { "type": ["string", "null"] },
45
+ "globalRole": { "type": ["string", "null"] },
46
+ "projectRoles": { "type": "array", "items": { "type": "string" } },
47
+ "fixtureNamespace": { "type": "string", "minLength": 1 }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,192 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontend-verify.dev/schemas/research.schema.json",
4
+ "title": "research.json",
5
+ "description": "lib/qa/research.mjs buildResearch() — the mechanised Phase 1 study: forms, principals, mocks, contract drift, derived assertions.",
6
+ "type": "object",
7
+ "required": ["generated", "runId", "repo", "counts", "routes", "principals", "mocks", "contractDrift", "residueQuestions"],
8
+ "additionalProperties": true,
9
+ "properties": {
10
+ "generated": { "type": "string" },
11
+ "runId": { "type": "string" },
12
+ "repo": { "type": "string" },
13
+ "counts": {
14
+ "type": "object",
15
+ "required": ["routes", "routesWithForms", "routesWithMutations", "principals", "mockLayerDetected", "contractDriftCandidates"],
16
+ "additionalProperties": true,
17
+ "properties": {
18
+ "routes": { "type": "integer", "minimum": 0 },
19
+ "routesWithForms": { "type": "integer", "minimum": 0 },
20
+ "routesWithMutations": { "type": "integer", "minimum": 0 },
21
+ "principals": { "type": "integer", "minimum": 0 },
22
+ "mockLayerDetected": { "type": "boolean" },
23
+ "contractDriftCandidates": { "type": "integer", "minimum": 0 }
24
+ }
25
+ },
26
+ "routes": { "type": "array", "items": { "$ref": "#/$defs/route" } },
27
+ "principals": {
28
+ "type": "object",
29
+ "required": ["detected", "missingFromRolesFile", "missingFromCode"],
30
+ "additionalProperties": true,
31
+ "properties": {
32
+ "detected": { "type": "array", "items": { "$ref": "#/$defs/principal" } },
33
+ "rolesFile": {
34
+ "type": ["object", "null"],
35
+ "additionalProperties": true,
36
+ "properties": {
37
+ "path": { "type": "string" },
38
+ "principals": { "type": "array", "items": { "type": "string" } },
39
+ "malformed": { "type": "boolean" }
40
+ }
41
+ },
42
+ "missingFromRolesFile": { "type": "array", "items": { "type": "string" } },
43
+ "missingFromCode": { "type": "array", "items": { "type": "string" } }
44
+ }
45
+ },
46
+ "mocks": {
47
+ "type": "object",
48
+ "required": ["detected", "kinds", "evidence"],
49
+ "additionalProperties": true,
50
+ "properties": {
51
+ "detected": { "type": "boolean" },
52
+ "kinds": { "type": "array", "items": { "type": "string" } },
53
+ "evidence": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "object",
57
+ "required": ["file", "line", "detail"],
58
+ "additionalProperties": true,
59
+ "properties": {
60
+ "file": { "type": "string" },
61
+ "line": { "type": "integer", "minimum": 1 },
62
+ "detail": { "type": "string" }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "contractDrift": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "object",
72
+ "required": ["path", "method", "mockFile", "specFile", "missingKeys", "missingCount", "confidence"],
73
+ "additionalProperties": true,
74
+ "properties": {
75
+ "path": { "type": "string" },
76
+ "method": { "type": "string" },
77
+ "mockFile": { "type": "string" },
78
+ "specFile": { "type": "string" },
79
+ "missingKeys": { "type": "array", "items": { "type": "string" } },
80
+ "missingCount": { "type": "integer", "minimum": 1 },
81
+ "confidence": { "type": "string", "enum": ["high", "medium", "low"] }
82
+ }
83
+ }
84
+ },
85
+ "residueQuestions": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "object",
89
+ "required": ["entity", "question"],
90
+ "additionalProperties": true,
91
+ "properties": {
92
+ "entity": { "type": "string" },
93
+ "question": { "type": "string" }
94
+ }
95
+ }
96
+ },
97
+ "harness": { "$ref": "#/$defs/harness" },
98
+ "notes": { "type": "array", "items": { "type": "string" } }
99
+ },
100
+ "$defs": {
101
+ "confidenceField": { "type": "string", "enum": ["high", "medium", "low"] },
102
+ "form": {
103
+ "type": "object",
104
+ "required": ["name", "confidence", "source", "via"],
105
+ "additionalProperties": true,
106
+ "properties": {
107
+ "name": { "type": "string" },
108
+ "type": { "type": ["string", "null"] },
109
+ "confidence": { "$ref": "#/$defs/confidenceField" },
110
+ "source": { "type": "string" },
111
+ "via": { "type": "string" },
112
+ "tag": { "type": ["string", "null"] }
113
+ }
114
+ },
115
+ "derivedAssertion": {
116
+ "type": "object",
117
+ "required": ["field", "confidence", "source"],
118
+ "additionalProperties": true,
119
+ "properties": {
120
+ "field": { "type": "string" },
121
+ "confidence": { "$ref": "#/$defs/confidenceField" },
122
+ "source": { "type": "string" }
123
+ }
124
+ },
125
+ "route": {
126
+ "type": "object",
127
+ "required": ["path", "file", "entities", "mutationsCount", "dynamic", "forms", "draftJourney", "derivedAssertions", "modules"],
128
+ "additionalProperties": true,
129
+ "properties": {
130
+ "path": { "type": "string" },
131
+ "file": { "type": "string" },
132
+ "entities": { "type": "array", "items": { "type": "string" } },
133
+ "mutationsCount": { "type": "integer", "minimum": 0 },
134
+ "dynamic": { "type": "boolean" },
135
+ "forms": { "type": "array", "items": { "$ref": "#/$defs/form" } },
136
+ "draftJourney": { "type": "boolean" },
137
+ "derivedAssertions": { "type": "array", "items": { "$ref": "#/$defs/derivedAssertion" } },
138
+ "modules": { "type": "integer", "minimum": 0 },
139
+ "seedNote": { "type": ["string", "null"] }
140
+ }
141
+ },
142
+ "principal": {
143
+ "type": "object",
144
+ "required": ["name", "confidence", "source", "via"],
145
+ "additionalProperties": true,
146
+ "properties": {
147
+ "name": { "type": "string" },
148
+ "confidence": { "$ref": "#/$defs/confidenceField" },
149
+ "source": { "type": "string" },
150
+ "via": { "type": "string" }
151
+ }
152
+ },
153
+ "harness": {
154
+ "type": "object",
155
+ "required": ["state", "declarations", "workItems"],
156
+ "additionalProperties": false,
157
+ "properties": {
158
+ "state": { "const": "source-derived/non-executed" },
159
+ "declarations": { "$ref": "#/$defs/declarations" },
160
+ "workItems": { "type": "array", "items": { "$ref": "#/$defs/harnessWorkItem" } }
161
+ }
162
+ },
163
+ "declarations": {
164
+ "type": "object",
165
+ "required": ["mutationDeclaration", "personas", "identityLauncher", "coherenceDriver", "coherenceProvenance"],
166
+ "additionalProperties": false,
167
+ "properties": {
168
+ "mutationDeclaration": { "$ref": "#/$defs/declarationStatus" },
169
+ "personas": { "$ref": "#/$defs/declarationStatus" },
170
+ "identityLauncher": { "$ref": "#/$defs/presenceStatus" },
171
+ "coherenceDriver": { "$ref": "#/$defs/presenceStatus" },
172
+ "coherenceProvenance": { "$ref": "#/$defs/presenceStatus" }
173
+ }
174
+ },
175
+ "declarationStatus": { "type": "object", "required": ["status"], "additionalProperties": false, "properties": { "status": { "enum": ["absent", "invalid", "validated"] } } },
176
+ "presenceStatus": { "type": "object", "required": ["status"], "additionalProperties": false, "properties": { "status": { "enum": ["absent", "present"] } } },
177
+ "harnessWorkItem": {
178
+ "type": "object",
179
+ "required": ["entity", "entityStatus", "state", "impact", "mutationSources", "assertionCandidates", "requiredAuthoring"],
180
+ "additionalProperties": false,
181
+ "properties": {
182
+ "entity": { "type": ["string", "null"] },
183
+ "entityStatus": { "enum": ["resolved", "unresolved"] },
184
+ "state": { "const": "source-derived/non-executed" },
185
+ "impact": { "type": "object", "required": ["routes", "surfaces", "score"], "additionalProperties": false, "properties": { "routes": { "type": "array", "items": { "type": "string" } }, "surfaces": { "type": "array" }, "score": { "type": "integer", "minimum": 0 } } },
186
+ "mutationSources": { "type": "array", "items": { "type": "object", "required": ["route", "routes", "source", "hook", "verb", "endpoint"], "additionalProperties": false, "properties": { "route": { "type": "string" }, "routes": { "type": "array", "items": { "type": "string" } }, "source": { "type": ["object", "null"] }, "hook": { "type": ["string", "null"] }, "verb": { "type": ["string", "null"] }, "endpoint": { "type": ["string", "null"] } } } },
187
+ "assertionCandidates": { "type": "array", "items": { "type": "object", "required": ["field", "confidence", "source"], "additionalProperties": false, "properties": { "field": { "type": "string" }, "confidence": { "type": "string" }, "source": { "type": "string" } } } },
188
+ "requiredAuthoring": { "type": "array", "items": { "type": "string" } }
189
+ }
190
+ }
191
+ }
192
+ }
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontend-verify.dev/schemas/run.schema.json",
4
+ "title": "run.json",
5
+ "description": "lib/qa/runs.mjs archiveRun() — the per-invocation archive index under .verify/runs/<id>/run.json.",
6
+ "type": "object",
7
+ "required": ["id", "at", "mode", "args", "exit", "produced", "counts", "findings"],
8
+ "additionalProperties": true,
9
+ "properties": {
10
+ "id": { "type": "string", "minLength": 1 },
11
+ "at": { "type": "string" },
12
+ "mode": { "type": ["string", "null"] },
13
+ "lane": { "type": ["string", "null"], "enum": ["source", "public-runtime", "mock-contract", "real-integration", "mfa-integration", null] },
14
+ "runId": { "type": "string", "minLength": 1 },
15
+ "args": { "type": "array", "items": { "type": "string" } },
16
+ "exit": { "type": "integer", "enum": [0, 1, 2] },
17
+ "agent": {
18
+ "description": "lib/qa/agent-result.mjs -- either the schema-valid AgentResult (schemas/agent-result.schema.json) when the Rust kernel ran, or a minimal {status, reason} discriminated object when it was never invoked or its output could not be trusted.",
19
+ "type": ["object", "null"],
20
+ "additionalProperties": true,
21
+ "required": ["status"],
22
+ "properties": {
23
+ "status": { "type": "string", "enum": ["measured", "unmeasured", "invalid"] },
24
+ "reason": { "type": "string" }
25
+ }
26
+ },
27
+ "produced": {
28
+ "type": "object",
29
+ "additionalProperties": { "type": "boolean" },
30
+ "properties": {
31
+ "inventory": { "type": "boolean" },
32
+ "classify": { "type": "boolean" },
33
+ "sweep": { "type": "boolean" }
34
+ }
35
+ },
36
+ "counts": {
37
+ "type": "object",
38
+ "required": ["total", "P0", "P1", "P2", "P3"],
39
+ "additionalProperties": true,
40
+ "properties": {
41
+ "total": { "type": "integer", "minimum": 0 },
42
+ "P0": { "type": "integer", "minimum": 0 },
43
+ "P1": { "type": "integer", "minimum": 0 },
44
+ "P2": { "type": "integer", "minimum": 0 },
45
+ "P3": { "type": "integer", "minimum": 0 }
46
+ }
47
+ },
48
+ "summary": { "type": ["object", "null"] },
49
+ "integrity": { "type": ["object", "null"] },
50
+ "aborted": { "type": ["string", "boolean", "null"] },
51
+ "resume": {
52
+ "type": ["object", "null"],
53
+ "additionalProperties": true,
54
+ "properties": {
55
+ "requested": { "type": "boolean" },
56
+ "compatible": { "type": ["boolean", "null"] },
57
+ "reused": { "type": "integer", "minimum": 0 }
58
+ }
59
+ },
60
+ "warm": { "type": ["object", "null"] },
61
+ "routesInventory": { "type": ["integer", "null"], "minimum": 0 },
62
+ "cells": { "type": "integer", "minimum": 0 },
63
+ "adapters": {
64
+ "type": "array",
65
+ "items": { "type": "string", "enum": ["crud", "shadow", "experiments", "coherence"] }
66
+ },
67
+ "evidence": {
68
+ "type": ["object", "null"],
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "crud": { "$ref": "#/$defs/evidenceReference" },
72
+ "shadow": { "$ref": "#/$defs/evidenceReference" },
73
+ "experiments": { "$ref": "#/$defs/evidenceReference" },
74
+ "coherence": { "$ref": "#/$defs/evidenceReference" }
75
+ }
76
+ },
77
+ "measuredSubphases": {
78
+ "type": "array",
79
+ "items": { "$ref": "#/$defs/measuredSubphase" }
80
+ },
81
+ "findings": { "type": "array", "items": { "$ref": "#/$defs/findingRecord" } },
82
+ "archiveError": { "type": "string" },
83
+ "checkpoint": { "type": "string" }
84
+ },
85
+ "$defs": {
86
+ "measuredSubphase": {
87
+ "type": "object",
88
+ "required": ["name", "status", "exit"],
89
+ "additionalProperties": true,
90
+ "properties": {
91
+ "name": { "type": "string", "enum": ["atlas", "report"] },
92
+ "status": { "type": "string", "enum": ["measured", "unmeasured", "invalid"] },
93
+ "exit": { "type": "integer", "enum": [0, 1, 2] }
94
+ }
95
+ },
96
+ "evidenceIdentity": {
97
+ "type": "object",
98
+ "required": ["marathonRunId", "repoRealPath", "sourceDigest", "base", "lane", "flowWorkers", "planDigest", "flowDeclarationDigest", "principalDigest", "configurationDigest", "toolProtocol"],
99
+ "additionalProperties": true,
100
+ "properties": {
101
+ "marathonRunId": { "type": "string", "minLength": 1 },
102
+ "repoRealPath": { "type": "string", "minLength": 1 },
103
+ "sourceDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
104
+ "base": { "type": ["string", "null"] },
105
+ "lane": { "type": "string", "minLength": 1 },
106
+ "flowWorkers": { "type": "integer", "minimum": 1 },
107
+ "planDigest": { "type": ["string", "null"], "pattern": "^sha256:[0-9a-f]{64}$" },
108
+ "flowDeclarationDigest": { "type": ["string", "null"], "pattern": "^sha256:[0-9a-f]{64}$" },
109
+ "principalDigest": { "type": ["string", "null"], "pattern": "^sha256:[0-9a-f]{64}$" },
110
+ "configurationDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
111
+ "toolProtocol": { "const": "marathon-adapter/v1" }
112
+ }
113
+ },
114
+ "evidenceReference": {
115
+ "type": "object",
116
+ "required": ["path", "sha256", "bytes", "status", "phase", "command", "startedAt", "endedAt", "exit", "signal", "evidenceIdentity"],
117
+ "additionalProperties": true,
118
+ "properties": {
119
+ "path": { "type": "string", "minLength": 1 },
120
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
121
+ "bytes": { "type": "integer", "minimum": 0 },
122
+ "status": { "const": "measured" },
123
+ "phase": { "type": "string", "enum": ["crud", "shadow", "experiment", "coherence"] },
124
+ "command": { "type": "string", "minLength": 1 },
125
+ "startedAt": { "type": "string", "minLength": 1 },
126
+ "endedAt": { "type": "string", "minLength": 1 },
127
+ "exit": { "type": "integer", "enum": [0, 1] },
128
+ "signal": { "type": ["string", "null"] },
129
+ "evidenceIdentity": { "$ref": "#/$defs/evidenceIdentity" }
130
+ }
131
+ },
132
+ "findingRecord": {
133
+ "type": "object",
134
+ "required": ["fid", "phase", "kind", "severity", "detail"],
135
+ "additionalProperties": true,
136
+ "properties": {
137
+ "fid": { "type": "string", "minLength": 1 },
138
+ "phase": { "type": "string", "enum": ["static", "sync", "runtime", "journey", "state", "mutate", "dark", "leak", "pack", "crud", "shadow", "experiment", "coherence"] },
139
+ "kind": { "type": "string", "minLength": 1 },
140
+ "severity": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
141
+ "route": { "type": ["string", "null"] },
142
+ "subject": { "type": ["string", "null"] },
143
+ "role": { "type": ["string", "null"] },
144
+ "width": { "type": ["integer", "null"] },
145
+ "at": { "type": ["string", "null"] },
146
+ "file": { "type": ["string", "null"] },
147
+ "line": { "type": ["integer", "null"] },
148
+ "anchor": { "type": ["string", "null"] },
149
+ "detail": { "type": "string" },
150
+ "atlas": { "type": ["string", "null"] },
151
+ "atlasVersion": { "type": "integer", "enum": [1, 2] },
152
+ "flaky": { "type": "boolean" },
153
+ "unresolved": { "type": "boolean" },
154
+ "waived": { "type": "boolean" },
155
+ "staleRoutes": { "type": ["array", "null"], "items": { "type": "string" } },
156
+ "pack": { "type": ["string", "null"] }
157
+ }
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontend-verify.dev/schemas/shadow-replay.schema.json",
4
+ "title": "shadow-replay.json",
5
+ "description": "bin/shadow-replay.mjs via lib/qa/commands/shadow.mjs — read-only replay of a collected shadow trace against an isolated target, written to .verify/autonomous/shadow-replay.json.",
6
+ "type": "object",
7
+ "required": ["status", "replayed", "skipped", "drift", "privacy"],
8
+ "additionalProperties": true,
9
+ "properties": {
10
+ "status": { "type": "string", "enum": ["measured", "invalid", "unmeasured"] },
11
+ "reason": { "type": "string" },
12
+ "replayed": { "type": "array", "items": { "$ref": "#/$defs/replayedEntry" } },
13
+ "skipped": { "type": "array", "items": { "$ref": "#/$defs/skippedEntry" } },
14
+ "drift": { "type": "array", "items": { "$ref": "#/$defs/driftEntry" } },
15
+ "privacy": {
16
+ "type": "object",
17
+ "required": ["raw_values"],
18
+ "additionalProperties": true,
19
+ "properties": {
20
+ "raw_values": { "const": false }
21
+ }
22
+ }
23
+ },
24
+ "$defs": {
25
+ "responseClass": { "type": ["string", "null"], "enum": ["1xx", "2xx", "3xx", "4xx", "5xx", null] },
26
+ "replayedEntry": {
27
+ "type": "object",
28
+ "required": ["route_template", "endpoint_template", "method", "observed"],
29
+ "additionalProperties": true,
30
+ "properties": {
31
+ "route_template": { "type": ["string", "null"] },
32
+ "endpoint_template": { "type": ["string", "null"] },
33
+ "method": { "const": "GET" },
34
+ "transition_index": { "type": ["integer", "null"] },
35
+ "expected_class": { "$ref": "#/$defs/responseClass" },
36
+ "observed_class": { "$ref": "#/$defs/responseClass" },
37
+ "expected_bucket": { "type": ["number", "null"] },
38
+ "observed_bucket": { "type": ["number", "null"] },
39
+ "observed": { "type": "boolean" }
40
+ }
41
+ },
42
+ "skippedEntry": {
43
+ "type": "object",
44
+ "required": ["reason"],
45
+ "additionalProperties": true,
46
+ "properties": {
47
+ "route_template": { "type": ["string", "null"] },
48
+ "endpoint_template": { "type": ["string", "null"] },
49
+ "method": { "type": ["string", "null"] },
50
+ "transition_index": { "type": ["integer", "null"] },
51
+ "reason": { "type": "string", "enum": ["non-get", "no-route-template", "unresolved-id", "navigation-failed"] }
52
+ }
53
+ },
54
+ "driftEntry": {
55
+ "type": "object",
56
+ "required": ["endpoint_template", "method", "expected_class", "observed_class"],
57
+ "additionalProperties": true,
58
+ "properties": {
59
+ "endpoint_template": { "type": ["string", "null"] },
60
+ "method": { "const": "GET" },
61
+ "expected_class": { "$ref": "#/$defs/responseClass" },
62
+ "observed_class": { "$ref": "#/$defs/responseClass" },
63
+ "expected_bucket": { "type": ["number", "null"] },
64
+ "observed_bucket": { "type": ["number", "null"] }
65
+ }
66
+ }
67
+ }
68
+ }