Phase D Testing: ReAct ExtractFn #44

Closed
opened 2026-05-07 13:02:32 +00:00 by xiaoju · 0 comments
Owner

验证目标

ExtractFn 支持 tool-use ReAct loop,可在 extract 阶段调用 cas get 遍历 Merkle DAG 提取 meta。通过 extractMode: "react" opt-in。

前置

Phase C 已合入 main。

测试步骤

  • Step 1: RoleDefinition 支持 extractMode

    bun run build
    

    预期: RoleDefinition 类型新增 extractMode: "single" | "react" 字段。默认 "single",现有 role 不受影响。Build 通过。

  • Step 2: ReAct extract 支持 cas_get tool

    bun test --filter "extract"
    

    预期:extractMode: "react" 时,extract 阶段的 LLM call 注册 cas_get tool。LLM 可以调用 tool 读取 CAS 节点,多轮交互后输出 meta JSON。

  • Step 3: 普通 role 不受影响

    bun test --filter "create-workflow"
    

    预期: extractMode: "single" 的 role(现有所有 role)仍走一次性 LLM extract,行为不变。

  • Step 4: 集成测试 — workflowAsAgent + ReAct extract

    bun test --filter "react-extract"
    

    预期: 父 workflow 用 workflowAsAgent 调用子 workflow,子 workflow 返回 root hash,父 role 的 extract 通过 ReAct loop cas get 遍历 DAG,成功提取 meta。

  • Step 5: 全量测试通过

    bun test
    bun run build
    bun run check
    

    预期: 全部通过。

验证完成标准

所有 checkbox 打勾
extractMode: "single" 的 role 行为不变
extractMode: "react" 的 role 可以通过 tool-use 遍历 DAG
完整 workflowAsAgent 场景验证通过

Refs #40

## 验证目标 ExtractFn 支持 tool-use ReAct loop,可在 extract 阶段调用 `cas get` 遍历 Merkle DAG 提取 meta。通过 `extractMode: "react"` opt-in。 ## 前置 Phase C 已合入 main。 ## 测试步骤 - [ ] **Step 1: RoleDefinition 支持 extractMode** ```bash bun run build ``` **预期:** `RoleDefinition` 类型新增 `extractMode: "single" | "react"` 字段。默认 `"single"`,现有 role 不受影响。Build 通过。 - [ ] **Step 2: ReAct extract 支持 cas_get tool** ```bash bun test --filter "extract" ``` **预期:** 当 `extractMode: "react"` 时,extract 阶段的 LLM call 注册 `cas_get` tool。LLM 可以调用 tool 读取 CAS 节点,多轮交互后输出 meta JSON。 - [ ] **Step 3: 普通 role 不受影响** ```bash bun test --filter "create-workflow" ``` **预期:** `extractMode: "single"` 的 role(现有所有 role)仍走一次性 LLM extract,行为不变。 - [ ] **Step 4: 集成测试 — workflowAsAgent + ReAct extract** ```bash bun test --filter "react-extract" ``` **预期:** 父 workflow 用 `workflowAsAgent` 调用子 workflow,子 workflow 返回 root hash,父 role 的 extract 通过 ReAct loop `cas get` 遍历 DAG,成功提取 meta。 - [ ] **Step 5: 全量测试通过** ```bash bun test bun run build bun run check ``` **预期:** 全部通过。 ## 验证完成标准 ✅ 所有 checkbox 打勾 ✅ extractMode: "single" 的 role 行为不变 ✅ extractMode: "react" 的 role 可以通过 tool-use 遍历 DAG ✅ 完整 workflowAsAgent 场景验证通过 Refs #40
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#44