chore: checkpoint Boss app v2.5.11
This commit is contained in:
@@ -120,6 +120,79 @@ test("expired task after turn start is timed out instead of duplicated", async (
|
||||
assert.equal(task?.recoverable, false);
|
||||
});
|
||||
|
||||
test("recoverable codex app-server runtime failure requeues conversation reply", async () => {
|
||||
await setup();
|
||||
const state = await data.readState();
|
||||
state.masterAgentTasks.unshift(
|
||||
makeQueuedTask("task-runtime-retry", {
|
||||
projectId: "project-juyuwan",
|
||||
targetProjectId: "project-juyuwan",
|
||||
targetThreadId: "thread-juyuwan",
|
||||
status: "running",
|
||||
phase: "awaiting_reply",
|
||||
claimedAt: "2026-06-07T06:05:16.000Z",
|
||||
lastProgressAt: "2026-06-07T06:10:00.000Z",
|
||||
leaseExpiresAt: "2026-06-07T06:20:16.000Z",
|
||||
attemptCount: 1,
|
||||
maxAttempts: 2,
|
||||
}),
|
||||
);
|
||||
await data.writeState(state);
|
||||
|
||||
const completed = await data.completeMasterAgentTask({
|
||||
taskId: "task-runtime-retry",
|
||||
deviceId: "mac-studio",
|
||||
status: "failed",
|
||||
errorMessage: "CODEX_APP_SERVER_TURN_INTERRUPTED",
|
||||
});
|
||||
|
||||
assert.equal(completed.status, "queued");
|
||||
assert.equal(completed.phase, "recoverable_failed");
|
||||
assert.equal(completed.recoverable, true);
|
||||
assert.equal(completed.errorMessage, "CODEX_APP_SERVER_TURN_INTERRUPTED");
|
||||
assert.equal(completed.attemptCount, 1);
|
||||
assert.equal(completed.completedAt, undefined);
|
||||
assert.equal(completed.claimedAt, undefined);
|
||||
assert.ok(completed.nextRetryAt);
|
||||
|
||||
const claimed = await data.claimNextMasterAgentTask("mac-studio");
|
||||
assert.equal(claimed?.taskId, "task-runtime-retry");
|
||||
assert.equal(claimed?.attemptCount, 2);
|
||||
});
|
||||
|
||||
test("recoverable codex app-server runtime failure becomes terminal after max attempts", async () => {
|
||||
await setup();
|
||||
const state = await data.readState();
|
||||
state.masterAgentTasks.unshift(
|
||||
makeQueuedTask("task-runtime-terminal", {
|
||||
projectId: "project-juyuwan",
|
||||
targetProjectId: "project-juyuwan",
|
||||
targetThreadId: "thread-juyuwan",
|
||||
status: "running",
|
||||
phase: "awaiting_reply",
|
||||
claimedAt: "2026-06-07T06:05:16.000Z",
|
||||
lastProgressAt: "2026-06-07T06:10:00.000Z",
|
||||
leaseExpiresAt: "2026-06-07T06:20:16.000Z",
|
||||
attemptCount: 2,
|
||||
maxAttempts: 2,
|
||||
}),
|
||||
);
|
||||
await data.writeState(state);
|
||||
|
||||
const completed = await data.completeMasterAgentTask({
|
||||
taskId: "task-runtime-terminal",
|
||||
deviceId: "mac-studio",
|
||||
status: "failed",
|
||||
errorMessage: "CODEX_APP_SERVER_TIMEOUT",
|
||||
});
|
||||
|
||||
assert.equal(completed.status, "failed");
|
||||
assert.equal(completed.phase, "terminal_failed");
|
||||
assert.equal(completed.recoverable, false);
|
||||
assert.equal(completed.errorMessage, "CODEX_APP_SERVER_TIMEOUT");
|
||||
assert.equal(completed.completedAt !== undefined, true);
|
||||
});
|
||||
|
||||
test("codex app server health distinguishes available, degraded, and unavailable", async () => {
|
||||
await setup();
|
||||
assert.equal(data.resolveCodexAppServerHealth(undefined), "unavailable");
|
||||
|
||||
Reference in New Issue
Block a user