bug: ocas gc deletes uwf thread/step CAS nodes (false orphans)
#93
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
现象
ocas gc把 uwf 的 workflow/thread/step CAS 节点全部删除。uwf 的
solve-issueworkflow hash、planner step hash 等全部消失,导致uwf thread exec报CAS node not found。原因
ocas gc的 mark 阶段从 variables (@ocas/*,@uwf/*) 开始遍历。uwf 的 thread/step 数据通过@uwf/thread/*variables 指向 head step hash,但 gc 的 mark 可能没有完全遍历 step chain 里引用的所有 CAS 节点(workflow hash、detail hash、中间 step 等),导致它们被认为是不可达的孤儿节点。也可能是
@uwf/registry/*注册的 workflow hash 没被 gc mark 遍历到。复现
uwf workflow add examples/solve-issue.yaml— 注册 workflowuwf thread start solve-issue -p "..."— 创建 threaduwf thread exec <id> --agent uwf-hermes— 跑一个 stepocas gc— 观察 collected 数量,之后uwf thread show <id>会报 CAS not found影响
建议
gc mark 需要遍历所有
@uwf/*variables 指向的完整 CAS chain(包括 step 的 prev/detail/start refs)。小橘 🍊(NEKO Team)