Skip to content

[backport core/1.54] fix: keep hand-wired autogrow connections on their real slot after an agent slot sync (PM-1449) - #18660

Closed
claude[bot] wants to merge 2 commits into
core/1.54from
backport-18279-to-core-1.54
Closed

claude[bot] wants to merge 2 commits into
core/1.54from
backport-18279-to-core-1.54

Conversation

@claude

@claude claude Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Requested by Christian Byrne · Slack thread

Backports #18279 (merge commit 566c343fb95e77ee04c4dc3aa02ea40bcb416e66) to core/1.54.

Conflict resolution

The automated backport bot hit cherry-pick conflicts in src/stores/nodeDataStore.test.ts and src/workbench/extensions/agent/crdt/graphMutations.ts because both files had diverged on core/1.54 from other agent/CRDT work already merged there. Resolved manually, following the same logic as the source PR:

  • Before: updateNodeSlots replaced the store's slot arrays wholesale, so a hand-wired connection into an autogrow port could serialize against the wrong input once the live LGraphNode's arrays (bound at construction) diverged from the reassigned store arrays.
  • After: the registered input/output arrays are preserved and matching slot objects are patched in place (matching duplicate names occurrence-by-occurrence), and CRDT slot records are reduced through a SERIALISABLE_SLOT_FIELDS allowlist before reaching live slot objects, instead of spreading raw records untyped.

Verification

  • pnpm vitest run src/stores/nodeDataStore.test.ts src/workbench/extensions/agent/crdt/graphMutations.test.ts — 91 passed, 1 expected failure
  • pnpm typecheck (all workspace projects) — clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6


Generated by Claude Code

… agent slot sync (PM-1449) (#18279)

<!-- ccr-slack-attribution -->
_Requested by **Christian Byrne** · [Slack
thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789985885071859)_

A hand-wired connection into an autogrow port could be serialized
against the wrong input after an agent slot sync. `updateNodeSlots`
replaced the store's slot arrays even though the live `LGraphNode`
retained the original arrays, leaving serialization and the canvas with
different slot layouts.

- Preserve the registered input and output arrays and patch matching
slot objects in place.
- Match duplicate names occurrence by occurrence. Insert incoming-only
slots before the next matching live slot while retaining existing-only
slots and their order.
- Treat `NodeInputSlot` and `NodeOutputSlot` connectivity as
link-store-owned explicitly, without probing prototypes or reading
deprecated `link`/`links` accessors.
- Reduce CRDT slot records to supported serialized fields before they
reach live slot objects.
- Cover the PM-1449 serialization path, middle insertion, duplicate
input/output names, external runtime fields, live output
identity/reactivity, partial snapshots, and self-aliased live slots.

The `updateNodeSlots` signature is unchanged.

`LGraphNode` binds its slot arrays to the registered `NodeState` when it
is constructed. Reassigning `state.inputs` or `state.outputs` later
detached the store from the live node. Subsequent local autogrow and
connection changes updated the canvas array, while `LGraph.serialize()`
read the stale store array and associated positional topology with the
wrong slot.

The fix keeps the shared arrays stable. Existing slot objects also
remain stable so Vue dependents continue to invalidate through the
reactive object. Connectivity remains authoritative in `linkStore` for
live slot classes and in the descriptor for plain store records.

- #18021 addresses the same array-detachment root cause for queued
execution.
- #18101 covers a separate dynamic-widget slot-offset issue.
- #18275 changes agent input reconciliation and may overlap when either
PR rebases onto the other.

- `pnpm vitest run src/stores/nodeDataStore.test.ts` — 29 passed.
- `pnpm vitest run
src/workbench/extensions/agent/crdt/graphMutations.test.ts` — 50 passed,
1 expected failure.
- `pnpm vitest run src/workbench/extensions/agent
src/stores/nodeDataStore.test.ts
src/core/graph/widgets/dynamicWidgets.test.ts` — 123 files, 1,919
passed, 7 expected failures.
- `pnpm typecheck` — passed.
- Scoped ESLint, type-aware oxlint, and oxfmt checks — passed.
- Commit hook checks and pre-push `knip --cache` — passed.

Fixes PM-1449 (child of PM-1442).

---------

Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
billing-web-test Error Error Sep 24, 2026 1:08am UTC
1 Skipped Deployment
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 24, 2026 1:08am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 8773239f-cc32-4210-90ff-44d6d7aa4a43

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

…o-core-1.54

# Conflicts:
#	src/stores/nodeDataStore.test.ts
#	src/workbench/extensions/agent/crdt/graphMutations.ts
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size

⏳ Size data collection in progress…

@claude

claude Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

The Vercel – billing-web-test check is failing on this PR's head (55ad9453f), but it's not caused by this PR's diff: the identical failure signature (Vercel – billing-web succeeds as an ignored build step, billing-web-test fails the same way) reproduces on another unrelated open core/1.54 PR (#18655, which only touches subgraph/widget rendering). This PR only changes src/stores/nodeDataStore.ts/.test.ts and src/workbench/extensions/agent/crdt/graphMutations.ts, neither referenced anywhere under apps/billing-web/. This looks like a pre-existing, branch-wide infra issue on core/1.54's current tip rather than something introduced here, and no fix for it exists yet. Not blocking on it from this PR's side.


Generated by Claude Code

@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-backport Agent changes targeting a stable cloud/core release branch agent-crdt Agent document synchronization, graph projection or CRDT operations labels Sep 24, 2026
christian-byrne pushed a commit that referenced this pull request Sep 24, 2026
…window (#18673)

Automated backport of #18599 to `core/1.54`. The backport bot's
automated cherry-pick attempt failed with a merge conflict in
`src/scripts/api.fetchApi.test.ts` (several other open PRs — #18660,
#18369, #18334, #17872 — are stacked against `core/1.54` touching the
same file), so this was done manually.

## What conflicted and how it was resolved

- **`src/scripts/api.fetchApi.test.ts`**: only the import/mock-setup
header conflicted. `core/1.54`'s auth mocking is older than `main`'s:
this branch's `authStore` still talks to Firebase directly through
`vuefire` + `firebase/auth` (no `firebaseIdentity` port exists here
yet), so the new `describe('post-401 retry timeout budget')` test's
`beforeEach` was adapted to mock `vuefire`/`firebase/auth` directly
(matching the pattern already used in this branch's `authStore.test.ts`)
instead of spying on `firebaseIdentity.onUserChanged`/`onTokenChanged`.
The new `trackUnifiedAuthRetry`/`mockDistribution`/`mockFeatureFlags`
mocks were kept, simplified to this branch's non-`fromPartial` mocking
style.
- **`src/platform/auth/unified/remintRetry.test.ts`**: auto-merged, but
the new test referenced `useWorkspaceAuthStore()` directly; this
branch's file mocks that whole module via a hoisted `mockRemint`
instead, so the test was updated to use
`mockRemint.mockResolvedValue(...)` like every other test in the file.
- **`src/scripts/api.ts`**: auto-merged, but the new timeout-retry code
called `addBreadcrumb(...)` directly; this branch imports Sentry as
`import * as Sentry from '@sentry/vue'` (not a named `addBreadcrumb`
import), so the call was changed to `Sentry.addBreadcrumb(...)` to match
this branch's existing convention (used a few lines above in the same
file).
- **`src/platform/auth/unified/remintRetry.ts`**: auto-merged cleanly,
no changes needed.

## Verification

- `pnpm typecheck` — clean
- `pnpm lint` (eslint on the touched files; `src/scripts/api.ts` is
repo-ignored from eslint on this branch) — clean, no new oxlint/eslint
issues
- `src/scripts/api.fetchApi.test.ts` — 18/18 passing
- `src/platform/auth/unified/remintRetry.test.ts` — 23/23 passing
- Pre-commit hooks (oxfmt, oxlint --fix, eslint --fix, typecheck) ran
clean on commit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_0137jzrG6RSp5e6YgGp8kxdY

---
_Generated by [Claude
Code](https://claude.ai/code/session_0137jzrG6RSp5e6YgGp8kxdY)_

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: dante01yoon <bunggl@naver.com>
@claude

claude Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing this backport PR: its diff against core/1.54's current tip is 0 lines (confirmed via the GitHub API diff and files endpoints), meaning this content has already landed on core/1.54 through another stacked backport PR. No action needed here.


Generated by Claude Code

@claude claude Bot closed this Sep 24, 2026

This branch had an error being deployed

1 failed deployment
Preview – billing-web-test — 55ad9453 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation agent-backport Agent changes targeting a stable cloud/core release branch agent-crdt Agent document synchronization, graph projection or CRDT operations backport Backporting a PR onto a release candidate risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants