@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,2076 @@
1
+ {
2
+ "id": "ac73f552-679a-4b38-917e-78a7a3069e3f",
3
+ "prevId": "b8b24020-4a35-490c-b5aa-072cd949551d",
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 ('product-bug','test-case','env','flaky','agent')"
271
+ },
272
+ "classification_prediction_category": {
273
+ "name": "classification_prediction_category",
274
+ "value": "\"qa\".\"classification_labels\".\"predicted\"->>'category' IN ('product-bug','test-case','env','flaky','agent')"
275
+ }
276
+ },
277
+ "isRLSEnabled": false
278
+ },
279
+ "qa.credentials": {
280
+ "name": "credentials",
281
+ "schema": "qa",
282
+ "columns": {
283
+ "project_id": {
284
+ "name": "project_id",
285
+ "type": "text",
286
+ "primaryKey": false,
287
+ "notNull": true
288
+ },
289
+ "user_id": {
290
+ "name": "user_id",
291
+ "type": "text",
292
+ "primaryKey": false,
293
+ "notNull": true
294
+ },
295
+ "provider": {
296
+ "name": "provider",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": true
300
+ },
301
+ "secret_ref": {
302
+ "name": "secret_ref",
303
+ "type": "text",
304
+ "primaryKey": false,
305
+ "notNull": true
306
+ },
307
+ "expires_at": {
308
+ "name": "expires_at",
309
+ "type": "timestamp with time zone",
310
+ "primaryKey": false,
311
+ "notNull": false
312
+ }
313
+ },
314
+ "indexes": {},
315
+ "foreignKeys": {},
316
+ "compositePrimaryKeys": {
317
+ "credentials_project_id_user_id_provider_pk": {
318
+ "name": "credentials_project_id_user_id_provider_pk",
319
+ "columns": ["project_id", "user_id", "provider"]
320
+ }
321
+ },
322
+ "uniqueConstraints": {},
323
+ "policies": {},
324
+ "checkConstraints": {},
325
+ "isRLSEnabled": false
326
+ },
327
+ "qa.event_chunks": {
328
+ "name": "event_chunks",
329
+ "schema": "qa",
330
+ "columns": {
331
+ "project_id": {
332
+ "name": "project_id",
333
+ "type": "text",
334
+ "primaryKey": false,
335
+ "notNull": true
336
+ },
337
+ "run_id": {
338
+ "name": "run_id",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": true
342
+ },
343
+ "id": {
344
+ "name": "id",
345
+ "type": "text",
346
+ "primaryKey": false,
347
+ "notNull": true
348
+ },
349
+ "object_key": {
350
+ "name": "object_key",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": true
354
+ },
355
+ "sha256": {
356
+ "name": "sha256",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true
360
+ },
361
+ "count": {
362
+ "name": "count",
363
+ "type": "integer",
364
+ "primaryKey": false,
365
+ "notNull": true
366
+ },
367
+ "bytes": {
368
+ "name": "bytes",
369
+ "type": "integer",
370
+ "primaryKey": false,
371
+ "notNull": true
372
+ },
373
+ "first_seq": {
374
+ "name": "first_seq",
375
+ "type": "bigint",
376
+ "primaryKey": false,
377
+ "notNull": true
378
+ },
379
+ "last_seq": {
380
+ "name": "last_seq",
381
+ "type": "bigint",
382
+ "primaryKey": false,
383
+ "notNull": true
384
+ },
385
+ "first_t": {
386
+ "name": "first_t",
387
+ "type": "double precision",
388
+ "primaryKey": false,
389
+ "notNull": true
390
+ },
391
+ "last_t": {
392
+ "name": "last_t",
393
+ "type": "double precision",
394
+ "primaryKey": false,
395
+ "notNull": true
396
+ },
397
+ "state": {
398
+ "name": "state",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "default": "'uploading'"
403
+ },
404
+ "cleaned_at": {
405
+ "name": "cleaned_at",
406
+ "type": "timestamp with time zone",
407
+ "primaryKey": false,
408
+ "notNull": false
409
+ },
410
+ "created_at": {
411
+ "name": "created_at",
412
+ "type": "timestamp with time zone",
413
+ "primaryKey": false,
414
+ "notNull": true,
415
+ "default": "now()"
416
+ }
417
+ },
418
+ "indexes": {
419
+ "event_object_key": {
420
+ "name": "event_object_key",
421
+ "columns": [
422
+ {
423
+ "expression": "object_key",
424
+ "isExpression": false,
425
+ "asc": true,
426
+ "nulls": "last"
427
+ }
428
+ ],
429
+ "isUnique": true,
430
+ "concurrently": false,
431
+ "method": "btree",
432
+ "with": {}
433
+ }
434
+ },
435
+ "foreignKeys": {
436
+ "event_chunks_project_id_run_id_runs_project_id_id_fk": {
437
+ "name": "event_chunks_project_id_run_id_runs_project_id_id_fk",
438
+ "tableFrom": "event_chunks",
439
+ "tableTo": "runs",
440
+ "schemaTo": "qa",
441
+ "columnsFrom": ["project_id", "run_id"],
442
+ "columnsTo": ["project_id", "id"],
443
+ "onDelete": "no action",
444
+ "onUpdate": "no action"
445
+ }
446
+ },
447
+ "compositePrimaryKeys": {
448
+ "event_chunks_project_id_run_id_id_pk": {
449
+ "name": "event_chunks_project_id_run_id_id_pk",
450
+ "columns": ["project_id", "run_id", "id"]
451
+ }
452
+ },
453
+ "uniqueConstraints": {},
454
+ "policies": {},
455
+ "checkConstraints": {
456
+ "chunk_state": {
457
+ "name": "chunk_state",
458
+ "value": "\"qa\".\"event_chunks\".\"state\" IN ('uploading','committed','abandoned','cleaned')"
459
+ },
460
+ "chunk_range": {
461
+ "name": "chunk_range",
462
+ "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\""
463
+ }
464
+ },
465
+ "isRLSEnabled": false
466
+ },
467
+ "qa.events": {
468
+ "name": "events",
469
+ "schema": "qa",
470
+ "columns": {
471
+ "project_id": {
472
+ "name": "project_id",
473
+ "type": "text",
474
+ "primaryKey": false,
475
+ "notNull": true
476
+ },
477
+ "run_id": {
478
+ "name": "run_id",
479
+ "type": "text",
480
+ "primaryKey": false,
481
+ "notNull": true
482
+ },
483
+ "seq": {
484
+ "name": "seq",
485
+ "type": "bigint",
486
+ "primaryKey": false,
487
+ "notNull": true
488
+ },
489
+ "t": {
490
+ "name": "t",
491
+ "type": "double precision",
492
+ "primaryKey": false,
493
+ "notNull": true
494
+ },
495
+ "kind": {
496
+ "name": "kind",
497
+ "type": "text",
498
+ "primaryKey": false,
499
+ "notNull": true
500
+ },
501
+ "actor": {
502
+ "name": "actor",
503
+ "type": "text",
504
+ "primaryKey": false,
505
+ "notNull": false
506
+ },
507
+ "step": {
508
+ "name": "step",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": false
512
+ },
513
+ "chunk_id": {
514
+ "name": "chunk_id",
515
+ "type": "text",
516
+ "primaryKey": false,
517
+ "notNull": true
518
+ },
519
+ "offset": {
520
+ "name": "offset",
521
+ "type": "integer",
522
+ "primaryKey": false,
523
+ "notNull": true
524
+ }
525
+ },
526
+ "indexes": {},
527
+ "foreignKeys": {
528
+ "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk": {
529
+ "name": "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk",
530
+ "tableFrom": "events",
531
+ "tableTo": "event_chunks",
532
+ "schemaTo": "qa",
533
+ "columnsFrom": ["project_id", "run_id", "chunk_id"],
534
+ "columnsTo": ["project_id", "run_id", "id"],
535
+ "onDelete": "no action",
536
+ "onUpdate": "no action"
537
+ }
538
+ },
539
+ "compositePrimaryKeys": {
540
+ "events_project_id_run_id_seq_pk": {
541
+ "name": "events_project_id_run_id_seq_pk",
542
+ "columns": ["project_id", "run_id", "seq"]
543
+ }
544
+ },
545
+ "uniqueConstraints": {},
546
+ "policies": {},
547
+ "checkConstraints": {},
548
+ "isRLSEnabled": false
549
+ },
550
+ "qa.findings": {
551
+ "name": "findings",
552
+ "schema": "qa",
553
+ "columns": {
554
+ "project_id": {
555
+ "name": "project_id",
556
+ "type": "text",
557
+ "primaryKey": false,
558
+ "notNull": true
559
+ },
560
+ "run_id": {
561
+ "name": "run_id",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": true
565
+ },
566
+ "ordinal": {
567
+ "name": "ordinal",
568
+ "type": "integer",
569
+ "primaryKey": false,
570
+ "notNull": true
571
+ },
572
+ "actor": {
573
+ "name": "actor",
574
+ "type": "text",
575
+ "primaryKey": false,
576
+ "notNull": true
577
+ },
578
+ "step": {
579
+ "name": "step",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true
583
+ },
584
+ "category": {
585
+ "name": "category",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true
589
+ },
590
+ "severity": {
591
+ "name": "severity",
592
+ "type": "text",
593
+ "primaryKey": false,
594
+ "notNull": true
595
+ },
596
+ "description": {
597
+ "name": "description",
598
+ "type": "text",
599
+ "primaryKey": false,
600
+ "notNull": true
601
+ },
602
+ "event_seqs": {
603
+ "name": "event_seqs",
604
+ "type": "jsonb",
605
+ "primaryKey": false,
606
+ "notNull": true
607
+ },
608
+ "shots": {
609
+ "name": "shots",
610
+ "type": "jsonb",
611
+ "primaryKey": false,
612
+ "notNull": true
613
+ },
614
+ "created_at": {
615
+ "name": "created_at",
616
+ "type": "timestamp with time zone",
617
+ "primaryKey": false,
618
+ "notNull": true,
619
+ "default": "now()"
620
+ }
621
+ },
622
+ "indexes": {},
623
+ "foreignKeys": {
624
+ "findings_project_id_run_id_runs_project_id_id_fk": {
625
+ "name": "findings_project_id_run_id_runs_project_id_id_fk",
626
+ "tableFrom": "findings",
627
+ "tableTo": "runs",
628
+ "schemaTo": "qa",
629
+ "columnsFrom": ["project_id", "run_id"],
630
+ "columnsTo": ["project_id", "id"],
631
+ "onDelete": "no action",
632
+ "onUpdate": "no action"
633
+ }
634
+ },
635
+ "compositePrimaryKeys": {
636
+ "findings_project_id_run_id_ordinal_pk": {
637
+ "name": "findings_project_id_run_id_ordinal_pk",
638
+ "columns": ["project_id", "run_id", "ordinal"]
639
+ }
640
+ },
641
+ "uniqueConstraints": {},
642
+ "policies": {},
643
+ "checkConstraints": {
644
+ "finding_ordinal_positive": {
645
+ "name": "finding_ordinal_positive",
646
+ "value": "\"qa\".\"findings\".\"ordinal\" > 0"
647
+ },
648
+ "finding_severity": {
649
+ "name": "finding_severity",
650
+ "value": "\"qa\".\"findings\".\"severity\" IN ('low','medium','high')"
651
+ },
652
+ "finding_category": {
653
+ "name": "finding_category",
654
+ "value": "\"qa\".\"findings\".\"category\" IN ('scope','other')"
655
+ }
656
+ },
657
+ "isRLSEnabled": false
658
+ },
659
+ "qa.flow_results": {
660
+ "name": "flow_results",
661
+ "schema": "qa",
662
+ "columns": {
663
+ "project_id": {
664
+ "name": "project_id",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": true
668
+ },
669
+ "execution_id": {
670
+ "name": "execution_id",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": true
674
+ },
675
+ "flow": {
676
+ "name": "flow",
677
+ "type": "text",
678
+ "primaryKey": false,
679
+ "notNull": true
680
+ },
681
+ "quarantined": {
682
+ "name": "quarantined",
683
+ "type": "integer",
684
+ "primaryKey": false,
685
+ "notNull": true
686
+ }
687
+ },
688
+ "indexes": {},
689
+ "foreignKeys": {},
690
+ "compositePrimaryKeys": {
691
+ "flow_results_project_id_execution_id_pk": {
692
+ "name": "flow_results_project_id_execution_id_pk",
693
+ "columns": ["project_id", "execution_id"]
694
+ }
695
+ },
696
+ "uniqueConstraints": {},
697
+ "policies": {},
698
+ "checkConstraints": {
699
+ "flow_result_quarantined": {
700
+ "name": "flow_result_quarantined",
701
+ "value": "\"qa\".\"flow_results\".\"quarantined\" IN (0,1)"
702
+ }
703
+ },
704
+ "isRLSEnabled": false
705
+ },
706
+ "qa.flow_statuses": {
707
+ "name": "flow_statuses",
708
+ "schema": "qa",
709
+ "columns": {
710
+ "project_id": {
711
+ "name": "project_id",
712
+ "type": "text",
713
+ "primaryKey": false,
714
+ "notNull": true
715
+ },
716
+ "flow": {
717
+ "name": "flow",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true
721
+ },
722
+ "status": {
723
+ "name": "status",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "default": "'draft'"
728
+ },
729
+ "flaky_streak": {
730
+ "name": "flaky_streak",
731
+ "type": "integer",
732
+ "primaryKey": false,
733
+ "notNull": true,
734
+ "default": 0
735
+ },
736
+ "generation": {
737
+ "name": "generation",
738
+ "type": "integer",
739
+ "primaryKey": false,
740
+ "notNull": true,
741
+ "default": 0
742
+ },
743
+ "owner": {
744
+ "name": "owner",
745
+ "type": "text",
746
+ "primaryKey": false,
747
+ "notNull": false
748
+ },
749
+ "latest_repeat": {
750
+ "name": "latest_repeat",
751
+ "type": "jsonb",
752
+ "primaryKey": false,
753
+ "notNull": false
754
+ },
755
+ "first_run_id": {
756
+ "name": "first_run_id",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": false
760
+ },
761
+ "first_run_revision": {
762
+ "name": "first_run_revision",
763
+ "type": "text",
764
+ "primaryKey": false,
765
+ "notNull": false
766
+ },
767
+ "first_run_at": {
768
+ "name": "first_run_at",
769
+ "type": "timestamp with time zone",
770
+ "primaryKey": false,
771
+ "notNull": false
772
+ },
773
+ "accepted_at": {
774
+ "name": "accepted_at",
775
+ "type": "timestamp with time zone",
776
+ "primaryKey": false,
777
+ "notNull": false
778
+ },
779
+ "accepted_by": {
780
+ "name": "accepted_by",
781
+ "type": "text",
782
+ "primaryKey": false,
783
+ "notNull": false
784
+ },
785
+ "retired_at": {
786
+ "name": "retired_at",
787
+ "type": "timestamp with time zone",
788
+ "primaryKey": false,
789
+ "notNull": false
790
+ }
791
+ },
792
+ "indexes": {},
793
+ "foreignKeys": {},
794
+ "compositePrimaryKeys": {
795
+ "flow_statuses_project_id_flow_pk": {
796
+ "name": "flow_statuses_project_id_flow_pk",
797
+ "columns": ["project_id", "flow"]
798
+ }
799
+ },
800
+ "uniqueConstraints": {},
801
+ "policies": {},
802
+ "checkConstraints": {
803
+ "flow_status": {
804
+ "name": "flow_status",
805
+ "value": "\"qa\".\"flow_statuses\".\"status\" IN ('draft','review','active','quarantined','retired')"
806
+ },
807
+ "flow_streak": {
808
+ "name": "flow_streak",
809
+ "value": "\"qa\".\"flow_statuses\".\"flaky_streak\" >= 0 AND \"qa\".\"flow_statuses\".\"generation\" >= 0"
810
+ }
811
+ },
812
+ "isRLSEnabled": false
813
+ },
814
+ "qa.jobs": {
815
+ "name": "jobs",
816
+ "schema": "qa",
817
+ "columns": {
818
+ "project_id": {
819
+ "name": "project_id",
820
+ "type": "text",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "id": {
825
+ "name": "id",
826
+ "type": "text",
827
+ "primaryKey": false,
828
+ "notNull": true
829
+ },
830
+ "run_id": {
831
+ "name": "run_id",
832
+ "type": "text",
833
+ "primaryKey": false,
834
+ "notNull": true
835
+ },
836
+ "state": {
837
+ "name": "state",
838
+ "type": "text",
839
+ "primaryKey": false,
840
+ "notNull": true,
841
+ "default": "'queued'"
842
+ },
843
+ "available_at": {
844
+ "name": "available_at",
845
+ "type": "timestamp with time zone",
846
+ "primaryKey": false,
847
+ "notNull": true,
848
+ "default": "now()"
849
+ },
850
+ "attempts": {
851
+ "name": "attempts",
852
+ "type": "integer",
853
+ "primaryKey": false,
854
+ "notNull": true,
855
+ "default": 0
856
+ },
857
+ "owner": {
858
+ "name": "owner",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": false
862
+ },
863
+ "epoch": {
864
+ "name": "epoch",
865
+ "type": "bigserial",
866
+ "primaryKey": false,
867
+ "notNull": true
868
+ },
869
+ "lease_until": {
870
+ "name": "lease_until",
871
+ "type": "timestamp with time zone",
872
+ "primaryKey": false,
873
+ "notNull": false
874
+ },
875
+ "retry_of": {
876
+ "name": "retry_of",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": false
880
+ },
881
+ "cleaned_at": {
882
+ "name": "cleaned_at",
883
+ "type": "timestamp with time zone",
884
+ "primaryKey": false,
885
+ "notNull": false
886
+ },
887
+ "verified_revision": {
888
+ "name": "verified_revision",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": false
892
+ },
893
+ "infrastructure_failure": {
894
+ "name": "infrastructure_failure",
895
+ "type": "integer",
896
+ "primaryKey": false,
897
+ "notNull": true,
898
+ "default": 0
899
+ }
900
+ },
901
+ "indexes": {
902
+ "jobs_available": {
903
+ "name": "jobs_available",
904
+ "columns": [
905
+ {
906
+ "expression": "project_id",
907
+ "isExpression": false,
908
+ "asc": true,
909
+ "nulls": "last"
910
+ },
911
+ {
912
+ "expression": "state",
913
+ "isExpression": false,
914
+ "asc": true,
915
+ "nulls": "last"
916
+ },
917
+ {
918
+ "expression": "available_at",
919
+ "isExpression": false,
920
+ "asc": true,
921
+ "nulls": "last"
922
+ }
923
+ ],
924
+ "isUnique": false,
925
+ "concurrently": false,
926
+ "method": "btree",
927
+ "with": {}
928
+ },
929
+ "job_run": {
930
+ "name": "job_run",
931
+ "columns": [
932
+ {
933
+ "expression": "project_id",
934
+ "isExpression": false,
935
+ "asc": true,
936
+ "nulls": "last"
937
+ },
938
+ {
939
+ "expression": "run_id",
940
+ "isExpression": false,
941
+ "asc": true,
942
+ "nulls": "last"
943
+ }
944
+ ],
945
+ "isUnique": true,
946
+ "concurrently": false,
947
+ "method": "btree",
948
+ "with": {}
949
+ },
950
+ "job_retry": {
951
+ "name": "job_retry",
952
+ "columns": [
953
+ {
954
+ "expression": "project_id",
955
+ "isExpression": false,
956
+ "asc": true,
957
+ "nulls": "last"
958
+ },
959
+ {
960
+ "expression": "retry_of",
961
+ "isExpression": false,
962
+ "asc": true,
963
+ "nulls": "last"
964
+ }
965
+ ],
966
+ "isUnique": true,
967
+ "concurrently": false,
968
+ "method": "btree",
969
+ "with": {}
970
+ }
971
+ },
972
+ "foreignKeys": {
973
+ "jobs_project_id_run_id_runs_project_id_id_fk": {
974
+ "name": "jobs_project_id_run_id_runs_project_id_id_fk",
975
+ "tableFrom": "jobs",
976
+ "tableTo": "runs",
977
+ "schemaTo": "qa",
978
+ "columnsFrom": ["project_id", "run_id"],
979
+ "columnsTo": ["project_id", "id"],
980
+ "onDelete": "no action",
981
+ "onUpdate": "no action"
982
+ }
983
+ },
984
+ "compositePrimaryKeys": {
985
+ "jobs_project_id_id_pk": {
986
+ "name": "jobs_project_id_id_pk",
987
+ "columns": ["project_id", "id"]
988
+ }
989
+ },
990
+ "uniqueConstraints": {},
991
+ "policies": {},
992
+ "checkConstraints": {
993
+ "job_attempt": {
994
+ "name": "job_attempt",
995
+ "value": "\"qa\".\"jobs\".\"attempts\" IN (0,1)"
996
+ }
997
+ },
998
+ "isRLSEnabled": false
999
+ },
1000
+ "qa.lanes": {
1001
+ "name": "lanes",
1002
+ "schema": "qa",
1003
+ "columns": {
1004
+ "project_id": {
1005
+ "name": "project_id",
1006
+ "type": "text",
1007
+ "primaryKey": false,
1008
+ "notNull": true
1009
+ },
1010
+ "run_id": {
1011
+ "name": "run_id",
1012
+ "type": "text",
1013
+ "primaryKey": false,
1014
+ "notNull": true
1015
+ },
1016
+ "actor": {
1017
+ "name": "actor",
1018
+ "type": "text",
1019
+ "primaryKey": false,
1020
+ "notNull": true
1021
+ },
1022
+ "status": {
1023
+ "name": "status",
1024
+ "type": "text",
1025
+ "primaryKey": false,
1026
+ "notNull": true
1027
+ },
1028
+ "started_at": {
1029
+ "name": "started_at",
1030
+ "type": "double precision",
1031
+ "primaryKey": false,
1032
+ "notNull": true
1033
+ },
1034
+ "finished_at": {
1035
+ "name": "finished_at",
1036
+ "type": "double precision",
1037
+ "primaryKey": false,
1038
+ "notNull": false
1039
+ }
1040
+ },
1041
+ "indexes": {},
1042
+ "foreignKeys": {
1043
+ "lanes_project_id_run_id_runs_project_id_id_fk": {
1044
+ "name": "lanes_project_id_run_id_runs_project_id_id_fk",
1045
+ "tableFrom": "lanes",
1046
+ "tableTo": "runs",
1047
+ "schemaTo": "qa",
1048
+ "columnsFrom": ["project_id", "run_id"],
1049
+ "columnsTo": ["project_id", "id"],
1050
+ "onDelete": "no action",
1051
+ "onUpdate": "no action"
1052
+ }
1053
+ },
1054
+ "compositePrimaryKeys": {
1055
+ "lanes_project_id_run_id_actor_pk": {
1056
+ "name": "lanes_project_id_run_id_actor_pk",
1057
+ "columns": ["project_id", "run_id", "actor"]
1058
+ }
1059
+ },
1060
+ "uniqueConstraints": {},
1061
+ "policies": {},
1062
+ "checkConstraints": {},
1063
+ "isRLSEnabled": false
1064
+ },
1065
+ "qa.lease_claims": {
1066
+ "name": "lease_claims",
1067
+ "schema": "qa",
1068
+ "columns": {
1069
+ "project_id": {
1070
+ "name": "project_id",
1071
+ "type": "text",
1072
+ "primaryKey": false,
1073
+ "notNull": true
1074
+ },
1075
+ "identity": {
1076
+ "name": "identity",
1077
+ "type": "text",
1078
+ "primaryKey": false,
1079
+ "notNull": true
1080
+ },
1081
+ "lease_id": {
1082
+ "name": "lease_id",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": true
1086
+ }
1087
+ },
1088
+ "indexes": {},
1089
+ "foreignKeys": {
1090
+ "lease_claims_project_id_lease_id_leases_project_id_id_fk": {
1091
+ "name": "lease_claims_project_id_lease_id_leases_project_id_id_fk",
1092
+ "tableFrom": "lease_claims",
1093
+ "tableTo": "leases",
1094
+ "schemaTo": "qa",
1095
+ "columnsFrom": ["project_id", "lease_id"],
1096
+ "columnsTo": ["project_id", "id"],
1097
+ "onDelete": "no action",
1098
+ "onUpdate": "no action"
1099
+ }
1100
+ },
1101
+ "compositePrimaryKeys": {
1102
+ "lease_claims_project_id_identity_pk": {
1103
+ "name": "lease_claims_project_id_identity_pk",
1104
+ "columns": ["project_id", "identity"]
1105
+ }
1106
+ },
1107
+ "uniqueConstraints": {},
1108
+ "policies": {},
1109
+ "checkConstraints": {},
1110
+ "isRLSEnabled": false
1111
+ },
1112
+ "qa.lease_resources": {
1113
+ "name": "lease_resources",
1114
+ "schema": "qa",
1115
+ "columns": {
1116
+ "project_id": {
1117
+ "name": "project_id",
1118
+ "type": "text",
1119
+ "primaryKey": false,
1120
+ "notNull": true
1121
+ },
1122
+ "id": {
1123
+ "name": "id",
1124
+ "type": "text",
1125
+ "primaryKey": false,
1126
+ "notNull": true
1127
+ },
1128
+ "kind": {
1129
+ "name": "kind",
1130
+ "type": "text",
1131
+ "primaryKey": false,
1132
+ "notNull": true
1133
+ },
1134
+ "canonical_id": {
1135
+ "name": "canonical_id",
1136
+ "type": "text",
1137
+ "primaryKey": false,
1138
+ "notNull": true
1139
+ },
1140
+ "secret_ref": {
1141
+ "name": "secret_ref",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true
1145
+ }
1146
+ },
1147
+ "indexes": {
1148
+ "resource_kinds": {
1149
+ "name": "resource_kinds",
1150
+ "columns": [
1151
+ {
1152
+ "expression": "project_id",
1153
+ "isExpression": false,
1154
+ "asc": true,
1155
+ "nulls": "last"
1156
+ },
1157
+ {
1158
+ "expression": "kind",
1159
+ "isExpression": false,
1160
+ "asc": true,
1161
+ "nulls": "last"
1162
+ }
1163
+ ],
1164
+ "isUnique": false,
1165
+ "concurrently": false,
1166
+ "method": "btree",
1167
+ "with": {}
1168
+ }
1169
+ },
1170
+ "foreignKeys": {},
1171
+ "compositePrimaryKeys": {
1172
+ "lease_resources_project_id_id_pk": {
1173
+ "name": "lease_resources_project_id_id_pk",
1174
+ "columns": ["project_id", "id"]
1175
+ }
1176
+ },
1177
+ "uniqueConstraints": {},
1178
+ "policies": {},
1179
+ "checkConstraints": {},
1180
+ "isRLSEnabled": false
1181
+ },
1182
+ "qa.leases": {
1183
+ "name": "leases",
1184
+ "schema": "qa",
1185
+ "columns": {
1186
+ "project_id": {
1187
+ "name": "project_id",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": true
1191
+ },
1192
+ "id": {
1193
+ "name": "id",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": true
1197
+ },
1198
+ "run_id": {
1199
+ "name": "run_id",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": true
1203
+ },
1204
+ "actor": {
1205
+ "name": "actor",
1206
+ "type": "text",
1207
+ "primaryKey": false,
1208
+ "notNull": true
1209
+ },
1210
+ "owner": {
1211
+ "name": "owner",
1212
+ "type": "text",
1213
+ "primaryKey": false,
1214
+ "notNull": true
1215
+ },
1216
+ "epoch": {
1217
+ "name": "epoch",
1218
+ "type": "bigserial",
1219
+ "primaryKey": false,
1220
+ "notNull": true
1221
+ },
1222
+ "state": {
1223
+ "name": "state",
1224
+ "type": "text",
1225
+ "primaryKey": false,
1226
+ "notNull": true,
1227
+ "default": "'active'"
1228
+ },
1229
+ "expires_at": {
1230
+ "name": "expires_at",
1231
+ "type": "timestamp with time zone",
1232
+ "primaryKey": false,
1233
+ "notNull": true
1234
+ },
1235
+ "allocations": {
1236
+ "name": "allocations",
1237
+ "type": "jsonb",
1238
+ "primaryKey": false,
1239
+ "notNull": true
1240
+ }
1241
+ },
1242
+ "indexes": {},
1243
+ "foreignKeys": {},
1244
+ "compositePrimaryKeys": {
1245
+ "leases_project_id_id_pk": {
1246
+ "name": "leases_project_id_id_pk",
1247
+ "columns": ["project_id", "id"]
1248
+ }
1249
+ },
1250
+ "uniqueConstraints": {},
1251
+ "policies": {},
1252
+ "checkConstraints": {
1253
+ "lease_state": {
1254
+ "name": "lease_state",
1255
+ "value": "\"qa\".\"leases\".\"state\" IN ('active','quarantined','released')"
1256
+ }
1257
+ },
1258
+ "isRLSEnabled": false
1259
+ },
1260
+ "qa.quarantine_notifications": {
1261
+ "name": "quarantine_notifications",
1262
+ "schema": "qa",
1263
+ "columns": {
1264
+ "project_id": {
1265
+ "name": "project_id",
1266
+ "type": "text",
1267
+ "primaryKey": false,
1268
+ "notNull": true
1269
+ },
1270
+ "flow": {
1271
+ "name": "flow",
1272
+ "type": "text",
1273
+ "primaryKey": false,
1274
+ "notNull": true
1275
+ },
1276
+ "generation": {
1277
+ "name": "generation",
1278
+ "type": "integer",
1279
+ "primaryKey": false,
1280
+ "notNull": true
1281
+ },
1282
+ "run_id": {
1283
+ "name": "run_id",
1284
+ "type": "text",
1285
+ "primaryKey": false,
1286
+ "notNull": true
1287
+ },
1288
+ "owner": {
1289
+ "name": "owner",
1290
+ "type": "text",
1291
+ "primaryKey": false,
1292
+ "notNull": false
1293
+ },
1294
+ "completed_at": {
1295
+ "name": "completed_at",
1296
+ "type": "timestamp with time zone",
1297
+ "primaryKey": false,
1298
+ "notNull": false
1299
+ },
1300
+ "abandoned_at": {
1301
+ "name": "abandoned_at",
1302
+ "type": "timestamp with time zone",
1303
+ "primaryKey": false,
1304
+ "notNull": false
1305
+ },
1306
+ "attempts": {
1307
+ "name": "attempts",
1308
+ "type": "integer",
1309
+ "primaryKey": false,
1310
+ "notNull": true,
1311
+ "default": 0
1312
+ },
1313
+ "available_at": {
1314
+ "name": "available_at",
1315
+ "type": "timestamp with time zone",
1316
+ "primaryKey": false,
1317
+ "notNull": true,
1318
+ "default": "now()"
1319
+ }
1320
+ },
1321
+ "indexes": {},
1322
+ "foreignKeys": {},
1323
+ "compositePrimaryKeys": {
1324
+ "quarantine_notifications_project_id_flow_generation_pk": {
1325
+ "name": "quarantine_notifications_project_id_flow_generation_pk",
1326
+ "columns": ["project_id", "flow", "generation"]
1327
+ }
1328
+ },
1329
+ "uniqueConstraints": {},
1330
+ "policies": {},
1331
+ "checkConstraints": {
1332
+ "quarantine_notification_attempts": {
1333
+ "name": "quarantine_notification_attempts",
1334
+ "value": "\"qa\".\"quarantine_notifications\".\"attempts\" BETWEEN 0 AND 5"
1335
+ }
1336
+ },
1337
+ "isRLSEnabled": false
1338
+ },
1339
+ "qa.read_publications": {
1340
+ "name": "read_publications",
1341
+ "schema": "qa",
1342
+ "columns": {
1343
+ "project_id": {
1344
+ "name": "project_id",
1345
+ "type": "text",
1346
+ "primaryKey": false,
1347
+ "notNull": true
1348
+ },
1349
+ "kind": {
1350
+ "name": "kind",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": true
1354
+ },
1355
+ "document": {
1356
+ "name": "document",
1357
+ "type": "jsonb",
1358
+ "primaryKey": false,
1359
+ "notNull": true
1360
+ }
1361
+ },
1362
+ "indexes": {},
1363
+ "foreignKeys": {},
1364
+ "compositePrimaryKeys": {
1365
+ "read_publications_project_id_kind_pk": {
1366
+ "name": "read_publications_project_id_kind_pk",
1367
+ "columns": ["project_id", "kind"]
1368
+ }
1369
+ },
1370
+ "uniqueConstraints": {},
1371
+ "policies": {},
1372
+ "checkConstraints": {},
1373
+ "isRLSEnabled": false
1374
+ },
1375
+ "qa.result_notification_flows": {
1376
+ "name": "result_notification_flows",
1377
+ "schema": "qa",
1378
+ "columns": {
1379
+ "project_id": {
1380
+ "name": "project_id",
1381
+ "type": "text",
1382
+ "primaryKey": false,
1383
+ "notNull": true
1384
+ },
1385
+ "batch_id": {
1386
+ "name": "batch_id",
1387
+ "type": "text",
1388
+ "primaryKey": false,
1389
+ "notNull": true
1390
+ },
1391
+ "channel": {
1392
+ "name": "channel",
1393
+ "type": "text",
1394
+ "primaryKey": false,
1395
+ "notNull": true,
1396
+ "default": "'pr'"
1397
+ },
1398
+ "flow": {
1399
+ "name": "flow",
1400
+ "type": "text",
1401
+ "primaryKey": false,
1402
+ "notNull": true
1403
+ },
1404
+ "outcome": {
1405
+ "name": "outcome",
1406
+ "type": "text",
1407
+ "primaryKey": false,
1408
+ "notNull": false
1409
+ },
1410
+ "completed_at": {
1411
+ "name": "completed_at",
1412
+ "type": "timestamp with time zone",
1413
+ "primaryKey": false,
1414
+ "notNull": false
1415
+ },
1416
+ "abandoned_at": {
1417
+ "name": "abandoned_at",
1418
+ "type": "timestamp with time zone",
1419
+ "primaryKey": false,
1420
+ "notNull": false
1421
+ },
1422
+ "attempts": {
1423
+ "name": "attempts",
1424
+ "type": "integer",
1425
+ "primaryKey": false,
1426
+ "notNull": true,
1427
+ "default": 0
1428
+ },
1429
+ "available_at": {
1430
+ "name": "available_at",
1431
+ "type": "timestamp with time zone",
1432
+ "primaryKey": false,
1433
+ "notNull": true,
1434
+ "default": "now()"
1435
+ }
1436
+ },
1437
+ "indexes": {
1438
+ "result_notification_flow_delivered": {
1439
+ "name": "result_notification_flow_delivered",
1440
+ "columns": [
1441
+ {
1442
+ "expression": "project_id",
1443
+ "isExpression": false,
1444
+ "asc": true,
1445
+ "nulls": "last"
1446
+ },
1447
+ {
1448
+ "expression": "flow",
1449
+ "isExpression": false,
1450
+ "asc": true,
1451
+ "nulls": "last"
1452
+ }
1453
+ ],
1454
+ "isUnique": false,
1455
+ "where": "\"qa\".\"result_notification_flows\".\"outcome\" = 'delivered'",
1456
+ "concurrently": false,
1457
+ "method": "btree",
1458
+ "with": {}
1459
+ }
1460
+ },
1461
+ "foreignKeys": {
1462
+ "result_notification_flows_project_id_batch_id_channel_result_notifications_project_id_batch_id_channel_fk": {
1463
+ "name": "result_notification_flows_project_id_batch_id_channel_result_notifications_project_id_batch_id_channel_fk",
1464
+ "tableFrom": "result_notification_flows",
1465
+ "tableTo": "result_notifications",
1466
+ "schemaTo": "qa",
1467
+ "columnsFrom": ["project_id", "batch_id", "channel"],
1468
+ "columnsTo": ["project_id", "batch_id", "channel"],
1469
+ "onDelete": "no action",
1470
+ "onUpdate": "no action"
1471
+ }
1472
+ },
1473
+ "compositePrimaryKeys": {
1474
+ "result_notification_flows_project_id_batch_id_flow_pk": {
1475
+ "name": "result_notification_flows_project_id_batch_id_flow_pk",
1476
+ "columns": ["project_id", "batch_id", "flow"]
1477
+ }
1478
+ },
1479
+ "uniqueConstraints": {},
1480
+ "policies": {},
1481
+ "checkConstraints": {
1482
+ "result_notification_flow_channel": {
1483
+ "name": "result_notification_flow_channel",
1484
+ "value": "\"qa\".\"result_notification_flows\".\"channel\" = 'pr'"
1485
+ },
1486
+ "result_notification_flow_attempts": {
1487
+ "name": "result_notification_flow_attempts",
1488
+ "value": "\"qa\".\"result_notification_flows\".\"attempts\" BETWEEN 0 AND 5"
1489
+ },
1490
+ "result_notification_flow_outcome": {
1491
+ "name": "result_notification_flow_outcome",
1492
+ "value": "\"qa\".\"result_notification_flows\".\"outcome\" IN ('delivered','superseded')"
1493
+ },
1494
+ "result_notification_flow_completion": {
1495
+ "name": "result_notification_flow_completion",
1496
+ "value": "(\"qa\".\"result_notification_flows\".\"outcome\" IS NULL) = (\"qa\".\"result_notification_flows\".\"completed_at\" IS NULL)"
1497
+ }
1498
+ },
1499
+ "isRLSEnabled": false
1500
+ },
1501
+ "qa.result_notifications": {
1502
+ "name": "result_notifications",
1503
+ "schema": "qa",
1504
+ "columns": {
1505
+ "project_id": {
1506
+ "name": "project_id",
1507
+ "type": "text",
1508
+ "primaryKey": false,
1509
+ "notNull": true
1510
+ },
1511
+ "batch_id": {
1512
+ "name": "batch_id",
1513
+ "type": "text",
1514
+ "primaryKey": false,
1515
+ "notNull": true
1516
+ },
1517
+ "channel": {
1518
+ "name": "channel",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true
1522
+ },
1523
+ "context": {
1524
+ "name": "context",
1525
+ "type": "jsonb",
1526
+ "primaryKey": false,
1527
+ "notNull": true
1528
+ },
1529
+ "completed_at": {
1530
+ "name": "completed_at",
1531
+ "type": "timestamp with time zone",
1532
+ "primaryKey": false,
1533
+ "notNull": false
1534
+ },
1535
+ "abandoned_at": {
1536
+ "name": "abandoned_at",
1537
+ "type": "timestamp with time zone",
1538
+ "primaryKey": false,
1539
+ "notNull": false
1540
+ },
1541
+ "attempts": {
1542
+ "name": "attempts",
1543
+ "type": "integer",
1544
+ "primaryKey": false,
1545
+ "notNull": true,
1546
+ "default": 0
1547
+ },
1548
+ "available_at": {
1549
+ "name": "available_at",
1550
+ "type": "timestamp with time zone",
1551
+ "primaryKey": false,
1552
+ "notNull": true,
1553
+ "default": "now()"
1554
+ }
1555
+ },
1556
+ "indexes": {
1557
+ "result_notifications_pending": {
1558
+ "name": "result_notifications_pending",
1559
+ "columns": [
1560
+ {
1561
+ "expression": "available_at",
1562
+ "isExpression": false,
1563
+ "asc": true,
1564
+ "nulls": "last"
1565
+ }
1566
+ ],
1567
+ "isUnique": false,
1568
+ "where": "\"qa\".\"result_notifications\".\"completed_at\" IS NULL AND \"qa\".\"result_notifications\".\"abandoned_at\" IS NULL",
1569
+ "concurrently": false,
1570
+ "method": "btree",
1571
+ "with": {}
1572
+ }
1573
+ },
1574
+ "foreignKeys": {
1575
+ "result_notifications_project_id_batch_id_batches_project_id_id_fk": {
1576
+ "name": "result_notifications_project_id_batch_id_batches_project_id_id_fk",
1577
+ "tableFrom": "result_notifications",
1578
+ "tableTo": "batches",
1579
+ "schemaTo": "qa",
1580
+ "columnsFrom": ["project_id", "batch_id"],
1581
+ "columnsTo": ["project_id", "id"],
1582
+ "onDelete": "no action",
1583
+ "onUpdate": "no action"
1584
+ }
1585
+ },
1586
+ "compositePrimaryKeys": {
1587
+ "result_notifications_project_id_batch_id_channel_pk": {
1588
+ "name": "result_notifications_project_id_batch_id_channel_pk",
1589
+ "columns": ["project_id", "batch_id", "channel"]
1590
+ }
1591
+ },
1592
+ "uniqueConstraints": {},
1593
+ "policies": {},
1594
+ "checkConstraints": {
1595
+ "result_notification_channel": {
1596
+ "name": "result_notification_channel",
1597
+ "value": "\"qa\".\"result_notifications\".\"channel\" IN ('commit','pr','discord')"
1598
+ },
1599
+ "result_notification_attempts": {
1600
+ "name": "result_notification_attempts",
1601
+ "value": "\"qa\".\"result_notifications\".\"attempts\" BETWEEN 0 AND 5"
1602
+ }
1603
+ },
1604
+ "isRLSEnabled": false
1605
+ },
1606
+ "qa.runs": {
1607
+ "name": "runs",
1608
+ "schema": "qa",
1609
+ "columns": {
1610
+ "project_id": {
1611
+ "name": "project_id",
1612
+ "type": "text",
1613
+ "primaryKey": false,
1614
+ "notNull": true
1615
+ },
1616
+ "id": {
1617
+ "name": "id",
1618
+ "type": "text",
1619
+ "primaryKey": false,
1620
+ "notNull": true
1621
+ },
1622
+ "batch_id": {
1623
+ "name": "batch_id",
1624
+ "type": "text",
1625
+ "primaryKey": false,
1626
+ "notNull": false
1627
+ },
1628
+ "flow": {
1629
+ "name": "flow",
1630
+ "type": "text",
1631
+ "primaryKey": false,
1632
+ "notNull": true
1633
+ },
1634
+ "started_at": {
1635
+ "name": "started_at",
1636
+ "type": "double precision",
1637
+ "primaryKey": false,
1638
+ "notNull": true
1639
+ },
1640
+ "metadata": {
1641
+ "name": "metadata",
1642
+ "type": "jsonb",
1643
+ "primaryKey": false,
1644
+ "notNull": false
1645
+ },
1646
+ "phase": {
1647
+ "name": "phase",
1648
+ "type": "text",
1649
+ "primaryKey": false,
1650
+ "notNull": true,
1651
+ "default": "'queued'"
1652
+ },
1653
+ "verdict": {
1654
+ "name": "verdict",
1655
+ "type": "text",
1656
+ "primaryKey": false,
1657
+ "notNull": false
1658
+ },
1659
+ "finished_at": {
1660
+ "name": "finished_at",
1661
+ "type": "double precision",
1662
+ "primaryKey": false,
1663
+ "notNull": false
1664
+ },
1665
+ "reason": {
1666
+ "name": "reason",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": false
1670
+ },
1671
+ "event_count": {
1672
+ "name": "event_count",
1673
+ "type": "integer",
1674
+ "primaryKey": false,
1675
+ "notNull": true,
1676
+ "default": 0
1677
+ },
1678
+ "last_seq": {
1679
+ "name": "last_seq",
1680
+ "type": "bigint",
1681
+ "primaryKey": false,
1682
+ "notNull": true,
1683
+ "default": 0
1684
+ },
1685
+ "last_t": {
1686
+ "name": "last_t",
1687
+ "type": "double precision",
1688
+ "primaryKey": false,
1689
+ "notNull": true,
1690
+ "default": 0
1691
+ },
1692
+ "event_bytes": {
1693
+ "name": "event_bytes",
1694
+ "type": "bigint",
1695
+ "primaryKey": false,
1696
+ "notNull": true,
1697
+ "default": 0
1698
+ },
1699
+ "writer_lease_id": {
1700
+ "name": "writer_lease_id",
1701
+ "type": "text",
1702
+ "primaryKey": false,
1703
+ "notNull": false
1704
+ },
1705
+ "heartbeat_at": {
1706
+ "name": "heartbeat_at",
1707
+ "type": "timestamp with time zone",
1708
+ "primaryKey": false,
1709
+ "notNull": false
1710
+ },
1711
+ "usage": {
1712
+ "name": "usage",
1713
+ "type": "jsonb",
1714
+ "primaryKey": false,
1715
+ "notNull": false
1716
+ },
1717
+ "error_reason": {
1718
+ "name": "error_reason",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": false
1722
+ },
1723
+ "cost_usd": {
1724
+ "name": "cost_usd",
1725
+ "type": "double precision",
1726
+ "primaryKey": false,
1727
+ "notNull": true,
1728
+ "default": 0
1729
+ },
1730
+ "classification": {
1731
+ "name": "classification",
1732
+ "type": "text",
1733
+ "primaryKey": false,
1734
+ "notNull": false
1735
+ }
1736
+ },
1737
+ "indexes": {
1738
+ "runs_recent": {
1739
+ "name": "runs_recent",
1740
+ "columns": [
1741
+ {
1742
+ "expression": "project_id",
1743
+ "isExpression": false,
1744
+ "asc": true,
1745
+ "nulls": "last"
1746
+ },
1747
+ {
1748
+ "expression": "started_at",
1749
+ "isExpression": false,
1750
+ "asc": false,
1751
+ "nulls": "last"
1752
+ },
1753
+ {
1754
+ "expression": "\"id\" COLLATE \"C\"",
1755
+ "asc": true,
1756
+ "isExpression": true,
1757
+ "nulls": "last"
1758
+ }
1759
+ ],
1760
+ "isUnique": false,
1761
+ "concurrently": false,
1762
+ "method": "btree",
1763
+ "with": {}
1764
+ }
1765
+ },
1766
+ "foreignKeys": {
1767
+ "runs_project_id_batch_id_batches_project_id_id_fk": {
1768
+ "name": "runs_project_id_batch_id_batches_project_id_id_fk",
1769
+ "tableFrom": "runs",
1770
+ "tableTo": "batches",
1771
+ "schemaTo": "qa",
1772
+ "columnsFrom": ["project_id", "batch_id"],
1773
+ "columnsTo": ["project_id", "id"],
1774
+ "onDelete": "no action",
1775
+ "onUpdate": "no action"
1776
+ }
1777
+ },
1778
+ "compositePrimaryKeys": {
1779
+ "runs_project_id_id_pk": {
1780
+ "name": "runs_project_id_id_pk",
1781
+ "columns": ["project_id", "id"]
1782
+ }
1783
+ },
1784
+ "uniqueConstraints": {},
1785
+ "policies": {},
1786
+ "checkConstraints": {
1787
+ "run_classification": {
1788
+ "name": "run_classification",
1789
+ "value": "\"qa\".\"runs\".\"classification\" IN ('product-bug','test-case','env','flaky','agent')"
1790
+ },
1791
+ "run_classification_metadata": {
1792
+ "name": "run_classification_metadata",
1793
+ "value": "\"qa\".\"runs\".\"metadata\"->'failureClassification'->>'category' IN ('product-bug','test-case','env','flaky','agent')"
1794
+ },
1795
+ "run_cursor_nonnegative": {
1796
+ "name": "run_cursor_nonnegative",
1797
+ "value": "\"qa\".\"runs\".\"last_seq\" >= 0 AND \"qa\".\"runs\".\"last_t\" >= 0 AND \"qa\".\"runs\".\"event_count\" >= 0 AND \"qa\".\"runs\".\"event_bytes\" >= 0"
1798
+ }
1799
+ },
1800
+ "isRLSEnabled": false
1801
+ },
1802
+ "qa.server_submissions": {
1803
+ "name": "server_submissions",
1804
+ "schema": "qa",
1805
+ "columns": {
1806
+ "project_id": {
1807
+ "name": "project_id",
1808
+ "type": "text",
1809
+ "primaryKey": false,
1810
+ "notNull": true
1811
+ },
1812
+ "principal_id": {
1813
+ "name": "principal_id",
1814
+ "type": "text",
1815
+ "primaryKey": false,
1816
+ "notNull": true
1817
+ },
1818
+ "idempotency_key": {
1819
+ "name": "idempotency_key",
1820
+ "type": "text",
1821
+ "primaryKey": false,
1822
+ "notNull": true
1823
+ },
1824
+ "fingerprint": {
1825
+ "name": "fingerprint",
1826
+ "type": "text",
1827
+ "primaryKey": false,
1828
+ "notNull": true
1829
+ },
1830
+ "batch_id": {
1831
+ "name": "batch_id",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": true
1835
+ },
1836
+ "response": {
1837
+ "name": "response",
1838
+ "type": "jsonb",
1839
+ "primaryKey": false,
1840
+ "notNull": true
1841
+ },
1842
+ "created_at": {
1843
+ "name": "created_at",
1844
+ "type": "timestamp with time zone",
1845
+ "primaryKey": false,
1846
+ "notNull": true,
1847
+ "default": "now()"
1848
+ }
1849
+ },
1850
+ "indexes": {
1851
+ "submission_batch": {
1852
+ "name": "submission_batch",
1853
+ "columns": [
1854
+ {
1855
+ "expression": "project_id",
1856
+ "isExpression": false,
1857
+ "asc": true,
1858
+ "nulls": "last"
1859
+ },
1860
+ {
1861
+ "expression": "batch_id",
1862
+ "isExpression": false,
1863
+ "asc": true,
1864
+ "nulls": "last"
1865
+ }
1866
+ ],
1867
+ "isUnique": true,
1868
+ "concurrently": false,
1869
+ "method": "btree",
1870
+ "with": {}
1871
+ },
1872
+ "submission_created": {
1873
+ "name": "submission_created",
1874
+ "columns": [
1875
+ {
1876
+ "expression": "project_id",
1877
+ "isExpression": false,
1878
+ "asc": true,
1879
+ "nulls": "last"
1880
+ },
1881
+ {
1882
+ "expression": "created_at",
1883
+ "isExpression": false,
1884
+ "asc": false,
1885
+ "nulls": "last"
1886
+ },
1887
+ {
1888
+ "expression": "batch_id",
1889
+ "isExpression": false,
1890
+ "asc": true,
1891
+ "nulls": "last"
1892
+ }
1893
+ ],
1894
+ "isUnique": false,
1895
+ "concurrently": false,
1896
+ "method": "btree",
1897
+ "with": {}
1898
+ }
1899
+ },
1900
+ "foreignKeys": {
1901
+ "server_submissions_project_id_batch_id_batches_project_id_id_fk": {
1902
+ "name": "server_submissions_project_id_batch_id_batches_project_id_id_fk",
1903
+ "tableFrom": "server_submissions",
1904
+ "tableTo": "batches",
1905
+ "schemaTo": "qa",
1906
+ "columnsFrom": ["project_id", "batch_id"],
1907
+ "columnsTo": ["project_id", "id"],
1908
+ "onDelete": "no action",
1909
+ "onUpdate": "no action"
1910
+ }
1911
+ },
1912
+ "compositePrimaryKeys": {
1913
+ "server_submissions_project_id_principal_id_idempotency_key_pk": {
1914
+ "name": "server_submissions_project_id_principal_id_idempotency_key_pk",
1915
+ "columns": ["project_id", "principal_id", "idempotency_key"]
1916
+ }
1917
+ },
1918
+ "uniqueConstraints": {},
1919
+ "policies": {},
1920
+ "checkConstraints": {},
1921
+ "isRLSEnabled": false
1922
+ },
1923
+ "qa.step_runs": {
1924
+ "name": "step_runs",
1925
+ "schema": "qa",
1926
+ "columns": {
1927
+ "project_id": {
1928
+ "name": "project_id",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": true
1932
+ },
1933
+ "run_id": {
1934
+ "name": "run_id",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": true
1938
+ },
1939
+ "actor": {
1940
+ "name": "actor",
1941
+ "type": "text",
1942
+ "primaryKey": false,
1943
+ "notNull": true
1944
+ },
1945
+ "step": {
1946
+ "name": "step",
1947
+ "type": "text",
1948
+ "primaryKey": false,
1949
+ "notNull": true
1950
+ },
1951
+ "seq": {
1952
+ "name": "seq",
1953
+ "type": "bigint",
1954
+ "primaryKey": false,
1955
+ "notNull": true
1956
+ },
1957
+ "status": {
1958
+ "name": "status",
1959
+ "type": "text",
1960
+ "primaryKey": false,
1961
+ "notNull": true
1962
+ },
1963
+ "started_at": {
1964
+ "name": "started_at",
1965
+ "type": "double precision",
1966
+ "primaryKey": false,
1967
+ "notNull": true
1968
+ },
1969
+ "finished_at": {
1970
+ "name": "finished_at",
1971
+ "type": "double precision",
1972
+ "primaryKey": false,
1973
+ "notNull": false
1974
+ }
1975
+ },
1976
+ "indexes": {},
1977
+ "foreignKeys": {
1978
+ "step_runs_project_id_run_id_runs_project_id_id_fk": {
1979
+ "name": "step_runs_project_id_run_id_runs_project_id_id_fk",
1980
+ "tableFrom": "step_runs",
1981
+ "tableTo": "runs",
1982
+ "schemaTo": "qa",
1983
+ "columnsFrom": ["project_id", "run_id"],
1984
+ "columnsTo": ["project_id", "id"],
1985
+ "onDelete": "no action",
1986
+ "onUpdate": "no action"
1987
+ }
1988
+ },
1989
+ "compositePrimaryKeys": {
1990
+ "step_runs_project_id_run_id_seq_pk": {
1991
+ "name": "step_runs_project_id_run_id_seq_pk",
1992
+ "columns": ["project_id", "run_id", "seq"]
1993
+ }
1994
+ },
1995
+ "uniqueConstraints": {},
1996
+ "policies": {},
1997
+ "checkConstraints": {},
1998
+ "isRLSEnabled": false
1999
+ },
2000
+ "qa.worker_slots": {
2001
+ "name": "worker_slots",
2002
+ "schema": "qa",
2003
+ "columns": {
2004
+ "id": {
2005
+ "name": "id",
2006
+ "type": "integer",
2007
+ "primaryKey": true,
2008
+ "notNull": true
2009
+ },
2010
+ "project_id": {
2011
+ "name": "project_id",
2012
+ "type": "text",
2013
+ "primaryKey": false,
2014
+ "notNull": false
2015
+ },
2016
+ "job_id": {
2017
+ "name": "job_id",
2018
+ "type": "text",
2019
+ "primaryKey": false,
2020
+ "notNull": false
2021
+ }
2022
+ },
2023
+ "indexes": {
2024
+ "worker_slot_job": {
2025
+ "name": "worker_slot_job",
2026
+ "columns": [
2027
+ {
2028
+ "expression": "project_id",
2029
+ "isExpression": false,
2030
+ "asc": true,
2031
+ "nulls": "last"
2032
+ },
2033
+ {
2034
+ "expression": "job_id",
2035
+ "isExpression": false,
2036
+ "asc": true,
2037
+ "nulls": "last"
2038
+ }
2039
+ ],
2040
+ "isUnique": true,
2041
+ "concurrently": false,
2042
+ "method": "btree",
2043
+ "with": {}
2044
+ }
2045
+ },
2046
+ "foreignKeys": {},
2047
+ "compositePrimaryKeys": {},
2048
+ "uniqueConstraints": {},
2049
+ "policies": {},
2050
+ "checkConstraints": {
2051
+ "worker_slot_range": {
2052
+ "name": "worker_slot_range",
2053
+ "value": "\"qa\".\"worker_slots\".\"id\" BETWEEN 1 AND 8"
2054
+ },
2055
+ "worker_slot_pair": {
2056
+ "name": "worker_slot_pair",
2057
+ "value": "(\"qa\".\"worker_slots\".\"project_id\" IS NULL) = (\"qa\".\"worker_slots\".\"job_id\" IS NULL)"
2058
+ }
2059
+ },
2060
+ "isRLSEnabled": false
2061
+ }
2062
+ },
2063
+ "enums": {},
2064
+ "schemas": {
2065
+ "qa": "qa"
2066
+ },
2067
+ "sequences": {},
2068
+ "roles": {},
2069
+ "policies": {},
2070
+ "views": {},
2071
+ "_meta": {
2072
+ "columns": {},
2073
+ "schemas": {},
2074
+ "tables": {}
2075
+ }
2076
+ }