@open-qa/qa 0.0.0-stage → 0.1.0-alpha.4

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 (313) hide show
  1. package/LICENSE +204 -0
  2. package/NOTICE +7 -0
  3. package/THIRD_PARTY.md +12 -0
  4. package/THIRD_PARTY_NOTICES.md +11 -0
  5. package/drizzle/0000_qa_core.sql +158 -0
  6. package/drizzle/0001_run_health.sql +3 -0
  7. package/drizzle/0002_bounded_cleanup.sql +5 -0
  8. package/drizzle/0003_step_replay_cache.sql +9 -0
  9. package/drizzle/0004_credential_expiry.sql +1 -0
  10. package/drizzle/0005_server_api.sql +19 -0
  11. package/drizzle/0006_submission_created.sql +3 -0
  12. package/drizzle/0007_findings.sql +19 -0
  13. package/drizzle/0008_classification_labels.sql +14 -0
  14. package/drizzle/0009_job_queue.sql +20 -0
  15. package/drizzle/0010_result_notifications.sql +13 -0
  16. package/drizzle/0011_result_notification_retries.sql +5 -0
  17. package/drizzle/0012_result_notification_flows.sql +44 -0
  18. package/drizzle/0013_flow_quarantine.sql +35 -0
  19. package/drizzle/0014_run_budgets.sql +2 -0
  20. package/drizzle/0015_flow_lifecycle.sql +9 -0
  21. package/drizzle/0016_open_qa_classification.sql +28 -0
  22. package/drizzle/meta/0000_snapshot.json +1002 -0
  23. package/drizzle/meta/0001_snapshot.json +1021 -0
  24. package/drizzle/meta/0002_snapshot.json +1027 -0
  25. package/drizzle/meta/0003_snapshot.json +1081 -0
  26. package/drizzle/meta/0004_snapshot.json +1087 -0
  27. package/drizzle/meta/0005_snapshot.json +1210 -0
  28. package/drizzle/meta/0006_snapshot.json +1244 -0
  29. package/drizzle/meta/0007_snapshot.json +1353 -0
  30. package/drizzle/meta/0008_snapshot.json +1435 -0
  31. package/drizzle/meta/0009_snapshot.json +1587 -0
  32. package/drizzle/meta/0010_snapshot.json +1675 -0
  33. package/drizzle/meta/0011_snapshot.json +1692 -0
  34. package/drizzle/meta/0012_snapshot.json +1818 -0
  35. package/drizzle/meta/0013_snapshot.json +2016 -0
  36. package/drizzle/meta/0014_snapshot.json +2028 -0
  37. package/drizzle/meta/0015_snapshot.json +2064 -0
  38. package/drizzle/meta/0016_snapshot.json +2076 -0
  39. package/drizzle/meta/_journal.json +125 -0
  40. package/package.json +118 -4
  41. package/problem-matcher.json +32 -0
  42. package/src/adapters/db-lease-pool.d.ts +25 -0
  43. package/src/adapters/db-lease-pool.js +293 -0
  44. package/src/adapters/dir-artifact-store.d.ts +9 -0
  45. package/src/adapters/dir-artifact-store.js +64 -0
  46. package/src/adapters/e2b-agent.d.ts +7 -0
  47. package/src/adapters/e2b-agent.js +94 -0
  48. package/src/adapters/e2b-artifacts.d.ts +3 -0
  49. package/src/adapters/e2b-artifacts.js +66 -0
  50. package/src/adapters/e2b-bounded.d.ts +1 -0
  51. package/src/adapters/e2b-bounded.js +19 -0
  52. package/src/adapters/e2b-client.d.ts +33 -0
  53. package/src/adapters/e2b-client.js +114 -0
  54. package/src/adapters/e2b-executor.d.ts +26 -0
  55. package/src/adapters/e2b-executor.js +194 -0
  56. package/src/adapters/e2b-lifetime.d.ts +20 -0
  57. package/src/adapters/e2b-lifetime.js +73 -0
  58. package/src/adapters/e2b-prune.d.ts +13 -0
  59. package/src/adapters/e2b-prune.js +42 -0
  60. package/src/adapters/file-replay-cache.d.ts +14 -0
  61. package/src/adapters/file-replay-cache.js +120 -0
  62. package/src/adapters/file-run-store.d.ts +175 -0
  63. package/src/adapters/file-run-store.js +280 -0
  64. package/src/adapters/fixed-lease-pool.d.ts +10 -0
  65. package/src/adapters/fixed-lease-pool.js +237 -0
  66. package/src/adapters/gcs/artifact-store.d.ts +49 -0
  67. package/src/adapters/gcs/artifact-store.js +247 -0
  68. package/src/adapters/gcs/client.d.ts +22 -0
  69. package/src/adapters/gcs/client.js +106 -0
  70. package/src/adapters/gcs/download.d.ts +9 -0
  71. package/src/adapters/gcs/download.js +43 -0
  72. package/src/adapters/gcs/index.d.ts +8 -0
  73. package/src/adapters/gcs/index.js +23 -0
  74. package/src/adapters/gcs/periodic-flush.d.ts +5 -0
  75. package/src/adapters/gcs/periodic-flush.js +16 -0
  76. package/src/adapters/gcs/pg-catalog.d.ts +16 -0
  77. package/src/adapters/gcs/pg-catalog.js +149 -0
  78. package/src/adapters/gcs/replay-completeness.d.ts +1 -0
  79. package/src/adapters/gcs/replay-completeness.js +65 -0
  80. package/src/adapters/gcs/scan-upload.d.ts +10 -0
  81. package/src/adapters/gcs/scan-upload.js +26 -0
  82. package/src/adapters/index.d.ts +5 -0
  83. package/src/adapters/index.js +12 -0
  84. package/src/adapters/lease-transaction.d.ts +2 -0
  85. package/src/adapters/lease-transaction.js +61 -0
  86. package/src/adapters/local-credential-resolver.d.ts +5 -0
  87. package/src/adapters/local-credential-resolver.js +15 -0
  88. package/src/adapters/local-env.d.ts +1 -0
  89. package/src/adapters/local-env.js +37 -0
  90. package/src/adapters/local-files.d.ts +17 -0
  91. package/src/adapters/local-files.js +150 -0
  92. package/src/adapters/pg-classification-store.d.ts +58 -0
  93. package/src/adapters/pg-classification-store.js +112 -0
  94. package/src/adapters/pg-replay-cache.d.ts +16 -0
  95. package/src/adapters/pg-replay-cache.js +111 -0
  96. package/src/adapters/pg-run-store.d.ts +58 -0
  97. package/src/adapters/pg-run-store.js +399 -0
  98. package/src/adapters/resource-pools.d.ts +2 -0
  99. package/src/adapters/resource-pools.js +28 -0
  100. package/src/adapters/secret-manager-credential-resolver.d.ts +44 -0
  101. package/src/adapters/secret-manager-credential-resolver.js +102 -0
  102. package/src/artifact-scan.d.ts +21 -0
  103. package/src/artifact-scan.js +139 -0
  104. package/src/budget-confirmation.d.ts +23 -0
  105. package/src/budget-confirmation.js +43 -0
  106. package/src/cache-command.d.ts +7 -0
  107. package/src/cache-command.js +107 -0
  108. package/src/classification-command.d.ts +14 -0
  109. package/src/classification-command.js +72 -0
  110. package/src/classification-diff.d.ts +10 -0
  111. package/src/classification-diff.js +47 -0
  112. package/src/classification-model.d.ts +17 -0
  113. package/src/classification-model.js +51 -0
  114. package/src/classification-notifier.d.ts +21 -0
  115. package/src/classification-notifier.js +34 -0
  116. package/src/classify-runs.d.ts +31 -0
  117. package/src/classify-runs.js +138 -0
  118. package/src/cli-program.d.ts +9 -0
  119. package/src/cli-program.js +172 -0
  120. package/src/cli.d.ts +2 -0
  121. package/src/cli.js +12 -0
  122. package/src/commands.d.ts +7 -0
  123. package/src/commands.js +17 -0
  124. package/src/credential-references.d.ts +24 -0
  125. package/src/credential-references.js +33 -0
  126. package/src/db/commands.d.ts +1 -0
  127. package/src/db/commands.js +34 -0
  128. package/src/db/credentials.d.ts +16 -0
  129. package/src/db/credentials.js +73 -0
  130. package/src/db/database.d.ts +12 -0
  131. package/src/db/database.js +135 -0
  132. package/src/db/event-chunks.d.ts +405 -0
  133. package/src/db/event-chunks.js +74 -0
  134. package/src/db/fencing.d.ts +8 -0
  135. package/src/db/fencing.js +16 -0
  136. package/src/db/flow-status.d.ts +41 -0
  137. package/src/db/flow-status.js +208 -0
  138. package/src/db/index.d.ts +12 -0
  139. package/src/db/index.js +24 -0
  140. package/src/db/queries.d.ts +73 -0
  141. package/src/db/queries.js +122 -0
  142. package/src/db/resources.d.ts +14 -0
  143. package/src/db/resources.js +61 -0
  144. package/src/db/schema.d.ts +3532 -0
  145. package/src/db/schema.js +501 -0
  146. package/src/demo-command.d.ts +1 -0
  147. package/src/demo-command.js +50 -0
  148. package/src/doctor-command.d.ts +15 -0
  149. package/src/doctor-command.js +275 -0
  150. package/src/doctor-summary.d.ts +2 -0
  151. package/src/doctor-summary.js +31 -0
  152. package/src/draft-api.d.ts +460 -0
  153. package/src/draft-api.js +333 -0
  154. package/src/draft-command.d.ts +10 -0
  155. package/src/draft-command.js +73 -0
  156. package/src/draft-hooks.d.ts +3 -0
  157. package/src/draft-hooks.js +33 -0
  158. package/src/draft-pages.d.ts +11 -0
  159. package/src/draft-pages.js +82 -0
  160. package/src/engine.d.ts +105 -0
  161. package/src/engine.js +323 -0
  162. package/src/execution-snapshot.d.ts +21 -0
  163. package/src/execution-snapshot.js +141 -0
  164. package/src/flow-check.d.ts +9 -0
  165. package/src/flow-check.js +68 -0
  166. package/src/flow-lifecycle.d.ts +6 -0
  167. package/src/flow-lifecycle.js +61 -0
  168. package/src/flow-lint.d.ts +8 -0
  169. package/src/flow-lint.js +73 -0
  170. package/src/flow-loader.d.ts +219 -0
  171. package/src/flow-loader.js +236 -0
  172. package/src/flow-source.d.ts +2 -0
  173. package/src/flow-source.js +6 -0
  174. package/src/flows-api.d.ts +1 -0
  175. package/src/flows-api.js +12 -0
  176. package/src/heal-notification.d.ts +16 -0
  177. package/src/heal-notification.js +62 -0
  178. package/src/hooks/api.d.ts +29 -0
  179. package/src/hooks/api.js +15 -0
  180. package/src/hooks/consumer.d.ts +18 -0
  181. package/src/hooks/consumer.js +98 -0
  182. package/src/hooks/loader.d.ts +6 -0
  183. package/src/hooks/loader.js +28 -0
  184. package/src/hooks/registry.d.ts +22 -0
  185. package/src/hooks/registry.js +23 -0
  186. package/src/hooks/runner.d.ts +19 -0
  187. package/src/hooks/runner.js +279 -0
  188. package/src/hooks/session-cache.d.ts +16 -0
  189. package/src/hooks/session-cache.js +42 -0
  190. package/src/hooks/session-store.d.ts +20 -0
  191. package/src/hooks/session-store.js +95 -0
  192. package/src/hooks/worker.d.ts +1 -0
  193. package/src/hooks/worker.js +84 -0
  194. package/src/http-stage-client.d.ts +367 -0
  195. package/src/http-stage-client.js +190 -0
  196. package/src/independent-model.d.ts +22 -0
  197. package/src/independent-model.js +215 -0
  198. package/src/lifecycle-command.d.ts +15 -0
  199. package/src/lifecycle-command.js +190 -0
  200. package/src/local-command.d.ts +3 -0
  201. package/src/local-command.js +27 -0
  202. package/src/local-host-executor.d.ts +38 -0
  203. package/src/local-host-executor.js +196 -0
  204. package/src/open-command.d.ts +7 -0
  205. package/src/open-command.js +39 -0
  206. package/src/operations-api.d.ts +2 -0
  207. package/src/operations-api.js +6 -0
  208. package/src/personas.d.ts +2 -0
  209. package/src/personas.js +61 -0
  210. package/src/program-runner.d.ts +3 -0
  211. package/src/program-runner.js +263 -0
  212. package/src/program-sandbox.py +75 -0
  213. package/src/program-scratch.d.ts +2 -0
  214. package/src/program-scratch.js +48 -0
  215. package/src/program-worker.mjs +101 -0
  216. package/src/public-id.d.ts +2 -0
  217. package/src/public-id.js +5 -0
  218. package/src/public-report-url.d.ts +1 -0
  219. package/src/public-report-url.js +18 -0
  220. package/src/publication-check.d.ts +1 -0
  221. package/src/publication-check.js +31 -0
  222. package/src/quarantine-command.d.ts +9 -0
  223. package/src/quarantine-command.js +69 -0
  224. package/src/remote-command.d.ts +30 -0
  225. package/src/remote-command.js +156 -0
  226. package/src/replay-image.d.ts +1 -0
  227. package/src/replay-image.js +35 -0
  228. package/src/report/assets.d.ts +1 -0
  229. package/src/report/assets.js +5 -0
  230. package/src/report/browser.css +414 -0
  231. package/src/report/browser.d.ts +1 -0
  232. package/src/report/browser.js +219 -0
  233. package/src/report/data.d.ts +1 -0
  234. package/src/report/data.js +4 -0
  235. package/src/report/generate.d.ts +1 -0
  236. package/src/report/generate.js +54 -0
  237. package/src/report/load.d.ts +870 -0
  238. package/src/report/load.js +139 -0
  239. package/src/report/resource-table.d.ts +2 -0
  240. package/src/report/resource-table.js +4 -0
  241. package/src/report/status-icon.d.ts +2 -0
  242. package/src/report/status-icon.js +20 -0
  243. package/src/report/style.css +413 -0
  244. package/src/result-notifier.d.ts +121 -0
  245. package/src/result-notifier.js +230 -0
  246. package/src/result-transports.d.ts +12 -0
  247. package/src/result-transports.js +150 -0
  248. package/src/run-command.d.ts +32 -0
  249. package/src/run-command.js +493 -0
  250. package/src/run-setup-error.d.ts +11 -0
  251. package/src/run-setup-error.js +18 -0
  252. package/src/sandboxes-command.d.ts +9 -0
  253. package/src/sandboxes-command.js +29 -0
  254. package/src/screen-proxy.d.ts +5 -0
  255. package/src/screen-proxy.js +79 -0
  256. package/src/screen-url.d.ts +18 -0
  257. package/src/screen-url.js +54 -0
  258. package/src/server/app.d.ts +29 -0
  259. package/src/server/app.js +350 -0
  260. package/src/server/auth.d.ts +33 -0
  261. package/src/server/auth.js +113 -0
  262. package/src/server/credentials.d.ts +30 -0
  263. package/src/server/credentials.js +77 -0
  264. package/src/server/errors.d.ts +9 -0
  265. package/src/server/errors.js +26 -0
  266. package/src/server/index.d.ts +35 -0
  267. package/src/server/index.js +96 -0
  268. package/src/server/maintenance.d.ts +13 -0
  269. package/src/server/maintenance.js +54 -0
  270. package/src/server/repository.d.ts +534 -0
  271. package/src/server/repository.js +219 -0
  272. package/src/setup-command.d.ts +10 -0
  273. package/src/setup-command.js +52 -0
  274. package/src/stage-environment.d.ts +1 -0
  275. package/src/stage-environment.js +35 -0
  276. package/src/stage-supervisor.mjs +95 -0
  277. package/src/studio-command.d.ts +7 -0
  278. package/src/studio-command.js +47 -0
  279. package/src/studio-control.d.ts +5 -0
  280. package/src/studio-control.js +207 -0
  281. package/src/studio-review.d.ts +24 -0
  282. package/src/studio-review.js +64 -0
  283. package/src/studio-worker.d.ts +1 -0
  284. package/src/studio-worker.js +48 -0
  285. package/src/system-config.d.ts +7 -0
  286. package/src/system-config.js +70 -0
  287. package/src/terminal-reporter.d.ts +13 -0
  288. package/src/terminal-reporter.js +93 -0
  289. package/src/vendor/gmail.d.ts +45 -0
  290. package/src/vendor/gmail.js +193 -0
  291. package/src/watch-command.d.ts +16 -0
  292. package/src/watch-command.js +93 -0
  293. package/src/watch-state.d.ts +4 -0
  294. package/src/watch-state.js +53 -0
  295. package/src/worker/execution-error.d.ts +5 -0
  296. package/src/worker/execution-error.js +10 -0
  297. package/src/worker/execution.d.ts +24 -0
  298. package/src/worker/execution.js +190 -0
  299. package/src/worker/index.d.ts +8 -0
  300. package/src/worker/index.js +40 -0
  301. package/src/worker/prune.d.ts +3 -0
  302. package/src/worker/prune.js +22 -0
  303. package/src/worker/quarantine-notifications.d.ts +8 -0
  304. package/src/worker/quarantine-notifications.js +89 -0
  305. package/src/worker/queue.d.ts +65 -0
  306. package/src/worker/queue.js +438 -0
  307. package/src/worker/result-notifications.d.ts +28 -0
  308. package/src/worker/result-notifications.js +347 -0
  309. package/src/worker/store.d.ts +4 -0
  310. package/src/worker/store.js +46 -0
  311. package/src/worker/worker.d.ts +21 -0
  312. package/src/worker/worker.js +140 -0
  313. package/README.md +0 -3
@@ -0,0 +1,1587 @@
1
+ {
2
+ "id": "ded4e0cb-87a7-4ae9-80a2-1aa1c45def1f",
3
+ "prevId": "c60e2add-353f-4c0b-84e7-046634650356",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "qa.artifacts": {
8
+ "name": "artifacts",
9
+ "schema": "qa",
10
+ "columns": {
11
+ "project_id": {
12
+ "name": "project_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "run_id": {
18
+ "name": "run_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "path": {
24
+ "name": "path",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "kind": {
30
+ "name": "kind",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "object_key": {
36
+ "name": "object_key",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "bytes": {
42
+ "name": "bytes",
43
+ "type": "bigint",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "sha256": {
48
+ "name": "sha256",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ }
53
+ },
54
+ "indexes": {},
55
+ "foreignKeys": {
56
+ "artifacts_project_id_run_id_runs_project_id_id_fk": {
57
+ "name": "artifacts_project_id_run_id_runs_project_id_id_fk",
58
+ "tableFrom": "artifacts",
59
+ "tableTo": "runs",
60
+ "schemaTo": "qa",
61
+ "columnsFrom": ["project_id", "run_id"],
62
+ "columnsTo": ["project_id", "id"],
63
+ "onDelete": "no action",
64
+ "onUpdate": "no action"
65
+ }
66
+ },
67
+ "compositePrimaryKeys": {
68
+ "artifacts_project_id_run_id_path_pk": {
69
+ "name": "artifacts_project_id_run_id_path_pk",
70
+ "columns": ["project_id", "run_id", "path"]
71
+ }
72
+ },
73
+ "uniqueConstraints": {},
74
+ "policies": {},
75
+ "checkConstraints": {},
76
+ "isRLSEnabled": false
77
+ },
78
+ "qa.batches": {
79
+ "name": "batches",
80
+ "schema": "qa",
81
+ "columns": {
82
+ "project_id": {
83
+ "name": "project_id",
84
+ "type": "text",
85
+ "primaryKey": false,
86
+ "notNull": true
87
+ },
88
+ "id": {
89
+ "name": "id",
90
+ "type": "text",
91
+ "primaryKey": false,
92
+ "notNull": true
93
+ },
94
+ "trigger": {
95
+ "name": "trigger",
96
+ "type": "text",
97
+ "primaryKey": false,
98
+ "notNull": true
99
+ },
100
+ "target": {
101
+ "name": "target",
102
+ "type": "text",
103
+ "primaryKey": false,
104
+ "notNull": false
105
+ },
106
+ "commit": {
107
+ "name": "commit",
108
+ "type": "text",
109
+ "primaryKey": false,
110
+ "notNull": false
111
+ },
112
+ "created_by": {
113
+ "name": "created_by",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": false
117
+ },
118
+ "created_at": {
119
+ "name": "created_at",
120
+ "type": "timestamp with time zone",
121
+ "primaryKey": false,
122
+ "notNull": true,
123
+ "default": "now()"
124
+ }
125
+ },
126
+ "indexes": {},
127
+ "foreignKeys": {},
128
+ "compositePrimaryKeys": {
129
+ "batches_project_id_id_pk": {
130
+ "name": "batches_project_id_id_pk",
131
+ "columns": ["project_id", "id"]
132
+ }
133
+ },
134
+ "uniqueConstraints": {},
135
+ "policies": {},
136
+ "checkConstraints": {},
137
+ "isRLSEnabled": false
138
+ },
139
+ "qa.cache_entries": {
140
+ "name": "cache_entries",
141
+ "schema": "qa",
142
+ "columns": {
143
+ "project_id": {
144
+ "name": "project_id",
145
+ "type": "text",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "cache_key": {
150
+ "name": "cache_key",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": true
154
+ },
155
+ "version": {
156
+ "name": "version",
157
+ "type": "integer",
158
+ "primaryKey": false,
159
+ "notNull": true
160
+ },
161
+ "entry": {
162
+ "name": "entry",
163
+ "type": "jsonb",
164
+ "primaryKey": false,
165
+ "notNull": true
166
+ },
167
+ "created_at": {
168
+ "name": "created_at",
169
+ "type": "timestamp with time zone",
170
+ "primaryKey": false,
171
+ "notNull": true,
172
+ "default": "now()"
173
+ }
174
+ },
175
+ "indexes": {},
176
+ "foreignKeys": {},
177
+ "compositePrimaryKeys": {
178
+ "cache_entries_project_id_cache_key_version_pk": {
179
+ "name": "cache_entries_project_id_cache_key_version_pk",
180
+ "columns": ["project_id", "cache_key", "version"]
181
+ }
182
+ },
183
+ "uniqueConstraints": {},
184
+ "policies": {},
185
+ "checkConstraints": {
186
+ "cache_version_positive": {
187
+ "name": "cache_version_positive",
188
+ "value": "\"qa\".\"cache_entries\".\"version\" > 0"
189
+ }
190
+ },
191
+ "isRLSEnabled": false
192
+ },
193
+ "qa.classification_labels": {
194
+ "name": "classification_labels",
195
+ "schema": "qa",
196
+ "columns": {
197
+ "project_id": {
198
+ "name": "project_id",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": true
202
+ },
203
+ "run_id": {
204
+ "name": "run_id",
205
+ "type": "text",
206
+ "primaryKey": false,
207
+ "notNull": true
208
+ },
209
+ "ordinal": {
210
+ "name": "ordinal",
211
+ "type": "integer",
212
+ "primaryKey": false,
213
+ "notNull": true
214
+ },
215
+ "category": {
216
+ "name": "category",
217
+ "type": "text",
218
+ "primaryKey": false,
219
+ "notNull": true
220
+ },
221
+ "reason": {
222
+ "name": "reason",
223
+ "type": "text",
224
+ "primaryKey": false,
225
+ "notNull": true
226
+ },
227
+ "modified_by": {
228
+ "name": "modified_by",
229
+ "type": "text",
230
+ "primaryKey": false,
231
+ "notNull": true
232
+ },
233
+ "modified_at": {
234
+ "name": "modified_at",
235
+ "type": "double precision",
236
+ "primaryKey": false,
237
+ "notNull": true
238
+ },
239
+ "predicted": {
240
+ "name": "predicted",
241
+ "type": "jsonb",
242
+ "primaryKey": false,
243
+ "notNull": false
244
+ }
245
+ },
246
+ "indexes": {},
247
+ "foreignKeys": {
248
+ "classification_labels_project_id_run_id_runs_project_id_id_fk": {
249
+ "name": "classification_labels_project_id_run_id_runs_project_id_id_fk",
250
+ "tableFrom": "classification_labels",
251
+ "tableTo": "runs",
252
+ "schemaTo": "qa",
253
+ "columnsFrom": ["project_id", "run_id"],
254
+ "columnsTo": ["project_id", "id"],
255
+ "onDelete": "no action",
256
+ "onUpdate": "no action"
257
+ }
258
+ },
259
+ "compositePrimaryKeys": {
260
+ "classification_labels_project_id_run_id_ordinal_pk": {
261
+ "name": "classification_labels_project_id_run_id_ordinal_pk",
262
+ "columns": ["project_id", "run_id", "ordinal"]
263
+ }
264
+ },
265
+ "uniqueConstraints": {},
266
+ "policies": {},
267
+ "checkConstraints": {
268
+ "classification_label_category": {
269
+ "name": "classification_label_category",
270
+ "value": "\"qa\".\"classification_labels\".\"category\" IN ('corvo-bug','test-case','env','flaky','agent')"
271
+ }
272
+ },
273
+ "isRLSEnabled": false
274
+ },
275
+ "qa.credentials": {
276
+ "name": "credentials",
277
+ "schema": "qa",
278
+ "columns": {
279
+ "project_id": {
280
+ "name": "project_id",
281
+ "type": "text",
282
+ "primaryKey": false,
283
+ "notNull": true
284
+ },
285
+ "user_id": {
286
+ "name": "user_id",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": true
290
+ },
291
+ "provider": {
292
+ "name": "provider",
293
+ "type": "text",
294
+ "primaryKey": false,
295
+ "notNull": true
296
+ },
297
+ "secret_ref": {
298
+ "name": "secret_ref",
299
+ "type": "text",
300
+ "primaryKey": false,
301
+ "notNull": true
302
+ },
303
+ "expires_at": {
304
+ "name": "expires_at",
305
+ "type": "timestamp with time zone",
306
+ "primaryKey": false,
307
+ "notNull": false
308
+ }
309
+ },
310
+ "indexes": {},
311
+ "foreignKeys": {},
312
+ "compositePrimaryKeys": {
313
+ "credentials_project_id_user_id_provider_pk": {
314
+ "name": "credentials_project_id_user_id_provider_pk",
315
+ "columns": ["project_id", "user_id", "provider"]
316
+ }
317
+ },
318
+ "uniqueConstraints": {},
319
+ "policies": {},
320
+ "checkConstraints": {},
321
+ "isRLSEnabled": false
322
+ },
323
+ "qa.event_chunks": {
324
+ "name": "event_chunks",
325
+ "schema": "qa",
326
+ "columns": {
327
+ "project_id": {
328
+ "name": "project_id",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true
332
+ },
333
+ "run_id": {
334
+ "name": "run_id",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": true
338
+ },
339
+ "id": {
340
+ "name": "id",
341
+ "type": "text",
342
+ "primaryKey": false,
343
+ "notNull": true
344
+ },
345
+ "object_key": {
346
+ "name": "object_key",
347
+ "type": "text",
348
+ "primaryKey": false,
349
+ "notNull": true
350
+ },
351
+ "sha256": {
352
+ "name": "sha256",
353
+ "type": "text",
354
+ "primaryKey": false,
355
+ "notNull": true
356
+ },
357
+ "count": {
358
+ "name": "count",
359
+ "type": "integer",
360
+ "primaryKey": false,
361
+ "notNull": true
362
+ },
363
+ "bytes": {
364
+ "name": "bytes",
365
+ "type": "integer",
366
+ "primaryKey": false,
367
+ "notNull": true
368
+ },
369
+ "first_seq": {
370
+ "name": "first_seq",
371
+ "type": "bigint",
372
+ "primaryKey": false,
373
+ "notNull": true
374
+ },
375
+ "last_seq": {
376
+ "name": "last_seq",
377
+ "type": "bigint",
378
+ "primaryKey": false,
379
+ "notNull": true
380
+ },
381
+ "first_t": {
382
+ "name": "first_t",
383
+ "type": "double precision",
384
+ "primaryKey": false,
385
+ "notNull": true
386
+ },
387
+ "last_t": {
388
+ "name": "last_t",
389
+ "type": "double precision",
390
+ "primaryKey": false,
391
+ "notNull": true
392
+ },
393
+ "state": {
394
+ "name": "state",
395
+ "type": "text",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "default": "'uploading'"
399
+ },
400
+ "cleaned_at": {
401
+ "name": "cleaned_at",
402
+ "type": "timestamp with time zone",
403
+ "primaryKey": false,
404
+ "notNull": false
405
+ },
406
+ "created_at": {
407
+ "name": "created_at",
408
+ "type": "timestamp with time zone",
409
+ "primaryKey": false,
410
+ "notNull": true,
411
+ "default": "now()"
412
+ }
413
+ },
414
+ "indexes": {
415
+ "event_object_key": {
416
+ "name": "event_object_key",
417
+ "columns": [
418
+ {
419
+ "expression": "object_key",
420
+ "isExpression": false,
421
+ "asc": true,
422
+ "nulls": "last"
423
+ }
424
+ ],
425
+ "isUnique": true,
426
+ "concurrently": false,
427
+ "method": "btree",
428
+ "with": {}
429
+ }
430
+ },
431
+ "foreignKeys": {
432
+ "event_chunks_project_id_run_id_runs_project_id_id_fk": {
433
+ "name": "event_chunks_project_id_run_id_runs_project_id_id_fk",
434
+ "tableFrom": "event_chunks",
435
+ "tableTo": "runs",
436
+ "schemaTo": "qa",
437
+ "columnsFrom": ["project_id", "run_id"],
438
+ "columnsTo": ["project_id", "id"],
439
+ "onDelete": "no action",
440
+ "onUpdate": "no action"
441
+ }
442
+ },
443
+ "compositePrimaryKeys": {
444
+ "event_chunks_project_id_run_id_id_pk": {
445
+ "name": "event_chunks_project_id_run_id_id_pk",
446
+ "columns": ["project_id", "run_id", "id"]
447
+ }
448
+ },
449
+ "uniqueConstraints": {},
450
+ "policies": {},
451
+ "checkConstraints": {
452
+ "chunk_state": {
453
+ "name": "chunk_state",
454
+ "value": "\"qa\".\"event_chunks\".\"state\" IN ('uploading','committed','abandoned','cleaned')"
455
+ },
456
+ "chunk_range": {
457
+ "name": "chunk_range",
458
+ "value": "\"qa\".\"event_chunks\".\"count\" > 0 AND \"qa\".\"event_chunks\".\"bytes\" > 0 AND \"qa\".\"event_chunks\".\"first_seq\" > 0 AND \"qa\".\"event_chunks\".\"last_seq\" >= \"qa\".\"event_chunks\".\"first_seq\" AND \"qa\".\"event_chunks\".\"last_t\" >= \"qa\".\"event_chunks\".\"first_t\""
459
+ }
460
+ },
461
+ "isRLSEnabled": false
462
+ },
463
+ "qa.events": {
464
+ "name": "events",
465
+ "schema": "qa",
466
+ "columns": {
467
+ "project_id": {
468
+ "name": "project_id",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true
472
+ },
473
+ "run_id": {
474
+ "name": "run_id",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "seq": {
480
+ "name": "seq",
481
+ "type": "bigint",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "t": {
486
+ "name": "t",
487
+ "type": "double precision",
488
+ "primaryKey": false,
489
+ "notNull": true
490
+ },
491
+ "kind": {
492
+ "name": "kind",
493
+ "type": "text",
494
+ "primaryKey": false,
495
+ "notNull": true
496
+ },
497
+ "actor": {
498
+ "name": "actor",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "step": {
504
+ "name": "step",
505
+ "type": "text",
506
+ "primaryKey": false,
507
+ "notNull": false
508
+ },
509
+ "chunk_id": {
510
+ "name": "chunk_id",
511
+ "type": "text",
512
+ "primaryKey": false,
513
+ "notNull": true
514
+ },
515
+ "offset": {
516
+ "name": "offset",
517
+ "type": "integer",
518
+ "primaryKey": false,
519
+ "notNull": true
520
+ }
521
+ },
522
+ "indexes": {},
523
+ "foreignKeys": {
524
+ "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk": {
525
+ "name": "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk",
526
+ "tableFrom": "events",
527
+ "tableTo": "event_chunks",
528
+ "schemaTo": "qa",
529
+ "columnsFrom": ["project_id", "run_id", "chunk_id"],
530
+ "columnsTo": ["project_id", "run_id", "id"],
531
+ "onDelete": "no action",
532
+ "onUpdate": "no action"
533
+ }
534
+ },
535
+ "compositePrimaryKeys": {
536
+ "events_project_id_run_id_seq_pk": {
537
+ "name": "events_project_id_run_id_seq_pk",
538
+ "columns": ["project_id", "run_id", "seq"]
539
+ }
540
+ },
541
+ "uniqueConstraints": {},
542
+ "policies": {},
543
+ "checkConstraints": {},
544
+ "isRLSEnabled": false
545
+ },
546
+ "qa.findings": {
547
+ "name": "findings",
548
+ "schema": "qa",
549
+ "columns": {
550
+ "project_id": {
551
+ "name": "project_id",
552
+ "type": "text",
553
+ "primaryKey": false,
554
+ "notNull": true
555
+ },
556
+ "run_id": {
557
+ "name": "run_id",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": true
561
+ },
562
+ "ordinal": {
563
+ "name": "ordinal",
564
+ "type": "integer",
565
+ "primaryKey": false,
566
+ "notNull": true
567
+ },
568
+ "actor": {
569
+ "name": "actor",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": true
573
+ },
574
+ "step": {
575
+ "name": "step",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": true
579
+ },
580
+ "category": {
581
+ "name": "category",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": true
585
+ },
586
+ "severity": {
587
+ "name": "severity",
588
+ "type": "text",
589
+ "primaryKey": false,
590
+ "notNull": true
591
+ },
592
+ "description": {
593
+ "name": "description",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": true
597
+ },
598
+ "event_seqs": {
599
+ "name": "event_seqs",
600
+ "type": "jsonb",
601
+ "primaryKey": false,
602
+ "notNull": true
603
+ },
604
+ "shots": {
605
+ "name": "shots",
606
+ "type": "jsonb",
607
+ "primaryKey": false,
608
+ "notNull": true
609
+ },
610
+ "created_at": {
611
+ "name": "created_at",
612
+ "type": "timestamp with time zone",
613
+ "primaryKey": false,
614
+ "notNull": true,
615
+ "default": "now()"
616
+ }
617
+ },
618
+ "indexes": {},
619
+ "foreignKeys": {
620
+ "findings_project_id_run_id_runs_project_id_id_fk": {
621
+ "name": "findings_project_id_run_id_runs_project_id_id_fk",
622
+ "tableFrom": "findings",
623
+ "tableTo": "runs",
624
+ "schemaTo": "qa",
625
+ "columnsFrom": ["project_id", "run_id"],
626
+ "columnsTo": ["project_id", "id"],
627
+ "onDelete": "no action",
628
+ "onUpdate": "no action"
629
+ }
630
+ },
631
+ "compositePrimaryKeys": {
632
+ "findings_project_id_run_id_ordinal_pk": {
633
+ "name": "findings_project_id_run_id_ordinal_pk",
634
+ "columns": ["project_id", "run_id", "ordinal"]
635
+ }
636
+ },
637
+ "uniqueConstraints": {},
638
+ "policies": {},
639
+ "checkConstraints": {
640
+ "finding_ordinal_positive": {
641
+ "name": "finding_ordinal_positive",
642
+ "value": "\"qa\".\"findings\".\"ordinal\" > 0"
643
+ },
644
+ "finding_severity": {
645
+ "name": "finding_severity",
646
+ "value": "\"qa\".\"findings\".\"severity\" IN ('low','medium','high')"
647
+ },
648
+ "finding_category": {
649
+ "name": "finding_category",
650
+ "value": "\"qa\".\"findings\".\"category\" IN ('scope','other')"
651
+ }
652
+ },
653
+ "isRLSEnabled": false
654
+ },
655
+ "qa.jobs": {
656
+ "name": "jobs",
657
+ "schema": "qa",
658
+ "columns": {
659
+ "project_id": {
660
+ "name": "project_id",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": true
664
+ },
665
+ "id": {
666
+ "name": "id",
667
+ "type": "text",
668
+ "primaryKey": false,
669
+ "notNull": true
670
+ },
671
+ "run_id": {
672
+ "name": "run_id",
673
+ "type": "text",
674
+ "primaryKey": false,
675
+ "notNull": true
676
+ },
677
+ "state": {
678
+ "name": "state",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": true,
682
+ "default": "'queued'"
683
+ },
684
+ "available_at": {
685
+ "name": "available_at",
686
+ "type": "timestamp with time zone",
687
+ "primaryKey": false,
688
+ "notNull": true,
689
+ "default": "now()"
690
+ },
691
+ "attempts": {
692
+ "name": "attempts",
693
+ "type": "integer",
694
+ "primaryKey": false,
695
+ "notNull": true,
696
+ "default": 0
697
+ },
698
+ "owner": {
699
+ "name": "owner",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": false
703
+ },
704
+ "epoch": {
705
+ "name": "epoch",
706
+ "type": "bigserial",
707
+ "primaryKey": false,
708
+ "notNull": true
709
+ },
710
+ "lease_until": {
711
+ "name": "lease_until",
712
+ "type": "timestamp with time zone",
713
+ "primaryKey": false,
714
+ "notNull": false
715
+ },
716
+ "retry_of": {
717
+ "name": "retry_of",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": false
721
+ },
722
+ "cleaned_at": {
723
+ "name": "cleaned_at",
724
+ "type": "timestamp with time zone",
725
+ "primaryKey": false,
726
+ "notNull": false
727
+ },
728
+ "verified_revision": {
729
+ "name": "verified_revision",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": false
733
+ },
734
+ "infrastructure_failure": {
735
+ "name": "infrastructure_failure",
736
+ "type": "integer",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "default": 0
740
+ }
741
+ },
742
+ "indexes": {
743
+ "jobs_available": {
744
+ "name": "jobs_available",
745
+ "columns": [
746
+ {
747
+ "expression": "project_id",
748
+ "isExpression": false,
749
+ "asc": true,
750
+ "nulls": "last"
751
+ },
752
+ {
753
+ "expression": "state",
754
+ "isExpression": false,
755
+ "asc": true,
756
+ "nulls": "last"
757
+ },
758
+ {
759
+ "expression": "available_at",
760
+ "isExpression": false,
761
+ "asc": true,
762
+ "nulls": "last"
763
+ }
764
+ ],
765
+ "isUnique": false,
766
+ "concurrently": false,
767
+ "method": "btree",
768
+ "with": {}
769
+ },
770
+ "job_run": {
771
+ "name": "job_run",
772
+ "columns": [
773
+ {
774
+ "expression": "project_id",
775
+ "isExpression": false,
776
+ "asc": true,
777
+ "nulls": "last"
778
+ },
779
+ {
780
+ "expression": "run_id",
781
+ "isExpression": false,
782
+ "asc": true,
783
+ "nulls": "last"
784
+ }
785
+ ],
786
+ "isUnique": true,
787
+ "concurrently": false,
788
+ "method": "btree",
789
+ "with": {}
790
+ },
791
+ "job_retry": {
792
+ "name": "job_retry",
793
+ "columns": [
794
+ {
795
+ "expression": "project_id",
796
+ "isExpression": false,
797
+ "asc": true,
798
+ "nulls": "last"
799
+ },
800
+ {
801
+ "expression": "retry_of",
802
+ "isExpression": false,
803
+ "asc": true,
804
+ "nulls": "last"
805
+ }
806
+ ],
807
+ "isUnique": true,
808
+ "concurrently": false,
809
+ "method": "btree",
810
+ "with": {}
811
+ }
812
+ },
813
+ "foreignKeys": {
814
+ "jobs_project_id_run_id_runs_project_id_id_fk": {
815
+ "name": "jobs_project_id_run_id_runs_project_id_id_fk",
816
+ "tableFrom": "jobs",
817
+ "tableTo": "runs",
818
+ "schemaTo": "qa",
819
+ "columnsFrom": ["project_id", "run_id"],
820
+ "columnsTo": ["project_id", "id"],
821
+ "onDelete": "no action",
822
+ "onUpdate": "no action"
823
+ }
824
+ },
825
+ "compositePrimaryKeys": {
826
+ "jobs_project_id_id_pk": {
827
+ "name": "jobs_project_id_id_pk",
828
+ "columns": ["project_id", "id"]
829
+ }
830
+ },
831
+ "uniqueConstraints": {},
832
+ "policies": {},
833
+ "checkConstraints": {
834
+ "job_attempt": {
835
+ "name": "job_attempt",
836
+ "value": "\"qa\".\"jobs\".\"attempts\" IN (0,1)"
837
+ }
838
+ },
839
+ "isRLSEnabled": false
840
+ },
841
+ "qa.lanes": {
842
+ "name": "lanes",
843
+ "schema": "qa",
844
+ "columns": {
845
+ "project_id": {
846
+ "name": "project_id",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": true
850
+ },
851
+ "run_id": {
852
+ "name": "run_id",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": true
856
+ },
857
+ "actor": {
858
+ "name": "actor",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": true
862
+ },
863
+ "status": {
864
+ "name": "status",
865
+ "type": "text",
866
+ "primaryKey": false,
867
+ "notNull": true
868
+ },
869
+ "started_at": {
870
+ "name": "started_at",
871
+ "type": "double precision",
872
+ "primaryKey": false,
873
+ "notNull": true
874
+ },
875
+ "finished_at": {
876
+ "name": "finished_at",
877
+ "type": "double precision",
878
+ "primaryKey": false,
879
+ "notNull": false
880
+ }
881
+ },
882
+ "indexes": {},
883
+ "foreignKeys": {
884
+ "lanes_project_id_run_id_runs_project_id_id_fk": {
885
+ "name": "lanes_project_id_run_id_runs_project_id_id_fk",
886
+ "tableFrom": "lanes",
887
+ "tableTo": "runs",
888
+ "schemaTo": "qa",
889
+ "columnsFrom": ["project_id", "run_id"],
890
+ "columnsTo": ["project_id", "id"],
891
+ "onDelete": "no action",
892
+ "onUpdate": "no action"
893
+ }
894
+ },
895
+ "compositePrimaryKeys": {
896
+ "lanes_project_id_run_id_actor_pk": {
897
+ "name": "lanes_project_id_run_id_actor_pk",
898
+ "columns": ["project_id", "run_id", "actor"]
899
+ }
900
+ },
901
+ "uniqueConstraints": {},
902
+ "policies": {},
903
+ "checkConstraints": {},
904
+ "isRLSEnabled": false
905
+ },
906
+ "qa.lease_claims": {
907
+ "name": "lease_claims",
908
+ "schema": "qa",
909
+ "columns": {
910
+ "project_id": {
911
+ "name": "project_id",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": true
915
+ },
916
+ "identity": {
917
+ "name": "identity",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true
921
+ },
922
+ "lease_id": {
923
+ "name": "lease_id",
924
+ "type": "text",
925
+ "primaryKey": false,
926
+ "notNull": true
927
+ }
928
+ },
929
+ "indexes": {},
930
+ "foreignKeys": {
931
+ "lease_claims_project_id_lease_id_leases_project_id_id_fk": {
932
+ "name": "lease_claims_project_id_lease_id_leases_project_id_id_fk",
933
+ "tableFrom": "lease_claims",
934
+ "tableTo": "leases",
935
+ "schemaTo": "qa",
936
+ "columnsFrom": ["project_id", "lease_id"],
937
+ "columnsTo": ["project_id", "id"],
938
+ "onDelete": "no action",
939
+ "onUpdate": "no action"
940
+ }
941
+ },
942
+ "compositePrimaryKeys": {
943
+ "lease_claims_project_id_identity_pk": {
944
+ "name": "lease_claims_project_id_identity_pk",
945
+ "columns": ["project_id", "identity"]
946
+ }
947
+ },
948
+ "uniqueConstraints": {},
949
+ "policies": {},
950
+ "checkConstraints": {},
951
+ "isRLSEnabled": false
952
+ },
953
+ "qa.lease_resources": {
954
+ "name": "lease_resources",
955
+ "schema": "qa",
956
+ "columns": {
957
+ "project_id": {
958
+ "name": "project_id",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": true
962
+ },
963
+ "id": {
964
+ "name": "id",
965
+ "type": "text",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ },
969
+ "kind": {
970
+ "name": "kind",
971
+ "type": "text",
972
+ "primaryKey": false,
973
+ "notNull": true
974
+ },
975
+ "canonical_id": {
976
+ "name": "canonical_id",
977
+ "type": "text",
978
+ "primaryKey": false,
979
+ "notNull": true
980
+ },
981
+ "secret_ref": {
982
+ "name": "secret_ref",
983
+ "type": "text",
984
+ "primaryKey": false,
985
+ "notNull": true
986
+ }
987
+ },
988
+ "indexes": {
989
+ "resource_kinds": {
990
+ "name": "resource_kinds",
991
+ "columns": [
992
+ {
993
+ "expression": "project_id",
994
+ "isExpression": false,
995
+ "asc": true,
996
+ "nulls": "last"
997
+ },
998
+ {
999
+ "expression": "kind",
1000
+ "isExpression": false,
1001
+ "asc": true,
1002
+ "nulls": "last"
1003
+ }
1004
+ ],
1005
+ "isUnique": false,
1006
+ "concurrently": false,
1007
+ "method": "btree",
1008
+ "with": {}
1009
+ }
1010
+ },
1011
+ "foreignKeys": {},
1012
+ "compositePrimaryKeys": {
1013
+ "lease_resources_project_id_id_pk": {
1014
+ "name": "lease_resources_project_id_id_pk",
1015
+ "columns": ["project_id", "id"]
1016
+ }
1017
+ },
1018
+ "uniqueConstraints": {},
1019
+ "policies": {},
1020
+ "checkConstraints": {},
1021
+ "isRLSEnabled": false
1022
+ },
1023
+ "qa.leases": {
1024
+ "name": "leases",
1025
+ "schema": "qa",
1026
+ "columns": {
1027
+ "project_id": {
1028
+ "name": "project_id",
1029
+ "type": "text",
1030
+ "primaryKey": false,
1031
+ "notNull": true
1032
+ },
1033
+ "id": {
1034
+ "name": "id",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true
1038
+ },
1039
+ "run_id": {
1040
+ "name": "run_id",
1041
+ "type": "text",
1042
+ "primaryKey": false,
1043
+ "notNull": true
1044
+ },
1045
+ "actor": {
1046
+ "name": "actor",
1047
+ "type": "text",
1048
+ "primaryKey": false,
1049
+ "notNull": true
1050
+ },
1051
+ "owner": {
1052
+ "name": "owner",
1053
+ "type": "text",
1054
+ "primaryKey": false,
1055
+ "notNull": true
1056
+ },
1057
+ "epoch": {
1058
+ "name": "epoch",
1059
+ "type": "bigserial",
1060
+ "primaryKey": false,
1061
+ "notNull": true
1062
+ },
1063
+ "state": {
1064
+ "name": "state",
1065
+ "type": "text",
1066
+ "primaryKey": false,
1067
+ "notNull": true,
1068
+ "default": "'active'"
1069
+ },
1070
+ "expires_at": {
1071
+ "name": "expires_at",
1072
+ "type": "timestamp with time zone",
1073
+ "primaryKey": false,
1074
+ "notNull": true
1075
+ },
1076
+ "allocations": {
1077
+ "name": "allocations",
1078
+ "type": "jsonb",
1079
+ "primaryKey": false,
1080
+ "notNull": true
1081
+ }
1082
+ },
1083
+ "indexes": {},
1084
+ "foreignKeys": {},
1085
+ "compositePrimaryKeys": {
1086
+ "leases_project_id_id_pk": {
1087
+ "name": "leases_project_id_id_pk",
1088
+ "columns": ["project_id", "id"]
1089
+ }
1090
+ },
1091
+ "uniqueConstraints": {},
1092
+ "policies": {},
1093
+ "checkConstraints": {
1094
+ "lease_state": {
1095
+ "name": "lease_state",
1096
+ "value": "\"qa\".\"leases\".\"state\" IN ('active','quarantined','released')"
1097
+ }
1098
+ },
1099
+ "isRLSEnabled": false
1100
+ },
1101
+ "qa.read_publications": {
1102
+ "name": "read_publications",
1103
+ "schema": "qa",
1104
+ "columns": {
1105
+ "project_id": {
1106
+ "name": "project_id",
1107
+ "type": "text",
1108
+ "primaryKey": false,
1109
+ "notNull": true
1110
+ },
1111
+ "kind": {
1112
+ "name": "kind",
1113
+ "type": "text",
1114
+ "primaryKey": false,
1115
+ "notNull": true
1116
+ },
1117
+ "document": {
1118
+ "name": "document",
1119
+ "type": "jsonb",
1120
+ "primaryKey": false,
1121
+ "notNull": true
1122
+ }
1123
+ },
1124
+ "indexes": {},
1125
+ "foreignKeys": {},
1126
+ "compositePrimaryKeys": {
1127
+ "read_publications_project_id_kind_pk": {
1128
+ "name": "read_publications_project_id_kind_pk",
1129
+ "columns": ["project_id", "kind"]
1130
+ }
1131
+ },
1132
+ "uniqueConstraints": {},
1133
+ "policies": {},
1134
+ "checkConstraints": {},
1135
+ "isRLSEnabled": false
1136
+ },
1137
+ "qa.runs": {
1138
+ "name": "runs",
1139
+ "schema": "qa",
1140
+ "columns": {
1141
+ "project_id": {
1142
+ "name": "project_id",
1143
+ "type": "text",
1144
+ "primaryKey": false,
1145
+ "notNull": true
1146
+ },
1147
+ "id": {
1148
+ "name": "id",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": true
1152
+ },
1153
+ "batch_id": {
1154
+ "name": "batch_id",
1155
+ "type": "text",
1156
+ "primaryKey": false,
1157
+ "notNull": false
1158
+ },
1159
+ "flow": {
1160
+ "name": "flow",
1161
+ "type": "text",
1162
+ "primaryKey": false,
1163
+ "notNull": true
1164
+ },
1165
+ "started_at": {
1166
+ "name": "started_at",
1167
+ "type": "double precision",
1168
+ "primaryKey": false,
1169
+ "notNull": true
1170
+ },
1171
+ "metadata": {
1172
+ "name": "metadata",
1173
+ "type": "jsonb",
1174
+ "primaryKey": false,
1175
+ "notNull": false
1176
+ },
1177
+ "phase": {
1178
+ "name": "phase",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": true,
1182
+ "default": "'queued'"
1183
+ },
1184
+ "verdict": {
1185
+ "name": "verdict",
1186
+ "type": "text",
1187
+ "primaryKey": false,
1188
+ "notNull": false
1189
+ },
1190
+ "finished_at": {
1191
+ "name": "finished_at",
1192
+ "type": "double precision",
1193
+ "primaryKey": false,
1194
+ "notNull": false
1195
+ },
1196
+ "reason": {
1197
+ "name": "reason",
1198
+ "type": "text",
1199
+ "primaryKey": false,
1200
+ "notNull": false
1201
+ },
1202
+ "event_count": {
1203
+ "name": "event_count",
1204
+ "type": "integer",
1205
+ "primaryKey": false,
1206
+ "notNull": true,
1207
+ "default": 0
1208
+ },
1209
+ "last_seq": {
1210
+ "name": "last_seq",
1211
+ "type": "bigint",
1212
+ "primaryKey": false,
1213
+ "notNull": true,
1214
+ "default": 0
1215
+ },
1216
+ "last_t": {
1217
+ "name": "last_t",
1218
+ "type": "double precision",
1219
+ "primaryKey": false,
1220
+ "notNull": true,
1221
+ "default": 0
1222
+ },
1223
+ "event_bytes": {
1224
+ "name": "event_bytes",
1225
+ "type": "bigint",
1226
+ "primaryKey": false,
1227
+ "notNull": true,
1228
+ "default": 0
1229
+ },
1230
+ "writer_lease_id": {
1231
+ "name": "writer_lease_id",
1232
+ "type": "text",
1233
+ "primaryKey": false,
1234
+ "notNull": false
1235
+ },
1236
+ "heartbeat_at": {
1237
+ "name": "heartbeat_at",
1238
+ "type": "timestamp with time zone",
1239
+ "primaryKey": false,
1240
+ "notNull": false
1241
+ },
1242
+ "cost_usd": {
1243
+ "name": "cost_usd",
1244
+ "type": "double precision",
1245
+ "primaryKey": false,
1246
+ "notNull": true,
1247
+ "default": 0
1248
+ },
1249
+ "classification": {
1250
+ "name": "classification",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": false
1254
+ }
1255
+ },
1256
+ "indexes": {
1257
+ "runs_recent": {
1258
+ "name": "runs_recent",
1259
+ "columns": [
1260
+ {
1261
+ "expression": "project_id",
1262
+ "isExpression": false,
1263
+ "asc": true,
1264
+ "nulls": "last"
1265
+ },
1266
+ {
1267
+ "expression": "started_at",
1268
+ "isExpression": false,
1269
+ "asc": false,
1270
+ "nulls": "last"
1271
+ },
1272
+ {
1273
+ "expression": "\"id\" COLLATE \"C\"",
1274
+ "asc": true,
1275
+ "isExpression": true,
1276
+ "nulls": "last"
1277
+ }
1278
+ ],
1279
+ "isUnique": false,
1280
+ "concurrently": false,
1281
+ "method": "btree",
1282
+ "with": {}
1283
+ }
1284
+ },
1285
+ "foreignKeys": {
1286
+ "runs_project_id_batch_id_batches_project_id_id_fk": {
1287
+ "name": "runs_project_id_batch_id_batches_project_id_id_fk",
1288
+ "tableFrom": "runs",
1289
+ "tableTo": "batches",
1290
+ "schemaTo": "qa",
1291
+ "columnsFrom": ["project_id", "batch_id"],
1292
+ "columnsTo": ["project_id", "id"],
1293
+ "onDelete": "no action",
1294
+ "onUpdate": "no action"
1295
+ }
1296
+ },
1297
+ "compositePrimaryKeys": {
1298
+ "runs_project_id_id_pk": {
1299
+ "name": "runs_project_id_id_pk",
1300
+ "columns": ["project_id", "id"]
1301
+ }
1302
+ },
1303
+ "uniqueConstraints": {},
1304
+ "policies": {},
1305
+ "checkConstraints": {
1306
+ "run_cursor_nonnegative": {
1307
+ "name": "run_cursor_nonnegative",
1308
+ "value": "\"qa\".\"runs\".\"last_seq\" >= 0 AND \"qa\".\"runs\".\"last_t\" >= 0 AND \"qa\".\"runs\".\"event_count\" >= 0 AND \"qa\".\"runs\".\"event_bytes\" >= 0"
1309
+ }
1310
+ },
1311
+ "isRLSEnabled": false
1312
+ },
1313
+ "qa.server_submissions": {
1314
+ "name": "server_submissions",
1315
+ "schema": "qa",
1316
+ "columns": {
1317
+ "project_id": {
1318
+ "name": "project_id",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true
1322
+ },
1323
+ "principal_id": {
1324
+ "name": "principal_id",
1325
+ "type": "text",
1326
+ "primaryKey": false,
1327
+ "notNull": true
1328
+ },
1329
+ "idempotency_key": {
1330
+ "name": "idempotency_key",
1331
+ "type": "text",
1332
+ "primaryKey": false,
1333
+ "notNull": true
1334
+ },
1335
+ "fingerprint": {
1336
+ "name": "fingerprint",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": true
1340
+ },
1341
+ "batch_id": {
1342
+ "name": "batch_id",
1343
+ "type": "text",
1344
+ "primaryKey": false,
1345
+ "notNull": true
1346
+ },
1347
+ "response": {
1348
+ "name": "response",
1349
+ "type": "jsonb",
1350
+ "primaryKey": false,
1351
+ "notNull": true
1352
+ },
1353
+ "created_at": {
1354
+ "name": "created_at",
1355
+ "type": "timestamp with time zone",
1356
+ "primaryKey": false,
1357
+ "notNull": true,
1358
+ "default": "now()"
1359
+ }
1360
+ },
1361
+ "indexes": {
1362
+ "submission_batch": {
1363
+ "name": "submission_batch",
1364
+ "columns": [
1365
+ {
1366
+ "expression": "project_id",
1367
+ "isExpression": false,
1368
+ "asc": true,
1369
+ "nulls": "last"
1370
+ },
1371
+ {
1372
+ "expression": "batch_id",
1373
+ "isExpression": false,
1374
+ "asc": true,
1375
+ "nulls": "last"
1376
+ }
1377
+ ],
1378
+ "isUnique": true,
1379
+ "concurrently": false,
1380
+ "method": "btree",
1381
+ "with": {}
1382
+ },
1383
+ "submission_created": {
1384
+ "name": "submission_created",
1385
+ "columns": [
1386
+ {
1387
+ "expression": "project_id",
1388
+ "isExpression": false,
1389
+ "asc": true,
1390
+ "nulls": "last"
1391
+ },
1392
+ {
1393
+ "expression": "created_at",
1394
+ "isExpression": false,
1395
+ "asc": false,
1396
+ "nulls": "last"
1397
+ },
1398
+ {
1399
+ "expression": "batch_id",
1400
+ "isExpression": false,
1401
+ "asc": true,
1402
+ "nulls": "last"
1403
+ }
1404
+ ],
1405
+ "isUnique": false,
1406
+ "concurrently": false,
1407
+ "method": "btree",
1408
+ "with": {}
1409
+ }
1410
+ },
1411
+ "foreignKeys": {
1412
+ "server_submissions_project_id_batch_id_batches_project_id_id_fk": {
1413
+ "name": "server_submissions_project_id_batch_id_batches_project_id_id_fk",
1414
+ "tableFrom": "server_submissions",
1415
+ "tableTo": "batches",
1416
+ "schemaTo": "qa",
1417
+ "columnsFrom": ["project_id", "batch_id"],
1418
+ "columnsTo": ["project_id", "id"],
1419
+ "onDelete": "no action",
1420
+ "onUpdate": "no action"
1421
+ }
1422
+ },
1423
+ "compositePrimaryKeys": {
1424
+ "server_submissions_project_id_principal_id_idempotency_key_pk": {
1425
+ "name": "server_submissions_project_id_principal_id_idempotency_key_pk",
1426
+ "columns": ["project_id", "principal_id", "idempotency_key"]
1427
+ }
1428
+ },
1429
+ "uniqueConstraints": {},
1430
+ "policies": {},
1431
+ "checkConstraints": {},
1432
+ "isRLSEnabled": false
1433
+ },
1434
+ "qa.step_runs": {
1435
+ "name": "step_runs",
1436
+ "schema": "qa",
1437
+ "columns": {
1438
+ "project_id": {
1439
+ "name": "project_id",
1440
+ "type": "text",
1441
+ "primaryKey": false,
1442
+ "notNull": true
1443
+ },
1444
+ "run_id": {
1445
+ "name": "run_id",
1446
+ "type": "text",
1447
+ "primaryKey": false,
1448
+ "notNull": true
1449
+ },
1450
+ "actor": {
1451
+ "name": "actor",
1452
+ "type": "text",
1453
+ "primaryKey": false,
1454
+ "notNull": true
1455
+ },
1456
+ "step": {
1457
+ "name": "step",
1458
+ "type": "text",
1459
+ "primaryKey": false,
1460
+ "notNull": true
1461
+ },
1462
+ "seq": {
1463
+ "name": "seq",
1464
+ "type": "bigint",
1465
+ "primaryKey": false,
1466
+ "notNull": true
1467
+ },
1468
+ "status": {
1469
+ "name": "status",
1470
+ "type": "text",
1471
+ "primaryKey": false,
1472
+ "notNull": true
1473
+ },
1474
+ "started_at": {
1475
+ "name": "started_at",
1476
+ "type": "double precision",
1477
+ "primaryKey": false,
1478
+ "notNull": true
1479
+ },
1480
+ "finished_at": {
1481
+ "name": "finished_at",
1482
+ "type": "double precision",
1483
+ "primaryKey": false,
1484
+ "notNull": false
1485
+ }
1486
+ },
1487
+ "indexes": {},
1488
+ "foreignKeys": {
1489
+ "step_runs_project_id_run_id_runs_project_id_id_fk": {
1490
+ "name": "step_runs_project_id_run_id_runs_project_id_id_fk",
1491
+ "tableFrom": "step_runs",
1492
+ "tableTo": "runs",
1493
+ "schemaTo": "qa",
1494
+ "columnsFrom": ["project_id", "run_id"],
1495
+ "columnsTo": ["project_id", "id"],
1496
+ "onDelete": "no action",
1497
+ "onUpdate": "no action"
1498
+ }
1499
+ },
1500
+ "compositePrimaryKeys": {
1501
+ "step_runs_project_id_run_id_seq_pk": {
1502
+ "name": "step_runs_project_id_run_id_seq_pk",
1503
+ "columns": ["project_id", "run_id", "seq"]
1504
+ }
1505
+ },
1506
+ "uniqueConstraints": {},
1507
+ "policies": {},
1508
+ "checkConstraints": {},
1509
+ "isRLSEnabled": false
1510
+ },
1511
+ "qa.worker_slots": {
1512
+ "name": "worker_slots",
1513
+ "schema": "qa",
1514
+ "columns": {
1515
+ "id": {
1516
+ "name": "id",
1517
+ "type": "integer",
1518
+ "primaryKey": true,
1519
+ "notNull": true
1520
+ },
1521
+ "project_id": {
1522
+ "name": "project_id",
1523
+ "type": "text",
1524
+ "primaryKey": false,
1525
+ "notNull": false
1526
+ },
1527
+ "job_id": {
1528
+ "name": "job_id",
1529
+ "type": "text",
1530
+ "primaryKey": false,
1531
+ "notNull": false
1532
+ }
1533
+ },
1534
+ "indexes": {
1535
+ "worker_slot_job": {
1536
+ "name": "worker_slot_job",
1537
+ "columns": [
1538
+ {
1539
+ "expression": "project_id",
1540
+ "isExpression": false,
1541
+ "asc": true,
1542
+ "nulls": "last"
1543
+ },
1544
+ {
1545
+ "expression": "job_id",
1546
+ "isExpression": false,
1547
+ "asc": true,
1548
+ "nulls": "last"
1549
+ }
1550
+ ],
1551
+ "isUnique": true,
1552
+ "concurrently": false,
1553
+ "method": "btree",
1554
+ "with": {}
1555
+ }
1556
+ },
1557
+ "foreignKeys": {},
1558
+ "compositePrimaryKeys": {},
1559
+ "uniqueConstraints": {},
1560
+ "policies": {},
1561
+ "checkConstraints": {
1562
+ "worker_slot_range": {
1563
+ "name": "worker_slot_range",
1564
+ "value": "\"qa\".\"worker_slots\".\"id\" BETWEEN 1 AND 8"
1565
+ },
1566
+ "worker_slot_pair": {
1567
+ "name": "worker_slot_pair",
1568
+ "value": "(\"qa\".\"worker_slots\".\"project_id\" IS NULL) = (\"qa\".\"worker_slots\".\"job_id\" IS NULL)"
1569
+ }
1570
+ },
1571
+ "isRLSEnabled": false
1572
+ }
1573
+ },
1574
+ "enums": {},
1575
+ "schemas": {
1576
+ "qa": "qa"
1577
+ },
1578
+ "sequences": {},
1579
+ "roles": {},
1580
+ "policies": {},
1581
+ "views": {},
1582
+ "_meta": {
1583
+ "columns": {},
1584
+ "schemas": {},
1585
+ "tables": {}
1586
+ }
1587
+ }