fix(orchestration): handle checkpoint-wait runs
Allow merge-back from provider-finished runs awaiting checkpoint capture while keeping waiting runs visible but non-interruptible in mobile. Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
091a76003e
commit
6ab4ce9fe3
8 files changed
+238
-14
No files matched your search
@@ -4,6 +4,7 @@ import {
|
||||
canDetachThreadProviderSession,
|
||||
canForkProjectedAssistantItem,
|
||||
deriveThreadQueueWorkflowState,
|
||||
resolveLatestMergeBackRun,
|
||||
} from "./threadWorkflows.ts";
|
||||
|
||||
const capabilities = (input?: {
|
||||
@@ -130,4 +131,16 @@ describe("thread workflows", () => {
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("merges the newest provider-finished run while checkpoint capture is pending", () => {
|
||||
const projection = {
|
||||
runs: [
|
||||
{ id: "newest-queued", status: "queued", ordinal: 3 },
|
||||
{ id: "older-completed", status: "completed", ordinal: 1 },
|
||||
{ id: "newest-finished", status: "waiting", ordinal: 2 },
|
||||
],
|
||||
} as never;
|
||||
|
||||
expect(resolveLatestMergeBackRun(projection)?.id).toBe("newest-finished");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user