PEP-250: тест перехода Claude → Codex без гонки с номером нового разговора
Codex может успеть сообщить свой thread-id до чтения сессии; проверяем, что разговор Claude не перенесён, а не что номер пуст. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9713682640
commit
00cb57cdd6
@ -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,9 @@ describe("Переезд на подписку другого провайдер
|
||||
const s = await sess(sid);
|
||||
assert.equal(s.provider, "codex");
|
||||
assert.equal(s.subscriptionId, c.id);
|
||||
assert.equal(s.conversationId, null);
|
||||
// Claude's conversation is dropped; Codex may already have reported its own new thread (codex-notify).
|
||||
assert.ok(before.conversationId, "Claude had a conversation before the switch");
|
||||
assert.notEqual(s.conversationId, before.conversationId, "Claude's conversation is not carried over to Codex");
|
||||
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