Skip to content

Commit c19ac09

Browse files
committed
test(server): expect the Synthos migrations after a V2 preview upgrade
Both V2 preview upgrade tests pin the exact list runMigrations() returns, and the list stopped at 72 WaitingLinkRequestIndex. The fork registers eight more migrations in migrationEntries, 73 SynthosWorkflows to 80 SynthosToolProbes, and the Synthos services depend on their tables. runMigrations() applies them correctly; the expectation was out of date. Both lists now end at 80, still as an exact deepStrictEqual. This is the same pattern upstream uses: when it adds migrations, it extends these lists. Fails before (CI Test Server 2): expected [ ...(27) ] to deeply equal [ ...(19) ], and the diff is exactly the eight Synthos entries. Passes after: 5/5 in the file, and 30 files / 74 tests across persistence and the Synthos suites that use those tables. Follow-up risk, not changed here: upstream also uses ids 73-77, for different migrations. A later upstream merge will need the Synthos migrations renumbered or reconciled. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A1D6J2UMPo7YBWQFvbg1br
1 parent 4150b20 commit c19ac09

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎apps/server/src/persistence/reconcileV2PreviewMigration.test.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ describe("V2 preview upgrade", () => {
5252
[70, "PeerLinks"],
5353
[71, "PeerLinkFence"],
5454
[72, "WaitingLinkRequestIndex"],
55+
[73, "SynthosWorkflows"],
56+
[74, "SynthosConnections"],
57+
[75, "SynthosPolicySnapshots"],
58+
[76, "SynthosKnowledge"],
59+
[77, "SynthosProfiles"],
60+
[78, "SynthosContext"],
61+
[79, "SynthosGraph"],
62+
[80, "SynthosToolProbes"],
5563
]);
5664
assert.deepStrictEqual(yield* runMigrations(), []);
5765
assert.deepStrictEqual(yield* sql`SELECT * FROM orchestration_v2_legacy_imports`, imports);
@@ -147,6 +155,14 @@ describe("V2 preview upgrade", () => {
147155
[70, "PeerLinks"],
148156
[71, "PeerLinkFence"],
149157
[72, "WaitingLinkRequestIndex"],
158+
[73, "SynthosWorkflows"],
159+
[74, "SynthosConnections"],
160+
[75, "SynthosPolicySnapshots"],
161+
[76, "SynthosKnowledge"],
162+
[77, "SynthosProfiles"],
163+
[78, "SynthosContext"],
164+
[79, "SynthosGraph"],
165+
[80, "SynthosToolProbes"],
150166
]);
151167
}).pipe(Effect.provide(NodeSqliteClient.layer({ filename: ":memory:" }))),
152168
);

0 commit comments

Comments
 (0)