Skip to content

[Workflow] Phase 02H:实现 Task input preflight 与 Handle binding #301

Description

@TablewareBox

上游功能与决策

入口基线

  • integration/workflow-task-runtime01380449868ccf334f4da1a28c7f6f946fb540d1
  • 02D~02G 均已有 round trend,并以非 squash 方式并入上述基线。
  • 实现分支:migration/02h-task-input-preflight
  • 实现前冻结:docs/developer_guide/workflow_task_runtime_migration/rounds/02h-task-input-preflight-design.md

本轮范围

  1. 从 persisted Workflow.meta_data.unilab.input_contract 读取 ordered v1 Input Contract。
  2. 在任何 WorkflowTask / WorkflowNodeJob 写入前完成 closed unknown/missing/default/null/type/constraint preflight。
  3. 严格规范化 scalar、opaque JSON object、同质一维 list 及 nullable/default 语义,不做字符串、bool/int 等便利 coercion。
  4. 将完整 resolved input 写入 WorkflowTask.input,并随既有 workflow_snapshot 冻结合同与 binding。
  5. 以真实 target WorkflowHandleTemplate.uuid 解析 WorkflowNode.meta_data.unilab.input_bindings,把值写入 Task-scoped Job param;不得修改 persisted WorkflowNode.param
  6. 定义可注入的 ResourceSlot resolver port 与 400/404/409 失败分类合同测试。

明确停止线

  • 本轮不实现 production Material lookup、Material/Site 持久权威、Task Reservation、Job Claim、Disposition 或软删除保护;这些属于后续 M1。
  • M1 完成前,任何非空 ResourceSlot / list[ResourceSlot] Task input 必须在 Task/Job 写入前 fail closed。
  • 不允许旧 Inventory、远程 Backend、字段名 heuristic、warning-only 或任意 fallback 使 Material-backed Task 进入执行。
  • 本轮不修改 Backend 或前端,也不扩展已冻结共享 wire DTO。

验收与 provenance

  • 严格按仓库 Workflow Migration Round Gate:fresh branch;恰好一个独立 test author 在独立 worktree 先提交 RED;保留测试提交 provenance;完整目标测试、全仓测试、Ruff/format/static 与 git diff --check;恰好一个未参与测试/实现的独立 reviewer 固定精确候选 SHA。
  • 覆盖 unknown/missing/default/null、strict scalar/object/list、约束、合同/binding closed shape、provider ambiguity、required Handle、debug-scope pruning、snapshot immutability 与零 partial write。
  • 记录 tested SHA、命令结果、test author、reviewer、finding disposition 和中文 trend;仅在全绿后非 squash 本地合并到 integration/workflow-task-runtime
  • 未经明确授权不 push。

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions