feat(core): 节点执行能力契约——5 token + 递归闭包 + validate_for_profile + NodeRunner 断言
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
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_dependenciesJSON,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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jeffkit/plaita
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
jeffkit/plaita#330 · 1 comment ·
Maintainers usually reply within 1 day
-
keeper-ignore
Difficulty 5/5 Over a week Newbie friendliness 22/100
jeffkit/plaita#329 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
jeffkit/plaita#327 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
jeffkit/plaita#326 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
type-bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
push_gh-pages fails on master branch on forksPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
kuznia-rdzeni/coreblocks#1135 ·
-
good first issue server
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
documentation priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
a-lex-s/mealie-telegram-bot#54 ·
Maintainers usually reply within 1 day