Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

migrate-dev-db.test.ts

515 lines22.6 KB

1import * as NodeServices from "@effect/platform-node/NodeServices";
2import { assert, it } from "@effect/vitest";
3import * as Effect from "effect/Effect";
4import * as FileSystem from "effect/FileSystem";
5import * as Path from "effect/Path";
6import * as SqlClient from "effect/sql/SqlClient";
7​
8import { runMigrations } from "../src/persistence/Migrations.ts";
9import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient";
10import { runMigrateDevDb } from "./migrate-dev-db.ts";
11​
12const withDatabase = <A, E>(
13 databasePath: string,
14 effect: Effect.Effect<A, E, SqlClient.SqlClient>,
15) => effect.pipe(Effect.provide(NodeSqliteClient.layer({ filename: databasePath })));
16​
17const insertPeerLink = (sql: SqlClient.SqlClient) => sql`INSERT INTO peer_environment_links
18 (environment_id, secret_name, label, urls_json, access, linked_at, expires_at)
19 VALUES ('environment-box', 'peer-link-box', 'Box', '["https://box.example"]', 'auto',
20 '2026-08-01', '2027-08-01')`;
21​
22const createFixtureSource = Effect.fn("createMigrateDevDbFixtureSource")(function* (
23 baseDir: string,
24 toMigrationInclusive?: number,
25) {
26 const fs = yield* FileSystem.FileSystem;
27 const path = yield* Path.Path;
28 const stateDir = path.join(baseDir, "userdata");
29 const databasePath = path.join(stateDir, "statev2.sqlite");
30 yield* fs.makeDirectory(stateDir, { recursive: true });
31 yield* withDatabase(
32 databasePath,
33 Effect.gen(function* () {
34 const sql = yield* SqlClient.SqlClient;
35 yield* runMigrations({ toMigrationInclusive });
36​
37 const scripts = JSON.stringify([
38 { id: "lint", name: "Lint", command: "vp lint", icon: "lint", runOnWorktreeCreate: false },
39 {
40 id: "teardown",
41 name: "Teardown",
42 command: "./teardown",
43 icon: "configure",
44 runOnWorktreeCreate: false,
45 runOnSettle: true,
46 },
47 ]);
48 yield* sql`INSERT INTO projection_projects
49 (project_id, title, workspace_root, scripts_json, created_at, updated_at, deleted_at)
50 VALUES
51 ('project-kept', 'Kept', '/tmp/kept', ${scripts}, '2026-08-01', '2026-08-01', NULL),
52 ('project-deleted', 'Deleted', '/tmp/deleted', '[]', '2026-08-01', '2026-08-02', '2026-08-02')`;
53​
54 const forkPayload =
55 '{"lineage":{"parentThreadId":"stopped-thread","relationshipToParent":"fork","rootThreadId":"stopped-thread"}}';
56 const subagentPayload =
57 '{"lineage":{"parentThreadId":"subagent-parent","relationshipToParent":"subagent","rootThreadId":"subagent-parent"},"forkedFrom":{"type":"node","nodeId":"node-1"}}';
58 const watchedPayload = JSON.stringify({
59 pullRequests: [
60 {
61 host: "github.com",
62 repository: "owner/repo",
63 number: 7,
64 url: "https://github.com/owner/repo/pull/7",
65 source: "agent",
66 linkedAt: "2026-08-01T00:00:00.000Z",
67 snapshot: null,
68 stack: null,
69 watch: {
70 startedAt: "2026-08-01T00:00:00.000Z",
71 headSha: null,
72 failedChecks: [],
73 passed: false,
74 passedChecks: [],
75 remarksThrough: "2026-08-01T00:00:00.000Z",
76 remarkIds: [],
77 conflicting: false,
78 wakes: 0,
79 },
80 },
81 ],
82 });
83 const threads = [
84 ["stopped-thread", "project-kept", "completed", watchedPayload, "2026-08-01"],
85 ["fork-thread", "project-kept", "completed", forkPayload, "2026-08-02"],
86 ["running-thread", "project-kept", "running", "{}", "2026-08-05"],
87 ["settled-thread", "project-kept", "completed", '{"settledAt":"2026-08-01"}', "2026-08-05"],
88 [
89 "archived-thread",
90 "project-kept",
91 "completed",
92 '{"archivedAt":"2026-08-01"}',
93 "2026-08-05",
94 ],
95 [
96 "limit-thread",
97 "project-kept",
98 "completed",
99 '{"limitRecovery":{"autoResume":true}}',
100 "2026-08-05",
101 ],
102 ["subagent-parent", "project-kept", "completed", "{}", "2026-08-05"],
103 ["subagent-child", "project-kept", "completed", subagentPayload, "2026-08-05"],
104 ["deleted-project-thread", "project-deleted", "completed", "{}", "2026-08-05"],
105 ] as const;
106 for (const [threadId, projectId, runStatus, payload, updatedAt] of threads) {
107 yield* sql`INSERT INTO orchestration_v2_projection_threads
108 (thread_id, project_id, title, default_provider, runtime_mode, interaction_mode, created_at, updated_at, payload_json)
109 VALUES (${threadId}, ${projectId}, ${threadId}, 'codex', 'full-access', 'default', '2026-08-01', ${updatedAt}, ${payload})`;
110 yield* sql`INSERT INTO orchestration_v2_projection_runs
111 (run_id, thread_id, ordinal, provider, status, requested_at, payload_json)
112 VALUES (${`run-${threadId}`}, ${threadId}, 1, 'codex', ${runStatus}, '2026-08-01', '{}')`;
113 yield* sql`INSERT INTO orchestration_events
114 (event_id, aggregate_kind, stream_id, stream_version, event_type, occurred_at, actor_kind, payload_json, metadata_json)
115 VALUES (${`event-${threadId}`}, 'thread', ${threadId}, 0, 'thread.created', '2026-08-01', 'user', '{}', '{}')`;
116 }
117 yield* sql`INSERT INTO orchestration_v2_projection_provider_sessions
118 (provider_session_id, thread_id, provider, status, updated_at, payload_json)
119 VALUES ('session-shared', 'running-thread', 'codex', 'stopped', '2026-08-01', '{}')`;
120 yield* sql`INSERT INTO orchestration_v2_projection_provider_session_bindings
121 (provider_session_id, thread_id)
122 VALUES ('session-shared', 'running-thread'), ('session-shared', 'stopped-thread')`;
123 yield* sql`INSERT INTO orchestration_v2_projection_context_transfers
124 (context_transfer_id, source_thread_id, target_thread_id, type, status, updated_at, payload_json)
125 VALUES ('transfer-1', 'archived-thread', 'stopped-thread', 'provider_handoff', 'completed', '2026-08-01', '{}')`;
126 yield* sql`INSERT INTO scheduled_tasks
127 (task_id, title, prompt, enabled, schedule_json, project_id, workspace_strategy_json,
128 model_selection_json, runtime_mode, interaction_mode, created_by, creation_source,
129 created_at, updated_at, last_run_status, run_count)
130 VALUES ('task-1', 'Nightly', 'Run it', 1, '{}', 'project-kept', '{}', '{}',
131 'full-access', 'default', 'user', 'user', '2026-08-01', '2026-08-01', 'never', 0)`;
132 yield* sql`INSERT INTO scheduled_task_webhook_replay_keys
133 (task_id, replay_key, delivery_id, expires_at)
134 VALUES ('task-1', 'replay-1', 'delivery-1', 1900000000000)`;
135 yield* sql`INSERT INTO scheduled_task_webhook_pending
136 (delivery_id, task_id, coalesce_key, due_at, task_json, request_json, delivery_ids_json)
137 VALUES ('delivery-1', 'task-1', 'key-1', 1900000000000, '{}', '{}', '[]')`;
138 yield* sql`INSERT INTO auth_sessions (session_id, subject, scopes, method, issued_at, expires_at)
139 VALUES ('session-1', 'user', '[]', 'pairing', '2026-08-01', '2027-08-01')`;
140 if (toMigrationInclusive === undefined) yield* insertPeerLink(sql);
141 }),
142 );
143 return databasePath;
144});
145​
146it.layer(NodeServices.layer)("migrate-dev-db", (it) => {
147 it.effect("keeps stopped and settled thread families and clears pending work", () =>
148 Effect.gen(function* () {
149 const fs = yield* FileSystem.FileSystem;
150 const path = yield* Path.Path;
151 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-src-" });
152 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-dest-" });
153 const source = yield* createFixtureSource(sourceDir);
154​
155 const result = yield* runMigrateDevDb(
156 { baseDir: destDir, source, projects: 5, threadsPerProject: 2 },
157 { sharedHome: sourceDir },
158 );
159​
160 assert.equal(result.databasePath, path.join(destDir, "userdata", "statev2.sqlite"));
161 const kept = yield* withDatabase(
162 result.databasePath,
163 Effect.gen(function* () {
164 const sql = yield* SqlClient.SqlClient;
165 const threads = yield* sql<{ thread_id: string }>`
166 SELECT thread_id FROM orchestration_v2_projection_threads ORDER BY thread_id`;
167 const events = yield* sql<{ stream_id: string }>`
168 SELECT stream_id FROM orchestration_events ORDER BY stream_id`;
169 const sessions = yield* sql<{ provider_session_id: string }>`
170 SELECT provider_session_id FROM orchestration_v2_projection_provider_sessions`;
171 const [pullRequest] = yield* sql<{ url: string | null; watch: string | null }>`
172 SELECT
173 json_extract(payload_json, '$.pullRequests[0].url') AS url,
174 json_extract(payload_json, '$.pullRequests[0].watch') AS watch
175 FROM orchestration_v2_projection_threads WHERE thread_id = 'stopped-thread'`;
176 const [project] = yield* sql<{ scripts_json: string }>`
177 SELECT scripts_json FROM projection_projects WHERE project_id = 'project-kept'`;
178 const [leftovers] = yield* sql<{
179 auth: number;
180 tasks: number;
181 webhooks: number;
182 transfers: number;
183 links: number;
184 }>`
185 SELECT
186 (SELECT COUNT(*) FROM auth_sessions) AS auth,
187 (SELECT COUNT(*) FROM scheduled_tasks) AS tasks,
188 (SELECT COUNT(*) FROM scheduled_task_webhook_replay_keys) +
189 (SELECT COUNT(*) FROM scheduled_task_webhook_pending) AS webhooks,
190 (SELECT COUNT(*) FROM orchestration_v2_projection_context_transfers) AS transfers,
191 (SELECT COUNT(*) FROM peer_environment_links) AS links`;
192 return { threads, events, sessions, pullRequest, project, leftovers };
193 }),
194 );
195 assert.deepStrictEqual(
196 kept.threads.map((row) => row.thread_id),
197 ["fork-thread", "settled-thread", "stopped-thread"],
198 );
199 assert.deepStrictEqual(
200 kept.events.map((row) => row.stream_id),
201 ["fork-thread", "settled-thread", "stopped-thread"],
202 );
203 assert.deepStrictEqual(
204 kept.sessions.map((row) => row.provider_session_id),
205 ["session-shared"],
206 );
207 assert.deepStrictEqual(
208 kept.pullRequest,
209 { url: "https://github.com/owner/repo/pull/7", watch: null },
210 "copied pull request links keep their history but stop being watched",
211 );
212 assert.deepStrictEqual(
213 JSON.parse(kept.project?.scripts_json ?? "[]"),
214 [
215 {
216 id: "lint",
217 name: "Lint",
218 command: "vp lint",
219 icon: "lint",
220 runOnWorktreeCreate: false,
221 },
222 {
223 id: "teardown",
224 name: "Teardown",
225 command: "./teardown",
226 icon: "configure",
227 runOnWorktreeCreate: false,
228 },
229 ],
230 "copied project scripts stay listed but never run on settle in the original checkout",
231 );
232 assert.deepStrictEqual(kept.leftovers, {
233 auth: 0,
234 tasks: 0,
235 webhooks: 0,
236 transfers: 0,
237 links: 0,
238 });
239 }),
240 );
241​
242 it.effect("never copies an archived thread, and new events append after the source's", () =>
243 Effect.gen(function* () {
244 const fs = yield* FileSystem.FileSystem;
245 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-slice-" });
246 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-slice-dest-" });
247 const source = yield* createFixtureSource(sourceDir);
248 const [sourceSequence] = yield* withDatabase(
249 source,
250 Effect.gen(function* () {
251 const sql = yield* SqlClient.SqlClient;
252 return yield* sql<{ seq: number }>`
253 SELECT seq FROM sqlite_sequence WHERE name = 'orchestration_events'`;
254 }),
255 );
256​
257 const result = yield* runMigrateDevDb(
258 { baseDir: destDir, source, projects: 5, threadsPerProject: 100 },
259 { sharedHome: sourceDir },
260 );
261​
262 const copied = yield* withDatabase(
263 result.databasePath,
264 Effect.gen(function* () {
265 const sql = yield* SqlClient.SqlClient;
266 const [archivedRows] = yield* sql<{ count: number }>`
267 SELECT
268 (SELECT COUNT(*) FROM orchestration_v2_projection_runs WHERE thread_id = 'archived-thread')
269 + (SELECT COUNT(*) FROM orchestration_events WHERE stream_id = 'archived-thread')
270 AS count`;
271 const [sequence] = yield* sql<{ seq: number }>`
272 SELECT seq FROM sqlite_sequence WHERE name = 'orchestration_events'`;
273 return { archivedRows: archivedRows?.count, sequence: sequence?.seq };
274 }),
275 );
276 assert.equal(copied.archivedRows, 0);
277 assert.equal(copied.sequence, sourceSequence?.seq);
278 }),
279 );
280​
281 it.effect("skips a thread family larger than the per-project limit", () =>
282 Effect.gen(function* () {
283 const fs = yield* FileSystem.FileSystem;
284 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-family-" });
285 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-family-dest-" });
286 const source = yield* createFixtureSource(sourceDir);
287​
288 // stopped-thread and its fork are 2 threads; settled-thread is 1.
289 const result = yield* runMigrateDevDb(
290 { baseDir: destDir, source, projects: 5, threadsPerProject: 1 },
291 { sharedHome: sourceDir },
292 );
293 const threads = yield* withDatabase(
294 result.databasePath,
295 Effect.gen(function* () {
296 const sql = yield* SqlClient.SqlClient;
297 return yield* sql<{ thread_id: string }>`
298 SELECT thread_id FROM orchestration_v2_projection_threads`;
299 }),
300 );
301 assert.deepStrictEqual(
302 threads.map((row) => row.thread_id),
303 ["settled-thread"],
304 );
305 }),
306 );
307​
308 it.effect("upgrades a source from before the V2 thread tables", () =>
309 Effect.gen(function* () {
310 const fs = yield* FileSystem.FileSystem;
311 const path = yield* Path.Path;
312 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-v1-" });
313 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-v1-dest-" });
314 const stateDir = path.join(sourceDir, "userdata");
315 const source = path.join(stateDir, "statev2.sqlite");
316 yield* fs.makeDirectory(stateDir, { recursive: true });
317 yield* withDatabase(source, runMigrations({ toMigrationInclusive: 54 }));
318​
319 const result = yield* runMigrateDevDb(
320 { baseDir: destDir, source, projects: 5, threadsPerProject: 10 },
321 { sharedHome: sourceDir },
322 );
323 assert.include(result.executedMigrations, "55_OrchestrationV2");
324 }),
325 );
326​
327 it.effect("seeds from a source that recorded another migration below V2", () =>
328 Effect.gen(function* () {
329 const fs = yield* FileSystem.FileSystem;
330 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-local-" });
331 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-local-dest-" });
332 const source = yield* createFixtureSource(sourceDir);
333 yield* withDatabase(
334 source,
335 Effect.gen(function* () {
336 const sql = yield* SqlClient.SqlClient;
337 yield* sql`UPDATE effect_sql_migrations SET name = 'SiteLocalMigration'
338 WHERE migration_id = 51`;
339 }),
340 );
341​
342 const result = yield* runMigrateDevDb(
343 { baseDir: destDir, source, projects: 5, threadsPerProject: 2 },
344 { sharedHome: sourceDir },
345 );
346 const threads = yield* withDatabase(
347 result.databasePath,
348 Effect.gen(function* () {
349 const sql = yield* SqlClient.SqlClient;
350 return yield* sql<{ thread_id: string }>`
351 SELECT thread_id FROM orchestration_v2_projection_threads ORDER BY thread_id`;
352 }),
353 );
354 assert.deepStrictEqual(
355 threads.map((row) => row.thread_id),
356 ["fork-thread", "settled-thread", "stopped-thread"],
357 );
358 }),
359 );
360​
361 it.effect("refuses a source whose V2 migration history clashes with this checkout", () =>
362 Effect.gen(function* () {
363 const fs = yield* FileSystem.FileSystem;
364 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-clash-" });
365 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-clash-dest-" });
366 const source = yield* createFixtureSource(sourceDir);
367 yield* withDatabase(
368 source,
369 Effect.gen(function* () {
370 const sql = yield* SqlClient.SqlClient;
371 yield* sql`UPDATE effect_sql_migrations SET name = 'OtherBuildMigration'
372 WHERE migration_id = 60`;
373 }),
374 );
375​
376 const destination = yield* createFixtureSource(destDir);
377 const sourceBefore = yield* fs.readFile(source);
378 const destinationBefore = yield* fs.readFile(destination);
379​
380 const error = yield* runMigrateDevDb(
381 { baseDir: destDir, source, projects: 5, threadsPerProject: 2 },
382 { sharedHome: sourceDir },
383 ).pipe(Effect.flip);
384 assert.equal(error._tag, "MigrateDevDbPhaseError");
385 if (error._tag === "MigrateDevDbPhaseError") {
386 assert.equal(error.phase, "migrate");
387 assert.include(String(error.cause), "60_ThreadSnapshotWindowIndexes");
388 }
389 assert.deepStrictEqual(yield* fs.readFile(source), sourceBefore);
390 assert.deepStrictEqual(yield* fs.readFile(destination), destinationBefore);
391 }),
392 );
393​
394 it.effect("imports a dev seed whose ids after 67 came from the peer links branch", () =>
395 Effect.gen(function* () {
396 const fs = yield* FileSystem.FileSystem;
397 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-peer-" });
398 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-peer-dest-" });
399 const source = yield* createFixtureSource(sourceDir, 67);
400 // Mirrors a real ~/.t3 seed written by a build whose 68-70 differ from main's.
401 yield* withDatabase(
402 source,
403 Effect.gen(function* () {
404 const sql = yield* SqlClient.SqlClient;
405 yield* sql`CREATE TABLE peer_environment_links (
406 environment_id TEXT PRIMARY KEY,
407 secret_name TEXT NOT NULL,
408 label TEXT NOT NULL,
409 urls_json TEXT NOT NULL,
410 access TEXT NOT NULL,
411 linked_at TEXT NOT NULL,
412 expires_at TEXT NOT NULL,
413 last_reached_at TEXT,
414 last_error TEXT,
415 fenced INTEGER NOT NULL DEFAULT 0)`;
416 yield* sql`CREATE INDEX orchestration_v2_projection_turn_items_waiting_link_idx
417 ON orchestration_v2_projection_turn_items(thread_id, updated_at DESC, turn_item_id DESC)
418 WHERE type = 'link_request' AND status = 'waiting'`;
419 yield* insertPeerLink(sql);
420 yield* sql`INSERT INTO effect_sql_migrations (migration_id, name) VALUES
421 (68, 'PeerLinks'), (69, 'PeerLinkFence'), (70, 'WaitingLinkRequestIndex')`;
422 }),
423 );
424​
425 const result = yield* runMigrateDevDb(
426 { baseDir: destDir, source, projects: 5, threadsPerProject: 2 },
427 { sharedHome: sourceDir },
428 );
429​
430 const imported = yield* withDatabase(
431 result.databasePath,
432 Effect.gen(function* () {
433 const sql = yield* SqlClient.SqlClient;
434 const threads = yield* sql<{ thread_id: string }>`
435 SELECT thread_id FROM orchestration_v2_projection_threads ORDER BY thread_id`;
436 const schema = yield* sql<{ name: string }>`
437 SELECT name FROM sqlite_master WHERE name IN (
438 'orchestration_v2_projection_turn_items_stop_request_idx',
439 'orchestration_v2_message_search')
440 ORDER BY name`;
441 return { threads, schema };
442 }),
443 );
444 assert.deepStrictEqual(
445 imported.threads.map((row) => row.thread_id),
446 ["fork-thread", "settled-thread", "stopped-thread"],
447 );
448 assert.deepStrictEqual(
449 imported.schema.map((row) => row.name),
450 [
451 "orchestration_v2_message_search",
452 "orchestration_v2_projection_turn_items_stop_request_idx",
453 ],
454 );
455 }),
456 );
457​
458 it.effect("refuses while a dev server holds the destination", () =>
459 Effect.gen(function* () {
460 const fs = yield* FileSystem.FileSystem;
461 const path = yield* Path.Path;
462 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-busy-" });
463 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-busy-dest-" });
464 const source = yield* createFixtureSource(sourceDir);
465 const stateDir = path.join(destDir, "userdata");
466 yield* fs.makeDirectory(stateDir, { recursive: true });
467 yield* fs.writeFileString(
468 path.join(stateDir, "server-runtime.json"),
469 `{"version":1,"pid":${process.pid}}`,
470 );
471​
472 const error = yield* runMigrateDevDb(
473 { baseDir: destDir, source, projects: 5, threadsPerProject: 10 },
474 { sharedHome: sourceDir },
475 ).pipe(Effect.flip);
476 assert.equal(error._tag, "MigrateDevDbServerRunningError");
477 if (error._tag === "MigrateDevDbServerRunningError") {
478 assert.equal(error.pid, process.pid);
479 }
480 }),
481 );
482​
483 it.effect("refuses a source that resolves to a destination path", () =>
484 Effect.gen(function* () {
485 const fs = yield* FileSystem.FileSystem;
486 const path = yield* Path.Path;
487 const sharedDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-overlap-" });
488 const destDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-overlap-dest-" });
489 const leftoverSnapshot = path.join(destDir, "userdata", "statev2.sqlite.migrate-dev-db-tmp");
490 yield* fs.makeDirectory(path.dirname(leftoverSnapshot), { recursive: true });
491 yield* fs.writeFileString(leftoverSnapshot, "not a real db");
492​
493 const error = yield* runMigrateDevDb(
494 { baseDir: destDir, source: leftoverSnapshot, projects: 5, threadsPerProject: 10 },
495 { sharedHome: sharedDir },
496 ).pipe(Effect.flip);
497 assert.equal(error._tag, "MigrateDevDbSourceIsDestinationError");
498 assert.equal(yield* fs.exists(leftoverSnapshot), true);
499 }),
500 );
501​
502 it.effect("refuses to rebuild the shared home", () =>
503 Effect.gen(function* () {
504 const fs = yield* FileSystem.FileSystem;
505 const sourceDir = yield* fs.makeTempDirectoryScoped({ prefix: "migrate-dev-db-shared-" });
506 const source = yield* createFixtureSource(sourceDir);
507​
508 const error = yield* runMigrateDevDb(
509 { baseDir: sourceDir, source, projects: 5, threadsPerProject: 10 },
510 { sharedHome: sourceDir },
511 ).pipe(Effect.flip);
512 assert.equal(error._tag, "MigrateDevDbSharedHomeError");
513 }),
514 );
515});