fix: retry evicted agentrun projection resume
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user