Skip to content

[backport core/1.56] fix: propagate DynamicGroup row changes through nested promotions - #21045

Closed
comfy-pr-bot wants to merge 1 commit into
core/1.56from
backport-20181-to-core-1.56
Closed

comfy-pr-bot wants to merge 1 commit into
core/1.56from
backport-20181-to-core-1.56

Conversation

@comfy-pr-bot

Copy link
Copy Markdown
Member

Backport of #20181 to core/1.56

Automatically created by backport workflow.

…0181)

## ELI5

Editing or deleting a repeated row now updates its promoted controls
through nested subgraphs. Outer labels follow the surviving row, and
controls and links disappear when their inner target is removed, while
labels renamed by the user are preserved.

## Summary

- Propagate DynamicGroup row renumbering and orphaned-promotion cleanup
through every enclosing subgraph and its host instances. Inputs with
other connected targets keep their promotion.
- Preserve per-instance custom labels in the shared `SubgraphNode`
rename listener; only labels still matching the previous generated label
are updated.
- Collect host instances lazily once per row-change operation and reuse
that lookup across fields, rows and promotion boundaries. No persistent
graph cache is added.
- Exercise a remote resize of an already materialized root node through
the real document applier, change tracker and outbound minter: frontend
workflow serialization updates, one undo entry is recorded, and remote
changes do not echo back. A subsequent local edit proves the outbound
minter is active.

## Validation

- Original regression proof: reverting the nested-promotion fix produced
**2 failures / 38 passes**; applying it produced **40 passes**.
- New per-instance-label regression: **1 failure / 41 passes** before
the label fix.
- `pnpm exec vitest run
src/core/graph/widgets/dynamicGroupWidget.test.ts
src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
src/workbench/extensions/agent/crdt/liveGraphApplier.changeTracker.test.ts
--maxWorkers=1`: **98 passed**. After narrowing the new fixture's
serialization types, its two tests passed again.
- The unchanged real-backend regressions in [#17510 — test: verify
DynamicGroup in a dedicated backend E2E
job](#17510), now
stacked here, both pass. The [dedicated Linux
job](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/37396376241/job/112054534444)
reports **18 passed / 1 failed**: the remaining failure is Undo/Redo of
a once-promoted row, which also fails after reverting both production
files to this PR’s base (`9eaaf261ff`). Local testing matched **18
passed / 1 failed** (one worker, no retries; local Vite-only timeout
60s, CI retains 30s).
- Formatting, lint, application typechecking, and commit/push hooks
passed, including Knip and the changed-file Fallow gate.

## Separate Undo/Redo follow-up

The remaining real-backend E2E failure is tracked in [#20285 — Redo
history is cleared after Undo normalizes node
size](#20285). Undo
changes the restored source-node height, and the next navigation click
records that difference as a new edit and clears Redo. The E2E child
keeps this test enabled as a real failure; the linked completed Linux
run reports 18 passed / 1 failed. No source-size workaround or shared
history change is included in this PR.

The shared-history fix now has an owned draft: [#20294 — fix: preserve
redo after restored node size
normalization](#20294),
assigned to @jaeone94. Its two normalization regressions fail before the
fix, and 140 related unit tests pass with it. Applying only that
production patch to the unchanged E2E child makes the promoted-row
Undo/Redo case pass locally. The full local run was 17 passed / 2
nested-entry click timeouts; see the draft for that limitation. The
child branch and its CI result have not been changed by this
verification.

## Remaining remote-edit scope

The remote-frame test begins with a correctly materialized root node. It
does not certify first catch-up, CLI/catalog integration, or edits
inside subgraph definitions: the current collector/applier path handles
root-node widget updates. Those broader agent-path checks remain
separate from this nested-promotion fix.

Fixes #20179
Fixes #20180

## Provenance

The two original nested-promotion regressions pass unchanged with the
E2E PR stacked on this fix. The child's [completed Linux
job](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/37397861046/job/112059272768)
reports 18 passed / 1 failed; the remaining shared-history Redo defect
has the owned issue and draft linked above. The child subsequently
updated its devtool and backend pin for the private API: four focused
real-backend cases passed locally, while the new full-suite CI run is
pending. The 18/1 result is evidence from before that pin update, not a
claim that the latest child head is green.

- **Authored by:** interactive session
- **Verified:** the unit results and hook checks above. The
[real-backend CI
job](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/37396376241/job/112054534444)
and local run both passed the two targeted regressions; the full suite
is not green because the baseline Redo failure remains.
- **Deviations:** full nested Agent/CLI/document/follower convergence is
not covered by the root-node remote-frame test. No backend dependency
override is added to this fix PR.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@comfy-pr-bot
comfy-pr-bot requested a review from a team as a code owner October 14, 2026 23:48
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Oct 14, 2026
@comfy-pr-bot
comfy-pr-bot requested review from a team as code owners October 14, 2026 23:48
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Oct 14, 2026
@comfy-pr-bot
comfy-pr-bot enabled auto-merge (squash) October 14, 2026 23:48
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/14/2026, 11:50:46 PM UTC

Links

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 90ae1dc249edbe4531274492a4ea8453cef357d4

Full docs: ADR-DEVEX-LINT-0015

🎭 Playwright: ✅ 2202 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2180 / ❌ 0 / ⚠️ 2 / ⏭️ 0)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🧩 Custom Nodes Ecosystem Matrix: ✅ Passed

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

Stage Result What a failure here means
pin-status success Informational. It never fails the build; it warns when the corpus snapshot is over 30 days old.
corpus success Infrastructure: the pack mirror could not be fetched, validated or cached. Not your diff.
shards success Harness integrity, not pack breakage. A shard only checks that every built spec wrote its row; vitest's own exit code is deliberately ignored because pack code leaks unhandled rejections.
verdicts success The population verdict per renderer. This is the stage that judges packs. Exit 1 is FAIL; exit 2 is withheld — rows were missing, so nothing was measured, which is not the same as your change breaking packs.
detection-proofs success The instrument self-test: the matrix must FAIL on a deliberately poisoned corpus. A failure here means the gate cannot be trusted this run, in either direction.

On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff.

Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Oct 14, 2026
@github-actions
github-actions Bot requested a review from thedatalife October 14, 2026 23:49
@jaeone94

Copy link
Copy Markdown
Collaborator

Closing: core is moving from 1.55 straight to 1.57, and the LoRA stack nodes are unregistered in core until then (Comfy-Org/ComfyUI#17050), so this core/1.56 backport isn't needed.

@jaeone94 jaeone94 closed this Oct 14, 2026
auto-merge was automatically disabled October 14, 2026 23:54

Pull request was closed

@jaeone94
jaeone94 deleted the backport-20181-to-core-1.56 branch October 14, 2026 23:54
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@             Coverage Diff              @@
##           core/1.56   #21045     +/-   ##
============================================
  Coverage      85.95%   85.96%             
============================================
  Files           2481     2481             
  Lines         141680   141710     +30     
  Branches       38577    36615   -1962     
============================================
+ Hits          121777   121814     +37     
+ Misses         19519    19512      -7     
  Partials         384      384             
Flag Coverage Δ
unit 82.94% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/core/graph/widgets/dynamicGroupWidget.ts 95.00% <100.00%> (+1.21%) ⬆️
src/lib/litegraph/src/subgraph/SubgraphNode.ts 89.27% <100.00%> (+0.06%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was previously deployed

1 inactive deployment
website-approval — f28f3043 Deployed Oct 14, 2026 by comfy-pr-bot via fast-lane #3401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants