feat(cron): support fresh execution sessions#3255
feat(cron): support fresh execution sessions#3255cnyarx wants to merge 7 commits intoagentscope-ai:mainfrom
Conversation
Allow cron jobs to start a new execution session for each run while keeping output delivery pinned to the configured target session. This lets scheduled agent runs isolate chat state without breaking console delivery. Co-Authored-By: Claude Opus 4.6 <[email protected]> *改动描述: *Bug 或 Feature: Bug *依赖信息: 无 *测试相关: - 自动测试 - UT: Y - UT Case 路径 : odps_src/test/unit_test/xxxx - 自动测试 - FT: N - FT Case 路径: NA - 手动测试描述: 无 *影响评估: - 性能影响:N - 性能影响描述: 无 - 兼容性影响: N - 兼容性影响描述: 无 - 配置变更影响: N - 是否已提交并完成部署变更review: N - 部署变更步骤描述: 无 *其他信息: 来自开发容器 Change-Id: I81924a16e11d2d678b1911266a0149dc54168536
|
Hi @cnyarx, this is your 2nd Pull Request. 🙌 Join Developer CommunityThanks so much for your contribution! We'd love to invite you to join the official CoPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page: We truly appreciate your enthusiasm—and look forward to your future contributions! 😊 We'll review your PR soon. |
There was a problem hiding this comment.
Code Review
This pull request introduces an execution session strategy for cron jobs, allowing users to choose between reusing the output session context or starting a fresh session for each run. Key changes include the addition of execution session interfaces and models, updated UI components in the Job Drawer and table columns to support the new strategy, and backend logic in the cron executor to generate unique session IDs for the 'new_per_run' mode. A review comment suggests enhancing the frontend data processing by merging the execution object for future-proofing and using destructuring to maintain immutability when cleaning up request parameters.
Stop sending an empty request object for text cron jobs so the create API no longer fails validation after the execution session changes. Co-Authored-By: Claude Opus 4.6 <[email protected]> *改动描述: *Bug 或 Feature: Bug *依赖信息: 无 *测试相关: - 自动测试 - UT: Y - UT Case 路径 : odps_src/test/unit_test/xxxx - 自动测试 - FT: N - FT Case 路径: NA - 手动测试描述: 无 *影响评估: - 性能影响:N - 性能影响描述: 无 - 兼容性影响: N - 兼容性影响描述: 无 - 配置变更影响: N - 是否已提交并完成部署变更review: N - 部署变更步骤描述: 无 *其他信息: 来自开发容器 Change-Id: I5a88829cf8ab2c0e6f8fe177d920b8bcca6d2519
Split cron create payloads from persisted specs, hide generated ids in the create form, and stop agent submissions when request JSON is invalid. Co-Authored-By: Claude Opus 4.6 <[email protected]> *改动描述: *Bug 或 Feature: Bug *依赖信息: 无 *测试相关: - 自动测试 - UT: Y - UT Case 路径 : odps_src/test/unit_test/xxxx - 自动测试 - FT: N - FT Case 路径: NA - 手动测试描述: 无 *影响评估: - 性能影响:N - 性能影响描述: 无 - 兼容性影响: N - 兼容性影响描述: 无 - 配置变更影响: N - 是否已提交并完成部署变更review: N - 部署变更步骤描述: 无 *其他信息: 来自开发容器 Change-Id: Ia9961a500f62a0c6f6c7ef91512378fa62bedfee
Thanks. This is a reasonable cleanup suggestion, but I’m keeping the current implementation in this PR since it doesn’t change behavior and there are no other `execution` fields to preserve today. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…tion-sessions
*改动描述:
*Bug 或 Feature: Bug
*依赖信息:
无
*测试相关:
- 自动测试 - UT: Y
- UT Case 路径 : odps_src/test/unit_test/xxxx
- 自动测试 - FT: N
- FT Case 路径: NA
- 手动测试描述:
无
*影响评估:
- 性能影响:N
- 性能影响描述: 无
- 兼容性影响: N
- 兼容性影响描述: 无
- 配置变更影响: N
- 是否已提交并完成部署变更review: N
- 部署变更步骤描述:
无
*其他信息:
来自开发容器
Change-Id: I8f78412539797fca3ed49eb5a4bf41c8a23125f1
Tighten the cron jobs console against the backend contract, localize remaining UI copy, and fix the cron executor test imports after the qwenpaw rename. Co-Authored-By: Claude Opus 4.6 <[email protected]> *改动描述: *Bug 或 Feature: Bug *依赖信息: 无 *测试相关: - 自动测试 - UT: Y - UT Case 路径 : odps_src/test/unit_test/xxxx - 自动测试 - FT: N - FT Case 路径: NA - 手动测试描述: 无 *影响评估: - 性能影响:N - 性能影响描述: 无 - 兼容性影响: N - 兼容性影响描述: 无 - 配置变更影响: N - 是否已提交并完成部署变更review: N - 部署变更步骤描述: 无 *其他信息: 来自开发容器 Change-Id: Ie9af67af31ea44ea5da4c967aaac74dbf5dba383
…tion-sessions Co-Authored-By: Claude Opus 4.6 <[email protected]> *改动描述: *Bug 或 Feature: Bug *依赖信息: 无 *测试相关: - 自动测试 - UT: Y - UT Case 路径 : odps_src/test/unit_test/xxxx - 自动测试 - FT: N - FT Case 路径: NA - 手动测试描述: 无 *影响评估: - 性能影响:N - 性能影响描述: 无 - 兼容性影响: N - 兼容性影响描述: 无 - 配置变更影响: N - 是否已提交并完成部署变更review: N - 部署变更步骤描述: 无 *其他信息: 来自开发容器 Change-Id: Ifab8dd709fd1b1335e4677172ec353f33a5868bf
|
处理了版本更新造成的冲突 |

Summary
new_per_runsession behavior and fix the test imports after theqwenpawpackage renamealigning form typing with actual form values
Test plan
python tests/unit/app/test_cron_executor.pydispatchvsnew_per_runbehavior for agent jobsNotes
idexpected byPUT /cron/jobs/{job_id}main