Checkpoint 是 Huoban 的校对对象:它把一次具体 Run 中的人类或系统决策边界记录为独立资源。Flow 可以声明 checkpoint 位置;Checkpoint 对象记录实例。
设计背景见 Checkpoint 模型。
字段
requiredActions 只能包含 approve、requestChanges、reject。它表达可用动作,不表达最终决策。
合法示例
examples/checkpoints/idea-to-spec-review-direction.yaml。
当前 CLI 行为
validate检查对象形状、动作枚举和 Artifact 引用形状。explain输出runRef、stage、reason、required actions、Artifact refs 和通用 conditions。- 当前 Preflight 不收集独立 Checkpoint 对象,不解析其
runRef、stage 或 Artifact refs。 - Lifecycle schema 提供
checkpoint.requested与checkpoint.resolved事件名,但当前仓库没有 dispatcher。
验证边界
- local
runRefschema 只要求name;它不会强制kind: Run或目标存在。 - schema 不检查
stage是否属于 Run 引用的 Flow。 - schema 不检查 Artifact 是否来自同一 Run 或 stage。
- schema 不定义
status.phase的 Pending/Approved/Rejected 状态机。 expiresAt只验证为字符串,不检查过期行为。
相邻概念边界
常见错误
- 把
requiredActions当成已经发生的 action。 - 发明 schema 未定义的
decision或resolvedByspec 字段。 - 声称当前 CLI 会验证 stage、Run、Artifact 的关系。
- 用
PreflightReady=True替代 Checkpoint 审批。 - 把 Policy 规则内联到 Checkpoint。
- 假设
expiresAt已由 runtime 强制执行。