Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat(core): 节点执行能力契约——5 token + 递归闭包 + validate_for_profile + NodeRunner 断言

Đã đóng
#331 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, python
Lĩnh vực
backend, devtools, testing

Hướng nghiên cứu

Start by reading the existing capability work in pkg/ir/capability.go and the implementation from dependency #330, then trace execution entry points for Normal, Generator, Distributed, and Go Execute plus NodeRunner. Implement recursive requirements and profile validation across Python and Go, keeping model_validate limited to graph checks. Done means both runtimes agree on accept/reject decisions and the listed controls pass, including the approval flow and compile behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

优先级 P2 · 依赖:depends-on: #330
关联:#311(嵌套挂起)、#325(runtime 冻结)、#329(tracking)

基线 HEAD = 8d715f76

Summary

G1(#330)修了"静默跳过",但节点仍然没有声明"我需要在什么宿主上跑"。
本单把执行要求变成可声明、可校验的契约,覆盖根流程和子流程。

建议

  • 能力词表收敛为 5 个正交 token:
    suspend:root|nested、event_bus、queue、sandbox、network;
    不要 service:<node_type>(每新增一个挂起节点就自动多一个符号);
    服务可用性是运行期事实,不是节点源码属性。
  • 节点声明:基类默认 + 显式覆盖;is_suspending ⇒ requirements 非空
    的不变量由 G1 已加。
  • 递归闭包:child/loop/parallel + reference 引用的 flow;
    计算 required_capabilities(flow, recursive=True)。
  • validate_for_profile(flow, profile):独立于 model_validate,
    只在执行入口(Normal/Generator/Distributed/Go Execute)和
    publish/start 调用;model_validate 只查图。
  • NodeRunner 在每个 suspending 节点 execute 前断言宿主契约
    (含子流程),覆盖绕过 strategies 的旁路。
  • 作者期信号:flow_list_nodes 行内加 requires/suspends;
    flow_compile(source, profile=...) 返回非致命
    execution_requirements:{required, missing}。
  • 矩阵从 registry.capability_matrix() 生成,断言进
    docs/DOC_ASSERTIONS.yml 同 PR 接 nightly;差分断言:
    注册表新增 node_type 而矩阵未变 → 红。
  • Python↔Go 对拍:Python 导出 node_dependencies JSON,Go 测试读同一份
    比对(Go 已有 pkg/ir/capability.go)。

验收

  • 同一 flow + 同一 profile,Python/Go 的 accept/reject 决策一致;
  • 新增节点漏声明 → 启动红 / 矩阵差分红;
  • 负控:approval flow 在 normal 拒绝、在 distributed 跑通;
  • 正控:错误体里的 fix.call 原样执行后 ok=true(或明确告知不可本地执行);
  • flow_compile(profile="normal") 对含 approval 的源码返回
    execution_requirements 但不改变 ok。

边界

  • 不做发布门(另立单,依赖 issue 48 的服务自注册);
  • 不做 simulate(另立单);
  • 不新增 manifest 平行词表(消费已有 features);
  • 不改 model_validate 默认行为。
Ngôn ngữ chính
Python
Star
0
Fork
1
Merge trung bình
2 giờ 33 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jeffkit/plaita

Tất cả issue của jeffkit/plaita

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.