Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#331 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go, python

Research direction

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.

Written by the indexing model from the issue text.

Description

优先级 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 默认行为。
Dominant language
Python
Stars
0
Forks
1
Avg merge
2h 33m
Merged PRs (30d)
9

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 jeffkit/plaita

All issues in jeffkit/plaita

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.