@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,1353 @@
1
+ {
2
+ "id": "d327a334-8893-4125-9bc8-ac448bd9889b",
3
+ "prevId": "9eb94ffe-85b7-4890-9fe3-6c3b443a304e",
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.credentials": {
194
+ "name": "credentials",
195
+ "schema": "qa",
196
+ "columns": {
197
+ "project_id": {
198
+ "name": "project_id",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": true
202
+ },
203
+ "user_id": {
204
+ "name": "user_id",
205
+ "type": "text",
206
+ "primaryKey": false,
207
+ "notNull": true
208
+ },
209
+ "provider": {
210
+ "name": "provider",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": true
214
+ },
215
+ "secret_ref": {
216
+ "name": "secret_ref",
217
+ "type": "text",
218
+ "primaryKey": false,
219
+ "notNull": true
220
+ },
221
+ "expires_at": {
222
+ "name": "expires_at",
223
+ "type": "timestamp with time zone",
224
+ "primaryKey": false,
225
+ "notNull": false
226
+ }
227
+ },
228
+ "indexes": {},
229
+ "foreignKeys": {},
230
+ "compositePrimaryKeys": {
231
+ "credentials_project_id_user_id_provider_pk": {
232
+ "name": "credentials_project_id_user_id_provider_pk",
233
+ "columns": ["project_id", "user_id", "provider"]
234
+ }
235
+ },
236
+ "uniqueConstraints": {},
237
+ "policies": {},
238
+ "checkConstraints": {},
239
+ "isRLSEnabled": false
240
+ },
241
+ "qa.event_chunks": {
242
+ "name": "event_chunks",
243
+ "schema": "qa",
244
+ "columns": {
245
+ "project_id": {
246
+ "name": "project_id",
247
+ "type": "text",
248
+ "primaryKey": false,
249
+ "notNull": true
250
+ },
251
+ "run_id": {
252
+ "name": "run_id",
253
+ "type": "text",
254
+ "primaryKey": false,
255
+ "notNull": true
256
+ },
257
+ "id": {
258
+ "name": "id",
259
+ "type": "text",
260
+ "primaryKey": false,
261
+ "notNull": true
262
+ },
263
+ "object_key": {
264
+ "name": "object_key",
265
+ "type": "text",
266
+ "primaryKey": false,
267
+ "notNull": true
268
+ },
269
+ "sha256": {
270
+ "name": "sha256",
271
+ "type": "text",
272
+ "primaryKey": false,
273
+ "notNull": true
274
+ },
275
+ "count": {
276
+ "name": "count",
277
+ "type": "integer",
278
+ "primaryKey": false,
279
+ "notNull": true
280
+ },
281
+ "bytes": {
282
+ "name": "bytes",
283
+ "type": "integer",
284
+ "primaryKey": false,
285
+ "notNull": true
286
+ },
287
+ "first_seq": {
288
+ "name": "first_seq",
289
+ "type": "bigint",
290
+ "primaryKey": false,
291
+ "notNull": true
292
+ },
293
+ "last_seq": {
294
+ "name": "last_seq",
295
+ "type": "bigint",
296
+ "primaryKey": false,
297
+ "notNull": true
298
+ },
299
+ "first_t": {
300
+ "name": "first_t",
301
+ "type": "double precision",
302
+ "primaryKey": false,
303
+ "notNull": true
304
+ },
305
+ "last_t": {
306
+ "name": "last_t",
307
+ "type": "double precision",
308
+ "primaryKey": false,
309
+ "notNull": true
310
+ },
311
+ "state": {
312
+ "name": "state",
313
+ "type": "text",
314
+ "primaryKey": false,
315
+ "notNull": true,
316
+ "default": "'uploading'"
317
+ },
318
+ "cleaned_at": {
319
+ "name": "cleaned_at",
320
+ "type": "timestamp with time zone",
321
+ "primaryKey": false,
322
+ "notNull": false
323
+ },
324
+ "created_at": {
325
+ "name": "created_at",
326
+ "type": "timestamp with time zone",
327
+ "primaryKey": false,
328
+ "notNull": true,
329
+ "default": "now()"
330
+ }
331
+ },
332
+ "indexes": {
333
+ "event_object_key": {
334
+ "name": "event_object_key",
335
+ "columns": [
336
+ {
337
+ "expression": "object_key",
338
+ "isExpression": false,
339
+ "asc": true,
340
+ "nulls": "last"
341
+ }
342
+ ],
343
+ "isUnique": true,
344
+ "concurrently": false,
345
+ "method": "btree",
346
+ "with": {}
347
+ }
348
+ },
349
+ "foreignKeys": {
350
+ "event_chunks_project_id_run_id_runs_project_id_id_fk": {
351
+ "name": "event_chunks_project_id_run_id_runs_project_id_id_fk",
352
+ "tableFrom": "event_chunks",
353
+ "tableTo": "runs",
354
+ "schemaTo": "qa",
355
+ "columnsFrom": ["project_id", "run_id"],
356
+ "columnsTo": ["project_id", "id"],
357
+ "onDelete": "no action",
358
+ "onUpdate": "no action"
359
+ }
360
+ },
361
+ "compositePrimaryKeys": {
362
+ "event_chunks_project_id_run_id_id_pk": {
363
+ "name": "event_chunks_project_id_run_id_id_pk",
364
+ "columns": ["project_id", "run_id", "id"]
365
+ }
366
+ },
367
+ "uniqueConstraints": {},
368
+ "policies": {},
369
+ "checkConstraints": {
370
+ "chunk_state": {
371
+ "name": "chunk_state",
372
+ "value": "\"qa\".\"event_chunks\".\"state\" IN ('uploading','committed','abandoned','cleaned')"
373
+ },
374
+ "chunk_range": {
375
+ "name": "chunk_range",
376
+ "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\""
377
+ }
378
+ },
379
+ "isRLSEnabled": false
380
+ },
381
+ "qa.events": {
382
+ "name": "events",
383
+ "schema": "qa",
384
+ "columns": {
385
+ "project_id": {
386
+ "name": "project_id",
387
+ "type": "text",
388
+ "primaryKey": false,
389
+ "notNull": true
390
+ },
391
+ "run_id": {
392
+ "name": "run_id",
393
+ "type": "text",
394
+ "primaryKey": false,
395
+ "notNull": true
396
+ },
397
+ "seq": {
398
+ "name": "seq",
399
+ "type": "bigint",
400
+ "primaryKey": false,
401
+ "notNull": true
402
+ },
403
+ "t": {
404
+ "name": "t",
405
+ "type": "double precision",
406
+ "primaryKey": false,
407
+ "notNull": true
408
+ },
409
+ "kind": {
410
+ "name": "kind",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": true
414
+ },
415
+ "actor": {
416
+ "name": "actor",
417
+ "type": "text",
418
+ "primaryKey": false,
419
+ "notNull": false
420
+ },
421
+ "step": {
422
+ "name": "step",
423
+ "type": "text",
424
+ "primaryKey": false,
425
+ "notNull": false
426
+ },
427
+ "chunk_id": {
428
+ "name": "chunk_id",
429
+ "type": "text",
430
+ "primaryKey": false,
431
+ "notNull": true
432
+ },
433
+ "offset": {
434
+ "name": "offset",
435
+ "type": "integer",
436
+ "primaryKey": false,
437
+ "notNull": true
438
+ }
439
+ },
440
+ "indexes": {},
441
+ "foreignKeys": {
442
+ "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk": {
443
+ "name": "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk",
444
+ "tableFrom": "events",
445
+ "tableTo": "event_chunks",
446
+ "schemaTo": "qa",
447
+ "columnsFrom": ["project_id", "run_id", "chunk_id"],
448
+ "columnsTo": ["project_id", "run_id", "id"],
449
+ "onDelete": "no action",
450
+ "onUpdate": "no action"
451
+ }
452
+ },
453
+ "compositePrimaryKeys": {
454
+ "events_project_id_run_id_seq_pk": {
455
+ "name": "events_project_id_run_id_seq_pk",
456
+ "columns": ["project_id", "run_id", "seq"]
457
+ }
458
+ },
459
+ "uniqueConstraints": {},
460
+ "policies": {},
461
+ "checkConstraints": {},
462
+ "isRLSEnabled": false
463
+ },
464
+ "qa.findings": {
465
+ "name": "findings",
466
+ "schema": "qa",
467
+ "columns": {
468
+ "project_id": {
469
+ "name": "project_id",
470
+ "type": "text",
471
+ "primaryKey": false,
472
+ "notNull": true
473
+ },
474
+ "run_id": {
475
+ "name": "run_id",
476
+ "type": "text",
477
+ "primaryKey": false,
478
+ "notNull": true
479
+ },
480
+ "ordinal": {
481
+ "name": "ordinal",
482
+ "type": "integer",
483
+ "primaryKey": false,
484
+ "notNull": true
485
+ },
486
+ "actor": {
487
+ "name": "actor",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": true
491
+ },
492
+ "step": {
493
+ "name": "step",
494
+ "type": "text",
495
+ "primaryKey": false,
496
+ "notNull": true
497
+ },
498
+ "category": {
499
+ "name": "category",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": true
503
+ },
504
+ "severity": {
505
+ "name": "severity",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": true
509
+ },
510
+ "description": {
511
+ "name": "description",
512
+ "type": "text",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "event_seqs": {
517
+ "name": "event_seqs",
518
+ "type": "jsonb",
519
+ "primaryKey": false,
520
+ "notNull": true
521
+ },
522
+ "shots": {
523
+ "name": "shots",
524
+ "type": "jsonb",
525
+ "primaryKey": false,
526
+ "notNull": true
527
+ },
528
+ "created_at": {
529
+ "name": "created_at",
530
+ "type": "timestamp with time zone",
531
+ "primaryKey": false,
532
+ "notNull": true,
533
+ "default": "now()"
534
+ }
535
+ },
536
+ "indexes": {},
537
+ "foreignKeys": {
538
+ "findings_project_id_run_id_runs_project_id_id_fk": {
539
+ "name": "findings_project_id_run_id_runs_project_id_id_fk",
540
+ "tableFrom": "findings",
541
+ "tableTo": "runs",
542
+ "schemaTo": "qa",
543
+ "columnsFrom": ["project_id", "run_id"],
544
+ "columnsTo": ["project_id", "id"],
545
+ "onDelete": "no action",
546
+ "onUpdate": "no action"
547
+ }
548
+ },
549
+ "compositePrimaryKeys": {
550
+ "findings_project_id_run_id_ordinal_pk": {
551
+ "name": "findings_project_id_run_id_ordinal_pk",
552
+ "columns": ["project_id", "run_id", "ordinal"]
553
+ }
554
+ },
555
+ "uniqueConstraints": {},
556
+ "policies": {},
557
+ "checkConstraints": {
558
+ "finding_ordinal_positive": {
559
+ "name": "finding_ordinal_positive",
560
+ "value": "\"qa\".\"findings\".\"ordinal\" > 0"
561
+ },
562
+ "finding_severity": {
563
+ "name": "finding_severity",
564
+ "value": "\"qa\".\"findings\".\"severity\" IN ('low','medium','high')"
565
+ },
566
+ "finding_category": {
567
+ "name": "finding_category",
568
+ "value": "\"qa\".\"findings\".\"category\" IN ('scope','other')"
569
+ }
570
+ },
571
+ "isRLSEnabled": false
572
+ },
573
+ "qa.jobs": {
574
+ "name": "jobs",
575
+ "schema": "qa",
576
+ "columns": {
577
+ "project_id": {
578
+ "name": "project_id",
579
+ "type": "text",
580
+ "primaryKey": false,
581
+ "notNull": true
582
+ },
583
+ "id": {
584
+ "name": "id",
585
+ "type": "text",
586
+ "primaryKey": false,
587
+ "notNull": true
588
+ },
589
+ "run_id": {
590
+ "name": "run_id",
591
+ "type": "text",
592
+ "primaryKey": false,
593
+ "notNull": true
594
+ },
595
+ "state": {
596
+ "name": "state",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": true,
600
+ "default": "'queued'"
601
+ },
602
+ "available_at": {
603
+ "name": "available_at",
604
+ "type": "timestamp with time zone",
605
+ "primaryKey": false,
606
+ "notNull": true,
607
+ "default": "now()"
608
+ },
609
+ "attempts": {
610
+ "name": "attempts",
611
+ "type": "integer",
612
+ "primaryKey": false,
613
+ "notNull": true,
614
+ "default": 0
615
+ }
616
+ },
617
+ "indexes": {
618
+ "jobs_available": {
619
+ "name": "jobs_available",
620
+ "columns": [
621
+ {
622
+ "expression": "project_id",
623
+ "isExpression": false,
624
+ "asc": true,
625
+ "nulls": "last"
626
+ },
627
+ {
628
+ "expression": "state",
629
+ "isExpression": false,
630
+ "asc": true,
631
+ "nulls": "last"
632
+ },
633
+ {
634
+ "expression": "available_at",
635
+ "isExpression": false,
636
+ "asc": true,
637
+ "nulls": "last"
638
+ }
639
+ ],
640
+ "isUnique": false,
641
+ "concurrently": false,
642
+ "method": "btree",
643
+ "with": {}
644
+ }
645
+ },
646
+ "foreignKeys": {
647
+ "jobs_project_id_run_id_runs_project_id_id_fk": {
648
+ "name": "jobs_project_id_run_id_runs_project_id_id_fk",
649
+ "tableFrom": "jobs",
650
+ "tableTo": "runs",
651
+ "schemaTo": "qa",
652
+ "columnsFrom": ["project_id", "run_id"],
653
+ "columnsTo": ["project_id", "id"],
654
+ "onDelete": "no action",
655
+ "onUpdate": "no action"
656
+ }
657
+ },
658
+ "compositePrimaryKeys": {
659
+ "jobs_project_id_id_pk": {
660
+ "name": "jobs_project_id_id_pk",
661
+ "columns": ["project_id", "id"]
662
+ }
663
+ },
664
+ "uniqueConstraints": {},
665
+ "policies": {},
666
+ "checkConstraints": {},
667
+ "isRLSEnabled": false
668
+ },
669
+ "qa.lanes": {
670
+ "name": "lanes",
671
+ "schema": "qa",
672
+ "columns": {
673
+ "project_id": {
674
+ "name": "project_id",
675
+ "type": "text",
676
+ "primaryKey": false,
677
+ "notNull": true
678
+ },
679
+ "run_id": {
680
+ "name": "run_id",
681
+ "type": "text",
682
+ "primaryKey": false,
683
+ "notNull": true
684
+ },
685
+ "actor": {
686
+ "name": "actor",
687
+ "type": "text",
688
+ "primaryKey": false,
689
+ "notNull": true
690
+ },
691
+ "status": {
692
+ "name": "status",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": true
696
+ },
697
+ "started_at": {
698
+ "name": "started_at",
699
+ "type": "double precision",
700
+ "primaryKey": false,
701
+ "notNull": true
702
+ },
703
+ "finished_at": {
704
+ "name": "finished_at",
705
+ "type": "double precision",
706
+ "primaryKey": false,
707
+ "notNull": false
708
+ }
709
+ },
710
+ "indexes": {},
711
+ "foreignKeys": {
712
+ "lanes_project_id_run_id_runs_project_id_id_fk": {
713
+ "name": "lanes_project_id_run_id_runs_project_id_id_fk",
714
+ "tableFrom": "lanes",
715
+ "tableTo": "runs",
716
+ "schemaTo": "qa",
717
+ "columnsFrom": ["project_id", "run_id"],
718
+ "columnsTo": ["project_id", "id"],
719
+ "onDelete": "no action",
720
+ "onUpdate": "no action"
721
+ }
722
+ },
723
+ "compositePrimaryKeys": {
724
+ "lanes_project_id_run_id_actor_pk": {
725
+ "name": "lanes_project_id_run_id_actor_pk",
726
+ "columns": ["project_id", "run_id", "actor"]
727
+ }
728
+ },
729
+ "uniqueConstraints": {},
730
+ "policies": {},
731
+ "checkConstraints": {},
732
+ "isRLSEnabled": false
733
+ },
734
+ "qa.lease_claims": {
735
+ "name": "lease_claims",
736
+ "schema": "qa",
737
+ "columns": {
738
+ "project_id": {
739
+ "name": "project_id",
740
+ "type": "text",
741
+ "primaryKey": false,
742
+ "notNull": true
743
+ },
744
+ "identity": {
745
+ "name": "identity",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": true
749
+ },
750
+ "lease_id": {
751
+ "name": "lease_id",
752
+ "type": "text",
753
+ "primaryKey": false,
754
+ "notNull": true
755
+ }
756
+ },
757
+ "indexes": {},
758
+ "foreignKeys": {
759
+ "lease_claims_project_id_lease_id_leases_project_id_id_fk": {
760
+ "name": "lease_claims_project_id_lease_id_leases_project_id_id_fk",
761
+ "tableFrom": "lease_claims",
762
+ "tableTo": "leases",
763
+ "schemaTo": "qa",
764
+ "columnsFrom": ["project_id", "lease_id"],
765
+ "columnsTo": ["project_id", "id"],
766
+ "onDelete": "no action",
767
+ "onUpdate": "no action"
768
+ }
769
+ },
770
+ "compositePrimaryKeys": {
771
+ "lease_claims_project_id_identity_pk": {
772
+ "name": "lease_claims_project_id_identity_pk",
773
+ "columns": ["project_id", "identity"]
774
+ }
775
+ },
776
+ "uniqueConstraints": {},
777
+ "policies": {},
778
+ "checkConstraints": {},
779
+ "isRLSEnabled": false
780
+ },
781
+ "qa.lease_resources": {
782
+ "name": "lease_resources",
783
+ "schema": "qa",
784
+ "columns": {
785
+ "project_id": {
786
+ "name": "project_id",
787
+ "type": "text",
788
+ "primaryKey": false,
789
+ "notNull": true
790
+ },
791
+ "id": {
792
+ "name": "id",
793
+ "type": "text",
794
+ "primaryKey": false,
795
+ "notNull": true
796
+ },
797
+ "kind": {
798
+ "name": "kind",
799
+ "type": "text",
800
+ "primaryKey": false,
801
+ "notNull": true
802
+ },
803
+ "canonical_id": {
804
+ "name": "canonical_id",
805
+ "type": "text",
806
+ "primaryKey": false,
807
+ "notNull": true
808
+ },
809
+ "secret_ref": {
810
+ "name": "secret_ref",
811
+ "type": "text",
812
+ "primaryKey": false,
813
+ "notNull": true
814
+ }
815
+ },
816
+ "indexes": {
817
+ "resource_kinds": {
818
+ "name": "resource_kinds",
819
+ "columns": [
820
+ {
821
+ "expression": "project_id",
822
+ "isExpression": false,
823
+ "asc": true,
824
+ "nulls": "last"
825
+ },
826
+ {
827
+ "expression": "kind",
828
+ "isExpression": false,
829
+ "asc": true,
830
+ "nulls": "last"
831
+ }
832
+ ],
833
+ "isUnique": false,
834
+ "concurrently": false,
835
+ "method": "btree",
836
+ "with": {}
837
+ }
838
+ },
839
+ "foreignKeys": {},
840
+ "compositePrimaryKeys": {
841
+ "lease_resources_project_id_id_pk": {
842
+ "name": "lease_resources_project_id_id_pk",
843
+ "columns": ["project_id", "id"]
844
+ }
845
+ },
846
+ "uniqueConstraints": {},
847
+ "policies": {},
848
+ "checkConstraints": {},
849
+ "isRLSEnabled": false
850
+ },
851
+ "qa.leases": {
852
+ "name": "leases",
853
+ "schema": "qa",
854
+ "columns": {
855
+ "project_id": {
856
+ "name": "project_id",
857
+ "type": "text",
858
+ "primaryKey": false,
859
+ "notNull": true
860
+ },
861
+ "id": {
862
+ "name": "id",
863
+ "type": "text",
864
+ "primaryKey": false,
865
+ "notNull": true
866
+ },
867
+ "run_id": {
868
+ "name": "run_id",
869
+ "type": "text",
870
+ "primaryKey": false,
871
+ "notNull": true
872
+ },
873
+ "actor": {
874
+ "name": "actor",
875
+ "type": "text",
876
+ "primaryKey": false,
877
+ "notNull": true
878
+ },
879
+ "owner": {
880
+ "name": "owner",
881
+ "type": "text",
882
+ "primaryKey": false,
883
+ "notNull": true
884
+ },
885
+ "epoch": {
886
+ "name": "epoch",
887
+ "type": "bigserial",
888
+ "primaryKey": false,
889
+ "notNull": true
890
+ },
891
+ "state": {
892
+ "name": "state",
893
+ "type": "text",
894
+ "primaryKey": false,
895
+ "notNull": true,
896
+ "default": "'active'"
897
+ },
898
+ "expires_at": {
899
+ "name": "expires_at",
900
+ "type": "timestamp with time zone",
901
+ "primaryKey": false,
902
+ "notNull": true
903
+ },
904
+ "allocations": {
905
+ "name": "allocations",
906
+ "type": "jsonb",
907
+ "primaryKey": false,
908
+ "notNull": true
909
+ }
910
+ },
911
+ "indexes": {},
912
+ "foreignKeys": {},
913
+ "compositePrimaryKeys": {
914
+ "leases_project_id_id_pk": {
915
+ "name": "leases_project_id_id_pk",
916
+ "columns": ["project_id", "id"]
917
+ }
918
+ },
919
+ "uniqueConstraints": {},
920
+ "policies": {},
921
+ "checkConstraints": {
922
+ "lease_state": {
923
+ "name": "lease_state",
924
+ "value": "\"qa\".\"leases\".\"state\" IN ('active','quarantined','released')"
925
+ }
926
+ },
927
+ "isRLSEnabled": false
928
+ },
929
+ "qa.read_publications": {
930
+ "name": "read_publications",
931
+ "schema": "qa",
932
+ "columns": {
933
+ "project_id": {
934
+ "name": "project_id",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": true
938
+ },
939
+ "kind": {
940
+ "name": "kind",
941
+ "type": "text",
942
+ "primaryKey": false,
943
+ "notNull": true
944
+ },
945
+ "document": {
946
+ "name": "document",
947
+ "type": "jsonb",
948
+ "primaryKey": false,
949
+ "notNull": true
950
+ }
951
+ },
952
+ "indexes": {},
953
+ "foreignKeys": {},
954
+ "compositePrimaryKeys": {
955
+ "read_publications_project_id_kind_pk": {
956
+ "name": "read_publications_project_id_kind_pk",
957
+ "columns": ["project_id", "kind"]
958
+ }
959
+ },
960
+ "uniqueConstraints": {},
961
+ "policies": {},
962
+ "checkConstraints": {},
963
+ "isRLSEnabled": false
964
+ },
965
+ "qa.runs": {
966
+ "name": "runs",
967
+ "schema": "qa",
968
+ "columns": {
969
+ "project_id": {
970
+ "name": "project_id",
971
+ "type": "text",
972
+ "primaryKey": false,
973
+ "notNull": true
974
+ },
975
+ "id": {
976
+ "name": "id",
977
+ "type": "text",
978
+ "primaryKey": false,
979
+ "notNull": true
980
+ },
981
+ "batch_id": {
982
+ "name": "batch_id",
983
+ "type": "text",
984
+ "primaryKey": false,
985
+ "notNull": false
986
+ },
987
+ "flow": {
988
+ "name": "flow",
989
+ "type": "text",
990
+ "primaryKey": false,
991
+ "notNull": true
992
+ },
993
+ "started_at": {
994
+ "name": "started_at",
995
+ "type": "double precision",
996
+ "primaryKey": false,
997
+ "notNull": true
998
+ },
999
+ "metadata": {
1000
+ "name": "metadata",
1001
+ "type": "jsonb",
1002
+ "primaryKey": false,
1003
+ "notNull": false
1004
+ },
1005
+ "phase": {
1006
+ "name": "phase",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": true,
1010
+ "default": "'queued'"
1011
+ },
1012
+ "verdict": {
1013
+ "name": "verdict",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": false
1017
+ },
1018
+ "finished_at": {
1019
+ "name": "finished_at",
1020
+ "type": "double precision",
1021
+ "primaryKey": false,
1022
+ "notNull": false
1023
+ },
1024
+ "reason": {
1025
+ "name": "reason",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": false
1029
+ },
1030
+ "event_count": {
1031
+ "name": "event_count",
1032
+ "type": "integer",
1033
+ "primaryKey": false,
1034
+ "notNull": true,
1035
+ "default": 0
1036
+ },
1037
+ "last_seq": {
1038
+ "name": "last_seq",
1039
+ "type": "bigint",
1040
+ "primaryKey": false,
1041
+ "notNull": true,
1042
+ "default": 0
1043
+ },
1044
+ "last_t": {
1045
+ "name": "last_t",
1046
+ "type": "double precision",
1047
+ "primaryKey": false,
1048
+ "notNull": true,
1049
+ "default": 0
1050
+ },
1051
+ "event_bytes": {
1052
+ "name": "event_bytes",
1053
+ "type": "bigint",
1054
+ "primaryKey": false,
1055
+ "notNull": true,
1056
+ "default": 0
1057
+ },
1058
+ "writer_lease_id": {
1059
+ "name": "writer_lease_id",
1060
+ "type": "text",
1061
+ "primaryKey": false,
1062
+ "notNull": false
1063
+ },
1064
+ "heartbeat_at": {
1065
+ "name": "heartbeat_at",
1066
+ "type": "timestamp with time zone",
1067
+ "primaryKey": false,
1068
+ "notNull": false
1069
+ },
1070
+ "cost_usd": {
1071
+ "name": "cost_usd",
1072
+ "type": "double precision",
1073
+ "primaryKey": false,
1074
+ "notNull": true,
1075
+ "default": 0
1076
+ },
1077
+ "classification": {
1078
+ "name": "classification",
1079
+ "type": "text",
1080
+ "primaryKey": false,
1081
+ "notNull": false
1082
+ }
1083
+ },
1084
+ "indexes": {
1085
+ "runs_recent": {
1086
+ "name": "runs_recent",
1087
+ "columns": [
1088
+ {
1089
+ "expression": "project_id",
1090
+ "isExpression": false,
1091
+ "asc": true,
1092
+ "nulls": "last"
1093
+ },
1094
+ {
1095
+ "expression": "started_at",
1096
+ "isExpression": false,
1097
+ "asc": false,
1098
+ "nulls": "last"
1099
+ },
1100
+ {
1101
+ "expression": "\"id\" COLLATE \"C\"",
1102
+ "asc": true,
1103
+ "isExpression": true,
1104
+ "nulls": "last"
1105
+ }
1106
+ ],
1107
+ "isUnique": false,
1108
+ "concurrently": false,
1109
+ "method": "btree",
1110
+ "with": {}
1111
+ }
1112
+ },
1113
+ "foreignKeys": {
1114
+ "runs_project_id_batch_id_batches_project_id_id_fk": {
1115
+ "name": "runs_project_id_batch_id_batches_project_id_id_fk",
1116
+ "tableFrom": "runs",
1117
+ "tableTo": "batches",
1118
+ "schemaTo": "qa",
1119
+ "columnsFrom": ["project_id", "batch_id"],
1120
+ "columnsTo": ["project_id", "id"],
1121
+ "onDelete": "no action",
1122
+ "onUpdate": "no action"
1123
+ }
1124
+ },
1125
+ "compositePrimaryKeys": {
1126
+ "runs_project_id_id_pk": {
1127
+ "name": "runs_project_id_id_pk",
1128
+ "columns": ["project_id", "id"]
1129
+ }
1130
+ },
1131
+ "uniqueConstraints": {},
1132
+ "policies": {},
1133
+ "checkConstraints": {
1134
+ "run_cursor_nonnegative": {
1135
+ "name": "run_cursor_nonnegative",
1136
+ "value": "\"qa\".\"runs\".\"last_seq\" >= 0 AND \"qa\".\"runs\".\"last_t\" >= 0 AND \"qa\".\"runs\".\"event_count\" >= 0 AND \"qa\".\"runs\".\"event_bytes\" >= 0"
1137
+ }
1138
+ },
1139
+ "isRLSEnabled": false
1140
+ },
1141
+ "qa.server_submissions": {
1142
+ "name": "server_submissions",
1143
+ "schema": "qa",
1144
+ "columns": {
1145
+ "project_id": {
1146
+ "name": "project_id",
1147
+ "type": "text",
1148
+ "primaryKey": false,
1149
+ "notNull": true
1150
+ },
1151
+ "principal_id": {
1152
+ "name": "principal_id",
1153
+ "type": "text",
1154
+ "primaryKey": false,
1155
+ "notNull": true
1156
+ },
1157
+ "idempotency_key": {
1158
+ "name": "idempotency_key",
1159
+ "type": "text",
1160
+ "primaryKey": false,
1161
+ "notNull": true
1162
+ },
1163
+ "fingerprint": {
1164
+ "name": "fingerprint",
1165
+ "type": "text",
1166
+ "primaryKey": false,
1167
+ "notNull": true
1168
+ },
1169
+ "batch_id": {
1170
+ "name": "batch_id",
1171
+ "type": "text",
1172
+ "primaryKey": false,
1173
+ "notNull": true
1174
+ },
1175
+ "response": {
1176
+ "name": "response",
1177
+ "type": "jsonb",
1178
+ "primaryKey": false,
1179
+ "notNull": true
1180
+ },
1181
+ "created_at": {
1182
+ "name": "created_at",
1183
+ "type": "timestamp with time zone",
1184
+ "primaryKey": false,
1185
+ "notNull": true,
1186
+ "default": "now()"
1187
+ }
1188
+ },
1189
+ "indexes": {
1190
+ "submission_batch": {
1191
+ "name": "submission_batch",
1192
+ "columns": [
1193
+ {
1194
+ "expression": "project_id",
1195
+ "isExpression": false,
1196
+ "asc": true,
1197
+ "nulls": "last"
1198
+ },
1199
+ {
1200
+ "expression": "batch_id",
1201
+ "isExpression": false,
1202
+ "asc": true,
1203
+ "nulls": "last"
1204
+ }
1205
+ ],
1206
+ "isUnique": true,
1207
+ "concurrently": false,
1208
+ "method": "btree",
1209
+ "with": {}
1210
+ },
1211
+ "submission_created": {
1212
+ "name": "submission_created",
1213
+ "columns": [
1214
+ {
1215
+ "expression": "project_id",
1216
+ "isExpression": false,
1217
+ "asc": true,
1218
+ "nulls": "last"
1219
+ },
1220
+ {
1221
+ "expression": "created_at",
1222
+ "isExpression": false,
1223
+ "asc": false,
1224
+ "nulls": "last"
1225
+ },
1226
+ {
1227
+ "expression": "batch_id",
1228
+ "isExpression": false,
1229
+ "asc": true,
1230
+ "nulls": "last"
1231
+ }
1232
+ ],
1233
+ "isUnique": false,
1234
+ "concurrently": false,
1235
+ "method": "btree",
1236
+ "with": {}
1237
+ }
1238
+ },
1239
+ "foreignKeys": {
1240
+ "server_submissions_project_id_batch_id_batches_project_id_id_fk": {
1241
+ "name": "server_submissions_project_id_batch_id_batches_project_id_id_fk",
1242
+ "tableFrom": "server_submissions",
1243
+ "tableTo": "batches",
1244
+ "schemaTo": "qa",
1245
+ "columnsFrom": ["project_id", "batch_id"],
1246
+ "columnsTo": ["project_id", "id"],
1247
+ "onDelete": "no action",
1248
+ "onUpdate": "no action"
1249
+ }
1250
+ },
1251
+ "compositePrimaryKeys": {
1252
+ "server_submissions_project_id_principal_id_idempotency_key_pk": {
1253
+ "name": "server_submissions_project_id_principal_id_idempotency_key_pk",
1254
+ "columns": ["project_id", "principal_id", "idempotency_key"]
1255
+ }
1256
+ },
1257
+ "uniqueConstraints": {},
1258
+ "policies": {},
1259
+ "checkConstraints": {},
1260
+ "isRLSEnabled": false
1261
+ },
1262
+ "qa.step_runs": {
1263
+ "name": "step_runs",
1264
+ "schema": "qa",
1265
+ "columns": {
1266
+ "project_id": {
1267
+ "name": "project_id",
1268
+ "type": "text",
1269
+ "primaryKey": false,
1270
+ "notNull": true
1271
+ },
1272
+ "run_id": {
1273
+ "name": "run_id",
1274
+ "type": "text",
1275
+ "primaryKey": false,
1276
+ "notNull": true
1277
+ },
1278
+ "actor": {
1279
+ "name": "actor",
1280
+ "type": "text",
1281
+ "primaryKey": false,
1282
+ "notNull": true
1283
+ },
1284
+ "step": {
1285
+ "name": "step",
1286
+ "type": "text",
1287
+ "primaryKey": false,
1288
+ "notNull": true
1289
+ },
1290
+ "seq": {
1291
+ "name": "seq",
1292
+ "type": "bigint",
1293
+ "primaryKey": false,
1294
+ "notNull": true
1295
+ },
1296
+ "status": {
1297
+ "name": "status",
1298
+ "type": "text",
1299
+ "primaryKey": false,
1300
+ "notNull": true
1301
+ },
1302
+ "started_at": {
1303
+ "name": "started_at",
1304
+ "type": "double precision",
1305
+ "primaryKey": false,
1306
+ "notNull": true
1307
+ },
1308
+ "finished_at": {
1309
+ "name": "finished_at",
1310
+ "type": "double precision",
1311
+ "primaryKey": false,
1312
+ "notNull": false
1313
+ }
1314
+ },
1315
+ "indexes": {},
1316
+ "foreignKeys": {
1317
+ "step_runs_project_id_run_id_runs_project_id_id_fk": {
1318
+ "name": "step_runs_project_id_run_id_runs_project_id_id_fk",
1319
+ "tableFrom": "step_runs",
1320
+ "tableTo": "runs",
1321
+ "schemaTo": "qa",
1322
+ "columnsFrom": ["project_id", "run_id"],
1323
+ "columnsTo": ["project_id", "id"],
1324
+ "onDelete": "no action",
1325
+ "onUpdate": "no action"
1326
+ }
1327
+ },
1328
+ "compositePrimaryKeys": {
1329
+ "step_runs_project_id_run_id_seq_pk": {
1330
+ "name": "step_runs_project_id_run_id_seq_pk",
1331
+ "columns": ["project_id", "run_id", "seq"]
1332
+ }
1333
+ },
1334
+ "uniqueConstraints": {},
1335
+ "policies": {},
1336
+ "checkConstraints": {},
1337
+ "isRLSEnabled": false
1338
+ }
1339
+ },
1340
+ "enums": {},
1341
+ "schemas": {
1342
+ "qa": "qa"
1343
+ },
1344
+ "sequences": {},
1345
+ "roles": {},
1346
+ "policies": {},
1347
+ "views": {},
1348
+ "_meta": {
1349
+ "columns": {},
1350
+ "schemas": {},
1351
+ "tables": {}
1352
+ }
1353
+ }