fix: retry evicted agentrun projection resume

This commit is contained in:
root
2026-06-29 17:17:42 +00:00
parent b2d2642b5b
commit 4ed8db2c00
5 changed files with 289 additions and 4 deletions
@@ -80,3 +80,32 @@ test("AgentRun projection state advances from incremental events response", () =
assert.equal(state.createdAt, "2026-06-19T12:00:00.000Z");
assert.equal(state.updatedAt, "2026-06-19T12:01:00.000Z");
});
test("AgentRun projection state preserves retry params for background resume", () => {
const state = buildWorkbenchProjectionStateUpdate({
currentState: {
traceId: "trc_cursor_retry_params",
sourceRunId: "run_cursor_retry_params",
sourceCommandId: "cmd_cursor_retry_params",
retryParams: {
message: "preserve this prompt for fresh-session retry",
sessionId: "ses_cursor_retry",
providerProfile: "dsflash-go",
valuesPrinted: false
},
createdAt: "2026-06-19T12:00:00.000Z"
},
agentRun: {
runId: "run_cursor_retry_params",
commandId: "cmd_cursor_retry_params",
lastSeq: 3
},
now: () => "2026-06-19T12:01:00.000Z"
});
assert.equal(state.retryParams.message, "preserve this prompt for fresh-session retry");
assert.equal(state.retryParams.prompt, "preserve this prompt for fresh-session retry");
assert.equal(state.retryParams.sessionId, "ses_cursor_retry");
assert.equal(state.retryParams.providerProfile, "dsflash-go");
assert.equal(state.retryParams.valuesPrinted, false);
});