Omnibus polish landing the remaining unstaged work on the branch:
frontend
- kind-aware RefChip — @{uuid} refs targeting non-wildcard library
modules (constraint, combine, derivation, fixed_values, bundle) now
render with the matching kind color + PrimeIcon instead of falling
through as unresolved wildcards. cascade/resolveChip exposes
resolveModuleChip; preview-resolver caches snap.type as kind;
RichTextPreview accepts a uuid-to-kind map; RefChip honours the
new moduleKind prop.
- DebugViewer derives uuid-to-kind from trace entries so engine
warnings (e.g. constraint_never_applied carrying @{constraint_id})
render the constraint id as a colored constraint chip.
- Injector node refactor: two-tier socket (template_subject /
subject row pairs) + general-template row model; binding modal
handles general rows; row reorder + cap; rows collapsed by
default; sockets gain tooltips.
- SPA misc: useStarterSet rebuilds cascade reverse-dep index on
catalog refresh so just-created starters surface in cascade
impact dialogs; tokens / resolveTokens / EmptyState height /
AppLayout sidebar count live-refresh / ModuleListView mid-cols.
engine
- constraint_handler: 3 dedup bugs in carrier-claim + classify the
never_applied warning.
- pipeline: detect via-nested constraint carriers; carrier-claim
failsafe + clearer never_applied warning text.
- syntax/resolve: nested @{uuid#name} optional segment recognised.
tests
- DebugViewer / Injector / RefChip / resolveChip / preview-resolver
test suites extended for the new behaviour.
- Engine + integration tests adjusted for constraint dedup + new
carrier path + nested-ref parsing.
43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
"""Unit test for the extension's comfy_entrypoint wiring."""
|
|
|
|
import asyncio
|
|
import importlib.util
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def _load_root_init():
|
|
"""Load the project-root __init__.py as a package-aware module."""
|
|
project_root = Path(__file__).parent.parent
|
|
init_path = project_root / "__init__.py"
|
|
spec = importlib.util.spec_from_file_location(
|
|
"wildcard_pipeline_root",
|
|
init_path,
|
|
submodule_search_locations=[str(project_root)],
|
|
)
|
|
assert spec and spec.loader
|
|
module = importlib.util.module_from_spec(spec)
|
|
sys.modules["wildcard_pipeline_root"] = module
|
|
spec.loader.exec_module(module)
|
|
return module
|
|
|
|
|
|
def test_entrypoint_exposes_all_node_classes():
|
|
ext = _load_root_init()
|
|
extension = asyncio.run(ext.comfy_entrypoint())
|
|
node_list = asyncio.run(extension.get_node_list())
|
|
|
|
ids = sorted(cls.define_schema().node_id for cls in node_list)
|
|
assert ids == [
|
|
"WP_Context",
|
|
"WP_ContextInjector",
|
|
"WP_ContextLoop",
|
|
"WP_Debug",
|
|
"WP_PromptAssembler",
|
|
"WP_PromptCleaner",
|
|
"WP_SeedList",
|
|
"WP_VarToBool",
|
|
"WP_VarToFloat",
|
|
"WP_VarToInt",
|
|
]
|