Skip to content

feat(workflow): add durable execution and automatic App compensation - #10

Merged
1111mp merged 9 commits into
devfrom
feat/durable-workflow-execution
Oct 9, 2026
Merged

1111mp merged 9 commits into
devfrom
feat/durable-workflow-execution

Conversation

@1111mp

@1111mp 1111mp commented Oct 9, 2026

Copy link
Copy Markdown
Owner

增加持久化执行日志、中断恢复与自动补偿

改动说明

为本地 Workflow 增加统一操作身份、持久化执行日志和尝试历史,并接入应用中断恢复、Process App 自动补偿及 Remote Agent 取消处理。

Workflow 失败或停止后保留终态,不再提供原任务继续入口;“重新运行”创建新的业务执行。应用退出或崩溃造成的中断,以及等待用户输入的暂停,分别保留符合条件的恢复与继续能力。

主要变更

  • 持久化操作意图、输入、执行状态和结果,协调操作日志与 checkpoint;恢复时复用已保存结果,未知结果禁止盲目重发。
  • 应用启动时识别中断任务,按执行器能力检查恢复条件;失败和停止的任务不能进入恢复队列。
  • 支持 Process App 在同一 App 中配置独立补偿入口,例如 compensate.py。
  • Workflow 失败时,自动补偿已成功执行且配置了补偿入口的 App 节点及工具调用,并在对应节点消息中展示结果。
  • Workflow 失败或停止时,对具有 taskId 的未完成 Remote Agent 操作发起一次尽力执行的 A2A CancelTask,不轮询或自动重试。
  • 重新运行生成新的执行身份,清除原任务的清理标记;修复排队恢复任务停止时遗漏远程取消的问题。
  • 增加文件产物支持、相关 SDK、示例与中英文文档。

行为边界

  • 用户停止不触发 Process App 自动补偿。
  • Remote Agent 取消不等于撤销已完成的远程业务;缺少 taskId 的未知操作无法自动取消。
  • 普通进程与 CodeAct 不承诺从任意位置恢复。
  • 应用退出期间暂停处理,本次不提供常驻后台执行能力。

验证

  • Rust:299 通过,3 忽略。
  • Desktop:88 通过。
  • Server:35 通过(缓存结果)。
  • Python SDK:27 通过,4 跳过。
  • 类型检查、Lint、Clippy、格式检查通过。
  • 前端生产构建与文档构建通过。

尚未完成真实桌面崩溃及外部服务的端到端验收。

1111mp added 9 commits October 7, 2026 20:59
Signed-off-by: The1111mp <The1111mp@outlook.com>
Persist automatic cleanup for successful App invocations.

Display compensation output and errors in the corresponding node messages.

Simplify App compensation configuration, localize recovery UI, and update the Saga demo.

Signed-off-by: The1111mp <The1111mp@outlook.com>
Signed-off-by: The1111mp <The1111mp@outlook.com>
Persist remote task handling and resume checks after restart.
Query before cancellation, retain completed results, and avoid
resubmitting unknown operations. Show status in node messages.

Consolidate database migrations and update English and Chinese docs.

Signed-off-by: The1111mp <The1111mp@outlook.com>
Remove cancellation polling, restart scheduling, and recovery restrictions.
Keep node status messages and update English and Chinese documentation.

Signed-off-by: The1111mp <The1111mp@outlook.com>
- Restrict automatic recovery to application-interrupted workflows
- Retire legacy recovery jobs for failed and stopped runs
- Reset compensation metadata when creating a new execution
- Cancel existing remote tasks when stopping queued recovery
- Move startup recovery into StartupRecovery outside database initialization
- Add regression tests and update recovery documentation

Signed-off-by: The1111mp <The1111mp@outlook.com>
Remove continuation of failed or cancelled workflows from the UI and backend.
Preserve waiting-for-input resume and application-interruption recovery.
Update recovery tests and Chinese/English documentation.

Signed-off-by: The1111mp <The1111mp@outlook.com>
Describe compensation and remote cancellation results in node messages.
Keep Chinese and English guides focused on current usage.

Signed-off-by: The1111mp <The1111mp@outlook.com>
- scope runs, chat sessions, queues, and approvals by workspace
- reset run UI state when switching personal/team modes
- merge workspace schema into the remote tasks migration
- document artifact usage and local storage in English and Chinese
- fix duplicate workspace component keys

Signed-off-by: The1111mp <The1111mp@outlook.com>
@1111mp
1111mp merged commit c9f6869 into dev Oct 9, 2026
6 checks passed
@1111mp
1111mp deleted the feat/durable-workflow-execution branch October 9, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant