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

Open
#301 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@TablewareBox is already working on this.

Since Jul 31, 2026.

Assessment

This issue has not been assessed yet.

Description

上游功能与决策

入口基线

  • integration/workflow-task-runtime:01380449868ccf334f4da1a28c7f6f946fb540d1
  • 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。
Dominant language
Python
Stars
186
Forks
79
Avg merge
1h 2m
Merged PRs (30d)
29

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepmodeling/Uni-Lab-OS

All issues in deepmodeling/Uni-Lab-OS

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.