Skip to content

fix(job-lifecycle):保证任务终态提交与租约 fencing - #42

Merged
Heyflyingpig merged 1 commit into
developfrom
fix(job-lifecycle)/atomic-terminal-commit
Aug 4, 2026
Merged

fix(job-lifecycle):保证任务终态提交与租约 fencing#42
Heyflyingpig merged 1 commit into
developfrom
fix(job-lifecycle)/atomic-terminal-commit

Conversation

@Heyflyingpig

Copy link
Copy Markdown
Owner
  • 终态聊天、chat_saved_at、终态事件和 job=succeeded 合并为单事务提交。
  • 所有 worker 写操作校验 job_id + worker_id + attempt_count,旧 worker 无法覆盖新任务。
  • chat_saved_at 改为保存前幂等闸门,避免重试重复聊天。
  • 最大尝试次数且心跳过期的任务会原子标记为 failed,并释放 active_session_key。
  • 新增 9 项生命周期测试。

- 终态聊天、chat_saved_at、终态事件和 job=succeeded 合并为单事务提交。
- 所有 worker 写操作校验 job_id + worker_id + attempt_count,旧 worker 无法覆盖新任务。
- chat_saved_at 改为保存前幂等闸门,避免重试重复聊天。
- 最大尝试次数且心跳过期的任务会原子标记为 failed,并释放 active_session_key。
- 新增 9 项生命周期测试。
@Heyflyingpig Heyflyingpig self-assigned this Aug 4, 2026
@Heyflyingpig Heyflyingpig linked an issue Aug 4, 2026 that may be closed by this pull request
@Heyflyingpig
Heyflyingpig merged commit 0e88cf3 into develop Aug 4, 2026
3 checks passed
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.

bug(agent-job):统一任务终态事务与聊天保存幂等性

1 participant