Skip to content

Commit 21092cf

Browse files
committed
test(server): keep the four isLegacyImportCovered cases that matter
1 parent 8f522ac commit 21092cf

1 file changed

Lines changed: 2 additions & 46 deletions

File tree

‎apps/server/src/orchestration-v2/Orchestrator.migration.test.ts‎

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ it("does not reissue imported context into a native thread that already has it",
151151
createdAt: now,
152152
updatedAt: now,
153153
};
154-
const delivered = (nativeThreadId: string, status: "pending" | "injected" | "inline") => ({
154+
const delivered = (nativeThreadId: string, status: "injected") => ({
155155
...legacy,
156156
delivery: { nativeThreadId, status, itemIds: [] },
157157
});
@@ -165,42 +165,14 @@ it("does not reissue imported context into a native thread that already has it",
165165
runs: cancelled,
166166
}),
167167
);
168-
assert.isTrue(
169-
isLegacyImportCovered({
170-
providerThread,
171-
contextHandoffs: [delivered("native:codex", "inline")],
172-
runs: cancelled,
173-
}),
174-
);
175-
// A replaced native thread, an uncertain delivery, or another provider thread still needs it.
168+
// A replaced native thread still needs it.
176169
assert.isFalse(
177170
isLegacyImportCovered({
178171
providerThread,
179172
contextHandoffs: [delivered("native:old", "injected")],
180173
runs: cancelled,
181174
}),
182175
);
183-
assert.isFalse(
184-
isLegacyImportCovered({
185-
providerThread,
186-
contextHandoffs: [delivered("native:codex", "pending")],
187-
runs: cancelled,
188-
}),
189-
);
190-
assert.isFalse(
191-
isLegacyImportCovered({
192-
providerThread: { ...providerThread, id: ProviderThreadId.make("provider-thread:other") },
193-
contextHandoffs: [delivered("native:codex", "injected")],
194-
runs: cancelled,
195-
}),
196-
);
197-
assert.isFalse(
198-
isLegacyImportCovered({
199-
providerThread: undefined,
200-
contextHandoffs: [legacy],
201-
runs: cancelled,
202-
}),
203-
);
204176
// Undelivered: turn start redelivers it after a failed run, not after a cancelled one.
205177
assert.isTrue(
206178
isLegacyImportCovered({
@@ -212,20 +184,4 @@ it("does not reissue imported context into a native thread that already has it",
212184
assert.isFalse(
213185
isLegacyImportCovered({ providerThread, contextHandoffs: [legacy], runs: cancelled }),
214186
);
215-
// Provider-switch summaries are not the imported history.
216-
assert.isFalse(
217-
isLegacyImportCovered({
218-
providerThread,
219-
contextHandoffs: [
220-
{
221-
...delivered("native:codex", "injected"),
222-
id: ContextHandoffId.make(
223-
"context-handoff:thread:t:from-provider-instance:claudeAgent:to-provider-instance:codex:2",
224-
),
225-
strategy: "full_thread_summary",
226-
},
227-
],
228-
runs: cancelled,
229-
}),
230-
);
231187
});

0 commit comments

Comments
 (0)