niceeval 0.16.2 → 0.17.0

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 (258) hide show
  1. package/dist/cli/bootstrap.cjs +7 -1
  2. package/dist/cli/bootstrap.cjs.map +1 -1
  3. package/dist/cli/project-configuration.cjs +8 -11
  4. package/dist/cli/project-configuration.cjs.map +1 -1
  5. package/dist/expect/index.cjs.map +1 -1
  6. package/dist/expect/index.d.cts +1 -0
  7. package/dist/expect/index.d.mts +1 -0
  8. package/dist/expect/index.d.ts +1 -0
  9. package/dist/experiment/host/cli/contribution.cjs +6 -11
  10. package/dist/experiment/host/cli/contribution.cjs.map +1 -1
  11. package/dist/experiment/host/cli/contribution.d.cts +0 -16
  12. package/dist/experiment/host/cli/contribution.d.mts +0 -16
  13. package/dist/experiment/host/cli/contribution.d.ts +0 -16
  14. package/dist/experiment/host/operations.cjs +3 -3
  15. package/dist/experiment/host/operations.cjs.map +1 -1
  16. package/dist/experiment/host/types.cjs.map +1 -1
  17. package/dist/experiment/host/types.d.cts +0 -4
  18. package/dist/experiment/host/types.d.mts +0 -4
  19. package/dist/experiment/host/types.d.ts +0 -4
  20. package/dist/fresh-import.cjs +2 -2
  21. package/dist/fresh-import.cjs.map +1 -1
  22. package/dist/fresh-import.d.cts +3 -3
  23. package/dist/fresh-import.d.mts +3 -3
  24. package/dist/fresh-import.d.ts +3 -3
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +1 -0
  27. package/dist/index.d.mts +1 -0
  28. package/dist/index.d.ts +1 -0
  29. package/dist/inspection/codec.cjs.map +1 -1
  30. package/dist/inspection/codec.d.cts +1 -1
  31. package/dist/inspection/codec.d.mts +1 -1
  32. package/dist/inspection/codec.d.ts +1 -1
  33. package/dist/inspection/facts.cjs +66 -9
  34. package/dist/inspection/facts.cjs.map +1 -1
  35. package/dist/inspection/facts.d.cts +4 -0
  36. package/dist/inspection/facts.d.mts +4 -0
  37. package/dist/inspection/facts.d.ts +4 -0
  38. package/dist/inspection/facts.js +4 -2
  39. package/dist/inspection/index.cjs +1 -3
  40. package/dist/inspection/index.cjs.map +1 -1
  41. package/dist/inspection/index.d.cts +1 -1
  42. package/dist/inspection/index.d.mts +1 -1
  43. package/dist/inspection/index.d.ts +1 -1
  44. package/dist/inspection/index.js +44 -48
  45. package/dist/inspection/limits.cjs +3 -1
  46. package/dist/inspection/limits.cjs.map +1 -1
  47. package/dist/inspection/limits.d.cts +2 -0
  48. package/dist/inspection/limits.d.mts +2 -0
  49. package/dist/inspection/limits.d.ts +2 -0
  50. package/dist/inspection/limits.js +6 -4
  51. package/dist/inspection/project-source.cjs +4 -1
  52. package/dist/inspection/project-source.cjs.map +1 -1
  53. package/dist/inspection/protocol.cjs +10 -18
  54. package/dist/inspection/protocol.cjs.map +1 -1
  55. package/dist/inspection/protocol.d.cts +111 -173
  56. package/dist/inspection/protocol.d.mts +111 -173
  57. package/dist/inspection/protocol.d.ts +111 -173
  58. package/dist/inspection/public.mjs +73 -109
  59. package/dist/inspection/results.cjs +12 -48
  60. package/dist/inspection/results.cjs.map +1 -1
  61. package/dist/inspection/results.d.cts +124 -122
  62. package/dist/inspection/results.d.mts +124 -122
  63. package/dist/inspection/results.d.ts +124 -122
  64. package/dist/inspection/results.js +16 -20
  65. package/dist/inspection/select.cjs +80 -117
  66. package/dist/inspection/select.cjs.map +1 -1
  67. package/dist/inspection/source.cjs +14 -15
  68. package/dist/inspection/source.cjs.map +1 -1
  69. package/dist/inspection/source.d.cts +6 -3
  70. package/dist/inspection/source.d.mts +6 -3
  71. package/dist/inspection/source.d.ts +6 -3
  72. package/dist/inspection/trace.cjs +1 -1
  73. package/dist/inspection/trace.cjs.map +1 -1
  74. package/dist/load-config.cjs +17 -11
  75. package/dist/load-config.cjs.map +1 -1
  76. package/dist/load-config.d.cts +3 -2
  77. package/dist/load-config.d.mts +3 -2
  78. package/dist/load-config.d.ts +3 -2
  79. package/dist/o11y/adapter-usage-projection.cjs +5 -1
  80. package/dist/o11y/adapter-usage-projection.cjs.map +1 -1
  81. package/dist/o11y/adapter-usage-projection.d.cts +109 -1
  82. package/dist/o11y/adapter-usage-projection.d.mts +109 -1
  83. package/dist/o11y/adapter-usage-projection.d.ts +109 -1
  84. package/dist/o11y/cache-read.cjs +113 -0
  85. package/dist/o11y/cache-read.cjs.map +1 -0
  86. package/dist/o11y/cache-read.d.cts +80 -0
  87. package/dist/o11y/cache-read.d.mts +80 -0
  88. package/dist/o11y/cache-read.d.ts +80 -0
  89. package/dist/o11y/cache-read.js +8 -0
  90. package/dist/o11y/cache-read.js.map +1 -0
  91. package/dist/o11y/eval-usage.cjs +4 -1
  92. package/dist/o11y/eval-usage.cjs.map +1 -1
  93. package/dist/o11y/eval-usage.d.cts +4 -1
  94. package/dist/o11y/eval-usage.d.mts +4 -1
  95. package/dist/o11y/eval-usage.d.ts +4 -1
  96. package/dist/record/host/sqlite-host.cjs +188 -53
  97. package/dist/record/host/sqlite-host.cjs.map +1 -1
  98. package/dist/record/host/sqlite-host.d.cts +37 -1
  99. package/dist/record/host/sqlite-host.d.mts +37 -1
  100. package/dist/record/host/sqlite-host.d.ts +37 -1
  101. package/dist/record/host/sqlite-host.js +16 -8
  102. package/dist/record/maintenance/runtime.cjs +3 -3
  103. package/dist/record/maintenance/runtime.cjs.map +1 -1
  104. package/dist/record/sqlite/admission-repository.cjs +18 -18
  105. package/dist/record/sqlite/admission-repository.cjs.map +1 -1
  106. package/dist/record/sqlite/case-repository.cjs +6 -6
  107. package/dist/record/sqlite/case-repository.cjs.map +1 -1
  108. package/dist/record/sqlite/coordination-repository.cjs +25 -25
  109. package/dist/record/sqlite/coordination-repository.cjs.map +1 -1
  110. package/dist/record/sqlite/current-schema.cjs +115 -111
  111. package/dist/record/sqlite/current-schema.cjs.map +1 -1
  112. package/dist/record/sqlite/current-schema.d.cts +3 -3
  113. package/dist/record/sqlite/current-schema.d.mts +3 -3
  114. package/dist/record/sqlite/current-schema.d.ts +3 -3
  115. package/dist/record/sqlite/database.cjs +56 -53
  116. package/dist/record/sqlite/database.cjs.map +1 -1
  117. package/dist/record/sqlite/index.cjs +3 -1
  118. package/dist/record/sqlite/index.cjs.map +1 -1
  119. package/dist/record/sqlite/index.d.cts +5 -2
  120. package/dist/record/sqlite/index.d.mts +5 -2
  121. package/dist/record/sqlite/index.d.ts +5 -2
  122. package/dist/record/sqlite/legacy-schema-018.cjs +443 -0
  123. package/dist/record/sqlite/legacy-schema-018.cjs.map +1 -0
  124. package/dist/record/sqlite/legacy-schema-018.d.cts +6 -0
  125. package/dist/record/sqlite/legacy-schema-018.d.mts +6 -0
  126. package/dist/record/sqlite/legacy-schema-018.d.ts +6 -0
  127. package/dist/record/sqlite/legacy-schema-018.js +6 -0
  128. package/dist/record/sqlite/legacy-schema-018.js.map +1 -0
  129. package/dist/record/sqlite/migration.cjs +105 -46
  130. package/dist/record/sqlite/migration.cjs.map +1 -1
  131. package/dist/record/sqlite/migration.d.cts +2 -1
  132. package/dist/record/sqlite/migration.d.mts +2 -1
  133. package/dist/record/sqlite/migration.d.ts +2 -1
  134. package/dist/record/sqlite/portable-capture.cjs +13 -13
  135. package/dist/record/sqlite/portable-capture.cjs.map +1 -1
  136. package/dist/record/sqlite/registry-repository.cjs +22 -22
  137. package/dist/record/sqlite/registry-repository.cjs.map +1 -1
  138. package/dist/record/sqlite/schema.cjs +10 -2
  139. package/dist/record/sqlite/schema.cjs.map +1 -1
  140. package/dist/record/sqlite/schema.d.cts +4 -1
  141. package/dist/record/sqlite/schema.d.mts +4 -1
  142. package/dist/record/sqlite/schema.d.ts +4 -1
  143. package/dist/record/sqlite/schema.js +20 -14
  144. package/dist/record/sqlite/storage-worker.cjs +1 -1
  145. package/dist/record/sqlite/storage-worker.cjs.map +1 -1
  146. package/dist/record/sqlite/storage.cjs +316 -232
  147. package/dist/record/sqlite/storage.cjs.map +1 -1
  148. package/dist/record/sqlite/storage.d.cts +10 -2
  149. package/dist/record/sqlite/storage.d.mts +10 -2
  150. package/dist/record/sqlite/storage.d.ts +10 -2
  151. package/dist/record/sqlite/storage.js +54 -50
  152. package/dist/record/sqlite/types.cjs +1 -1
  153. package/dist/record/sqlite/types.cjs.map +1 -1
  154. package/dist/record/sqlite/types.d.cts +13 -1
  155. package/dist/record/sqlite/types.d.mts +13 -1
  156. package/dist/record/sqlite/types.d.ts +13 -1
  157. package/dist/run/cli/contribution.cjs +17 -12
  158. package/dist/run/cli/contribution.cjs.map +1 -1
  159. package/dist/run/host/lifecycle-adapter.cjs +1 -1
  160. package/dist/run/host/lifecycle-adapter.cjs.map +1 -1
  161. package/dist/run/storage/owner-identity.cjs +78 -16
  162. package/dist/run/storage/owner-identity.cjs.map +1 -1
  163. package/dist/run/storage/owner-identity.d.cts +2 -1
  164. package/dist/run/storage/owner-identity.d.mts +2 -1
  165. package/dist/run/storage/owner-identity.d.ts +2 -1
  166. package/dist/run/storage/sqlite.cjs +55 -55
  167. package/dist/run/storage/sqlite.cjs.map +1 -1
  168. package/dist/runner/accept.cjs +12 -42
  169. package/dist/runner/accept.cjs.map +1 -1
  170. package/dist/runner/accept.d.cts +2 -3
  171. package/dist/runner/accept.d.mts +2 -3
  172. package/dist/runner/accept.d.ts +2 -3
  173. package/dist/runner/adapter-usage.cjs +2 -2
  174. package/dist/runner/adapter-usage.cjs.map +1 -1
  175. package/dist/runner/adoption.cjs +14 -26
  176. package/dist/runner/adoption.cjs.map +1 -1
  177. package/dist/runner/adoption.d.cts +5 -13
  178. package/dist/runner/adoption.d.mts +5 -13
  179. package/dist/runner/adoption.d.ts +5 -13
  180. package/dist/runner/adoption.js +2 -4
  181. package/dist/runner/record.cjs +24 -18
  182. package/dist/runner/record.cjs.map +1 -1
  183. package/dist/runner/rename-experiment.cjs +5 -7
  184. package/dist/runner/rename-experiment.cjs.map +1 -1
  185. package/dist/runner/reuse-plan.cjs +37 -18
  186. package/dist/runner/reuse-plan.cjs.map +1 -1
  187. package/dist/runner/reuse-plan.d.cts +4 -1
  188. package/dist/runner/reuse-plan.d.mts +4 -1
  189. package/dist/runner/reuse-plan.d.ts +4 -1
  190. package/dist/runner/setup-prefix-plan.cjs +17 -12
  191. package/dist/runner/setup-prefix-plan.cjs.map +1 -1
  192. package/dist/runner/setup-prefix-plan.d.cts +0 -2
  193. package/dist/runner/setup-prefix-plan.d.mts +0 -2
  194. package/dist/runner/setup-prefix-plan.d.ts +0 -2
  195. package/dist/runner/setup-prefix-plan.js +8 -12
  196. package/dist/sandbox/backend.cjs +10 -1
  197. package/dist/sandbox/backend.cjs.map +1 -1
  198. package/dist/sandbox/backend.d.cts +16 -8
  199. package/dist/sandbox/backend.d.mts +16 -8
  200. package/dist/sandbox/backend.d.ts +16 -8
  201. package/dist/sandbox/backend.js +28 -26
  202. package/dist/sandbox/docker.cjs +7 -1
  203. package/dist/sandbox/docker.cjs.map +1 -1
  204. package/dist/sandbox/e2b-cache-repository.cjs +13 -3
  205. package/dist/sandbox/e2b-cache-repository.cjs.map +1 -1
  206. package/dist/sandbox/e2b-cache-repository.d.cts +3 -0
  207. package/dist/sandbox/e2b-cache-repository.d.mts +3 -0
  208. package/dist/sandbox/e2b-cache-repository.d.ts +3 -0
  209. package/dist/sandbox/e2b-cache-repository.js +16 -12
  210. package/dist/sandbox/e2b.cjs +2 -2
  211. package/dist/sandbox/e2b.cjs.map +1 -1
  212. package/dist/sandbox/incus/materialize.cjs +1 -1
  213. package/dist/sandbox/incus/materialize.cjs.map +1 -1
  214. package/dist/show/contribution.cjs +3 -3
  215. package/dist/show/contribution.cjs.map +1 -1
  216. package/dist/show/model.cjs +14 -13
  217. package/dist/show/model.cjs.map +1 -1
  218. package/dist/show/model.d.cts +7 -7
  219. package/dist/show/model.d.mts +7 -7
  220. package/dist/show/model.d.ts +7 -7
  221. package/dist/show/render.cjs +14 -0
  222. package/dist/show/render.cjs.map +1 -1
  223. package/dist/user-database/storage-worker.cjs +13 -3
  224. package/dist/user-database/storage-worker.cjs.map +1 -1
  225. package/dist/view/app-dist/.vite/manifest.json +2 -2
  226. package/dist/view/app-dist/assets/{index-CmVoXbwG.js → index-B3ijZRph.js} +17 -17
  227. package/dist/view/app-dist/assets/{quality-cost-scatter-BuLISaH4.js → quality-cost-scatter-B--DfJ9s.js} +1 -1
  228. package/dist/view/app-dist/index.html +1 -1
  229. package/dist/view/application-runtime.cjs +8 -0
  230. package/dist/view/application-runtime.cjs.map +1 -0
  231. package/dist/view/application-runtime.d.cts +9 -0
  232. package/dist/view/application-runtime.d.mts +9 -0
  233. package/dist/view/application-runtime.d.ts +9 -0
  234. package/dist/view/application-runtime.js +6 -0
  235. package/dist/view/application-runtime.js.map +1 -0
  236. package/dist/view/cli/contribution.cjs +5 -2
  237. package/dist/view/cli/contribution.cjs.map +1 -1
  238. package/dist/view/cli/contribution.d.cts +2 -1
  239. package/dist/view/cli/contribution.d.mts +2 -1
  240. package/dist/view/cli/contribution.d.ts +2 -1
  241. package/dist/view/function-runtime.mjs +1019 -456
  242. package/dist/view/http-protocol.d.cts +1 -9
  243. package/dist/view/http-protocol.d.mts +1 -9
  244. package/dist/view/http-protocol.d.ts +1 -9
  245. package/dist/view/inspection-host.cjs +39 -30
  246. package/dist/view/inspection-host.cjs.map +1 -1
  247. package/dist/view/inspection-host.d.cts +7545 -2
  248. package/dist/view/inspection-host.d.mts +7545 -2
  249. package/dist/view/inspection-host.d.ts +7545 -2
  250. package/dist/view/server.cjs +8 -5
  251. package/dist/view/server.cjs.map +1 -1
  252. package/dist/view/server.d.cts +4 -2
  253. package/dist/view/server.d.mts +4 -2
  254. package/dist/view/server.d.ts +4 -2
  255. package/docs-site/zh/reference/cli.mdx +1 -2
  256. package/docs-site/zh/tutorials/control-run-cost.mdx +22 -0
  257. package/docs-site/zh/tutorials/niceeval-taste-application.mdx +21 -0
  258. package/package.json +1 -1
@@ -98,13 +98,13 @@ function requireClosure(bytes, digest) {
98
98
  }
99
99
  }
100
100
  function metadataGeneration(connection) {
101
- const row = (0, database_ts_1.recordStatement)(connection, "SELECT storage_generation FROM ne18_record_metadata WHERE singleton=1").get();
101
+ const row = (0, database_ts_1.recordStatement)(connection, "SELECT storage_generation FROM ne19_record_metadata WHERE singleton=1").get();
102
102
  if (row === undefined)
103
103
  throw invalid("ProjectDatabase storage generation is missing");
104
104
  return text(row, "storage_generation");
105
105
  }
106
106
  function currentRevision(connection) {
107
- const row = (0, database_ts_1.recordStatement)(connection, "SELECT revision FROM ne18_run_publication_clock WHERE singleton=1").get();
107
+ const row = (0, database_ts_1.recordStatement)(connection, "SELECT revision FROM ne19_run_publication_clock WHERE singleton=1").get();
108
108
  if (row === undefined)
109
109
  throw invalid("Run publication clock is missing");
110
110
  return integer(row, "revision");
@@ -113,7 +113,7 @@ function cutoffAt(connection, revision) {
113
113
  return Object.freeze({ storeGeneration: metadataGeneration(connection), revision });
114
114
  }
115
115
  function nextRevision(connection) {
116
- const changed = (0, database_ts_1.recordStatement)(connection, "UPDATE ne18_run_publication_clock SET revision=revision+1 WHERE singleton=1").run();
116
+ const changed = (0, database_ts_1.recordStatement)(connection, "UPDATE ne19_run_publication_clock SET revision=revision+1 WHERE singleton=1").run();
117
117
  if (Number(changed.changes) !== 1)
118
118
  throw invalid("Run publication clock could not advance");
119
119
  return currentRevision(connection);
@@ -130,7 +130,7 @@ function requireCutoff(connection, requested) {
130
130
  }
131
131
  function runHeader(connection, runId) {
132
132
  const row = (0, database_ts_1.recordStatement)(connection, `SELECT run_id,current_writer_generation,terminal_state,created_revision,close_revision
133
- FROM ne18_run_resources WHERE run_id=?`).get(runId);
133
+ FROM ne19_run_resources WHERE run_id=?`).get(runId);
134
134
  if (row === undefined)
135
135
  return undefined;
136
136
  const terminalState = optionalText(row, "terminal_state");
@@ -145,7 +145,7 @@ function runHeader(connection, runId) {
145
145
  });
146
146
  }
147
147
  function requireActiveWriter(connection, runId, writerGeneration) {
148
- const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne18_record_metadata WHERE singleton=1").get();
148
+ const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne19_record_metadata WHERE singleton=1").get();
149
149
  if (barrier === undefined || text(barrier, "barrier_state") !== "open") {
150
150
  throw new errors_ts_2.RunStorageError("run-not-active", "ProjectDatabase writer barrier is not open");
151
151
  }
@@ -160,15 +160,15 @@ function requireActiveWriter(connection, runId, writerGeneration) {
160
160
  return run;
161
161
  }
162
162
  function slotExists(connection, runId, slotId) {
163
- return (0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne18_run_expected_slots WHERE run_id=? AND slot_id=?")
163
+ return (0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne19_run_expected_slots WHERE run_id=? AND slot_id=?")
164
164
  .get(runId, slotId) !== undefined;
165
165
  }
166
166
  function slotBound(connection, runId, slotId) {
167
- return (0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne18_run_slot_bindings WHERE target_run_id=? AND slot_id=?")
167
+ return (0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne19_run_slot_bindings WHERE target_run_id=? AND slot_id=?")
168
168
  .get(runId, slotId) !== undefined;
169
169
  }
170
170
  function sourceDeleted(connection, runId) {
171
- return (0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne18_run_deletion_tombstones WHERE run_id=?").get(runId) !== undefined;
171
+ return (0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne19_run_deletion_tombstones WHERE run_id=?").get(runId) !== undefined;
172
172
  }
173
173
  function validateExpectedSlots(slots) {
174
174
  if (slots.length > types_ts_1.RECORD_SQLITE_MAX_ROW_BYTES / 256) {
@@ -201,7 +201,7 @@ function createRunResourceOnConnection(connection, input) {
201
201
  requireIsoInstant(input.startedAt, "startedAt");
202
202
  validateExpectedSlots(input.expectedSlots);
203
203
  return (0, transaction_ts_1.withImmediateTransaction)(connection, input.deadlineEpochMs, "create-run-resource", () => {
204
- const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne18_record_metadata WHERE singleton=1").get();
204
+ const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne19_record_metadata WHERE singleton=1").get();
205
205
  if (barrier === undefined || text(barrier, "barrier_state") !== "open") {
206
206
  throw new errors_ts_2.RunStorageError("run-not-active", "ProjectDatabase writer barrier is not open");
207
207
  }
@@ -209,10 +209,10 @@ function createRunResourceOnConnection(connection, input) {
209
209
  throw new errors_ts_2.RunStorageError("run-storage-invalid", `Run ${input.runId} already exists`);
210
210
  }
211
211
  const revision = nextRevision(connection);
212
- (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_run_resources(run_id,invocation_id,experiment_id,started_at,
212
+ (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_run_resources(run_id,invocation_id,experiment_id,started_at,
213
213
  initial_writer_generation,current_writer_generation,terminal_state,completed_at,created_revision,close_revision)
214
214
  VALUES (?,?,?,?,?,?,NULL,NULL,?,NULL)`).run(input.runId, input.invocationId, input.experimentId, input.startedAt, input.writerGeneration, input.writerGeneration, revision);
215
- const insertSlot = (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_run_expected_slots(run_id,slot_id,ordinal,eval_id,
215
+ const insertSlot = (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_run_expected_slots(run_id,slot_id,ordinal,eval_id,
216
216
  attempt_ordinal,execution_identity_digest) VALUES (?,?,?,?,?,?)`);
217
217
  input.expectedSlots.forEach((slot, ordinal) => insertSlot.run(input.runId, slot.slotId, ordinal, slot.evalId, slot.attemptOrdinal, slot.executionIdentityDigest));
218
218
  return Object.freeze({ runId: input.runId, cutoff: cutoffAt(connection, revision) });
@@ -237,13 +237,13 @@ function publishOriginAttemptOnConnection(connection, input) {
237
237
  if (slotBound(connection, input.runId, input.slotId)) {
238
238
  throw new errors_ts_2.RunStorageError("slot-already-bound", `Run ${input.runId} slot ${input.slotId} is already bound`);
239
239
  }
240
- if ((0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne18_attempt_publications WHERE attempt_id=?").get(input.attemptId) !== undefined) {
240
+ if ((0, database_ts_1.recordStatement)(connection, "SELECT 1 AS present FROM ne19_attempt_publications WHERE attempt_id=?").get(input.attemptId) !== undefined) {
241
241
  throw new errors_ts_2.RunStorageError("attempt-already-published", `Attempt ${input.attemptId} is already published`);
242
242
  }
243
243
  const aggregate = (0, database_ts_1.recordStatement)(connection, `SELECT r.status,r.writer_generation,a.attempt_locator,a.publication_state,a.core_payload,a.core_digest,
244
- m.slot_id AS member_slot FROM ne18_runs r
245
- JOIN ne18_attempts a ON a.origin_run_id=r.run_id AND a.attempt_id=?
246
- JOIN ne18_members m ON m.target_run_id=r.run_id AND m.slot_id=? AND m.origin_run_id=r.run_id AND m.attempt_id=a.attempt_id
244
+ m.slot_id AS member_slot FROM ne19_runs r
245
+ JOIN ne19_attempts a ON a.origin_run_id=r.run_id AND a.attempt_id=?
246
+ JOIN ne19_members m ON m.target_run_id=r.run_id AND m.slot_id=? AND m.origin_run_id=r.run_id AND m.attempt_id=a.attempt_id
247
247
  WHERE r.run_id=?`).get(input.attemptId, input.slotId, input.runId);
248
248
  if (aggregate === undefined || text(aggregate, "writer_generation") !== input.writerGeneration ||
249
249
  (text(aggregate, "status") !== "open" && text(aggregate, "status") !== "sealing") ||
@@ -252,8 +252,8 @@ function publishOriginAttemptOnConnection(connection, input) {
252
252
  typeof aggregate.core_digest !== "string") {
253
253
  throw new errors_ts_2.RunStorageError("run-storage-invalid", "Attempt aggregate is not complete at its publication fence");
254
254
  }
255
- const incomplete = (0, database_ts_1.recordStatement)(connection, `SELECT count(*) AS count FROM ne18_attachments a
256
- LEFT JOIN ne18_contents c ON c.attachment_id=a.attachment_id
255
+ const incomplete = (0, database_ts_1.recordStatement)(connection, `SELECT count(*) AS count FROM ne19_attachments a
256
+ LEFT JOIN ne19_contents c ON c.attachment_id=a.attachment_id
257
257
  WHERE a.owner_run_id=? AND a.owner_attempt_id=? AND
258
258
  (a.logical_identity IS NULL OR a.canonical_payload IS NULL OR a.canonical_digest IS NULL OR
259
259
  a.logical_inventory IS NULL OR a.inventory_digest IS NULL OR
@@ -262,17 +262,17 @@ function publishOriginAttemptOnConnection(connection, input) {
262
262
  if (integer(incomplete, "count") !== 0) {
263
263
  throw new errors_ts_2.RunStorageError("run-storage-invalid", "Attempt attachment closure is incomplete at its publication fence");
264
264
  }
265
- const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne18_record_metadata WHERE singleton=1").get();
265
+ const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne19_record_metadata WHERE singleton=1").get();
266
266
  if (barrier === undefined || text(barrier, "barrier_state") !== "open") {
267
267
  throw new errors_ts_2.RunStorageError("run-not-active", "ProjectDatabase portable barrier is not open");
268
268
  }
269
269
  const revision = nextRevision(connection);
270
- (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_attempt_publications(attempt_id,attempt_locator,origin_run_id,origin_slot_id,
270
+ (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_attempt_publications(attempt_id,attempt_locator,origin_run_id,origin_slot_id,
271
271
  closure_payload,closure_digest,published_revision) VALUES (?,?,?,?,?,?,?)`).run(input.attemptId, input.attemptLocator, input.runId, input.slotId, input.closureBytes, input.closureDigest, revision);
272
- (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_run_slot_bindings(target_run_id,slot_id,attempt_id,origin_run_id,
272
+ (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_run_slot_bindings(target_run_id,slot_id,attempt_id,origin_run_id,
273
273
  origin_slot_id,attempt_publication_revision,action,binding_revision) VALUES (?,?,?,?,?,?,'executed',?)`).run(input.runId, input.slotId, input.attemptId, input.runId, input.slotId, revision, revision);
274
274
  const publicationIdentity = Object.freeze({ originRunId: input.runId, attemptId: input.attemptId, revision });
275
- const frozen = (0, database_ts_1.recordStatement)(connection, `UPDATE ne18_attempts SET publication_state='published'
275
+ const frozen = (0, database_ts_1.recordStatement)(connection, `UPDATE ne19_attempts SET publication_state='published'
276
276
  WHERE origin_run_id=? AND attempt_id=? AND publication_state='sealing'`).run(input.runId, input.attemptId);
277
277
  if (Number(frozen.changes) !== 1) {
278
278
  throw new errors_ts_2.RunStorageError("run-storage-invalid", "Attempt publication fence changed before freeze");
@@ -304,7 +304,7 @@ function bindAttemptReferenceOnConnection(connection, input) {
304
304
  if (slotBound(connection, input.runId, input.slotId)) {
305
305
  throw new errors_ts_2.RunStorageError("slot-already-bound", `Run ${input.runId} slot ${input.slotId} is already bound`);
306
306
  }
307
- const source = (0, database_ts_1.recordStatement)(connection, `SELECT origin_run_id,origin_slot_id,published_revision FROM ne18_attempt_publications
307
+ const source = (0, database_ts_1.recordStatement)(connection, `SELECT origin_run_id,origin_slot_id,published_revision FROM ne19_attempt_publications
308
308
  WHERE attempt_id=?`).get(input.publicationIdentity.attemptId);
309
309
  if (source === undefined || text(source, "origin_run_id") !== input.publicationIdentity.originRunId ||
310
310
  integer(source, "published_revision") !== input.publicationIdentity.revision) {
@@ -314,7 +314,7 @@ function bindAttemptReferenceOnConnection(connection, input) {
314
314
  throw new errors_ts_2.RunStorageError("source-run-deleted", `Origin Run ${input.publicationIdentity.originRunId} is deleted`);
315
315
  }
316
316
  const revision = nextRevision(connection);
317
- (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_run_slot_bindings(target_run_id,slot_id,attempt_id,origin_run_id,
317
+ (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_run_slot_bindings(target_run_id,slot_id,attempt_id,origin_run_id,
318
318
  origin_slot_id,attempt_publication_revision,action,binding_revision) VALUES (?,?,?,?,?,?,?,?)`).run(input.runId, input.slotId, input.publicationIdentity.attemptId, input.publicationIdentity.originRunId, text(source, "origin_slot_id"), input.publicationIdentity.revision, input.action, revision);
319
319
  return Object.freeze({
320
320
  runId: input.runId,
@@ -325,8 +325,8 @@ function bindAttemptReferenceOnConnection(connection, input) {
325
325
  });
326
326
  }
327
327
  function pendingSlotIds(connection, runId) {
328
- const rows = (0, database_ts_1.recordStatement)(connection, `SELECT s.slot_id FROM ne18_run_expected_slots s
329
- LEFT JOIN ne18_run_slot_bindings b ON b.target_run_id=s.run_id AND b.slot_id=s.slot_id
328
+ const rows = (0, database_ts_1.recordStatement)(connection, `SELECT s.slot_id FROM ne19_run_expected_slots s
329
+ LEFT JOIN ne19_run_slot_bindings b ON b.target_run_id=s.run_id AND b.slot_id=s.slot_id
330
330
  WHERE s.run_id=? AND b.slot_id IS NULL ORDER BY s.ordinal`).all(runId);
331
331
  return Object.freeze(rows.map((row) => text(row, "slot_id")));
332
332
  }
@@ -346,7 +346,7 @@ function validateAbsenceClosure(connection, runId, absences) {
346
346
  }
347
347
  }
348
348
  function insertAbsences(connection, runId, revision, absences) {
349
- const insert = (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_run_slot_absences(run_id,slot_id,reason,absence_revision)
349
+ const insert = (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_run_slot_absences(run_id,slot_id,reason,absence_revision)
350
350
  VALUES (?,?,?,?)`);
351
351
  for (const absence of absences)
352
352
  insert.run(runId, absence.slotId, absence.reason, revision);
@@ -360,19 +360,19 @@ function closeRunResourceOnConnection(connection, input) {
360
360
  return (0, transaction_ts_1.withImmediateTransaction)(connection, input.deadlineEpochMs, "close-run-resource", () => {
361
361
  requireActiveWriter(connection, input.runId, input.writerGeneration);
362
362
  validateAbsenceClosure(connection, input.runId, input.absences);
363
- const aggregate = (0, database_ts_1.recordStatement)(connection, "SELECT status,writer_generation FROM ne18_runs WHERE run_id=?")
363
+ const aggregate = (0, database_ts_1.recordStatement)(connection, "SELECT status,writer_generation FROM ne19_runs WHERE run_id=?")
364
364
  .get(input.runId);
365
365
  if (aggregate === undefined || text(aggregate, "status") !== "sealed" ||
366
366
  text(aggregate, "writer_generation") !== input.writerGeneration) {
367
367
  throw new errors_ts_2.RunStorageError("run-storage-invalid", `Run ${input.runId} aggregate is not sealed at close`);
368
368
  }
369
- const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne18_record_metadata WHERE singleton=1").get();
369
+ const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne19_record_metadata WHERE singleton=1").get();
370
370
  if (barrier === undefined || text(barrier, "barrier_state") !== "open") {
371
371
  throw new errors_ts_2.RunStorageError("run-not-active", "ProjectDatabase portable barrier is not open");
372
372
  }
373
373
  const revision = nextRevision(connection);
374
374
  insertAbsences(connection, input.runId, revision, input.absences);
375
- const changed = (0, database_ts_1.recordStatement)(connection, `UPDATE ne18_run_resources SET terminal_state=?,completed_at=?,close_revision=?
375
+ const changed = (0, database_ts_1.recordStatement)(connection, `UPDATE ne19_run_resources SET terminal_state=?,completed_at=?,close_revision=?
376
376
  WHERE run_id=? AND terminal_state IS NULL AND current_writer_generation=?`).run(input.state, input.completedAt, revision, input.runId, input.writerGeneration);
377
377
  if (Number(changed.changes) !== 1)
378
378
  throw new errors_ts_2.RunStorageError("run-not-active", `Run ${input.runId} changed before close`);
@@ -400,20 +400,20 @@ function recoverRunResourceOnConnection(connection, input) {
400
400
  }));
401
401
  const revision = nextRevision(connection);
402
402
  insertAbsences(connection, input.runId, revision, absences);
403
- const changed = (0, database_ts_1.recordStatement)(connection, `UPDATE ne18_run_resources SET current_writer_generation=?,terminal_state='interrupted',
403
+ const changed = (0, database_ts_1.recordStatement)(connection, `UPDATE ne19_run_resources SET current_writer_generation=?,terminal_state='interrupted',
404
404
  completed_at=?,close_revision=? WHERE run_id=? AND terminal_state IS NULL AND current_writer_generation=?`).run(input.recoveryWriterGeneration, input.completedAt, revision, input.runId, input.expectedWriterGeneration);
405
405
  if (Number(changed.changes) !== 1) {
406
406
  throw new errors_ts_2.RunStorageError("writer-generation-mismatch", `Run ${input.runId} changed before recovery fence`);
407
407
  }
408
- (0, database_ts_1.recordStatement)(connection, `DELETE FROM ne18_attachments WHERE owner_run_id=? AND
409
- (owner_kind='run' OR owner_attempt_id NOT IN (SELECT attempt_id FROM ne18_attempt_publications WHERE origin_run_id=?))`)
408
+ (0, database_ts_1.recordStatement)(connection, `DELETE FROM ne19_attachments WHERE owner_run_id=? AND
409
+ (owner_kind='run' OR owner_attempt_id NOT IN (SELECT attempt_id FROM ne19_attempt_publications WHERE origin_run_id=?))`)
410
410
  .run(input.runId, input.runId);
411
- (0, database_ts_1.recordStatement)(connection, `DELETE FROM ne18_members WHERE target_run_id=? AND
412
- (attempt_id IS NULL OR attempt_id NOT IN (SELECT attempt_id FROM ne18_attempt_publications WHERE origin_run_id=?))`)
411
+ (0, database_ts_1.recordStatement)(connection, `DELETE FROM ne19_members WHERE target_run_id=? AND
412
+ (attempt_id IS NULL OR attempt_id NOT IN (SELECT attempt_id FROM ne19_attempt_publications WHERE origin_run_id=?))`)
413
413
  .run(input.runId, input.runId);
414
- (0, database_ts_1.recordStatement)(connection, `DELETE FROM ne18_attempts WHERE origin_run_id=? AND
415
- attempt_id NOT IN (SELECT attempt_id FROM ne18_attempt_publications WHERE origin_run_id=?)`).run(input.runId, input.runId);
416
- (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_run_recoveries(run_id,previous_writer_generation,recovery_writer_generation,
414
+ (0, database_ts_1.recordStatement)(connection, `DELETE FROM ne19_attempts WHERE origin_run_id=? AND
415
+ attempt_id NOT IN (SELECT attempt_id FROM ne19_attempt_publications WHERE origin_run_id=?)`).run(input.runId, input.runId);
416
+ (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_run_recoveries(run_id,previous_writer_generation,recovery_writer_generation,
417
417
  evidence_kind,evidence_identity,evidence_observed_at,recovery_revision) VALUES (?,?,?,?,?,?,?)`).run(input.runId, input.expectedWriterGeneration, input.recoveryWriterGeneration, input.evidence.kind, input.evidence.identity, input.evidence.observedAt, revision);
418
418
  return Object.freeze({
419
419
  runId: input.runId,
@@ -426,8 +426,8 @@ function recoverRunResourceOnConnection(connection, input) {
426
426
  }
427
427
  function incomingReferences(connection, originRunId) {
428
428
  const rows = (0, database_ts_1.recordStatement)(connection, `SELECT b.target_run_id,b.slot_id,b.attempt_id,a.attempt_locator
429
- FROM ne18_run_slot_bindings b JOIN ne18_attempt_publications a ON a.attempt_id=b.attempt_id
430
- LEFT JOIN ne18_run_deletion_tombstones d ON d.run_id=b.target_run_id
429
+ FROM ne19_run_slot_bindings b JOIN ne19_attempt_publications a ON a.attempt_id=b.attempt_id
430
+ LEFT JOIN ne19_run_deletion_tombstones d ON d.run_id=b.target_run_id
431
431
  WHERE b.origin_run_id=? AND b.target_run_id<>? AND d.run_id IS NULL
432
432
  ORDER BY b.target_run_id,b.slot_id,b.attempt_id LIMIT ?`).all(originRunId, originRunId, Math.trunc(types_ts_1.RECORD_SQLITE_MAX_ROW_BYTES / 256) + 1);
433
433
  if (rows.length > types_ts_1.RECORD_SQLITE_MAX_ROW_BYTES / 256) {
@@ -448,15 +448,15 @@ function deleteRunResourceOnConnection(connection, input) {
448
448
  requireTerminalState(input.expectedState);
449
449
  requireIsoInstant(input.deletedAt, "deletedAt");
450
450
  return (0, transaction_ts_1.withImmediateTransaction)(connection, input.deadlineEpochMs, "delete-run-resource", () => {
451
- const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne18_record_metadata WHERE singleton=1").get();
451
+ const barrier = (0, database_ts_1.recordStatement)(connection, "SELECT barrier_state FROM ne19_record_metadata WHERE singleton=1").get();
452
452
  if (barrier === undefined || text(barrier, "barrier_state") === "draining") {
453
453
  throw new errors_ts_2.RunStorageError("run-not-active", "ProjectDatabase writer barrier is not open");
454
454
  }
455
455
  if (text(barrier, "barrier_state") === "portable") {
456
456
  const generation = (0, node_crypto_1.randomUUID)();
457
- (0, database_ts_1.recordStatement)(connection, `UPDATE ne18_record_metadata SET barrier_state='open',storage_generation=?,portable_generation=NULL,
457
+ (0, database_ts_1.recordStatement)(connection, `UPDATE ne19_record_metadata SET barrier_state='open',storage_generation=?,portable_generation=NULL,
458
458
  portable_revision=NULL,portable_gate_id=NULL WHERE singleton=1 AND barrier_state='portable'`).run(generation);
459
- (0, database_ts_1.recordStatement)(connection, "UPDATE ne18_coordination_state SET operational_generation=?,revision=revision+1 WHERE singleton=1")
459
+ (0, database_ts_1.recordStatement)(connection, "UPDATE ne19_coordination_state SET operational_generation=?,revision=revision+1 WHERE singleton=1")
460
460
  .run(generation);
461
461
  }
462
462
  const run = runHeader(connection, input.runId);
@@ -465,7 +465,7 @@ function deleteRunResourceOnConnection(connection, input) {
465
465
  if (run.terminalState !== input.expectedState) {
466
466
  throw new errors_ts_2.RunStorageError("run-state-mismatch", `Run ${input.runId} is ${run.terminalState ?? "active"}, not ${input.expectedState}`);
467
467
  }
468
- const tombstone = (0, database_ts_1.recordStatement)(connection, "SELECT deletion_revision FROM ne18_run_deletion_tombstones WHERE run_id=?")
468
+ const tombstone = (0, database_ts_1.recordStatement)(connection, "SELECT deletion_revision FROM ne19_run_deletion_tombstones WHERE run_id=?")
469
469
  .get(input.runId);
470
470
  if (tombstone !== undefined) {
471
471
  const revision = integer(tombstone, "deletion_revision");
@@ -476,7 +476,7 @@ function deleteRunResourceOnConnection(connection, input) {
476
476
  throw new errors_ts_2.RunStorageError("run-delete-reference-conflict", `Run ${input.runId} has incoming Attempt references`, dependencies);
477
477
  }
478
478
  const revision = nextRevision(connection);
479
- (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne18_run_deletion_tombstones(run_id,terminal_state,deleted_at,deletion_revision)
479
+ (0, database_ts_1.recordStatement)(connection, `INSERT INTO ne19_run_deletion_tombstones(run_id,terminal_state,deleted_at,deletion_revision)
480
480
  VALUES (?,?,?,?)`).run(input.runId, input.expectedState, input.deletedAt, revision);
481
481
  return Object.freeze({ runId: input.runId, state: input.expectedState, cutoff: cutoffAt(connection, revision) });
482
482
  });
@@ -490,8 +490,8 @@ function publicationIdentity(row) {
490
490
  }
491
491
  function readSlotPublication(connection, runId, slotId, cutoff) {
492
492
  const binding = (0, database_ts_1.recordStatement)(connection, `SELECT b.action,b.binding_revision,b.attempt_id,b.origin_run_id,b.origin_slot_id,
493
- b.attempt_publication_revision,a.attempt_locator FROM ne18_run_slot_bindings b
494
- JOIN ne18_attempt_publications a ON a.attempt_id=b.attempt_id
493
+ b.attempt_publication_revision,a.attempt_locator FROM ne19_run_slot_bindings b
494
+ JOIN ne19_attempt_publications a ON a.attempt_id=b.attempt_id
495
495
  WHERE b.target_run_id=? AND b.slot_id=? AND b.binding_revision<=?`).get(runId, slotId, cutoff.revision);
496
496
  if (binding !== undefined) {
497
497
  const action = text(binding, "action");
@@ -509,7 +509,7 @@ function readSlotPublication(connection, runId, slotId, cutoff) {
509
509
  bindingRevision: integer(binding, "binding_revision"),
510
510
  });
511
511
  }
512
- const absence = (0, database_ts_1.recordStatement)(connection, `SELECT reason,absence_revision FROM ne18_run_slot_absences
512
+ const absence = (0, database_ts_1.recordStatement)(connection, `SELECT reason,absence_revision FROM ne19_run_slot_absences
513
513
  WHERE run_id=? AND slot_id=? AND absence_revision<=?`).get(runId, slotId, cutoff.revision);
514
514
  if (absence !== undefined) {
515
515
  const reason = text(absence, "reason");
@@ -521,7 +521,7 @@ function readSlotPublication(connection, runId, slotId, cutoff) {
521
521
  function readRunAtCutoff(connection, runId, cutoff) {
522
522
  const row = (0, database_ts_1.recordStatement)(connection, `SELECT r.run_id,r.invocation_id,r.experiment_id,r.started_at,r.initial_writer_generation,r.current_writer_generation,
523
523
  r.terminal_state,r.completed_at,r.created_revision,r.close_revision,d.deletion_revision
524
- FROM ne18_run_resources r LEFT JOIN ne18_run_deletion_tombstones d ON d.run_id=r.run_id WHERE r.run_id=?`).get(runId);
524
+ FROM ne19_run_resources r LEFT JOIN ne19_run_deletion_tombstones d ON d.run_id=r.run_id WHERE r.run_id=?`).get(runId);
525
525
  if (row === undefined || integer(row, "created_revision") > cutoff.revision ||
526
526
  row.deletion_revision !== null && row.deletion_revision !== undefined && integer(row, "deletion_revision") <= cutoff.revision) {
527
527
  return undefined;
@@ -535,7 +535,7 @@ function readRunAtCutoff(connection, runId, cutoff) {
535
535
  ? terminalState ?? (() => { throw invalid(`Run ${runId} close revision lacks terminal state`); })()
536
536
  : "active";
537
537
  const slotRows = (0, database_ts_1.recordStatement)(connection, `SELECT slot_id,eval_id,attempt_ordinal,execution_identity_digest
538
- FROM ne18_run_expected_slots WHERE run_id=? ORDER BY ordinal LIMIT ?`).all(runId, Math.trunc(types_ts_1.RECORD_SQLITE_MAX_ROW_BYTES / 256) + 1);
538
+ FROM ne19_run_expected_slots WHERE run_id=? ORDER BY ordinal LIMIT ?`).all(runId, Math.trunc(types_ts_1.RECORD_SQLITE_MAX_ROW_BYTES / 256) + 1);
539
539
  if (slotRows.length > types_ts_1.RECORD_SQLITE_MAX_ROW_BYTES / 256) {
540
540
  throw invalid(`Run ${runId} expected slot inventory exceeds its bounded read`);
541
541
  }
@@ -576,12 +576,12 @@ function listRunResourcesOnConnection(connection, input = {}) {
576
576
  if (!Number.isSafeInteger(pageSize) || pageSize < 1 || pageSize > 256)
577
577
  throw invalid("Run page size must be between 1 and 256");
578
578
  const rows = (input.invocationId === undefined
579
- ? (0, database_ts_1.recordStatement)(connection, `SELECT r.run_id FROM ne18_run_resources r
580
- LEFT JOIN ne18_run_deletion_tombstones d ON d.run_id=r.run_id
579
+ ? (0, database_ts_1.recordStatement)(connection, `SELECT r.run_id FROM ne19_run_resources r
580
+ LEFT JOIN ne19_run_deletion_tombstones d ON d.run_id=r.run_id
581
581
  WHERE r.created_revision<=? AND (d.deletion_revision IS NULL OR d.deletion_revision>?) AND r.run_id>?
582
582
  ORDER BY r.run_id LIMIT ?`).all(cutoff.revision, cutoff.revision, afterRunId, pageSize + 1)
583
- : (0, database_ts_1.recordStatement)(connection, `SELECT r.run_id FROM ne18_run_resources r
584
- LEFT JOIN ne18_run_deletion_tombstones d ON d.run_id=r.run_id
583
+ : (0, database_ts_1.recordStatement)(connection, `SELECT r.run_id FROM ne19_run_resources r
584
+ LEFT JOIN ne19_run_deletion_tombstones d ON d.run_id=r.run_id
585
585
  WHERE r.created_revision<=? AND (d.deletion_revision IS NULL OR d.deletion_revision>?) AND r.invocation_id=? AND r.run_id>?
586
586
  ORDER BY r.run_id LIMIT ?`).all(cutoff.revision, cutoff.revision, input.invocationId, afterRunId, pageSize + 1));
587
587
  const selected = rows.slice(0, pageSize);
@@ -596,8 +596,8 @@ function readPublishedAttemptOnConnection(connection, attemptId, requestedCutoff
596
596
  requireIdentity(attemptId, "attemptId");
597
597
  const cutoff = requireCutoff(connection, requestedCutoff);
598
598
  const row = (0, database_ts_1.recordStatement)(connection, `SELECT a.attempt_id,a.attempt_locator,a.origin_run_id,a.origin_slot_id,a.closure_payload,
599
- a.closure_digest,a.published_revision,d.deletion_revision FROM ne18_attempt_publications a
600
- LEFT JOIN ne18_run_deletion_tombstones d ON d.run_id=a.origin_run_id WHERE a.attempt_id=?`).get(attemptId);
599
+ a.closure_digest,a.published_revision,d.deletion_revision FROM ne19_attempt_publications a
600
+ LEFT JOIN ne19_run_deletion_tombstones d ON d.run_id=a.origin_run_id WHERE a.attempt_id=?`).get(attemptId);
601
601
  if (row === undefined || integer(row, "published_revision") > cutoff.revision ||
602
602
  row.deletion_revision !== null && row.deletion_revision !== undefined && integer(row, "deletion_revision") <= cutoff.revision) {
603
603
  return undefined;