fix: resolve workflow from CAS chain in collectCompletedThreads #47

Merged
xiaomo merged 1 commits from fix/completed-thread-workflow into main 2026-06-04 08:38:06 +00:00
Owner

What

Fix completed/cancelled thread 的 workflow 字段在 thread list 里显示为空。

Why

collectCompletedThreads 把 workflow 写死了空字符串,而 active thread 用 resolveWorkflowFromHead 从 CAS chain 获取。不一致。

Changes

  • collectCompletedThreads 签名从 VarStore 改为 UwfStore
  • 内部调用 resolveWorkflowFromHead(uwf, entry.head) 获取 workflow hash
  • fallback 到空字符串(CAS 数据损坏时)

Ref

Closes #46

## What Fix completed/cancelled thread 的 workflow 字段在 `thread list` 里显示为空。 ## Why `collectCompletedThreads` 把 workflow 写死了空字符串,而 active thread 用 `resolveWorkflowFromHead` 从 CAS chain 获取。不一致。 ## Changes - `collectCompletedThreads` 签名从 `VarStore` 改为 `UwfStore` - 内部调用 `resolveWorkflowFromHead(uwf, entry.head)` 获取 workflow hash - fallback 到空字符串(CAS 数据损坏时) ## Ref Closes #46
xiaoju added 1 commit 2026-06-04 07:35:26 +00:00
Instead of hardcoding workflow as empty string for completed/cancelled
threads, use resolveWorkflowFromHead to get the actual workflow hash
from the CAS chain, consistent with active thread handling.

Closes #46
xiaomo approved these changes 2026-06-04 08:38:05 +00:00
xiaomo left a comment
Owner

LGTM 正好修了 #45 review 里提到的空 workflow 问题。

LGTM ✅ 正好修了 #45 review 里提到的空 workflow 问题。
xiaomo merged commit 64a8bab5ce into main 2026-06-04 08:38:06 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/united-workforce#47