(dbPath: string)
| 141 | /** The boot sequence apps/local/src/executor.ts runs, minus the executor: |
| 142 | * v1 gate → fumadb DDL → ledger. Returns what each phase reported. */ |
| 143 | const bootOnce = async (dbPath: string) => { |
| 144 | const migration = await migrateLocalV1ToV2IfNeeded({ |
| 145 | sqlitePath: dbPath, |
| 146 | tables: collectTables(), |
| 147 | namespace: "executor_local", |
| 148 | tenantId: TENANT, |
| 149 | }); |
| 150 | const sqlite = await createSqliteFumaDb({ |
| 151 | tables: collectTables(), |
| 152 | namespace: "executor_local", |
| 153 | path: dbPath, |
| 154 | }); |
| 155 | const applied = await Effect.runPromise( |
| 156 | runSqliteDataMigrations(sqlite.client, localDataMigrations), |
| 157 | ); |
| 158 | const ledger = await queryRows<{ name: string }>( |
| 159 | sqlite.client, |
| 160 | "SELECT name FROM data_migration ORDER BY name", |
| 161 | ); |
| 162 | await sqlite.close(); |
| 163 | return { migration, applied, ledger: ledger.map((row) => row.name) }; |
| 164 | }; |
| 165 | |
| 166 | const expectV2WithContext7 = async (dbPath: string) => { |
| 167 | const client = await openLocalLibsql(dbPath); |
no test coverage detected