Phase 3 Testing: Descriptor 保留 x-cas-ref 标注 #291

Closed
opened 2026-05-16 11:27:40 +00:00 by xiaoju · 0 comments
Owner

验证目标

buildDescriptor 生成的 JSON Schema 中保留 x-cas-ref: true 标注,使 WorkflowDescriptor 携带 CAS ref 信息。

关联

Ref #285 Phase 3

测试步骤

  • Step 1: buildDescriptor 输出含 x-cas-ref — 带 .meta({ casRef: true }) 的 schema 字段,生成的 JSON Schema 中包含 "x-cas-ref": true
  • Step 2: 无标注字段不含 x-cas-ref — 普通字段的 JSON Schema 中无 x-cas-ref
  • Step 3: nested array 场景 — phases[].hash 标注后,JSON Schema 的 items.properties.hash 含 x-cas-ref
  • Step 4: Zod toJSONSchema 验证 — 确认 Zod v4 的 toJSONSchema 是否自动保留 .meta(),如果不保留则手动注入
  • Step 5: bunx tsc --build 通过
  • Step 6: bun test 全量通过

验证完成标准

所有 checkbox 打勾
全量 tsc + test 通过

## 验证目标 buildDescriptor 生成的 JSON Schema 中保留 x-cas-ref: true 标注,使 WorkflowDescriptor 携带 CAS ref 信息。 ## 关联 Ref #285 Phase 3 ## 测试步骤 - [ ] **Step 1: buildDescriptor 输出含 x-cas-ref** — 带 .meta({ casRef: true }) 的 schema 字段,生成的 JSON Schema 中包含 "x-cas-ref": true - [ ] **Step 2: 无标注字段不含 x-cas-ref** — 普通字段的 JSON Schema 中无 x-cas-ref - [ ] **Step 3: nested array 场景** — phases[].hash 标注后,JSON Schema 的 items.properties.hash 含 x-cas-ref - [ ] **Step 4: Zod toJSONSchema 验证** — 确认 Zod v4 的 toJSONSchema 是否自动保留 .meta(),如果不保留则手动注入 - [ ] **Step 5: bunx tsc --build 通过** - [ ] **Step 6: bun test 全量通过** ## 验证完成标准 ✅ 所有 checkbox 打勾 ✅ 全量 tsc + test 通过
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#291