修复 VM 空闲回收活动语义并统一回收流程#868
Merged
Merged
Conversation
Collaborator
Author
|
关联变更: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
control WebSocket 只能证明 VM 需要保持唤醒,不能代表任务仍在活动。此前 control 保活会持续延长 notify/recycle deadline,导致长连接任务无法按空闲策略回收;历史 Redis 数据还存在 deadline 缺失,需要保守分析和显式修复。
本方案不修改 taskflow,也不为了回收持久化 task-event。
改动
自动回收失败补偿
验证
测试覆盖正常回收、幂等清理、远端错误类型传播、前 4 次重试、第 5 次置位、置位失败持续保留且不重复远端删除、非远端错误不置位,以及历史候选和 deadline 修复。
依赖
monkeycode-ai MR !750 将子模块更新到本 PR,并提供中文运维 CLI、显式回收、强制回收和 deadline 修复。
远端环境不存在的幂等处理
强制回收处理脱敏远端错误
实际链路会把 taskflow 内部 environment not found 脱敏为通用 HTTP 500,客户端只能看到 trace_id。为避免该错误阻断运维强制回收: