Skip to content

[codex] Preserve legacy string-node search during Text rename#13348

Draft
taiyangtandian-star wants to merge 1 commit intoComfy-Org:masterfrom
taiyangtandian-star:codex/string-node-alias-regression
Draft

[codex] Preserve legacy string-node search during Text rename#13348
taiyangtandian-star wants to merge 1 commit intoComfy-Org:masterfrom
taiyangtandian-star:codex/string-node-alias-regression

Conversation

@taiyangtandian-star
Copy link
Copy Markdown

Issue

The recent string-node rename pass changed display names to the new Text ... variants, but StringLength no longer kept its old Length display name as a search alias. Users searching for the legacy name would stop finding the node even though the intent of the rename was to preserve discoverability through aliases.

Root cause

The rename commit updated aliases for the other renamed string nodes, but StringLength only kept descriptive aliases like character count and string length. The exact legacy display name was omitted, so this path was left untested and regressed silently.

Fix

Add the missing Length search alias back to StringLength and introduce a focused unit test module that verifies:

  • all renamed string nodes expose the expected Text ... display names;
  • all old display names remain present as search aliases;
  • regex-based string nodes keep the generic regex keyword for search.

The new test uses lightweight stubs for the Comfy API import surface so it stays fast and independent from the full runtime dependency graph.

Validation

Validated with:

  • uvx pytest tests-unit/comfy_extras_test/nodes_string_test.py

I also attempted uvx --from ruff ruff check comfy_extras/nodes_string.py tests-unit/comfy_extras_test/nodes_string_test.py, but the temporary tool download stalled in this environment, so lint evidence is limited to the targeted test pass.

The string-node rename updated display names for discoverability, but
`StringLength` lost the exact legacy `Length` alias. This restores that
alias and adds focused tests for the renamed schema metadata so future
renames keep old search paths intact.

Constraint: Keep scope limited to the recent string-node rename surface
Rejected: Broad schema metadata audit across unrelated nodes | exceeds the changed-area scope for this automation
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: When renaming nodes for search/discoverability, preserve the previous display name as an alias and lock it with a schema test
Tested: uvx pytest tests-unit/comfy_extras_test/nodes_string_test.py
Not-tested: Ruff lint, because uvx temporary download stalled in this environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants