Phase 1 Testing: uwf cas 核心读写命令 #320

Closed
opened 2026-05-18 12:33:38 +00:00 by xiaoju · 0 comments
Owner

验证目标

uwf cas 的 get/cat/put/has 命令能正确读写 CAS 节点。

Ref: #319

前置条件

uwf setup --provider dashscope --base-url https://dashscope.aliyuncs.com/compatible-mode/v1 --api-key $DASHSCOPE_API_KEY --model qwen-plus

测试步骤

  • Step 1: uwf cas --help 显示子命令列表

    uwf cas --help
    

    预期: 显示 get、cat、put、has 等子命令说明

  • Step 2: put 写入节点
    先获取一个 type hash(用 uwf workflow put 注册一个 workflow 后,用 cas list 找到 schema),然后:

    echo '{ "hello": "world" }' > /tmp/test-node.json
    uwf cas put <type-hash> /tmp/test-node.json
    

    预期: 输出 13 字符 CAS hash

  • Step 3: get 读取节点

    uwf cas get <hash-from-step-2>
    

    预期: 输出完整节点 JSON(含 type、payload、timestamp)

  • Step 4: cat --payload 只输出 payload

    uwf cas cat <hash-from-step-2> --payload
    

    预期: 只输出 { "hello": "world" }

  • Step 5: has 检查存在

    uwf cas has <hash-from-step-2>
    uwf cas has 0000000000000
    

    预期: 第一个输出 true,第二个输出 false

验证完成标准

所有 checkbox 打勾
不依赖 json-cas CLI 在 PATH

## 验证目标 `uwf cas` 的 get/cat/put/has 命令能正确读写 CAS 节点。 Ref: #319 ## 前置条件 ```bash uwf setup --provider dashscope --base-url https://dashscope.aliyuncs.com/compatible-mode/v1 --api-key $DASHSCOPE_API_KEY --model qwen-plus ``` ## 测试步骤 - [ ] **Step 1: `uwf cas --help` 显示子命令列表** ```bash uwf cas --help ``` **预期:** 显示 get、cat、put、has 等子命令说明 - [ ] **Step 2: put 写入节点** 先获取一个 type hash(用 uwf workflow put 注册一个 workflow 后,用 cas list 找到 schema),然后: ```bash echo '{ "hello": "world" }' > /tmp/test-node.json uwf cas put <type-hash> /tmp/test-node.json ``` **预期:** 输出 13 字符 CAS hash - [ ] **Step 3: get 读取节点** ```bash uwf cas get <hash-from-step-2> ``` **预期:** 输出完整节点 JSON(含 type、payload、timestamp) - [ ] **Step 4: cat --payload 只输出 payload** ```bash uwf cas cat <hash-from-step-2> --payload ``` **预期:** 只输出 `{ "hello": "world" }` - [ ] **Step 5: has 检查存在** ```bash uwf cas has <hash-from-step-2> uwf cas has 0000000000000 ``` **预期:** 第一个输出 `true`,第二个输出 `false` ## 验证完成标准 ✅ 所有 checkbox 打勾 ✅ 不依赖 json-cas CLI 在 PATH
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#320