diff --git a/comfy_cli/skills/comfy-custom-nodes-validation/SKILL.md b/comfy_cli/skills/comfy-custom-nodes-validation/SKILL.md index 4ace9ae7e..1884dfb1e 100644 --- a/comfy_cli/skills/comfy-custom-nodes-validation/SKILL.md +++ b/comfy_cli/skills/comfy-custom-nodes-validation/SKILL.md @@ -7,7 +7,9 @@ description: Packaged fallback for staged validation of generated custom-node co Validate in stages: static contract and Python parse; import inside ComfyUI's own Python environment; restart; discovery in `/object_info`; then one small workflow execution. filesystem presence is never proof that a node loaded. After a repair, restart and rediscover. Do not promise hot reload. -Pin local catalog checks with `--where local`. If the result reports `object_info_stale`, restart -ComfyUI and refresh before treating the catalog as proof of what loaded. +Pin local catalog checks with `--where local`. If the result reports `object_info_stale`, it came +from a cache: restart ComfyUI and re-run that command, and treat the catalog as proof of what loaded +only once the warning is gone. `comfy nodes refresh` re-pulls annotations, not `/object_info`, and a +browser reload changes neither. Check one registration form, unique non-empty node/input/output ids, declared callable existence, and report dependency/filesystem/network behavior. A static scan cannot prove dynamic behavior is absent. diff --git a/tests/comfy_cli/skills/fixtures/custom_node_context_budget.json b/tests/comfy_cli/skills/fixtures/custom_node_context_budget.json index 0d8a7d08f..0de232409 100644 --- a/tests/comfy_cli/skills/fixtures/custom_node_context_budget.json +++ b/tests/comfy_cli/skills/fixtures/custom_node_context_budget.json @@ -9,7 +9,7 @@ "invocation": { "bytes": 1016, "tokens": 145 }, "ecosystem-reference": { "bytes": 807, "tokens": 102 }, "api-schema": { "bytes": 1143, "tokens": 137 }, - "validation": { "bytes": 826, "tokens": 109 }, + "validation": { "bytes": 987, "tokens": 135 }, "dependencies-capabilities": { "bytes": 830, "tokens": 102 }, "troubleshooting": { "bytes": 651, "tokens": 82 }, "packaging-publishing": { "bytes": 1566, "tokens": 202 }, diff --git a/tests/comfy_cli/skills/test_installer.py b/tests/comfy_cli/skills/test_installer.py index d885905bd..3b09961a4 100644 --- a/tests/comfy_cli/skills/test_installer.py +++ b/tests/comfy_cli/skills/test_installer.py @@ -222,6 +222,17 @@ def test_custom_node_skill_snapshot_keeps_runtime_contract(): assert needle in corpus +def test_custom_node_validation_names_what_to_refresh(): + """A bare "restart ComfyUI and refresh" reads as "reload the browser tab" + or "run `comfy nodes refresh`"; neither re-reads `/object_info`.""" + text = " ".join(skill_content("comfy-custom-nodes-validation").split()) + assert not re.search(r"(?i)restart(ed)?,? (comfyui )?(and )?refresh\b", text) + assert not re.search(r"(?i)(refresh|reload)(ing)? (the |your )?(comfyui )?(browser|page|tab)\b", text) + assert "restart ComfyUI and re-run that command" in text + assert "`comfy nodes refresh` re-pulls annotations, not `/object_info`" in text + assert "browser reload changes neither" in text + + def test_custom_node_search_routes_have_positive_and_negative_controls(): """A search cue without an avoid control teaches indiscriminate search.""" text = skill_content("comfy-custom-nodes-search")