Repository navigation
[backport core/1.54] fix: keep hand-wired autogrow connections on their real slot after an agent slot sync (PM-1449) - #18660
claude[bot] wants to merge 2 commits into
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…o-core-1.54 # Conflicts: # src/stores/nodeDataStore.test.ts # src/workbench/extensions/agent/crdt/graphMutations.ts
📦 Bundle Size
|
|
The Generated by Claude Code |
…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>
|
Closing this backport PR: its diff against Generated by Claude Code |
Requested by Christian Byrne · Slack thread
Backports #18279 (merge commit
566c343fb95e77ee04c4dc3aa02ea40bcb416e66) tocore/1.54.Conflict resolution
The automated backport bot hit cherry-pick conflicts in
src/stores/nodeDataStore.test.tsandsrc/workbench/extensions/agent/crdt/graphMutations.tsbecause both files had diverged oncore/1.54from other agent/CRDT work already merged there. Resolved manually, following the same logic as the source PR:updateNodeSlotsreplaced the store's slot arrays wholesale, so a hand-wired connection into an autogrow port could serialize against the wrong input once the liveLGraphNode's arrays (bound at construction) diverged from the reassigned store arrays.SERIALISABLE_SLOT_FIELDSallowlist 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 failurepnpm typecheck(all workspace projects) — clean🤖 Generated with Claude Code
https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6
Generated by Claude Code