apply_specs cannot replay a replace_ops batch that wires an autogrow slot (dot guard in _slot_ref)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
調査の方向性
Read _slot_ref in comfy_cli/workflow_ops.py and the regression test TestOpModel::test_replace_ops_batch_is_replayable_through_apply_specs in tests/comfy_cli/command/test_workflow_edit.py. The issue describes how dotted autogrow slot names become unresolved refs in apply_specs. Done means the test passes without xfail and the same replace_ops batch replays through both consumers.
索引モデルが issue の本文から書いたものです。
説明
Problem
apply_specs cannot replay any replace_ops batch that wires an autogrow slot. The whole batch is discarded with ValueError: input '1' not found on node <id>; inputs: ['images'].
replace_ops returns one array that is meant to replay through both consumers — apply_op (the op path) and apply_specs (the spec path). That is the "one artifact, both consumers" contract in docs/op-vocabulary-v1.md §8.8.
The spec-form connect refs are minted by _slot_ref (comfy_cli/workflow_ops.py, ~line 1151). It preferred the slot name, but refused any name containing a dot and fell back to $alias.<slot index>. Autogrow slots are named images.image0, images.image1, … so the dot guard fired on every one of them.
The index fallback cannot resolve on the spec path. apply_specs re-mints each node from the live catalog, so a freshly added BatchImagesNode has only the bare images input — there is no slot at index 1 for $batchimagesnode.1 to address. The connect raises, and apply_specs aborts the remainder, so nothing from the batch is applied.
The guard's stated reason was that _split_ref_slot partitions on the first dot and so would mis-resolve a dotted name. That is not what happens: an alias is re.sub(r"[^a-z0-9_]", "", class_type.lower()), which never contains a dot, so partitioning on the first dot yields the alias and hands back the entire remainder — dots included — as the slot name. $batchimagesnode.images.image0 splits correctly.
Repro
import copy
from comfy_cli import workflow_ops
# `new` = any workflow with a BatchImagesNode whose autogrow base has wired slots
# (images.image0 … images.image2); `g` = a Graph built from object_info.
old = {"nodes": [], "links": [], "last_node_id": 0, "last_link_id": 0}
batch = workflow_ops.replace_ops(old, new)
workflow_ops.apply_op(...) # replays fine, all 3 slots wired
workflow_ops.apply_specs(copy.deepcopy(old), g, batch)
# ValueError: input '1' not found on node 3909371455067170; inputs: ['images'].
# No changes were applied — the batch was discarded.
A runnable version is TestOpModel::test_replace_ops_batch_is_replayable_through_apply_specs in tests/comfy_cli/command/test_workflow_edit.py.
Impact
Every caller that emits a replace_ops batch and replays it through the spec path loses the whole batch, not just the autogrow wiring — apply_specs discards on the first failing spec. That covers templates fetch --emit-ops, generate, and recipe replay, for any workflow using an autogrow node such as BatchImagesNode.
It was invisible until now because the only existing replace_ops test used a link-less workflow.
Expected
replace_ops mints a connect ref the spec path can resolve, so the same array replays through apply_op and apply_specs with the same wiring.
Fix
Drop the dot guard in _slot_ref so dotted autogrow names are emitted verbatim. Filed alongside https://github.com/Comfy-Org/comfy-cli/pull/848, which applies that one-line change and turns the test above from a strict xfail into a real passing regression pin.
Task Decomposition
Not decomposed: this is a one-line production change (removing a single condition in _slot_ref) plus the test that pins it, already implemented in #848. Complexity tier: trivial. No sub-tasks or dependencies. Acceptance: TestOpModel::test_replace_ops_batch_is_replayable_through_apply_specs passes without an xfail marker and fails on the parent commit.
- 主要言語
- Python
- スター
- 1k
- フォーク
- 176
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 87
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Comfy-Org/comfy-cli のほかの issue
-
test_file_utils umask tests assert against a umask the code never reads (import-time _UMASK), so they only pass on a 0o022 host対応中かも @neverbiasu が 10 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Comfy-Org/comfy-cli#907 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Comfy-Org/comfy-cli#781 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`comfy launch --background` fails with FileNotFoundError when comfy-cli is invoked by path対応中かも @RaphaelFakhri が 42 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Comfy-Org/comfy-cli#691 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Comfy-Org/comfy-cli#670 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
Comfy-Org/comfy-cli の issue をすべて見る
似ている issue
-
add entry to blockオープン
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"対応中かも @0z5a が今日担当しました。 オープンneeds-triage
難易度 2/5 半日 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
plot_graph crashes when a mesh node has no m2m edge対応中かも @tygvi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mllam/neural-lam#883 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
future-agi/future-agi#4092 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeオープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
WingedGuardian/GENesis-AGI#4641 ·
メンテナーはふだん 1 日以内に返信