fix: agent CAS path mismatch (~/.uwf/cas → ~/.ocas) #20

Merged
xiaomo merged 1 commits from fix/agent-cas-path into main 2026-06-02 15:20:35 +00:00
Owner

What

Fix createAgentStore in workflow-util-agent using wrong CAS directory.

Why

Since Phase 3, all CAS data lives in ~/.ocas/. But createAgentStore was calling getCasDir(storageRoot)~/.uwf/cas/, while getActiveThreadEntry correctly used getGlobalCasDir()~/.ocas/. This caused thread lookup to succeed but CAS node reads to fail with "CAS node not found".

Found

During e2e walkthrough after Phase 0-5 migration. uwf thread exec failed with CAS node not found even though ocas get could find the same hash.

Changes

  • packages/workflow-util-agent/src/storage.ts: createAgentStore now uses getGlobalCasDir() instead of getCasDir(storageRoot)
  • 1 file, 1 line change
  • 640 tests pass
## What Fix `createAgentStore` in `workflow-util-agent` using wrong CAS directory. ## Why Since Phase 3, all CAS data lives in `~/.ocas/`. But `createAgentStore` was calling `getCasDir(storageRoot)` → `~/.uwf/cas/`, while `getActiveThreadEntry` correctly used `getGlobalCasDir()` → `~/.ocas/`. This caused thread lookup to succeed but CAS node reads to fail with "CAS node not found". ## Found During e2e walkthrough after Phase 0-5 migration. `uwf thread exec` failed with `CAS node not found` even though `ocas get` could find the same hash. ## Changes - `packages/workflow-util-agent/src/storage.ts`: `createAgentStore` now uses `getGlobalCasDir()` instead of `getCasDir(storageRoot)` - 1 file, 1 line change - 640 tests pass
xingyue added 1 commit 2026-06-02 15:19:34 +00:00
createAgentStore was calling getCasDir(storageRoot) which resolves to
~/.uwf/cas/, but since Phase 3 all CAS data lives in ~/.ocas/.
getActiveThreadEntry already used getGlobalCasDir() correctly, causing
a split where thread lookup succeeded but CAS node reads failed.

Found during e2e walkthrough after Phase 0-5 migration.
xiaomo approved these changes 2026-06-02 15:20:34 +00:00
xiaomo left a comment
Owner

LGTM

Phase 3 遗留 bug:createAgentStore 还在用 getCasDir(storageRoot)~/.uwf/cas/,而 CAS 已统一到 ~/.ocas/。改为 getGlobalCasDir() 正确。E2E 走查的价值 💪

LGTM ✅ Phase 3 遗留 bug:`createAgentStore` 还在用 `getCasDir(storageRoot)` → `~/.uwf/cas/`,而 CAS 已统一到 `~/.ocas/`。改为 `getGlobalCasDir()` 正确。E2E 走查的价值 💪
xiaomo merged commit e4e4288d00 into main 2026-06-02 15:20:35 +00:00
xiaomo deleted branch fix/agent-cas-path 2026-06-02 15:20:36 +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#20