PEP-266: тест переезда на Codex не зависит от того, успел ли мок закончить ход
Мок Codex после переезда сразу завершает первый ход и сообщает свой id разговора — на загруженном CI conversationId уже не null. Проверяем суть: разговор Claude не переносится (id другой; если есть — новый разговор Codex). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
274336779c
commit
336e63d82f
@ -84,7 +84,8 @@ describe("Переезд на подписку другого провайдер
|
||||
const sid = await p.start();
|
||||
assert.equal((await sess(sid)).provider, "claude");
|
||||
await p.waitStatus(sid, "rate_limited");
|
||||
assert.equal((await sess(sid)).rotateReason, "limit");
|
||||
const before = await sess(sid);
|
||||
assert.equal(before.rotateReason, "limit");
|
||||
await tick();
|
||||
const start = await p.waitLog("relaunched on Codex", (e) => e.ev === "start" && e.gen === "2");
|
||||
assert.equal(start.resume, null, "a conversation doesn't move between CLIs");
|
||||
@ -93,7 +94,10 @@ describe("Переезд на подписку другого провайдер
|
||||
const s = await sess(sid);
|
||||
assert.equal(s.provider, "codex");
|
||||
assert.equal(s.subscriptionId, c.id);
|
||||
assert.equal(s.conversationId, null);
|
||||
// Codex starts a new conversation: Claude's id is dropped. The mock may already have finished its first
|
||||
// turn and reported its own thread id — then it's the new one, never the old Claude conversation.
|
||||
assert.notEqual(s.conversationId, before.conversationId);
|
||||
assert.ok(s.conversationId === null || s.conversationId === start.conversationId, `unexpected conversation ${s.conversationId}`);
|
||||
const ev = (await typeEvents(runner.SWITCH_EVENT)).find((e) => e.sessionId === sid)!.payload as Record<string, unknown>;
|
||||
assert.deepEqual({ from: ev.fromProvider, to: ev.toProvider, carried: ev.carried }, { from: "claude", to: "codex", carried: "fresh" });
|
||||
const [msg] = await outboxTexts(`rot:${sid}:g2:`);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user