@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,2028 @@
1
+ {
2
+ "id": "4f2faf60-4493-4a06-ba60-feed027d0d83",
3
+ "prevId": "fc9a5801-acb0-4ddf-8eae-8b6c8ca99e3d",
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.flow_results": {
656
+ "name": "flow_results",
657
+ "schema": "qa",
658
+ "columns": {
659
+ "project_id": {
660
+ "name": "project_id",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": true
664
+ },
665
+ "execution_id": {
666
+ "name": "execution_id",
667
+ "type": "text",
668
+ "primaryKey": false,
669
+ "notNull": true
670
+ },
671
+ "flow": {
672
+ "name": "flow",
673
+ "type": "text",
674
+ "primaryKey": false,
675
+ "notNull": true
676
+ },
677
+ "quarantined": {
678
+ "name": "quarantined",
679
+ "type": "integer",
680
+ "primaryKey": false,
681
+ "notNull": true
682
+ }
683
+ },
684
+ "indexes": {},
685
+ "foreignKeys": {},
686
+ "compositePrimaryKeys": {
687
+ "flow_results_project_id_execution_id_pk": {
688
+ "name": "flow_results_project_id_execution_id_pk",
689
+ "columns": ["project_id", "execution_id"]
690
+ }
691
+ },
692
+ "uniqueConstraints": {},
693
+ "policies": {},
694
+ "checkConstraints": {
695
+ "flow_result_quarantined": {
696
+ "name": "flow_result_quarantined",
697
+ "value": "\"qa\".\"flow_results\".\"quarantined\" IN (0,1)"
698
+ }
699
+ },
700
+ "isRLSEnabled": false
701
+ },
702
+ "qa.flow_statuses": {
703
+ "name": "flow_statuses",
704
+ "schema": "qa",
705
+ "columns": {
706
+ "project_id": {
707
+ "name": "project_id",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true
711
+ },
712
+ "flow": {
713
+ "name": "flow",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": true
717
+ },
718
+ "status": {
719
+ "name": "status",
720
+ "type": "text",
721
+ "primaryKey": false,
722
+ "notNull": true,
723
+ "default": "'active'"
724
+ },
725
+ "flaky_streak": {
726
+ "name": "flaky_streak",
727
+ "type": "integer",
728
+ "primaryKey": false,
729
+ "notNull": true,
730
+ "default": 0
731
+ },
732
+ "generation": {
733
+ "name": "generation",
734
+ "type": "integer",
735
+ "primaryKey": false,
736
+ "notNull": true,
737
+ "default": 0
738
+ },
739
+ "owner": {
740
+ "name": "owner",
741
+ "type": "text",
742
+ "primaryKey": false,
743
+ "notNull": false
744
+ },
745
+ "latest_repeat": {
746
+ "name": "latest_repeat",
747
+ "type": "jsonb",
748
+ "primaryKey": false,
749
+ "notNull": false
750
+ }
751
+ },
752
+ "indexes": {},
753
+ "foreignKeys": {},
754
+ "compositePrimaryKeys": {
755
+ "flow_statuses_project_id_flow_pk": {
756
+ "name": "flow_statuses_project_id_flow_pk",
757
+ "columns": ["project_id", "flow"]
758
+ }
759
+ },
760
+ "uniqueConstraints": {},
761
+ "policies": {},
762
+ "checkConstraints": {
763
+ "flow_status": {
764
+ "name": "flow_status",
765
+ "value": "\"qa\".\"flow_statuses\".\"status\" IN ('active','quarantined')"
766
+ },
767
+ "flow_streak": {
768
+ "name": "flow_streak",
769
+ "value": "\"qa\".\"flow_statuses\".\"flaky_streak\" >= 0 AND \"qa\".\"flow_statuses\".\"generation\" >= 0"
770
+ }
771
+ },
772
+ "isRLSEnabled": false
773
+ },
774
+ "qa.jobs": {
775
+ "name": "jobs",
776
+ "schema": "qa",
777
+ "columns": {
778
+ "project_id": {
779
+ "name": "project_id",
780
+ "type": "text",
781
+ "primaryKey": false,
782
+ "notNull": true
783
+ },
784
+ "id": {
785
+ "name": "id",
786
+ "type": "text",
787
+ "primaryKey": false,
788
+ "notNull": true
789
+ },
790
+ "run_id": {
791
+ "name": "run_id",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": true
795
+ },
796
+ "state": {
797
+ "name": "state",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": true,
801
+ "default": "'queued'"
802
+ },
803
+ "available_at": {
804
+ "name": "available_at",
805
+ "type": "timestamp with time zone",
806
+ "primaryKey": false,
807
+ "notNull": true,
808
+ "default": "now()"
809
+ },
810
+ "attempts": {
811
+ "name": "attempts",
812
+ "type": "integer",
813
+ "primaryKey": false,
814
+ "notNull": true,
815
+ "default": 0
816
+ },
817
+ "owner": {
818
+ "name": "owner",
819
+ "type": "text",
820
+ "primaryKey": false,
821
+ "notNull": false
822
+ },
823
+ "epoch": {
824
+ "name": "epoch",
825
+ "type": "bigserial",
826
+ "primaryKey": false,
827
+ "notNull": true
828
+ },
829
+ "lease_until": {
830
+ "name": "lease_until",
831
+ "type": "timestamp with time zone",
832
+ "primaryKey": false,
833
+ "notNull": false
834
+ },
835
+ "retry_of": {
836
+ "name": "retry_of",
837
+ "type": "text",
838
+ "primaryKey": false,
839
+ "notNull": false
840
+ },
841
+ "cleaned_at": {
842
+ "name": "cleaned_at",
843
+ "type": "timestamp with time zone",
844
+ "primaryKey": false,
845
+ "notNull": false
846
+ },
847
+ "verified_revision": {
848
+ "name": "verified_revision",
849
+ "type": "text",
850
+ "primaryKey": false,
851
+ "notNull": false
852
+ },
853
+ "infrastructure_failure": {
854
+ "name": "infrastructure_failure",
855
+ "type": "integer",
856
+ "primaryKey": false,
857
+ "notNull": true,
858
+ "default": 0
859
+ }
860
+ },
861
+ "indexes": {
862
+ "jobs_available": {
863
+ "name": "jobs_available",
864
+ "columns": [
865
+ {
866
+ "expression": "project_id",
867
+ "isExpression": false,
868
+ "asc": true,
869
+ "nulls": "last"
870
+ },
871
+ {
872
+ "expression": "state",
873
+ "isExpression": false,
874
+ "asc": true,
875
+ "nulls": "last"
876
+ },
877
+ {
878
+ "expression": "available_at",
879
+ "isExpression": false,
880
+ "asc": true,
881
+ "nulls": "last"
882
+ }
883
+ ],
884
+ "isUnique": false,
885
+ "concurrently": false,
886
+ "method": "btree",
887
+ "with": {}
888
+ },
889
+ "job_run": {
890
+ "name": "job_run",
891
+ "columns": [
892
+ {
893
+ "expression": "project_id",
894
+ "isExpression": false,
895
+ "asc": true,
896
+ "nulls": "last"
897
+ },
898
+ {
899
+ "expression": "run_id",
900
+ "isExpression": false,
901
+ "asc": true,
902
+ "nulls": "last"
903
+ }
904
+ ],
905
+ "isUnique": true,
906
+ "concurrently": false,
907
+ "method": "btree",
908
+ "with": {}
909
+ },
910
+ "job_retry": {
911
+ "name": "job_retry",
912
+ "columns": [
913
+ {
914
+ "expression": "project_id",
915
+ "isExpression": false,
916
+ "asc": true,
917
+ "nulls": "last"
918
+ },
919
+ {
920
+ "expression": "retry_of",
921
+ "isExpression": false,
922
+ "asc": true,
923
+ "nulls": "last"
924
+ }
925
+ ],
926
+ "isUnique": true,
927
+ "concurrently": false,
928
+ "method": "btree",
929
+ "with": {}
930
+ }
931
+ },
932
+ "foreignKeys": {
933
+ "jobs_project_id_run_id_runs_project_id_id_fk": {
934
+ "name": "jobs_project_id_run_id_runs_project_id_id_fk",
935
+ "tableFrom": "jobs",
936
+ "tableTo": "runs",
937
+ "schemaTo": "qa",
938
+ "columnsFrom": ["project_id", "run_id"],
939
+ "columnsTo": ["project_id", "id"],
940
+ "onDelete": "no action",
941
+ "onUpdate": "no action"
942
+ }
943
+ },
944
+ "compositePrimaryKeys": {
945
+ "jobs_project_id_id_pk": {
946
+ "name": "jobs_project_id_id_pk",
947
+ "columns": ["project_id", "id"]
948
+ }
949
+ },
950
+ "uniqueConstraints": {},
951
+ "policies": {},
952
+ "checkConstraints": {
953
+ "job_attempt": {
954
+ "name": "job_attempt",
955
+ "value": "\"qa\".\"jobs\".\"attempts\" IN (0,1)"
956
+ }
957
+ },
958
+ "isRLSEnabled": false
959
+ },
960
+ "qa.lanes": {
961
+ "name": "lanes",
962
+ "schema": "qa",
963
+ "columns": {
964
+ "project_id": {
965
+ "name": "project_id",
966
+ "type": "text",
967
+ "primaryKey": false,
968
+ "notNull": true
969
+ },
970
+ "run_id": {
971
+ "name": "run_id",
972
+ "type": "text",
973
+ "primaryKey": false,
974
+ "notNull": true
975
+ },
976
+ "actor": {
977
+ "name": "actor",
978
+ "type": "text",
979
+ "primaryKey": false,
980
+ "notNull": true
981
+ },
982
+ "status": {
983
+ "name": "status",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": true
987
+ },
988
+ "started_at": {
989
+ "name": "started_at",
990
+ "type": "double precision",
991
+ "primaryKey": false,
992
+ "notNull": true
993
+ },
994
+ "finished_at": {
995
+ "name": "finished_at",
996
+ "type": "double precision",
997
+ "primaryKey": false,
998
+ "notNull": false
999
+ }
1000
+ },
1001
+ "indexes": {},
1002
+ "foreignKeys": {
1003
+ "lanes_project_id_run_id_runs_project_id_id_fk": {
1004
+ "name": "lanes_project_id_run_id_runs_project_id_id_fk",
1005
+ "tableFrom": "lanes",
1006
+ "tableTo": "runs",
1007
+ "schemaTo": "qa",
1008
+ "columnsFrom": ["project_id", "run_id"],
1009
+ "columnsTo": ["project_id", "id"],
1010
+ "onDelete": "no action",
1011
+ "onUpdate": "no action"
1012
+ }
1013
+ },
1014
+ "compositePrimaryKeys": {
1015
+ "lanes_project_id_run_id_actor_pk": {
1016
+ "name": "lanes_project_id_run_id_actor_pk",
1017
+ "columns": ["project_id", "run_id", "actor"]
1018
+ }
1019
+ },
1020
+ "uniqueConstraints": {},
1021
+ "policies": {},
1022
+ "checkConstraints": {},
1023
+ "isRLSEnabled": false
1024
+ },
1025
+ "qa.lease_claims": {
1026
+ "name": "lease_claims",
1027
+ "schema": "qa",
1028
+ "columns": {
1029
+ "project_id": {
1030
+ "name": "project_id",
1031
+ "type": "text",
1032
+ "primaryKey": false,
1033
+ "notNull": true
1034
+ },
1035
+ "identity": {
1036
+ "name": "identity",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true
1040
+ },
1041
+ "lease_id": {
1042
+ "name": "lease_id",
1043
+ "type": "text",
1044
+ "primaryKey": false,
1045
+ "notNull": true
1046
+ }
1047
+ },
1048
+ "indexes": {},
1049
+ "foreignKeys": {
1050
+ "lease_claims_project_id_lease_id_leases_project_id_id_fk": {
1051
+ "name": "lease_claims_project_id_lease_id_leases_project_id_id_fk",
1052
+ "tableFrom": "lease_claims",
1053
+ "tableTo": "leases",
1054
+ "schemaTo": "qa",
1055
+ "columnsFrom": ["project_id", "lease_id"],
1056
+ "columnsTo": ["project_id", "id"],
1057
+ "onDelete": "no action",
1058
+ "onUpdate": "no action"
1059
+ }
1060
+ },
1061
+ "compositePrimaryKeys": {
1062
+ "lease_claims_project_id_identity_pk": {
1063
+ "name": "lease_claims_project_id_identity_pk",
1064
+ "columns": ["project_id", "identity"]
1065
+ }
1066
+ },
1067
+ "uniqueConstraints": {},
1068
+ "policies": {},
1069
+ "checkConstraints": {},
1070
+ "isRLSEnabled": false
1071
+ },
1072
+ "qa.lease_resources": {
1073
+ "name": "lease_resources",
1074
+ "schema": "qa",
1075
+ "columns": {
1076
+ "project_id": {
1077
+ "name": "project_id",
1078
+ "type": "text",
1079
+ "primaryKey": false,
1080
+ "notNull": true
1081
+ },
1082
+ "id": {
1083
+ "name": "id",
1084
+ "type": "text",
1085
+ "primaryKey": false,
1086
+ "notNull": true
1087
+ },
1088
+ "kind": {
1089
+ "name": "kind",
1090
+ "type": "text",
1091
+ "primaryKey": false,
1092
+ "notNull": true
1093
+ },
1094
+ "canonical_id": {
1095
+ "name": "canonical_id",
1096
+ "type": "text",
1097
+ "primaryKey": false,
1098
+ "notNull": true
1099
+ },
1100
+ "secret_ref": {
1101
+ "name": "secret_ref",
1102
+ "type": "text",
1103
+ "primaryKey": false,
1104
+ "notNull": true
1105
+ }
1106
+ },
1107
+ "indexes": {
1108
+ "resource_kinds": {
1109
+ "name": "resource_kinds",
1110
+ "columns": [
1111
+ {
1112
+ "expression": "project_id",
1113
+ "isExpression": false,
1114
+ "asc": true,
1115
+ "nulls": "last"
1116
+ },
1117
+ {
1118
+ "expression": "kind",
1119
+ "isExpression": false,
1120
+ "asc": true,
1121
+ "nulls": "last"
1122
+ }
1123
+ ],
1124
+ "isUnique": false,
1125
+ "concurrently": false,
1126
+ "method": "btree",
1127
+ "with": {}
1128
+ }
1129
+ },
1130
+ "foreignKeys": {},
1131
+ "compositePrimaryKeys": {
1132
+ "lease_resources_project_id_id_pk": {
1133
+ "name": "lease_resources_project_id_id_pk",
1134
+ "columns": ["project_id", "id"]
1135
+ }
1136
+ },
1137
+ "uniqueConstraints": {},
1138
+ "policies": {},
1139
+ "checkConstraints": {},
1140
+ "isRLSEnabled": false
1141
+ },
1142
+ "qa.leases": {
1143
+ "name": "leases",
1144
+ "schema": "qa",
1145
+ "columns": {
1146
+ "project_id": {
1147
+ "name": "project_id",
1148
+ "type": "text",
1149
+ "primaryKey": false,
1150
+ "notNull": true
1151
+ },
1152
+ "id": {
1153
+ "name": "id",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true
1157
+ },
1158
+ "run_id": {
1159
+ "name": "run_id",
1160
+ "type": "text",
1161
+ "primaryKey": false,
1162
+ "notNull": true
1163
+ },
1164
+ "actor": {
1165
+ "name": "actor",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": true
1169
+ },
1170
+ "owner": {
1171
+ "name": "owner",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": true
1175
+ },
1176
+ "epoch": {
1177
+ "name": "epoch",
1178
+ "type": "bigserial",
1179
+ "primaryKey": false,
1180
+ "notNull": true
1181
+ },
1182
+ "state": {
1183
+ "name": "state",
1184
+ "type": "text",
1185
+ "primaryKey": false,
1186
+ "notNull": true,
1187
+ "default": "'active'"
1188
+ },
1189
+ "expires_at": {
1190
+ "name": "expires_at",
1191
+ "type": "timestamp with time zone",
1192
+ "primaryKey": false,
1193
+ "notNull": true
1194
+ },
1195
+ "allocations": {
1196
+ "name": "allocations",
1197
+ "type": "jsonb",
1198
+ "primaryKey": false,
1199
+ "notNull": true
1200
+ }
1201
+ },
1202
+ "indexes": {},
1203
+ "foreignKeys": {},
1204
+ "compositePrimaryKeys": {
1205
+ "leases_project_id_id_pk": {
1206
+ "name": "leases_project_id_id_pk",
1207
+ "columns": ["project_id", "id"]
1208
+ }
1209
+ },
1210
+ "uniqueConstraints": {},
1211
+ "policies": {},
1212
+ "checkConstraints": {
1213
+ "lease_state": {
1214
+ "name": "lease_state",
1215
+ "value": "\"qa\".\"leases\".\"state\" IN ('active','quarantined','released')"
1216
+ }
1217
+ },
1218
+ "isRLSEnabled": false
1219
+ },
1220
+ "qa.quarantine_notifications": {
1221
+ "name": "quarantine_notifications",
1222
+ "schema": "qa",
1223
+ "columns": {
1224
+ "project_id": {
1225
+ "name": "project_id",
1226
+ "type": "text",
1227
+ "primaryKey": false,
1228
+ "notNull": true
1229
+ },
1230
+ "flow": {
1231
+ "name": "flow",
1232
+ "type": "text",
1233
+ "primaryKey": false,
1234
+ "notNull": true
1235
+ },
1236
+ "generation": {
1237
+ "name": "generation",
1238
+ "type": "integer",
1239
+ "primaryKey": false,
1240
+ "notNull": true
1241
+ },
1242
+ "run_id": {
1243
+ "name": "run_id",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": true
1247
+ },
1248
+ "owner": {
1249
+ "name": "owner",
1250
+ "type": "text",
1251
+ "primaryKey": false,
1252
+ "notNull": false
1253
+ },
1254
+ "completed_at": {
1255
+ "name": "completed_at",
1256
+ "type": "timestamp with time zone",
1257
+ "primaryKey": false,
1258
+ "notNull": false
1259
+ },
1260
+ "abandoned_at": {
1261
+ "name": "abandoned_at",
1262
+ "type": "timestamp with time zone",
1263
+ "primaryKey": false,
1264
+ "notNull": false
1265
+ },
1266
+ "attempts": {
1267
+ "name": "attempts",
1268
+ "type": "integer",
1269
+ "primaryKey": false,
1270
+ "notNull": true,
1271
+ "default": 0
1272
+ },
1273
+ "available_at": {
1274
+ "name": "available_at",
1275
+ "type": "timestamp with time zone",
1276
+ "primaryKey": false,
1277
+ "notNull": true,
1278
+ "default": "now()"
1279
+ }
1280
+ },
1281
+ "indexes": {},
1282
+ "foreignKeys": {},
1283
+ "compositePrimaryKeys": {
1284
+ "quarantine_notifications_project_id_flow_generation_pk": {
1285
+ "name": "quarantine_notifications_project_id_flow_generation_pk",
1286
+ "columns": ["project_id", "flow", "generation"]
1287
+ }
1288
+ },
1289
+ "uniqueConstraints": {},
1290
+ "policies": {},
1291
+ "checkConstraints": {
1292
+ "quarantine_notification_attempts": {
1293
+ "name": "quarantine_notification_attempts",
1294
+ "value": "\"qa\".\"quarantine_notifications\".\"attempts\" BETWEEN 0 AND 5"
1295
+ }
1296
+ },
1297
+ "isRLSEnabled": false
1298
+ },
1299
+ "qa.read_publications": {
1300
+ "name": "read_publications",
1301
+ "schema": "qa",
1302
+ "columns": {
1303
+ "project_id": {
1304
+ "name": "project_id",
1305
+ "type": "text",
1306
+ "primaryKey": false,
1307
+ "notNull": true
1308
+ },
1309
+ "kind": {
1310
+ "name": "kind",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true
1314
+ },
1315
+ "document": {
1316
+ "name": "document",
1317
+ "type": "jsonb",
1318
+ "primaryKey": false,
1319
+ "notNull": true
1320
+ }
1321
+ },
1322
+ "indexes": {},
1323
+ "foreignKeys": {},
1324
+ "compositePrimaryKeys": {
1325
+ "read_publications_project_id_kind_pk": {
1326
+ "name": "read_publications_project_id_kind_pk",
1327
+ "columns": ["project_id", "kind"]
1328
+ }
1329
+ },
1330
+ "uniqueConstraints": {},
1331
+ "policies": {},
1332
+ "checkConstraints": {},
1333
+ "isRLSEnabled": false
1334
+ },
1335
+ "qa.result_notification_flows": {
1336
+ "name": "result_notification_flows",
1337
+ "schema": "qa",
1338
+ "columns": {
1339
+ "project_id": {
1340
+ "name": "project_id",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": true
1344
+ },
1345
+ "batch_id": {
1346
+ "name": "batch_id",
1347
+ "type": "text",
1348
+ "primaryKey": false,
1349
+ "notNull": true
1350
+ },
1351
+ "channel": {
1352
+ "name": "channel",
1353
+ "type": "text",
1354
+ "primaryKey": false,
1355
+ "notNull": true,
1356
+ "default": "'pr'"
1357
+ },
1358
+ "flow": {
1359
+ "name": "flow",
1360
+ "type": "text",
1361
+ "primaryKey": false,
1362
+ "notNull": true
1363
+ },
1364
+ "outcome": {
1365
+ "name": "outcome",
1366
+ "type": "text",
1367
+ "primaryKey": false,
1368
+ "notNull": false
1369
+ },
1370
+ "completed_at": {
1371
+ "name": "completed_at",
1372
+ "type": "timestamp with time zone",
1373
+ "primaryKey": false,
1374
+ "notNull": false
1375
+ },
1376
+ "abandoned_at": {
1377
+ "name": "abandoned_at",
1378
+ "type": "timestamp with time zone",
1379
+ "primaryKey": false,
1380
+ "notNull": false
1381
+ },
1382
+ "attempts": {
1383
+ "name": "attempts",
1384
+ "type": "integer",
1385
+ "primaryKey": false,
1386
+ "notNull": true,
1387
+ "default": 0
1388
+ },
1389
+ "available_at": {
1390
+ "name": "available_at",
1391
+ "type": "timestamp with time zone",
1392
+ "primaryKey": false,
1393
+ "notNull": true,
1394
+ "default": "now()"
1395
+ }
1396
+ },
1397
+ "indexes": {
1398
+ "result_notification_flow_delivered": {
1399
+ "name": "result_notification_flow_delivered",
1400
+ "columns": [
1401
+ {
1402
+ "expression": "project_id",
1403
+ "isExpression": false,
1404
+ "asc": true,
1405
+ "nulls": "last"
1406
+ },
1407
+ {
1408
+ "expression": "flow",
1409
+ "isExpression": false,
1410
+ "asc": true,
1411
+ "nulls": "last"
1412
+ }
1413
+ ],
1414
+ "isUnique": false,
1415
+ "where": "\"qa\".\"result_notification_flows\".\"outcome\" = 'delivered'",
1416
+ "concurrently": false,
1417
+ "method": "btree",
1418
+ "with": {}
1419
+ }
1420
+ },
1421
+ "foreignKeys": {
1422
+ "result_notification_flows_project_id_batch_id_channel_result_notifications_project_id_batch_id_channel_fk": {
1423
+ "name": "result_notification_flows_project_id_batch_id_channel_result_notifications_project_id_batch_id_channel_fk",
1424
+ "tableFrom": "result_notification_flows",
1425
+ "tableTo": "result_notifications",
1426
+ "schemaTo": "qa",
1427
+ "columnsFrom": ["project_id", "batch_id", "channel"],
1428
+ "columnsTo": ["project_id", "batch_id", "channel"],
1429
+ "onDelete": "no action",
1430
+ "onUpdate": "no action"
1431
+ }
1432
+ },
1433
+ "compositePrimaryKeys": {
1434
+ "result_notification_flows_project_id_batch_id_flow_pk": {
1435
+ "name": "result_notification_flows_project_id_batch_id_flow_pk",
1436
+ "columns": ["project_id", "batch_id", "flow"]
1437
+ }
1438
+ },
1439
+ "uniqueConstraints": {},
1440
+ "policies": {},
1441
+ "checkConstraints": {
1442
+ "result_notification_flow_channel": {
1443
+ "name": "result_notification_flow_channel",
1444
+ "value": "\"qa\".\"result_notification_flows\".\"channel\" = 'pr'"
1445
+ },
1446
+ "result_notification_flow_attempts": {
1447
+ "name": "result_notification_flow_attempts",
1448
+ "value": "\"qa\".\"result_notification_flows\".\"attempts\" BETWEEN 0 AND 5"
1449
+ },
1450
+ "result_notification_flow_outcome": {
1451
+ "name": "result_notification_flow_outcome",
1452
+ "value": "\"qa\".\"result_notification_flows\".\"outcome\" IN ('delivered','superseded')"
1453
+ },
1454
+ "result_notification_flow_completion": {
1455
+ "name": "result_notification_flow_completion",
1456
+ "value": "(\"qa\".\"result_notification_flows\".\"outcome\" IS NULL) = (\"qa\".\"result_notification_flows\".\"completed_at\" IS NULL)"
1457
+ }
1458
+ },
1459
+ "isRLSEnabled": false
1460
+ },
1461
+ "qa.result_notifications": {
1462
+ "name": "result_notifications",
1463
+ "schema": "qa",
1464
+ "columns": {
1465
+ "project_id": {
1466
+ "name": "project_id",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": true
1470
+ },
1471
+ "batch_id": {
1472
+ "name": "batch_id",
1473
+ "type": "text",
1474
+ "primaryKey": false,
1475
+ "notNull": true
1476
+ },
1477
+ "channel": {
1478
+ "name": "channel",
1479
+ "type": "text",
1480
+ "primaryKey": false,
1481
+ "notNull": true
1482
+ },
1483
+ "context": {
1484
+ "name": "context",
1485
+ "type": "jsonb",
1486
+ "primaryKey": false,
1487
+ "notNull": true
1488
+ },
1489
+ "completed_at": {
1490
+ "name": "completed_at",
1491
+ "type": "timestamp with time zone",
1492
+ "primaryKey": false,
1493
+ "notNull": false
1494
+ },
1495
+ "abandoned_at": {
1496
+ "name": "abandoned_at",
1497
+ "type": "timestamp with time zone",
1498
+ "primaryKey": false,
1499
+ "notNull": false
1500
+ },
1501
+ "attempts": {
1502
+ "name": "attempts",
1503
+ "type": "integer",
1504
+ "primaryKey": false,
1505
+ "notNull": true,
1506
+ "default": 0
1507
+ },
1508
+ "available_at": {
1509
+ "name": "available_at",
1510
+ "type": "timestamp with time zone",
1511
+ "primaryKey": false,
1512
+ "notNull": true,
1513
+ "default": "now()"
1514
+ }
1515
+ },
1516
+ "indexes": {
1517
+ "result_notifications_pending": {
1518
+ "name": "result_notifications_pending",
1519
+ "columns": [
1520
+ {
1521
+ "expression": "available_at",
1522
+ "isExpression": false,
1523
+ "asc": true,
1524
+ "nulls": "last"
1525
+ }
1526
+ ],
1527
+ "isUnique": false,
1528
+ "where": "\"qa\".\"result_notifications\".\"completed_at\" IS NULL AND \"qa\".\"result_notifications\".\"abandoned_at\" IS NULL",
1529
+ "concurrently": false,
1530
+ "method": "btree",
1531
+ "with": {}
1532
+ }
1533
+ },
1534
+ "foreignKeys": {
1535
+ "result_notifications_project_id_batch_id_batches_project_id_id_fk": {
1536
+ "name": "result_notifications_project_id_batch_id_batches_project_id_id_fk",
1537
+ "tableFrom": "result_notifications",
1538
+ "tableTo": "batches",
1539
+ "schemaTo": "qa",
1540
+ "columnsFrom": ["project_id", "batch_id"],
1541
+ "columnsTo": ["project_id", "id"],
1542
+ "onDelete": "no action",
1543
+ "onUpdate": "no action"
1544
+ }
1545
+ },
1546
+ "compositePrimaryKeys": {
1547
+ "result_notifications_project_id_batch_id_channel_pk": {
1548
+ "name": "result_notifications_project_id_batch_id_channel_pk",
1549
+ "columns": ["project_id", "batch_id", "channel"]
1550
+ }
1551
+ },
1552
+ "uniqueConstraints": {},
1553
+ "policies": {},
1554
+ "checkConstraints": {
1555
+ "result_notification_channel": {
1556
+ "name": "result_notification_channel",
1557
+ "value": "\"qa\".\"result_notifications\".\"channel\" IN ('commit','pr','discord')"
1558
+ },
1559
+ "result_notification_attempts": {
1560
+ "name": "result_notification_attempts",
1561
+ "value": "\"qa\".\"result_notifications\".\"attempts\" BETWEEN 0 AND 5"
1562
+ }
1563
+ },
1564
+ "isRLSEnabled": false
1565
+ },
1566
+ "qa.runs": {
1567
+ "name": "runs",
1568
+ "schema": "qa",
1569
+ "columns": {
1570
+ "project_id": {
1571
+ "name": "project_id",
1572
+ "type": "text",
1573
+ "primaryKey": false,
1574
+ "notNull": true
1575
+ },
1576
+ "id": {
1577
+ "name": "id",
1578
+ "type": "text",
1579
+ "primaryKey": false,
1580
+ "notNull": true
1581
+ },
1582
+ "batch_id": {
1583
+ "name": "batch_id",
1584
+ "type": "text",
1585
+ "primaryKey": false,
1586
+ "notNull": false
1587
+ },
1588
+ "flow": {
1589
+ "name": "flow",
1590
+ "type": "text",
1591
+ "primaryKey": false,
1592
+ "notNull": true
1593
+ },
1594
+ "started_at": {
1595
+ "name": "started_at",
1596
+ "type": "double precision",
1597
+ "primaryKey": false,
1598
+ "notNull": true
1599
+ },
1600
+ "metadata": {
1601
+ "name": "metadata",
1602
+ "type": "jsonb",
1603
+ "primaryKey": false,
1604
+ "notNull": false
1605
+ },
1606
+ "phase": {
1607
+ "name": "phase",
1608
+ "type": "text",
1609
+ "primaryKey": false,
1610
+ "notNull": true,
1611
+ "default": "'queued'"
1612
+ },
1613
+ "verdict": {
1614
+ "name": "verdict",
1615
+ "type": "text",
1616
+ "primaryKey": false,
1617
+ "notNull": false
1618
+ },
1619
+ "finished_at": {
1620
+ "name": "finished_at",
1621
+ "type": "double precision",
1622
+ "primaryKey": false,
1623
+ "notNull": false
1624
+ },
1625
+ "reason": {
1626
+ "name": "reason",
1627
+ "type": "text",
1628
+ "primaryKey": false,
1629
+ "notNull": false
1630
+ },
1631
+ "event_count": {
1632
+ "name": "event_count",
1633
+ "type": "integer",
1634
+ "primaryKey": false,
1635
+ "notNull": true,
1636
+ "default": 0
1637
+ },
1638
+ "last_seq": {
1639
+ "name": "last_seq",
1640
+ "type": "bigint",
1641
+ "primaryKey": false,
1642
+ "notNull": true,
1643
+ "default": 0
1644
+ },
1645
+ "last_t": {
1646
+ "name": "last_t",
1647
+ "type": "double precision",
1648
+ "primaryKey": false,
1649
+ "notNull": true,
1650
+ "default": 0
1651
+ },
1652
+ "event_bytes": {
1653
+ "name": "event_bytes",
1654
+ "type": "bigint",
1655
+ "primaryKey": false,
1656
+ "notNull": true,
1657
+ "default": 0
1658
+ },
1659
+ "writer_lease_id": {
1660
+ "name": "writer_lease_id",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": false
1664
+ },
1665
+ "heartbeat_at": {
1666
+ "name": "heartbeat_at",
1667
+ "type": "timestamp with time zone",
1668
+ "primaryKey": false,
1669
+ "notNull": false
1670
+ },
1671
+ "usage": {
1672
+ "name": "usage",
1673
+ "type": "jsonb",
1674
+ "primaryKey": false,
1675
+ "notNull": false
1676
+ },
1677
+ "error_reason": {
1678
+ "name": "error_reason",
1679
+ "type": "text",
1680
+ "primaryKey": false,
1681
+ "notNull": false
1682
+ },
1683
+ "cost_usd": {
1684
+ "name": "cost_usd",
1685
+ "type": "double precision",
1686
+ "primaryKey": false,
1687
+ "notNull": true,
1688
+ "default": 0
1689
+ },
1690
+ "classification": {
1691
+ "name": "classification",
1692
+ "type": "text",
1693
+ "primaryKey": false,
1694
+ "notNull": false
1695
+ }
1696
+ },
1697
+ "indexes": {
1698
+ "runs_recent": {
1699
+ "name": "runs_recent",
1700
+ "columns": [
1701
+ {
1702
+ "expression": "project_id",
1703
+ "isExpression": false,
1704
+ "asc": true,
1705
+ "nulls": "last"
1706
+ },
1707
+ {
1708
+ "expression": "started_at",
1709
+ "isExpression": false,
1710
+ "asc": false,
1711
+ "nulls": "last"
1712
+ },
1713
+ {
1714
+ "expression": "\"id\" COLLATE \"C\"",
1715
+ "asc": true,
1716
+ "isExpression": true,
1717
+ "nulls": "last"
1718
+ }
1719
+ ],
1720
+ "isUnique": false,
1721
+ "concurrently": false,
1722
+ "method": "btree",
1723
+ "with": {}
1724
+ }
1725
+ },
1726
+ "foreignKeys": {
1727
+ "runs_project_id_batch_id_batches_project_id_id_fk": {
1728
+ "name": "runs_project_id_batch_id_batches_project_id_id_fk",
1729
+ "tableFrom": "runs",
1730
+ "tableTo": "batches",
1731
+ "schemaTo": "qa",
1732
+ "columnsFrom": ["project_id", "batch_id"],
1733
+ "columnsTo": ["project_id", "id"],
1734
+ "onDelete": "no action",
1735
+ "onUpdate": "no action"
1736
+ }
1737
+ },
1738
+ "compositePrimaryKeys": {
1739
+ "runs_project_id_id_pk": {
1740
+ "name": "runs_project_id_id_pk",
1741
+ "columns": ["project_id", "id"]
1742
+ }
1743
+ },
1744
+ "uniqueConstraints": {},
1745
+ "policies": {},
1746
+ "checkConstraints": {
1747
+ "run_cursor_nonnegative": {
1748
+ "name": "run_cursor_nonnegative",
1749
+ "value": "\"qa\".\"runs\".\"last_seq\" >= 0 AND \"qa\".\"runs\".\"last_t\" >= 0 AND \"qa\".\"runs\".\"event_count\" >= 0 AND \"qa\".\"runs\".\"event_bytes\" >= 0"
1750
+ }
1751
+ },
1752
+ "isRLSEnabled": false
1753
+ },
1754
+ "qa.server_submissions": {
1755
+ "name": "server_submissions",
1756
+ "schema": "qa",
1757
+ "columns": {
1758
+ "project_id": {
1759
+ "name": "project_id",
1760
+ "type": "text",
1761
+ "primaryKey": false,
1762
+ "notNull": true
1763
+ },
1764
+ "principal_id": {
1765
+ "name": "principal_id",
1766
+ "type": "text",
1767
+ "primaryKey": false,
1768
+ "notNull": true
1769
+ },
1770
+ "idempotency_key": {
1771
+ "name": "idempotency_key",
1772
+ "type": "text",
1773
+ "primaryKey": false,
1774
+ "notNull": true
1775
+ },
1776
+ "fingerprint": {
1777
+ "name": "fingerprint",
1778
+ "type": "text",
1779
+ "primaryKey": false,
1780
+ "notNull": true
1781
+ },
1782
+ "batch_id": {
1783
+ "name": "batch_id",
1784
+ "type": "text",
1785
+ "primaryKey": false,
1786
+ "notNull": true
1787
+ },
1788
+ "response": {
1789
+ "name": "response",
1790
+ "type": "jsonb",
1791
+ "primaryKey": false,
1792
+ "notNull": true
1793
+ },
1794
+ "created_at": {
1795
+ "name": "created_at",
1796
+ "type": "timestamp with time zone",
1797
+ "primaryKey": false,
1798
+ "notNull": true,
1799
+ "default": "now()"
1800
+ }
1801
+ },
1802
+ "indexes": {
1803
+ "submission_batch": {
1804
+ "name": "submission_batch",
1805
+ "columns": [
1806
+ {
1807
+ "expression": "project_id",
1808
+ "isExpression": false,
1809
+ "asc": true,
1810
+ "nulls": "last"
1811
+ },
1812
+ {
1813
+ "expression": "batch_id",
1814
+ "isExpression": false,
1815
+ "asc": true,
1816
+ "nulls": "last"
1817
+ }
1818
+ ],
1819
+ "isUnique": true,
1820
+ "concurrently": false,
1821
+ "method": "btree",
1822
+ "with": {}
1823
+ },
1824
+ "submission_created": {
1825
+ "name": "submission_created",
1826
+ "columns": [
1827
+ {
1828
+ "expression": "project_id",
1829
+ "isExpression": false,
1830
+ "asc": true,
1831
+ "nulls": "last"
1832
+ },
1833
+ {
1834
+ "expression": "created_at",
1835
+ "isExpression": false,
1836
+ "asc": false,
1837
+ "nulls": "last"
1838
+ },
1839
+ {
1840
+ "expression": "batch_id",
1841
+ "isExpression": false,
1842
+ "asc": true,
1843
+ "nulls": "last"
1844
+ }
1845
+ ],
1846
+ "isUnique": false,
1847
+ "concurrently": false,
1848
+ "method": "btree",
1849
+ "with": {}
1850
+ }
1851
+ },
1852
+ "foreignKeys": {
1853
+ "server_submissions_project_id_batch_id_batches_project_id_id_fk": {
1854
+ "name": "server_submissions_project_id_batch_id_batches_project_id_id_fk",
1855
+ "tableFrom": "server_submissions",
1856
+ "tableTo": "batches",
1857
+ "schemaTo": "qa",
1858
+ "columnsFrom": ["project_id", "batch_id"],
1859
+ "columnsTo": ["project_id", "id"],
1860
+ "onDelete": "no action",
1861
+ "onUpdate": "no action"
1862
+ }
1863
+ },
1864
+ "compositePrimaryKeys": {
1865
+ "server_submissions_project_id_principal_id_idempotency_key_pk": {
1866
+ "name": "server_submissions_project_id_principal_id_idempotency_key_pk",
1867
+ "columns": ["project_id", "principal_id", "idempotency_key"]
1868
+ }
1869
+ },
1870
+ "uniqueConstraints": {},
1871
+ "policies": {},
1872
+ "checkConstraints": {},
1873
+ "isRLSEnabled": false
1874
+ },
1875
+ "qa.step_runs": {
1876
+ "name": "step_runs",
1877
+ "schema": "qa",
1878
+ "columns": {
1879
+ "project_id": {
1880
+ "name": "project_id",
1881
+ "type": "text",
1882
+ "primaryKey": false,
1883
+ "notNull": true
1884
+ },
1885
+ "run_id": {
1886
+ "name": "run_id",
1887
+ "type": "text",
1888
+ "primaryKey": false,
1889
+ "notNull": true
1890
+ },
1891
+ "actor": {
1892
+ "name": "actor",
1893
+ "type": "text",
1894
+ "primaryKey": false,
1895
+ "notNull": true
1896
+ },
1897
+ "step": {
1898
+ "name": "step",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": true
1902
+ },
1903
+ "seq": {
1904
+ "name": "seq",
1905
+ "type": "bigint",
1906
+ "primaryKey": false,
1907
+ "notNull": true
1908
+ },
1909
+ "status": {
1910
+ "name": "status",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": true
1914
+ },
1915
+ "started_at": {
1916
+ "name": "started_at",
1917
+ "type": "double precision",
1918
+ "primaryKey": false,
1919
+ "notNull": true
1920
+ },
1921
+ "finished_at": {
1922
+ "name": "finished_at",
1923
+ "type": "double precision",
1924
+ "primaryKey": false,
1925
+ "notNull": false
1926
+ }
1927
+ },
1928
+ "indexes": {},
1929
+ "foreignKeys": {
1930
+ "step_runs_project_id_run_id_runs_project_id_id_fk": {
1931
+ "name": "step_runs_project_id_run_id_runs_project_id_id_fk",
1932
+ "tableFrom": "step_runs",
1933
+ "tableTo": "runs",
1934
+ "schemaTo": "qa",
1935
+ "columnsFrom": ["project_id", "run_id"],
1936
+ "columnsTo": ["project_id", "id"],
1937
+ "onDelete": "no action",
1938
+ "onUpdate": "no action"
1939
+ }
1940
+ },
1941
+ "compositePrimaryKeys": {
1942
+ "step_runs_project_id_run_id_seq_pk": {
1943
+ "name": "step_runs_project_id_run_id_seq_pk",
1944
+ "columns": ["project_id", "run_id", "seq"]
1945
+ }
1946
+ },
1947
+ "uniqueConstraints": {},
1948
+ "policies": {},
1949
+ "checkConstraints": {},
1950
+ "isRLSEnabled": false
1951
+ },
1952
+ "qa.worker_slots": {
1953
+ "name": "worker_slots",
1954
+ "schema": "qa",
1955
+ "columns": {
1956
+ "id": {
1957
+ "name": "id",
1958
+ "type": "integer",
1959
+ "primaryKey": true,
1960
+ "notNull": true
1961
+ },
1962
+ "project_id": {
1963
+ "name": "project_id",
1964
+ "type": "text",
1965
+ "primaryKey": false,
1966
+ "notNull": false
1967
+ },
1968
+ "job_id": {
1969
+ "name": "job_id",
1970
+ "type": "text",
1971
+ "primaryKey": false,
1972
+ "notNull": false
1973
+ }
1974
+ },
1975
+ "indexes": {
1976
+ "worker_slot_job": {
1977
+ "name": "worker_slot_job",
1978
+ "columns": [
1979
+ {
1980
+ "expression": "project_id",
1981
+ "isExpression": false,
1982
+ "asc": true,
1983
+ "nulls": "last"
1984
+ },
1985
+ {
1986
+ "expression": "job_id",
1987
+ "isExpression": false,
1988
+ "asc": true,
1989
+ "nulls": "last"
1990
+ }
1991
+ ],
1992
+ "isUnique": true,
1993
+ "concurrently": false,
1994
+ "method": "btree",
1995
+ "with": {}
1996
+ }
1997
+ },
1998
+ "foreignKeys": {},
1999
+ "compositePrimaryKeys": {},
2000
+ "uniqueConstraints": {},
2001
+ "policies": {},
2002
+ "checkConstraints": {
2003
+ "worker_slot_range": {
2004
+ "name": "worker_slot_range",
2005
+ "value": "\"qa\".\"worker_slots\".\"id\" BETWEEN 1 AND 8"
2006
+ },
2007
+ "worker_slot_pair": {
2008
+ "name": "worker_slot_pair",
2009
+ "value": "(\"qa\".\"worker_slots\".\"project_id\" IS NULL) = (\"qa\".\"worker_slots\".\"job_id\" IS NULL)"
2010
+ }
2011
+ },
2012
+ "isRLSEnabled": false
2013
+ }
2014
+ },
2015
+ "enums": {},
2016
+ "schemas": {
2017
+ "qa": "qa"
2018
+ },
2019
+ "sequences": {},
2020
+ "roles": {},
2021
+ "policies": {},
2022
+ "views": {},
2023
+ "_meta": {
2024
+ "columns": {},
2025
+ "schemas": {},
2026
+ "tables": {}
2027
+ }
2028
+ }