@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,1002 @@
1
+ {
2
+ "id": "7f5eadb4-c512-49d0-a877-16dcb061ca01",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
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.credentials": {
140
+ "name": "credentials",
141
+ "schema": "qa",
142
+ "columns": {
143
+ "project_id": {
144
+ "name": "project_id",
145
+ "type": "text",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "user_id": {
150
+ "name": "user_id",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": true
154
+ },
155
+ "provider": {
156
+ "name": "provider",
157
+ "type": "text",
158
+ "primaryKey": false,
159
+ "notNull": true
160
+ },
161
+ "secret_ref": {
162
+ "name": "secret_ref",
163
+ "type": "text",
164
+ "primaryKey": false,
165
+ "notNull": true
166
+ }
167
+ },
168
+ "indexes": {},
169
+ "foreignKeys": {},
170
+ "compositePrimaryKeys": {
171
+ "credentials_project_id_user_id_provider_pk": {
172
+ "name": "credentials_project_id_user_id_provider_pk",
173
+ "columns": ["project_id", "user_id", "provider"]
174
+ }
175
+ },
176
+ "uniqueConstraints": {},
177
+ "policies": {},
178
+ "checkConstraints": {},
179
+ "isRLSEnabled": false
180
+ },
181
+ "qa.event_chunks": {
182
+ "name": "event_chunks",
183
+ "schema": "qa",
184
+ "columns": {
185
+ "project_id": {
186
+ "name": "project_id",
187
+ "type": "text",
188
+ "primaryKey": false,
189
+ "notNull": true
190
+ },
191
+ "run_id": {
192
+ "name": "run_id",
193
+ "type": "text",
194
+ "primaryKey": false,
195
+ "notNull": true
196
+ },
197
+ "id": {
198
+ "name": "id",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": true
202
+ },
203
+ "object_key": {
204
+ "name": "object_key",
205
+ "type": "text",
206
+ "primaryKey": false,
207
+ "notNull": true
208
+ },
209
+ "sha256": {
210
+ "name": "sha256",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": true
214
+ },
215
+ "count": {
216
+ "name": "count",
217
+ "type": "integer",
218
+ "primaryKey": false,
219
+ "notNull": true
220
+ },
221
+ "bytes": {
222
+ "name": "bytes",
223
+ "type": "integer",
224
+ "primaryKey": false,
225
+ "notNull": true
226
+ },
227
+ "first_seq": {
228
+ "name": "first_seq",
229
+ "type": "bigint",
230
+ "primaryKey": false,
231
+ "notNull": true
232
+ },
233
+ "last_seq": {
234
+ "name": "last_seq",
235
+ "type": "bigint",
236
+ "primaryKey": false,
237
+ "notNull": true
238
+ },
239
+ "first_t": {
240
+ "name": "first_t",
241
+ "type": "double precision",
242
+ "primaryKey": false,
243
+ "notNull": true
244
+ },
245
+ "last_t": {
246
+ "name": "last_t",
247
+ "type": "double precision",
248
+ "primaryKey": false,
249
+ "notNull": true
250
+ },
251
+ "state": {
252
+ "name": "state",
253
+ "type": "text",
254
+ "primaryKey": false,
255
+ "notNull": true,
256
+ "default": "'uploading'"
257
+ },
258
+ "created_at": {
259
+ "name": "created_at",
260
+ "type": "timestamp with time zone",
261
+ "primaryKey": false,
262
+ "notNull": true,
263
+ "default": "now()"
264
+ }
265
+ },
266
+ "indexes": {
267
+ "event_object_key": {
268
+ "name": "event_object_key",
269
+ "columns": [
270
+ {
271
+ "expression": "object_key",
272
+ "isExpression": false,
273
+ "asc": true,
274
+ "nulls": "last"
275
+ }
276
+ ],
277
+ "isUnique": true,
278
+ "concurrently": false,
279
+ "method": "btree",
280
+ "with": {}
281
+ }
282
+ },
283
+ "foreignKeys": {
284
+ "event_chunks_project_id_run_id_runs_project_id_id_fk": {
285
+ "name": "event_chunks_project_id_run_id_runs_project_id_id_fk",
286
+ "tableFrom": "event_chunks",
287
+ "tableTo": "runs",
288
+ "schemaTo": "qa",
289
+ "columnsFrom": ["project_id", "run_id"],
290
+ "columnsTo": ["project_id", "id"],
291
+ "onDelete": "no action",
292
+ "onUpdate": "no action"
293
+ }
294
+ },
295
+ "compositePrimaryKeys": {
296
+ "event_chunks_project_id_run_id_id_pk": {
297
+ "name": "event_chunks_project_id_run_id_id_pk",
298
+ "columns": ["project_id", "run_id", "id"]
299
+ }
300
+ },
301
+ "uniqueConstraints": {},
302
+ "policies": {},
303
+ "checkConstraints": {
304
+ "chunk_state": {
305
+ "name": "chunk_state",
306
+ "value": "\"qa\".\"event_chunks\".\"state\" IN ('uploading','committed','abandoned','cleaned')"
307
+ },
308
+ "chunk_range": {
309
+ "name": "chunk_range",
310
+ "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\""
311
+ }
312
+ },
313
+ "isRLSEnabled": false
314
+ },
315
+ "qa.events": {
316
+ "name": "events",
317
+ "schema": "qa",
318
+ "columns": {
319
+ "project_id": {
320
+ "name": "project_id",
321
+ "type": "text",
322
+ "primaryKey": false,
323
+ "notNull": true
324
+ },
325
+ "run_id": {
326
+ "name": "run_id",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true
330
+ },
331
+ "seq": {
332
+ "name": "seq",
333
+ "type": "bigint",
334
+ "primaryKey": false,
335
+ "notNull": true
336
+ },
337
+ "t": {
338
+ "name": "t",
339
+ "type": "double precision",
340
+ "primaryKey": false,
341
+ "notNull": true
342
+ },
343
+ "kind": {
344
+ "name": "kind",
345
+ "type": "text",
346
+ "primaryKey": false,
347
+ "notNull": true
348
+ },
349
+ "actor": {
350
+ "name": "actor",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": false
354
+ },
355
+ "step": {
356
+ "name": "step",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": false
360
+ },
361
+ "chunk_id": {
362
+ "name": "chunk_id",
363
+ "type": "text",
364
+ "primaryKey": false,
365
+ "notNull": true
366
+ },
367
+ "offset": {
368
+ "name": "offset",
369
+ "type": "integer",
370
+ "primaryKey": false,
371
+ "notNull": true
372
+ }
373
+ },
374
+ "indexes": {},
375
+ "foreignKeys": {
376
+ "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk": {
377
+ "name": "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk",
378
+ "tableFrom": "events",
379
+ "tableTo": "event_chunks",
380
+ "schemaTo": "qa",
381
+ "columnsFrom": ["project_id", "run_id", "chunk_id"],
382
+ "columnsTo": ["project_id", "run_id", "id"],
383
+ "onDelete": "no action",
384
+ "onUpdate": "no action"
385
+ }
386
+ },
387
+ "compositePrimaryKeys": {
388
+ "events_project_id_run_id_seq_pk": {
389
+ "name": "events_project_id_run_id_seq_pk",
390
+ "columns": ["project_id", "run_id", "seq"]
391
+ }
392
+ },
393
+ "uniqueConstraints": {},
394
+ "policies": {},
395
+ "checkConstraints": {},
396
+ "isRLSEnabled": false
397
+ },
398
+ "qa.jobs": {
399
+ "name": "jobs",
400
+ "schema": "qa",
401
+ "columns": {
402
+ "project_id": {
403
+ "name": "project_id",
404
+ "type": "text",
405
+ "primaryKey": false,
406
+ "notNull": true
407
+ },
408
+ "id": {
409
+ "name": "id",
410
+ "type": "text",
411
+ "primaryKey": false,
412
+ "notNull": true
413
+ },
414
+ "run_id": {
415
+ "name": "run_id",
416
+ "type": "text",
417
+ "primaryKey": false,
418
+ "notNull": true
419
+ },
420
+ "state": {
421
+ "name": "state",
422
+ "type": "text",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "default": "'queued'"
426
+ },
427
+ "available_at": {
428
+ "name": "available_at",
429
+ "type": "timestamp with time zone",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "default": "now()"
433
+ },
434
+ "attempts": {
435
+ "name": "attempts",
436
+ "type": "integer",
437
+ "primaryKey": false,
438
+ "notNull": true,
439
+ "default": 0
440
+ }
441
+ },
442
+ "indexes": {
443
+ "jobs_available": {
444
+ "name": "jobs_available",
445
+ "columns": [
446
+ {
447
+ "expression": "project_id",
448
+ "isExpression": false,
449
+ "asc": true,
450
+ "nulls": "last"
451
+ },
452
+ {
453
+ "expression": "state",
454
+ "isExpression": false,
455
+ "asc": true,
456
+ "nulls": "last"
457
+ },
458
+ {
459
+ "expression": "available_at",
460
+ "isExpression": false,
461
+ "asc": true,
462
+ "nulls": "last"
463
+ }
464
+ ],
465
+ "isUnique": false,
466
+ "concurrently": false,
467
+ "method": "btree",
468
+ "with": {}
469
+ }
470
+ },
471
+ "foreignKeys": {
472
+ "jobs_project_id_run_id_runs_project_id_id_fk": {
473
+ "name": "jobs_project_id_run_id_runs_project_id_id_fk",
474
+ "tableFrom": "jobs",
475
+ "tableTo": "runs",
476
+ "schemaTo": "qa",
477
+ "columnsFrom": ["project_id", "run_id"],
478
+ "columnsTo": ["project_id", "id"],
479
+ "onDelete": "no action",
480
+ "onUpdate": "no action"
481
+ }
482
+ },
483
+ "compositePrimaryKeys": {
484
+ "jobs_project_id_id_pk": {
485
+ "name": "jobs_project_id_id_pk",
486
+ "columns": ["project_id", "id"]
487
+ }
488
+ },
489
+ "uniqueConstraints": {},
490
+ "policies": {},
491
+ "checkConstraints": {},
492
+ "isRLSEnabled": false
493
+ },
494
+ "qa.lanes": {
495
+ "name": "lanes",
496
+ "schema": "qa",
497
+ "columns": {
498
+ "project_id": {
499
+ "name": "project_id",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": true
503
+ },
504
+ "run_id": {
505
+ "name": "run_id",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": true
509
+ },
510
+ "actor": {
511
+ "name": "actor",
512
+ "type": "text",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "status": {
517
+ "name": "status",
518
+ "type": "text",
519
+ "primaryKey": false,
520
+ "notNull": true
521
+ },
522
+ "started_at": {
523
+ "name": "started_at",
524
+ "type": "double precision",
525
+ "primaryKey": false,
526
+ "notNull": true
527
+ },
528
+ "finished_at": {
529
+ "name": "finished_at",
530
+ "type": "double precision",
531
+ "primaryKey": false,
532
+ "notNull": false
533
+ }
534
+ },
535
+ "indexes": {},
536
+ "foreignKeys": {
537
+ "lanes_project_id_run_id_runs_project_id_id_fk": {
538
+ "name": "lanes_project_id_run_id_runs_project_id_id_fk",
539
+ "tableFrom": "lanes",
540
+ "tableTo": "runs",
541
+ "schemaTo": "qa",
542
+ "columnsFrom": ["project_id", "run_id"],
543
+ "columnsTo": ["project_id", "id"],
544
+ "onDelete": "no action",
545
+ "onUpdate": "no action"
546
+ }
547
+ },
548
+ "compositePrimaryKeys": {
549
+ "lanes_project_id_run_id_actor_pk": {
550
+ "name": "lanes_project_id_run_id_actor_pk",
551
+ "columns": ["project_id", "run_id", "actor"]
552
+ }
553
+ },
554
+ "uniqueConstraints": {},
555
+ "policies": {},
556
+ "checkConstraints": {},
557
+ "isRLSEnabled": false
558
+ },
559
+ "qa.lease_claims": {
560
+ "name": "lease_claims",
561
+ "schema": "qa",
562
+ "columns": {
563
+ "project_id": {
564
+ "name": "project_id",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": true
568
+ },
569
+ "identity": {
570
+ "name": "identity",
571
+ "type": "text",
572
+ "primaryKey": false,
573
+ "notNull": true
574
+ },
575
+ "lease_id": {
576
+ "name": "lease_id",
577
+ "type": "text",
578
+ "primaryKey": false,
579
+ "notNull": true
580
+ }
581
+ },
582
+ "indexes": {},
583
+ "foreignKeys": {
584
+ "lease_claims_project_id_lease_id_leases_project_id_id_fk": {
585
+ "name": "lease_claims_project_id_lease_id_leases_project_id_id_fk",
586
+ "tableFrom": "lease_claims",
587
+ "tableTo": "leases",
588
+ "schemaTo": "qa",
589
+ "columnsFrom": ["project_id", "lease_id"],
590
+ "columnsTo": ["project_id", "id"],
591
+ "onDelete": "no action",
592
+ "onUpdate": "no action"
593
+ }
594
+ },
595
+ "compositePrimaryKeys": {
596
+ "lease_claims_project_id_identity_pk": {
597
+ "name": "lease_claims_project_id_identity_pk",
598
+ "columns": ["project_id", "identity"]
599
+ }
600
+ },
601
+ "uniqueConstraints": {},
602
+ "policies": {},
603
+ "checkConstraints": {},
604
+ "isRLSEnabled": false
605
+ },
606
+ "qa.lease_resources": {
607
+ "name": "lease_resources",
608
+ "schema": "qa",
609
+ "columns": {
610
+ "project_id": {
611
+ "name": "project_id",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": true
615
+ },
616
+ "id": {
617
+ "name": "id",
618
+ "type": "text",
619
+ "primaryKey": false,
620
+ "notNull": true
621
+ },
622
+ "kind": {
623
+ "name": "kind",
624
+ "type": "text",
625
+ "primaryKey": false,
626
+ "notNull": true
627
+ },
628
+ "canonical_id": {
629
+ "name": "canonical_id",
630
+ "type": "text",
631
+ "primaryKey": false,
632
+ "notNull": true
633
+ },
634
+ "secret_ref": {
635
+ "name": "secret_ref",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true
639
+ }
640
+ },
641
+ "indexes": {
642
+ "resource_kinds": {
643
+ "name": "resource_kinds",
644
+ "columns": [
645
+ {
646
+ "expression": "project_id",
647
+ "isExpression": false,
648
+ "asc": true,
649
+ "nulls": "last"
650
+ },
651
+ {
652
+ "expression": "kind",
653
+ "isExpression": false,
654
+ "asc": true,
655
+ "nulls": "last"
656
+ }
657
+ ],
658
+ "isUnique": false,
659
+ "concurrently": false,
660
+ "method": "btree",
661
+ "with": {}
662
+ }
663
+ },
664
+ "foreignKeys": {},
665
+ "compositePrimaryKeys": {
666
+ "lease_resources_project_id_id_pk": {
667
+ "name": "lease_resources_project_id_id_pk",
668
+ "columns": ["project_id", "id"]
669
+ }
670
+ },
671
+ "uniqueConstraints": {},
672
+ "policies": {},
673
+ "checkConstraints": {},
674
+ "isRLSEnabled": false
675
+ },
676
+ "qa.leases": {
677
+ "name": "leases",
678
+ "schema": "qa",
679
+ "columns": {
680
+ "project_id": {
681
+ "name": "project_id",
682
+ "type": "text",
683
+ "primaryKey": false,
684
+ "notNull": true
685
+ },
686
+ "id": {
687
+ "name": "id",
688
+ "type": "text",
689
+ "primaryKey": false,
690
+ "notNull": true
691
+ },
692
+ "run_id": {
693
+ "name": "run_id",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": true
697
+ },
698
+ "actor": {
699
+ "name": "actor",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": true
703
+ },
704
+ "owner": {
705
+ "name": "owner",
706
+ "type": "text",
707
+ "primaryKey": false,
708
+ "notNull": true
709
+ },
710
+ "epoch": {
711
+ "name": "epoch",
712
+ "type": "bigserial",
713
+ "primaryKey": false,
714
+ "notNull": true
715
+ },
716
+ "state": {
717
+ "name": "state",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true,
721
+ "default": "'active'"
722
+ },
723
+ "expires_at": {
724
+ "name": "expires_at",
725
+ "type": "timestamp with time zone",
726
+ "primaryKey": false,
727
+ "notNull": true
728
+ },
729
+ "allocations": {
730
+ "name": "allocations",
731
+ "type": "jsonb",
732
+ "primaryKey": false,
733
+ "notNull": true
734
+ }
735
+ },
736
+ "indexes": {},
737
+ "foreignKeys": {},
738
+ "compositePrimaryKeys": {
739
+ "leases_project_id_id_pk": {
740
+ "name": "leases_project_id_id_pk",
741
+ "columns": ["project_id", "id"]
742
+ }
743
+ },
744
+ "uniqueConstraints": {},
745
+ "policies": {},
746
+ "checkConstraints": {
747
+ "lease_state": {
748
+ "name": "lease_state",
749
+ "value": "\"qa\".\"leases\".\"state\" IN ('active','quarantined','released')"
750
+ }
751
+ },
752
+ "isRLSEnabled": false
753
+ },
754
+ "qa.runs": {
755
+ "name": "runs",
756
+ "schema": "qa",
757
+ "columns": {
758
+ "project_id": {
759
+ "name": "project_id",
760
+ "type": "text",
761
+ "primaryKey": false,
762
+ "notNull": true
763
+ },
764
+ "id": {
765
+ "name": "id",
766
+ "type": "text",
767
+ "primaryKey": false,
768
+ "notNull": true
769
+ },
770
+ "batch_id": {
771
+ "name": "batch_id",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": false
775
+ },
776
+ "flow": {
777
+ "name": "flow",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true
781
+ },
782
+ "started_at": {
783
+ "name": "started_at",
784
+ "type": "double precision",
785
+ "primaryKey": false,
786
+ "notNull": true
787
+ },
788
+ "metadata": {
789
+ "name": "metadata",
790
+ "type": "jsonb",
791
+ "primaryKey": false,
792
+ "notNull": false
793
+ },
794
+ "phase": {
795
+ "name": "phase",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true,
799
+ "default": "'queued'"
800
+ },
801
+ "verdict": {
802
+ "name": "verdict",
803
+ "type": "text",
804
+ "primaryKey": false,
805
+ "notNull": false
806
+ },
807
+ "finished_at": {
808
+ "name": "finished_at",
809
+ "type": "double precision",
810
+ "primaryKey": false,
811
+ "notNull": false
812
+ },
813
+ "reason": {
814
+ "name": "reason",
815
+ "type": "text",
816
+ "primaryKey": false,
817
+ "notNull": false
818
+ },
819
+ "event_count": {
820
+ "name": "event_count",
821
+ "type": "integer",
822
+ "primaryKey": false,
823
+ "notNull": true,
824
+ "default": 0
825
+ },
826
+ "last_seq": {
827
+ "name": "last_seq",
828
+ "type": "bigint",
829
+ "primaryKey": false,
830
+ "notNull": true,
831
+ "default": 0
832
+ },
833
+ "last_t": {
834
+ "name": "last_t",
835
+ "type": "double precision",
836
+ "primaryKey": false,
837
+ "notNull": true,
838
+ "default": 0
839
+ },
840
+ "event_bytes": {
841
+ "name": "event_bytes",
842
+ "type": "bigint",
843
+ "primaryKey": false,
844
+ "notNull": true,
845
+ "default": 0
846
+ },
847
+ "writer_lease_id": {
848
+ "name": "writer_lease_id",
849
+ "type": "text",
850
+ "primaryKey": false,
851
+ "notNull": false
852
+ }
853
+ },
854
+ "indexes": {
855
+ "runs_recent": {
856
+ "name": "runs_recent",
857
+ "columns": [
858
+ {
859
+ "expression": "project_id",
860
+ "isExpression": false,
861
+ "asc": true,
862
+ "nulls": "last"
863
+ },
864
+ {
865
+ "expression": "started_at",
866
+ "isExpression": false,
867
+ "asc": true,
868
+ "nulls": "last"
869
+ },
870
+ {
871
+ "expression": "id",
872
+ "isExpression": false,
873
+ "asc": true,
874
+ "nulls": "last"
875
+ }
876
+ ],
877
+ "isUnique": false,
878
+ "concurrently": false,
879
+ "method": "btree",
880
+ "with": {}
881
+ }
882
+ },
883
+ "foreignKeys": {
884
+ "runs_project_id_batch_id_batches_project_id_id_fk": {
885
+ "name": "runs_project_id_batch_id_batches_project_id_id_fk",
886
+ "tableFrom": "runs",
887
+ "tableTo": "batches",
888
+ "schemaTo": "qa",
889
+ "columnsFrom": ["project_id", "batch_id"],
890
+ "columnsTo": ["project_id", "id"],
891
+ "onDelete": "no action",
892
+ "onUpdate": "no action"
893
+ }
894
+ },
895
+ "compositePrimaryKeys": {
896
+ "runs_project_id_id_pk": {
897
+ "name": "runs_project_id_id_pk",
898
+ "columns": ["project_id", "id"]
899
+ }
900
+ },
901
+ "uniqueConstraints": {},
902
+ "policies": {},
903
+ "checkConstraints": {
904
+ "run_cursor_nonnegative": {
905
+ "name": "run_cursor_nonnegative",
906
+ "value": "\"qa\".\"runs\".\"last_seq\" >= 0 AND \"qa\".\"runs\".\"last_t\" >= 0 AND \"qa\".\"runs\".\"event_count\" >= 0 AND \"qa\".\"runs\".\"event_bytes\" >= 0"
907
+ }
908
+ },
909
+ "isRLSEnabled": false
910
+ },
911
+ "qa.step_runs": {
912
+ "name": "step_runs",
913
+ "schema": "qa",
914
+ "columns": {
915
+ "project_id": {
916
+ "name": "project_id",
917
+ "type": "text",
918
+ "primaryKey": false,
919
+ "notNull": true
920
+ },
921
+ "run_id": {
922
+ "name": "run_id",
923
+ "type": "text",
924
+ "primaryKey": false,
925
+ "notNull": true
926
+ },
927
+ "actor": {
928
+ "name": "actor",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": true
932
+ },
933
+ "step": {
934
+ "name": "step",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": true
938
+ },
939
+ "seq": {
940
+ "name": "seq",
941
+ "type": "bigint",
942
+ "primaryKey": false,
943
+ "notNull": true
944
+ },
945
+ "status": {
946
+ "name": "status",
947
+ "type": "text",
948
+ "primaryKey": false,
949
+ "notNull": true
950
+ },
951
+ "started_at": {
952
+ "name": "started_at",
953
+ "type": "double precision",
954
+ "primaryKey": false,
955
+ "notNull": true
956
+ },
957
+ "finished_at": {
958
+ "name": "finished_at",
959
+ "type": "double precision",
960
+ "primaryKey": false,
961
+ "notNull": false
962
+ }
963
+ },
964
+ "indexes": {},
965
+ "foreignKeys": {
966
+ "step_runs_project_id_run_id_runs_project_id_id_fk": {
967
+ "name": "step_runs_project_id_run_id_runs_project_id_id_fk",
968
+ "tableFrom": "step_runs",
969
+ "tableTo": "runs",
970
+ "schemaTo": "qa",
971
+ "columnsFrom": ["project_id", "run_id"],
972
+ "columnsTo": ["project_id", "id"],
973
+ "onDelete": "no action",
974
+ "onUpdate": "no action"
975
+ }
976
+ },
977
+ "compositePrimaryKeys": {
978
+ "step_runs_project_id_run_id_seq_pk": {
979
+ "name": "step_runs_project_id_run_id_seq_pk",
980
+ "columns": ["project_id", "run_id", "seq"]
981
+ }
982
+ },
983
+ "uniqueConstraints": {},
984
+ "policies": {},
985
+ "checkConstraints": {},
986
+ "isRLSEnabled": false
987
+ }
988
+ },
989
+ "enums": {},
990
+ "schemas": {
991
+ "qa": "qa"
992
+ },
993
+ "sequences": {},
994
+ "roles": {},
995
+ "policies": {},
996
+ "views": {},
997
+ "_meta": {
998
+ "columns": {},
999
+ "schemas": {},
1000
+ "tables": {}
1001
+ }
1002
+ }