Skip to content

Commit c4a6448

Browse files
committed
test(codex): model probe unsubscribe in fork continuation
1 parent 5f86cb4 commit c4a6448

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎extensions/codex/src/app-server/upstream-session-fork-continuation.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ describe("persistent upstream fork continuation", () => {
139139
nativeThreads.set(response.thread.id, response);
140140
return response;
141141
}
142+
if (method === "thread/unsubscribe") {
143+
if (home !== "secondary" || !nativeThreads.has(threadId)) {
144+
throw new Error(`Unknown subscription target: ${threadId}`);
145+
}
146+
return { status: "unsubscribed" };
147+
}
142148
if (method === "thread/archive") {
143149
if (home !== "secondary" || !nativeThreads.has(threadId)) {
144150
throw new Error(`Unknown archive target: ${threadId}`);
@@ -296,6 +302,13 @@ describe("persistent upstream fork continuation", () => {
296302
modelProvider: "openai",
297303
preserveNativeModel: true,
298304
});
305+
expect(native.request).toHaveBeenCalledWith(
306+
"thread/unsubscribe",
307+
{ threadId: "thread-secondary-0" },
308+
expect.anything(),
309+
);
310+
// Native unsubscribe detaches the client; idle retention still owns the thread.
311+
expect(nativeThreads.has("thread-secondary-0")).toBe(true);
299312
// Configuration must reach thread/start; persisted fingerprints alone cannot install tools.
300313
expect(native.request).toHaveBeenCalledWith(
301314
"thread/start",

0 commit comments

Comments
 (0)