Comfy-Org / Comfy-Org/ComfyUI_frontend

Serialized link endpoints are not remapped after merge-boundary node-id remint

Open
#15,928 1 comment 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
area:subgraph Bug Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Problem / Goal

When the merge boundary remints a colliding node id (the `nodeShellLifecycle` remint loop), no old→new id map is recorded. `LGraph.configure` restores links **before** nodes are added, so serialized link endpoints (links, reroutes, group memberships) that referenced the old id silently dangle after a remint.

Node identity is handled correctly (fresh id + console warning); references to that identity are not. Goal: serialized payloads that trigger a remint must either be remapped consistently or rejected explicitly — never silently corrupted.

## Proposed Solution

Two candidate approaches (from ADR-0008's known-gap note and ADR-0018, #15920):

- **(a)** Record an old→new id map during the remint loop and remap serialized link/reroute/group endpoints before `LGraph.configure` restores connections.
- **(b)** Reject ambiguous payloads outright (fail loudly instead of remapping).

Decision between (a) and (b) should be made when this is picked up; (a) preserves user data and is the presumptive default.

## Acceptance Criteria

- Chosen behavior implemented for all serialized reference kinds (links, reroutes, groups).
- Invariant test pinning the chosen behavior, following the collision-contract test conventions established in #15720.
- ADR-0008/ADR-0018 gap notes updated to point at the resolution.

## References

- ADR-0018 (Node-ID Reminting at the Merge Boundary) — #15920
- ADR-0008 amendment documenting this as a known deliberate gap — #15761
- Collision-contract invariant suite — #15720

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.