@devries-cameron20 / t3code Mirror · read-only / commits / c7e3993fe9
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 19:30 UTC

fix(server): speed up shell snapshots on large databases (#23751)

Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Yash Singh committed Oct 22, 2026 at 18:36 UTC c7e3993fe9fb8e75ccfb1ac64fb360c130d91689
5 files changed +281 -72
apps/server/src/orchestration-v2/ProjectionStore.test.ts
+164
@@ -2374,6 +2374,170 @@ it.layer(layerTest)("ProjectionStoreV2", (it) => {
2374 }),
2375 );
2376
2377 + it.effect("looks up shell stop requests through the interrupt request index", () =>
2378 + Effect.gen(function* () {
2379 + const projectionStore = yield* ProjectionStore.ProjectionStoreV2;
2380 + const sql = yield* SqlClient.SqlClient;
2381 + const { projectId } = yield* assertProjectScopedShells("sql-shell-stop-index");
2382 + const { statements, tracer } = traceSqlStatements();
2383 + yield* projectionStore
2384 + .getShellSnapshot({ projectId, location: "active" })
2385 + .pipe(Effect.withTracer(tracer));
2386 +
2387 + const threadQuery = statements.find((statement) =>
2388 + statement.includes("AS latest_run_stop_requested"),
2389 + );
2390 + assert.isDefined(threadQuery);
2391 + const stopRequestLookups = (yield* sql.unsafe<{ readonly detail: string }>(
2392 + `EXPLAIN QUERY PLAN ${threadQuery}`,
2393 + ))
2394 + .map((row) => row.detail)
2395 + .filter((detail) => detail.startsWith("SEARCH stop_request "));
2396 + assert.lengthOf(stopRequestLookups, 2);
2397 + for (const lookup of stopRequestLookups) {
2398 + assert.include(lookup, "orchestration_v2_projection_turn_items_stop_request_idx");
2399 + }
2400 + }),
2401 + );
2402 +
2403 + it.effect(
2404 + "counts each shell's own runless and live-run items, skipping rolled back and missing runs",
2405 + () =>
2406 + Effect.gen(function* () {
2407 + const projectionStore = yield* ProjectionStore.ProjectionStoreV2;
2408 + const now = yield* DateTime.now;
2409 + const projectId = ProjectId.make("project:shell-item-counts");
2410 + const busyThreadId = ThreadId.make("thread:shell-item-counts:busy");
2411 + const emptyThreadId = ThreadId.make("thread:shell-item-counts:empty");
2412 + const otherThreadId = ThreadId.make("thread:shell-item-counts:other");
2413 + for (const threadId of [busyThreadId, emptyThreadId, otherThreadId]) {
2414 + yield* projectionStore.apply({
2415 + id: EventId.make(`event:${threadId}:created`),
2416 + type: "thread.created",
2417 + threadId,
2418 + occurredAt: now,
2419 + payload: {
2420 + createdBy: "user",
2421 + creationSource: "web",
2422 + id: threadId,
2423 + projectId,
2424 + title: threadId,
2425 + providerInstanceId,
2426 + modelSelection,
2427 + runtimeMode: "full-access",
2428 + interactionMode: "default",
2429 + branch: null,
2430 + worktreePath: null,
2431 + activeProviderThreadId: null,
2432 + lineage: { parentThreadId: null, relationshipToParent: null, rootThreadId: threadId },
2433 + forkedFrom: null,
2434 + createdAt: now,
2435 + updatedAt: now,
2436 + archivedAt: null,
2437 + settledOverride: null,
2438 + settledAt: null,
2439 + lastVisitedAt: null,
2440 + deletedAt: null,
2441 + },
2442 + });
2443 + }
2444 + const applyRun = (
2445 + threadId: ThreadId,
2446 + suffix: string,
2447 + ordinal: number,
2448 + rolledBack: boolean,
2449 + ) => {
2450 + const runId = RunId.make(`run:shell-item-counts:${suffix}`);
2451 + const rootNodeId = NodeId.make(`node:shell-item-counts:${suffix}`);
2452 + return projectionStore
2453 + .apply({
2454 + id: EventId.make(`event:shell-item-counts:${suffix}:run`),
2455 + type: "run.created",
2456 + threadId,
2457 + runId,
2458 + nodeId: rootNodeId,
2459 + driver,
2460 + occurredAt: now,
2461 + payload: {
2462 + id: runId,
2463 + threadId,
2464 + ordinal,
2465 + providerInstanceId,
2466 + modelSelection,
2467 + providerThreadId: null,
2468 + userMessageId: MessageId.make(`message:shell-item-counts:${suffix}:user`),
2469 + rootNodeId,
2470 + activeAttemptId: null,
2471 + status: rolledBack ? "rolled_back" : "completed",
2472 + requestedAt: now,
2473 + startedAt: now,
2474 + completedAt: now,
2475 + checkpointId: null,
2476 + contextHandoffId: null,
2477 + },
2478 + })
2479 + .pipe(Effect.as(runId));
2480 + };
2481 + let ordinal = 0;
2482 + const applyItem = (threadId: ThreadId, runId: RunId | null) => {
2483 + ordinal += 1;
2484 + return projectionStore.apply({
2485 + id: EventId.make(`event:shell-item-counts:item:${ordinal}`),
2486 + type: "turn-item.updated",
2487 + threadId,
2488 + ...(runId === null ? {} : { runId }),
2489 + occurredAt: now,
2490 + payload: {
2491 + id: TurnItemId.make(`turn-item:shell-item-counts:${ordinal}`),
2492 + threadId,
2493 + runId,
2494 + nodeId: null,
2495 + providerThreadId: null,
2496 + providerTurnId: null,
2497 + nativeItemRef: null,
2498 + parentItemId: null,
2499 + ordinal,
2500 + status: "completed",
2501 + title: null,
2502 + startedAt: now,
2503 + completedAt: now,
2504 + updatedAt: now,
2505 + type: "assistant_message",
2506 + messageId: MessageId.make(`message:shell-item-counts:${ordinal}`),
2507 + text: `item ${ordinal}`,
2508 + streaming: false,
2509 + },
2510 + });
2511 + };
2512 +
2513 + const completedRunId = yield* applyRun(busyThreadId, "busy-completed", 1, false);
2514 + const rolledBackRunId = yield* applyRun(busyThreadId, "busy-rolled-back", 2, true);
2515 + const otherRunId = yield* applyRun(otherThreadId, "other", 1, false);
2516 + yield* applyItem(busyThreadId, null);
2517 + yield* applyItem(busyThreadId, null);
2518 + yield* applyItem(busyThreadId, completedRunId);
2519 + yield* applyItem(busyThreadId, completedRunId);
2520 + yield* applyItem(busyThreadId, rolledBackRunId);
2521 + yield* applyItem(busyThreadId, RunId.make("run:shell-item-counts:missing"));
2522 + yield* applyItem(otherThreadId, otherRunId);
2523 +
2524 + const snapshot = yield* projectionStore.getShellSnapshot({ projectId });
2525 + const expected = [
2526 + [busyThreadId, 4],
2527 + [emptyThreadId, 0],
2528 + [otherThreadId, 1],
2529 + ] as const;
2530 + for (const [threadId, itemCount] of expected) {
2531 + const shell = yield* projectionStore.getThreadShell(threadId);
2532 + assert.deepEqual(
2533 + snapshot.threads.find((thread) => thread.id === threadId),
2534 + shell ?? undefined,
2535 + );
2536 + assert.equal(shell?.itemCount, itemCount);
2537 + }
2538 + }),
2539 + );
2540 +
2541 it.effect("does not treat visited or marked-unread state as thread activity", () =>
2542 Effect.gen(function* () {
2543 const projectionStore = yield* ProjectionStore.ProjectionStoreV2;
apps/server/src/orchestration-v2/ProjectionStore.ts
+101 -72
@@ -1076,8 +1076,6 @@ type ShellThreadRow = {
1076 readonly latest_user_message_at: string | null;
1077 readonly latest_user_authored_message_at: string | null;
1078 readonly has_actionable_proposed_plan: number;
1079 - readonly item_count: number;
1080 - readonly runless_item_count: number;
1079 };
1080
1081 type ShellRunRow = {
@@ -1105,6 +1103,12 @@ type ShellRunItemCountRow = {
1103 readonly item_count: number;
1104 };
1105
1106 +type ShellItemCountRow = {
1107 + readonly thread_id: string;
1108 + readonly item_count: number;
1109 + readonly runless_item_count: number;
1110 +};
1111 +
1112 const encodeTimelineSources = Schema.encodeEffect(
1113 Schema.fromJsonString(
1114 Schema.Array(Schema.Struct({ threadId: Schema.String, id: Schema.String })),
@@ -5763,27 +5767,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
5767 WHERE plan.thread_id = t.thread_id
5768 AND plan.kind = 'proposed_plan'
5769 AND plan.status = 'active'
5766 - ) AS has_actionable_proposed_plan,
5767 - -- Count per run on the covering (thread_id, run_id) index, then
5768 - -- look up each run once, instead of one run lookup per item.
5769 - (
5770 - SELECT COALESCE(SUM(per_run.item_count), 0)
5771 - FROM (
5772 - SELECT i.run_id, COUNT(*) AS item_count
5773 - FROM orchestration_v2_projection_turn_items i
5774 - WHERE i.thread_id = t.thread_id
5775 - GROUP BY i.run_id
5776 - ) per_run
5777 - LEFT JOIN orchestration_v2_projection_runs r
5778 - ON r.run_id = per_run.run_id
5779 - WHERE per_run.run_id IS NULL OR r.status <> 'rolled_back'
5780 - ) AS item_count,
5781 - (
5782 - SELECT COUNT(*)
5783 - FROM orchestration_v2_projection_turn_items i
5784 - WHERE i.thread_id = t.thread_id
5785 - AND i.run_id IS NULL
5786 - ) AS runless_item_count
5770 + ) AS has_actionable_proposed_plan
5771 FROM orchestration_v2_projection_threads t
5772 LEFT JOIN orchestration_v2_projection_runs active ON active.run_id = (
5773 SELECT r.run_id
@@ -5847,21 +5831,31 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
5831 WHERE thread_id IN ${sql.in(threadIds)}
5832 `;
5833
5850 - const selectShellRunItemCounts = (threadIds?: ReadonlyArray<ThreadId>) =>
5851 - threadIds === undefined
5852 - ? sql<ShellRunItemCountRow>`
5853 - SELECT thread_id, run_id, COUNT(*) AS item_count
5854 - FROM orchestration_v2_projection_turn_items
5855 - WHERE run_id IS NOT NULL
5856 - GROUP BY thread_id, run_id
5857 - `
5858 - : sql<ShellRunItemCountRow>`
5859 - SELECT thread_id, run_id, COUNT(*) AS item_count
5860 - FROM orchestration_v2_projection_turn_items
5861 - WHERE run_id IS NOT NULL
5862 - AND thread_id IN ${sql.in(threadIds)}
5863 - GROUP BY thread_id, run_id
5864 - `;
5834 + const selectShellRunItemCounts = (threadIds: ReadonlyArray<ThreadId>) =>
5835 + sql<ShellRunItemCountRow>`
5836 + SELECT thread_id, run_id, COUNT(*) AS item_count
5837 + FROM orchestration_v2_projection_turn_items
5838 + WHERE run_id IS NOT NULL AND thread_id IN ${sql.in(threadIds)}
5839 + GROUP BY thread_id, run_id
5840 + `;
5841 +
5842 + // Count all selected threads in one index walk; fork sources still need per-run counts.
5843 + const selectShellItemCounts = (threadIds: ReadonlyArray<ThreadId>) =>
5844 + sql<ShellItemCountRow>`
5845 + SELECT counts.thread_id,
5846 + SUM(CASE WHEN counts.run_id IS NULL OR r.status <> 'rolled_back'
5847 + THEN counts.item_count ELSE 0 END) AS item_count,
5848 + SUM(CASE WHEN counts.run_id IS NULL THEN counts.item_count ELSE 0 END)
5849 + AS runless_item_count
5850 + FROM (
5851 + SELECT thread_id, run_id, COUNT(*) AS item_count
5852 + FROM orchestration_v2_projection_turn_items
5853 + WHERE thread_id IN ${sql.in(threadIds)}
5854 + GROUP BY thread_id, run_id
5855 + ) counts
5856 + LEFT JOIN orchestration_v2_projection_runs r ON r.run_id = counts.run_id
5857 + GROUP BY counts.thread_id
5858 + `;
5859
5860 const selectShellProviderThreadRows = (threadIds?: ReadonlyArray<ThreadId>) =>
5861 threadIds === undefined
@@ -5928,6 +5922,17 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
5922 return { runOrdinalsByThreadId, itemCountsByThreadId };
5923 };
5924
5925 + const shellItemCountMap = (rows: ReadonlyArray<ShellItemCountRow>) =>
5926 + new Map(
5927 + rows.map(
5928 + (row) =>
5929 + [
5930 + ThreadId.make(row.thread_id),
5931 + { itemCount: row.item_count, runlessItemCount: row.runless_item_count },
5932 + ] as const,
5933 + ),
5934 + );
5935 +
5936 const pendingBackgroundDataByThreadId = Effect.fn(
5937 "ProjectionStore.pendingBackgroundDataByThreadId",
5938 )(function* (input: {
@@ -6131,6 +6136,10 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6136 readonly row: ShellThreadRow;
6137 readonly runOrdinalsByThreadId: ReadonlyMap<ThreadId, Map<RunId, number>>;
6138 readonly itemCountsByThreadId: ReadonlyMap<ThreadId, Map<RunId, number>>;
6139 + readonly shellItemCountsByThreadId: ReadonlyMap<
6140 + ThreadId,
6141 + { readonly itemCount: number; readonly runlessItemCount: number }
6142 + >;
6143 readonly providerThreadsByThreadId: ReadonlyMap<
6144 ThreadId,
6145 ReadonlyArray<OrchestrationV2ThreadProjection["providerThreads"][number]>
@@ -6144,6 +6153,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6153 row,
6154 runOrdinalsByThreadId,
6155 itemCountsByThreadId,
6156 + shellItemCountsByThreadId,
6157 providerThreadsByThreadId,
6158 pendingTurnItemsByThreadId,
6159 } = input;
@@ -6277,8 +6287,8 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6287 providerThreadsByThreadId.get(thread.id) ?? [],
6288 thread.activeProviderThreadId,
6289 ),
6280 - itemCount: row.item_count,
6281 - runlessItemCount: row.runless_item_count,
6290 + itemCount: shellItemCountsByThreadId.get(thread.id)?.itemCount ?? 0,
6291 + runlessItemCount: shellItemCountsByThreadId.get(thread.id)?.runlessItemCount ?? 0,
6292 updatedAt: thread.updatedAt,
6293 runOrdinalById: runOrdinalsByThreadId.get(ThreadId.make(row.thread_id)) ?? new Map(),
6294 itemCountByRunId: itemCountsByThreadId.get(ThreadId.make(row.thread_id)) ?? new Map(),
@@ -6318,33 +6328,41 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6328 read: (ids: ReadonlyArray<ThreadId>) => Effect.Effect<ReadonlyArray<A>, unknown>,
6329 ids: ReadonlyArray<ThreadId> = threadIds,
6330 ) => (ids.length === 0 ? Effect.succeed([] as ReadonlyArray<A>) : read(ids));
6321 - const [runRows, itemCountRows, sequenceRows, providerThreadRows, pendingTurnItemRows] =
6322 - yield* Effect.all([
6323 - readForThreadIds(selectShellRunRows, forkSourceIds),
6324 - readForThreadIds(selectShellRunItemCounts, forkSourceIds),
6325 - sql<{ readonly snapshot_sequence: number | null }>`
6331 + const [
6332 + runRows,
6333 + itemCountRows,
6334 + shellItemCountRows,
6335 + sequenceRows,
6336 + providerThreadRows,
6337 + pendingTurnItemRows,
6338 + ] = yield* Effect.all([
6339 + readForThreadIds(selectShellRunRows, forkSourceIds),
6340 + readForThreadIds(selectShellRunItemCounts, forkSourceIds),
6341 + readForThreadIds(selectShellItemCounts),
6342 + sql<{ readonly snapshot_sequence: number | null }>`
6343 SELECT MAX(sequence) AS snapshot_sequence
6344 FROM orchestration_events
6345 WHERE application_event_version = 2
6346 AND aggregate_kind = 'thread'
6347 `,
6331 - readForThreadIds(selectShellProviderThreadRows),
6332 - readForThreadIds((ids) =>
6333 - selectShellPendingTurnItemRows(
6334 - ids,
6335 - threadRows.flatMap((row) =>
6336 - row.active_run_id !== null && row.active_run_status === "running"
6337 - ? [row.active_run_id]
6338 - : [],
6339 - ),
6348 + readForThreadIds(selectShellProviderThreadRows),
6349 + readForThreadIds((ids) =>
6350 + selectShellPendingTurnItemRows(
6351 + ids,
6352 + threadRows.flatMap((row) =>
6353 + row.active_run_id !== null && row.active_run_status === "running"
6354 + ? [row.active_run_id]
6355 + : [],
6356 ),
6357 ),
6342 - ]);
6358 + ),
6359 + ]);
6360 return {
6361 targetThreadIds,
6362 threadRows,
6363 runRows,
6364 itemCountRows,
6365 + shellItemCountRows,
6366 sequenceRows,
6367 providerThreadRows,
6368 pendingTurnItemRows,
@@ -6356,6 +6374,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6374 threadRows,
6375 runRows,
6376 itemCountRows,
6377 + shellItemCountRows,
6378 sequenceRows,
6379 providerThreadRows,
6380 pendingTurnItemRows,
@@ -6364,6 +6383,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6383 runRows,
6384 itemCountRows,
6385 });
6386 + const shellItemCountsByThreadId = shellItemCountMap(shellItemCountRows);
6387 const { providerThreadsByThreadId, pendingTurnItemsByThreadId } =
6388 yield* pendingBackgroundDataByThreadId({ providerThreadRows, pendingTurnItemRows });
6389 const states = yield* Effect.forEach(threadRows, (row) =>
@@ -6371,6 +6391,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6391 row,
6392 runOrdinalsByThreadId,
6393 itemCountsByThreadId,
6394 + shellItemCountsByThreadId,
6395 providerThreadsByThreadId,
6396 pendingTurnItemsByThreadId,
6397 }),
@@ -6435,28 +6456,35 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6456
6457 const threadIds = [...rowsByThreadId.keys()];
6458 const forkSourceIds = shellForkSourceIds([...rowsByThreadId.values()]);
6438 - const [runRows, itemCountRows, providerThreadRows, pendingTurnItemRows] =
6439 - yield* Effect.all([
6440 - forkSourceIds.length === 0
6441 - ? Effect.succeed([] as ReadonlyArray<ShellRunRow>)
6442 - : selectShellRunRows(forkSourceIds),
6443 - forkSourceIds.length === 0
6444 - ? Effect.succeed([] as ReadonlyArray<ShellRunItemCountRow>)
6445 - : selectShellRunItemCounts(forkSourceIds),
6446 - selectShellProviderThreadRows(threadIds),
6447 - selectShellPendingTurnItemRows(
6448 - threadIds,
6449 - [...rowsByThreadId.values()].flatMap((row) =>
6450 - row.active_run_id !== null && row.active_run_status === "running"
6451 - ? [row.active_run_id]
6452 - : [],
6453 - ),
6459 + const [
6460 + runRows,
6461 + itemCountRows,
6462 + shellItemCountRows,
6463 + providerThreadRows,
6464 + pendingTurnItemRows,
6465 + ] = yield* Effect.all([
6466 + forkSourceIds.length === 0
6467 + ? Effect.succeed([] as ReadonlyArray<ShellRunRow>)
6468 + : selectShellRunRows(forkSourceIds),
6469 + forkSourceIds.length === 0
6470 + ? Effect.succeed([] as ReadonlyArray<ShellRunItemCountRow>)
6471 + : selectShellRunItemCounts(forkSourceIds),
6472 + selectShellItemCounts(threadIds),
6473 + selectShellProviderThreadRows(threadIds),
6474 + selectShellPendingTurnItemRows(
6475 + threadIds,
6476 + [...rowsByThreadId.values()].flatMap((row) =>
6477 + row.active_run_id !== null && row.active_run_status === "running"
6478 + ? [row.active_run_id]
6479 + : [],
6480 ),
6455 - ]);
6481 + ),
6482 + ]);
6483 const { runOrdinalsByThreadId, itemCountsByThreadId } = runMapsByThreadId({
6484 runRows,
6485 itemCountRows,
6486 });
6487 + const shellItemCountsByThreadId = shellItemCountMap(shellItemCountRows);
6488 const { providerThreadsByThreadId, pendingTurnItemsByThreadId } =
6489 yield* pendingBackgroundDataByThreadId({ providerThreadRows, pendingTurnItemRows });
6490
@@ -6465,6 +6493,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6493 row,
6494 runOrdinalsByThreadId,
6495 itemCountsByThreadId,
6496 + shellItemCountsByThreadId,
6497 providerThreadsByThreadId,
6498 pendingTurnItemsByThreadId,
6499 }),
apps/server/src/persistence/Migrations.ts
+2
@@ -70,6 +70,7 @@ import Migration0064 from "./Migrations/064_CanonicalizeThreadPullRequestLinks.t
70 import Migration0065 from "./Migrations/065_CodexUsageNativeTurnIndex.ts";
71 import Migration0066 from "./Migrations/066_RepairClientSettlementTimestamps.ts";
72 import Migration0067 from "./Migrations/067_WebhookDedupe.ts";
73 +import Migration0068 from "./Migrations/068_ShellStopRequestIndex.ts";
74
75 const migrationEntries = [
76 [1, "OrchestrationEvents", Migration0001],
@@ -140,6 +141,7 @@ const migrationEntries = [
141 [65, "CodexUsageNativeTurnIndex", Migration0065],
142 [66, "RepairClientSettlementTimestamps", Migration0066],
143 [67, "WebhookDedupe", Migration0067],
144 + [68, "ShellStopRequestIndex", Migration0068],
145 ] as const;
146
147 export const migrationManifest = migrationEntries.map(([id, name]) => [id, name] as const);
apps/server/src/persistence/Migrations/068_ShellStopRequestIndex.ts new
+12
@@ -0,0 +1,12 @@
1 +import * as Effect from "effect/Effect";
2 +import * as SqlClient from "effect/sql/SqlClient";
3 +
4 +export default Effect.gen(function* () {
5 + const sql = yield* SqlClient.SqlClient;
6 +
7 + yield* sql`
8 + CREATE INDEX orchestration_v2_projection_turn_items_stop_request_idx
9 + ON orchestration_v2_projection_turn_items(thread_id, run_id)
10 + WHERE type = 'run_interrupt_request'
11 + `;
12 +});
apps/server/src/persistence/reconcileV2PreviewMigration.test.ts
+2
@@ -47,6 +47,7 @@ describe("V2 preview upgrade", () => {
47 [65, "CodexUsageNativeTurnIndex"],
48 [66, "RepairClientSettlementTimestamps"],
49 [67, "WebhookDedupe"],
50 + [68, "ShellStopRequestIndex"],
51 ]);
52 assert.deepStrictEqual(yield* runMigrations(), []);
53 assert.deepStrictEqual(yield* sql`SELECT * FROM orchestration_v2_legacy_imports`, imports);
@@ -137,6 +138,7 @@ describe("V2 preview upgrade", () => {
138 [65, "CodexUsageNativeTurnIndex"],
139 [66, "RepairClientSettlementTimestamps"],
140 [67, "WebhookDedupe"],
141 + [68, "ShellStopRequestIndex"],
142 ]);
143 }).pipe(Effect.provide(NodeSqliteClient.layer({ filename: ":memory:" }))),
144 );