Phase 3 Testing: Extract Layer #237
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
验证目标
ExtractFn 实现,支持 retry-once 错误处理和三级 merge 配置。
前置条件
Phase 1 (#235) 完成。在
packages/workflow-utils中工作(已有 llm-extract)。测试步骤
Step 1: ExtractFn 基本工作
Mock LLM 返回 JSON,ExtractFn parse 成功。
预期: 单元测试通过
Step 2: Retry-once on parse failure
第一次返回 malformed JSON,第二次返回正确 JSON。
预期: 最终成功,LLM 被调用 2 次
Step 3: 两次都失败抛 ExtractError
预期: throw ExtractError,包含 raw string 和 parse error
Step 4: 三级 merge — global config 生效
预期: 所有 role 默认使用 global extract config
Step 5: 三级 merge — role override
预期: 该 role 使用 override config,其他 role 用 global
验证完成标准
✅ 所有 checkbox 打勾 | ✅
pnpm test通过Ref: #234