fix(server): renumber v2 migrations after main's 036_ProjectionThreadsPinned
Main owns migration numbering: 036_ProjectionThreadsPinned landed on main, so the v2 migrations shift from 036-044 to 037-045. Release path runs all of main's migrations first, then the v2 stack. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
8ada620ce8
commit
e538616255
14 files changed
+34
-34
No files matched your search
@@ -53,15 +53,15 @@ import Migration0037 from "./Migrations/037_ProjectionTurnsKeysetIndex.ts";
|
||||
import Migration0038 from "./Migrations/038_ProjectionThreadsPinOrderKey.ts";
|
||||
import Migration0039 from "./Migrations/039_ProjectionProjectsDefaultThreadEnvMode.ts";
|
||||
import Migration0040 from "./Migrations/040_ProjectionProjectFaviconPath.ts";
|
||||
import Migration036V2 from "./Migrations/036_OrchestrationV2.ts";
|
||||
import Migration037V2 from "./Migrations/037_OrchestrationV2Subagents.ts";
|
||||
import Migration038V2 from "./Migrations/038_OrchestrationV2Foundation.ts";
|
||||
import Migration039V2 from "./Migrations/039_OrchestrationV2ProviderSessionBindings.ts";
|
||||
import Migration040V2 from "./Migrations/040_OrchestrationV2ThreadLaunchWorkflows.ts";
|
||||
import Migration041V2 from "./Migrations/041_ApplicationEventSource.ts";
|
||||
import Migration042V2 from "./Migrations/042_OrchestrationV2EffectCancellation.ts";
|
||||
import Migration043V2 from "./Migrations/043_ScheduledTasks.ts";
|
||||
import Migration044V2 from "./Migrations/044_LegacyV1ImportState.ts";
|
||||
import Migration037V2 from "./Migrations/037_OrchestrationV2.ts";
|
||||
import Migration038V2 from "./Migrations/038_OrchestrationV2Subagents.ts";
|
||||
import Migration039V2 from "./Migrations/039_OrchestrationV2Foundation.ts";
|
||||
import Migration040V2 from "./Migrations/040_OrchestrationV2ProviderSessionBindings.ts";
|
||||
import Migration041V2 from "./Migrations/041_OrchestrationV2ThreadLaunchWorkflows.ts";
|
||||
import Migration042V2 from "./Migrations/042_ApplicationEventSource.ts";
|
||||
import Migration043V2 from "./Migrations/043_OrchestrationV2EffectCancellation.ts";
|
||||
import Migration044V2 from "./Migrations/044_ScheduledTasks.ts";
|
||||
import Migration045V2 from "./Migrations/045_LegacyV1ImportState.ts";
|
||||
|
||||
/**
|
||||
* Migration loader with all migrations defined inline.
|
||||
@@ -114,15 +114,15 @@ export const migrationEntries = [
|
||||
[38, "ProjectionThreadsPinOrderKey", Migration0038],
|
||||
[39, "ProjectionProjectsDefaultThreadEnvMode", Migration0039],
|
||||
[40, "ProjectionProjectFaviconPath", Migration0040],
|
||||
[41, "OrchestrationV2", Migration036V2],
|
||||
[42, "OrchestrationV2Subagents", Migration037V2],
|
||||
[43, "OrchestrationV2Foundation", Migration038V2],
|
||||
[44, "OrchestrationV2ProviderSessionBindings", Migration039V2],
|
||||
[45, "OrchestrationV2ThreadLaunchWorkflows", Migration040V2],
|
||||
[46, "ApplicationEventSource", Migration041V2],
|
||||
[47, "OrchestrationV2EffectCancellation", Migration042V2],
|
||||
[48, "ScheduledTasks", Migration043V2],
|
||||
[49, "LegacyV1ImportState", Migration044V2],
|
||||
[41, "OrchestrationV2", Migration037V2],
|
||||
[42, "OrchestrationV2Subagents", Migration038V2],
|
||||
[43, "OrchestrationV2Foundation", Migration039V2],
|
||||
[44, "OrchestrationV2ProviderSessionBindings", Migration040V2],
|
||||
[45, "OrchestrationV2ThreadLaunchWorkflows", Migration041V2],
|
||||
[46, "ApplicationEventSource", Migration042V2],
|
||||
[47, "OrchestrationV2EffectCancellation", Migration043V2],
|
||||
[48, "ScheduledTasks", Migration044V2],
|
||||
[49, "LegacyV1ImportState", Migration045V2],
|
||||
] as const;
|
||||
|
||||
export const migrationManifest = migrationEntries.map(([id, name]) => [id, name] as const);
|
||||
|
||||
+8
-8
@@ -8,7 +8,7 @@ import * as NodeSqliteClient from "../NodeSqliteClient.ts";
|
||||
|
||||
const layer = it.layer(Layer.mergeAll(NodeSqliteClient.layerMemory()));
|
||||
|
||||
layer("036_037_OrchestrationV2", (it) => {
|
||||
layer("037_038_OrchestrationV2", (it) => {
|
||||
it.effect("keeps released and private migration ids contiguous", () =>
|
||||
Effect.sync(() => {
|
||||
assert.deepStrictEqual(
|
||||
@@ -22,7 +22,7 @@ layer("036_037_OrchestrationV2", (it) => {
|
||||
Effect.gen(function* () {
|
||||
const sql = yield* SqlClient.SqlClient;
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 37 });
|
||||
yield* runMigrations({ toMigrationInclusive: 38 });
|
||||
|
||||
const migrations = yield* sql<{
|
||||
readonly migration_id: number;
|
||||
@@ -67,7 +67,7 @@ layer("036_037_OrchestrationV2", (it) => {
|
||||
it.effect("backfills provider-session thread bindings in migration 038", () =>
|
||||
Effect.gen(function* () {
|
||||
const sql = yield* SqlClient.SqlClient;
|
||||
yield* runMigrations({ toMigrationInclusive: 38 });
|
||||
yield* runMigrations({ toMigrationInclusive: 39 });
|
||||
yield* sql`
|
||||
INSERT INTO orchestration_v2_projection_provider_sessions (
|
||||
provider_session_id,
|
||||
@@ -92,7 +92,7 @@ layer("036_037_OrchestrationV2", (it) => {
|
||||
)
|
||||
`;
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 39 });
|
||||
yield* runMigrations({ toMigrationInclusive: 40 });
|
||||
|
||||
const bindings = yield* sql<{
|
||||
readonly provider_session_id: string;
|
||||
@@ -113,7 +113,7 @@ layer("036_037_OrchestrationV2", (it) => {
|
||||
it.effect("preserves turn items with colliding ordinals in migration 037", () =>
|
||||
Effect.gen(function* () {
|
||||
const sql = yield* SqlClient.SqlClient;
|
||||
yield* runMigrations({ toMigrationInclusive: 37 });
|
||||
yield* runMigrations({ toMigrationInclusive: 38 });
|
||||
yield* sql`
|
||||
INSERT INTO orchestration_v2_projection_runs (
|
||||
run_id,
|
||||
@@ -150,7 +150,7 @@ layer("036_037_OrchestrationV2", (it) => {
|
||||
('turn-item:d', 'thread:two', NULL, 42, 'assistant_message', 'completed', '2026-01-01T00:00:00.000Z', '{}')
|
||||
`;
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 38 });
|
||||
yield* runMigrations({ toMigrationInclusive: 39 });
|
||||
|
||||
const positions = yield* sql<{
|
||||
readonly thread_id: string;
|
||||
@@ -175,14 +175,14 @@ it.effect("upgrades a database already at released main migration 034", () =>
|
||||
Effect.gen(function* () {
|
||||
const sql = yield* SqlClient.SqlClient;
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 35 });
|
||||
yield* runMigrations({ toMigrationInclusive: 36 });
|
||||
const snoozeColumns = yield* sql<{ readonly name: string }>`
|
||||
PRAGMA table_info(projection_threads)
|
||||
`;
|
||||
assert.ok(snoozeColumns.some((column) => column.name === "snoozed_until"));
|
||||
assert.ok(snoozeColumns.some((column) => column.name === "snoozed_at"));
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 44 });
|
||||
yield* runMigrations({ toMigrationInclusive: 45 });
|
||||
|
||||
const migrations = yield* sql<{
|
||||
readonly migration_id: number;
|
||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -8,7 +8,7 @@ import * as NodeSqliteClient from "../NodeSqliteClient.ts";
|
||||
it.effect("backfills the V2 event driver from payload before the legacy provider column", () =>
|
||||
Effect.gen(function* () {
|
||||
const sql = yield* SqlClient.SqlClient;
|
||||
yield* runMigrations({ toMigrationInclusive: 37 });
|
||||
yield* runMigrations({ toMigrationInclusive: 38 });
|
||||
|
||||
yield* sql`
|
||||
INSERT INTO orchestration_v2_events (
|
||||
@@ -37,7 +37,7 @@ it.effect("backfills the V2 event driver from payload before the legacy provider
|
||||
)
|
||||
`;
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 38 });
|
||||
yield* runMigrations({ toMigrationInclusive: 39 });
|
||||
|
||||
const events = yield* sql<{
|
||||
readonly event_id: string;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
-3
@@ -8,11 +8,11 @@ import * as NodeSqliteClient from "../NodeSqliteClient.ts";
|
||||
|
||||
const layer = it.layer(Layer.mergeAll(NodeSqliteClient.layerMemory()));
|
||||
|
||||
layer("040_ApplicationEventSource", (it) => {
|
||||
layer("042_ApplicationEventSource", (it) => {
|
||||
it.effect("moves V2 events and current project state behind one global sequence", () =>
|
||||
Effect.gen(function* () {
|
||||
const sql = yield* SqlClient.SqlClient;
|
||||
yield* runMigrations({ toMigrationInclusive: 40 });
|
||||
yield* runMigrations({ toMigrationInclusive: 41 });
|
||||
|
||||
yield* sql`
|
||||
INSERT INTO orchestration_v2_events (
|
||||
@@ -84,7 +84,7 @@ layer("040_ApplicationEventSource", (it) => {
|
||||
)
|
||||
`;
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 41 });
|
||||
yield* runMigrations({ toMigrationInclusive: 42 });
|
||||
|
||||
const events = yield* sql<{
|
||||
readonly sequence: number;
|
||||
File renamed without changes.
+3
-3
@@ -8,11 +8,11 @@ import * as NodeSqliteClient from "../NodeSqliteClient.ts";
|
||||
|
||||
const layer = it.layer(Layer.mergeAll(NodeSqliteClient.layerMemory()));
|
||||
|
||||
layer("041_OrchestrationV2EffectCancellation", (it) => {
|
||||
layer("043_OrchestrationV2EffectCancellation", (it) => {
|
||||
it.effect("preserves existing effects and adds the cancelled terminal status", () =>
|
||||
Effect.gen(function* () {
|
||||
const sql = yield* SqlClient.SqlClient;
|
||||
yield* runMigrations({ toMigrationInclusive: 41 });
|
||||
yield* runMigrations({ toMigrationInclusive: 42 });
|
||||
yield* sql`
|
||||
INSERT INTO orchestration_v2_effect_outbox (
|
||||
effect_id,
|
||||
@@ -47,7 +47,7 @@ layer("041_OrchestrationV2EffectCancellation", (it) => {
|
||||
)
|
||||
`;
|
||||
|
||||
yield* runMigrations({ toMigrationInclusive: 42 });
|
||||
yield* runMigrations({ toMigrationInclusive: 43 });
|
||||
yield* sql`
|
||||
UPDATE orchestration_v2_effect_outbox
|
||||
SET
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user