fix: agent CAS path mismatch (~/.uwf/cas → ~/.ocas) #20
Reference in New Issue
Block a user
Delete Branch "fix/agent-cas-path"
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?
What
Fix
createAgentStoreinworkflow-util-agentusing wrong CAS directory.Why
Since Phase 3, all CAS data lives in
~/.ocas/. ButcreateAgentStorewas callinggetCasDir(storageRoot)→~/.uwf/cas/, whilegetActiveThreadEntrycorrectly usedgetGlobalCasDir()→~/.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 execfailed withCAS node not foundeven thoughocas getcould find the same hash.Changes
packages/workflow-util-agent/src/storage.ts:createAgentStorenow usesgetGlobalCasDir()instead ofgetCasDir(storageRoot)LGTM ✅
Phase 3 遗留 bug:
createAgentStore还在用getCasDir(storageRoot)→~/.uwf/cas/,而 CAS 已统一到~/.ocas/。改为getGlobalCasDir()正确。E2E 走查的价值 💪