mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 19:35:28 -06:00
fix(cron): propagate cleanupCliLiveSessionOnRunEnd to isolated cron CLI branch (#97227)
* fix(cron): propagate cleanupCliLiveSessionOnRunEnd to isolated cron CLI branch * test(cron): add CLI interim retry coverage for isolated cron cleanup flag Verify cleanupCliLiveSessionOnRunEnd is passed on both the initial and retry CLI runs during isolated cron interim-ack retry loops. Proves the inner boundary is safe: each runCliAgent call creates a fresh context, so cleanup cannot affect the retry's live session. * fix(cron): remove unused variable in interim retry test Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test(cron): trim redundant cleanup retry coverage --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
This commit is contained in:
@@ -322,6 +322,7 @@ export function createCronPromptExecutor(params: {
|
||||
agentId: params.agentId,
|
||||
trigger: "cron",
|
||||
jobId: params.job.id,
|
||||
cleanupCliLiveSessionOnRunEnd: params.job.sessionTarget === "isolated",
|
||||
sessionFile,
|
||||
workspaceDir: params.workspaceDir,
|
||||
config: params.cfgWithAgentDefaults,
|
||||
|
||||
@@ -198,6 +198,7 @@ describe("runCronIsolatedAgentTurn isolated session identity", () => {
|
||||
promptCacheKey?: string;
|
||||
bootstrapContextMode?: string;
|
||||
bootstrapContextRunKind?: string;
|
||||
cleanupCliLiveSessionOnRunEnd?: boolean;
|
||||
};
|
||||
expect(runRequest.sessionId).toBe("isolated-cli-run-1");
|
||||
expect(runRequest.sessionKey).toBe("agent:default:cron:cli-monitor:run:isolated-cli-run-1");
|
||||
@@ -205,6 +206,7 @@ describe("runCronIsolatedAgentTurn isolated session identity", () => {
|
||||
expect(runRequest.promptCacheKey).toBeUndefined();
|
||||
expect(runRequest.bootstrapContextMode).toBe("lightweight");
|
||||
expect(runRequest.bootstrapContextRunKind).toBe("cron");
|
||||
expect(runRequest.cleanupCliLiveSessionOnRunEnd).toBe(true);
|
||||
});
|
||||
|
||||
it("runs externally sourced CLI hook turns", async () => {
|
||||
|
||||
Reference in New Issue
Block a user