Phase 1 Testing: Protocol 类型定义 — Role 四段式字段 (#359) #360

Closed
opened 2026-05-21 01:17:51 +00:00 by xiaoju · 0 comments
Owner

验证目标

RoleDefinition 类型扩展四段字段,编译通过,现有 workflow YAML 不受影响。

测试步骤

  • Step 1: 类型定义正确
    在 workflow-protocol 的 RoleDefinition 中新增 identity/prepare/execute/report 字段(均为 string | null)。
    systemPrompt 保留(string | null)。
    预期:bun run typecheck 通过

  • Step 2: WorkflowPayload schema 兼容
    现有的 CAS schema(WorkflowPayload)能正确校验包含四段字段的 role 定义。
    预期:含四段字段的 workflow 能通过 schema 校验

  • Step 3: 现有 workflow 不受影响
    用 examples/ 目录下的现有 workflow YAML 执行 uwf workflow put。
    预期:注册成功,hash 不变(如果 YAML 未改)

  • Step 4: 新字段可选
    一个 role 只有 systemPrompt、没有四段字段时,类型检查和运行时均正常。
    预期:无编译错误,运行时不报错

验证完成标准

所有 checkbox 打勾
bun run typecheck 通过
biome check 通过

Ref: #359

## 验证目标 RoleDefinition 类型扩展四段字段,编译通过,现有 workflow YAML 不受影响。 ## 测试步骤 - [ ] Step 1: 类型定义正确 在 workflow-protocol 的 RoleDefinition 中新增 identity/prepare/execute/report 字段(均为 string | null)。 systemPrompt 保留(string | null)。 预期:bun run typecheck 通过 - [ ] Step 2: WorkflowPayload schema 兼容 现有的 CAS schema(WorkflowPayload)能正确校验包含四段字段的 role 定义。 预期:含四段字段的 workflow 能通过 schema 校验 - [ ] Step 3: 现有 workflow 不受影响 用 examples/ 目录下的现有 workflow YAML 执行 uwf workflow put。 预期:注册成功,hash 不变(如果 YAML 未改) - [ ] Step 4: 新字段可选 一个 role 只有 systemPrompt、没有四段字段时,类型检查和运行时均正常。 预期:无编译错误,运行时不报错 ## 验证完成标准 所有 checkbox 打勾 bun run typecheck 通过 biome check 通过 Ref: #359
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#360