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