Repository navigation
test(subgraph): pin #10849 promoted-widget-value corruption with it.fails - #11697
Conversation
…ails The Z-Image-Turbo regression introduced by #10849 corrupts promoted widget values on load when widgets_values comes from a pre-#10849 template (where that array was leftover noise rather than promoted-widget state). The fix on the unmerged inline-proxyWidgets-state branch distinguishes legacy 2-tuple proxyWidgets entries from new-format entries that carry inline state, and falls back to the source widget's value for the legacy shape. Two new vitest cases assert the user-visible symptom directly: 1. After configure() with a legacy 2-tuple proxyWidgets entry and a misaligned widgets_values, widget.value reflects the source default (42), not the legacy noise (999). 2. After configure() with a misaligned widgets_values whose length doesn't match the promoted-view count, the bound widget still reflects the source default, not the leaked legacy entry. Both use it.fails so CI stays green while the bug is present and flips to failing the moment the inline-proxyWidgets-state fix lands. When that happens, drop the .fails marker. Verified locally that removing .fails makes both tests fail with the expected positional-corruption errors (received 999 / 111, expected 42). Care taken not to assert serialize-side contracts that conflict with the existing 'preserves per-instance widget values after configure' / 'round- trips per-instance widget values' coverage in the same file.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds two failing Vitest regression cases to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 1335 passed, 0 failed · 2 flaky📊 Browser Reports
|
📦 Bundle: 5.22 MB gzip 🔴 +37 BDetailsSummary
Category Glance App Entry Points — 22.5 kB (baseline 22.5 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.23 MB (baseline 1.23 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 77.7 kB (baseline 77.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 484 kB (baseline 484 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 11 unchanged User & Accounts — 17.4 kB (baseline 17.4 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 110 kB (baseline 110 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 61 kB (baseline 61 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 3.03 MB (baseline 3.03 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 363 kB (baseline 363 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 18 unchanged Vendor & Third-Party — 9.88 MB (baseline 9.88 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.78 MB (baseline 8.78 MB) • ⚪ 0 BBundles that do not match a named category
Status: 57 added / 57 removed / 78 unchanged ⚡ Performance
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/litegraph/src/subgraph/SubgraphNode.multiInstance.test.ts (1)
262-272: Trim the multi-line regression commentary block.This comment block is verbose and duplicates intent already captured by the test names and PR description.
✂️ Proposed cleanup
- // Pins the open `#10849` regression: the post-#10849 SubgraphNode.configure - // applies `widgets_values` positionally to promoted widgets, which corrupts - // pre-#10849 templates (e.g. Z-Image-Turbo) where `widgets_values` was - // leftover from older serialization and never represented promoted-widget - // values. The fix on the unmerged inline-proxyWidgets-state branch - // distinguishes legacy entries (plain 2-tuples) from new-format entries - // (entries carrying inline state), and falls back to the source widget's - // value for the legacy shape. - // - // Uses it.fails so the suite stays green while the bug is present and - // flips to failing when the fix lands. Drop the `.fails` marker then. it.fails('falls back to source widget value when proxyWidgets is in legacy 2-tuple shape (regression for `#10849`)', () => {As per coding guidelines: "Avoid new usage of code comments; do not add or retain redundant comments."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/lib/litegraph/src/subgraph/SubgraphNode.multiInstance.test.ts` around lines 262 - 272, Remove or significantly shorten the long multi-line regression commentary in SubgraphNode.multiInstance.test.ts that duplicates the test name and PR description; keep a single concise sentence referencing the regression and the related symbol SubgraphNode.configure (and optionally note the it.fails marker) so the intent remains clear without redundant detail. Locate the block at the top of the test (the multi-line comment describing post-#10849 behavior and the inline-proxyWidgets-state fix) and replace it with a one-line summary like "Regression test for SubgraphNode.configure applying widgets_values positionally; retains it.fails until the fix is merged." Ensure the trimmed comment still mentions the it.fails behavior and the affected symbol SubgraphNode.configure.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/lib/litegraph/src/subgraph/SubgraphNode.multiInstance.test.ts`:
- Around line 262-272: Remove or significantly shorten the long multi-line
regression commentary in SubgraphNode.multiInstance.test.ts that duplicates the
test name and PR description; keep a single concise sentence referencing the
regression and the related symbol SubgraphNode.configure (and optionally note
the it.fails marker) so the intent remains clear without redundant detail.
Locate the block at the top of the test (the multi-line comment describing
post-#10849 behavior and the inline-proxyWidgets-state fix) and replace it with
a one-line summary like "Regression test for SubgraphNode.configure applying
widgets_values positionally; retains it.fails until the fix is merged." Ensure
the trimmed comment still mentions the it.fails behavior and the affected symbol
SubgraphNode.configure.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 079a9bfc-0a58-493e-85a1-9f8ff6c920a8
📒 Files selected for processing (1)
src/lib/litegraph/src/subgraph/SubgraphNode.multiInstance.test.ts
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #11697 +/- ##
===========================================
- Coverage 69.16% 51.14% -18.03%
===========================================
Files 1481 1372 -109
Lines 84169 70239 -13930
Branches 22361 19551 -2810
===========================================
- Hits 58219 35921 -22298
- Misses 25004 33720 +8716
+ Partials 946 598 -348
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Reviewed the current draft head. I did not find actionable inline issues; the added it.fails cases exercise the intended #10849 load-time regression, and the focused Vitest file passes on the PR head.
…moted widget values) (Comfy-Org#11790) ## Summary Reverts Comfy-Org#10849 (per-instance promoted widget value storage) and its companion test-pinning PR Comfy-Org#11697. The fix in Comfy-Org#10849 caused regressions in promoted-widget serialization (notably the Z-Image-Turbo template, see Comfy-Org#10146 follow-up). A replacement fix is being developed on `fix/subgraph-promoted-widget-inline-state` and will land separately. ## Changes - **Revert Comfy-Org#11697** — drops the `it.fails`-marked tests that pin the Comfy-Org#10849 corruption symptom. With Comfy-Org#10849 reverted, those markers would falsely flip to passing. - **Revert Comfy-Org#10849** — removes per-instance `_instanceWidgetValues` map, `_pendingWidgetsValues` configure-time hydration, the `widgets_values` write path in `SubgraphNode.serialize()`, the `sourceSerialize` field on `PromotedWidgetView`, the multi-instance Vitest suite, and the multi-instance E2E test + asset. - **Conflict resolution** in `browser_tests/tests/subgraph/subgraphSerialization.spec.ts`: kept the restored test coverage from Comfy-Org#11579 (which is post-Comfy-Org#10849 on main) and removed only the now-unreachable multi-instance test, its helper, and its workflow constant. Auto-merge with Comfy-Org#11698 (`incrementVersion`) and Comfy-Org#11699 (ID type aliases) was clean. ## Review Focus - Confirm no other on-main code path has come to depend on `PromotedWidgetView.sourceSerialize` or `SubgraphNode._instanceWidgetValues` since Comfy-Org#10849 (grep is clean locally). - Confirm we want to land this revert before the replacement fix on `fix/subgraph-promoted-widget-inline-state` is ready — this leaves the original Comfy-Org#10146 (multi-instance widget value collision) unfixed in the meantime. - The retained Comfy-Org#11579 test coverage now exercises pre-Comfy-Org#10849 behavior; some of those assertions were written expecting the Comfy-Org#10849 code path. CI will surface any that need adjustment. ┆Issue is synchronized with this [Notion page](https://app.notion.com/p/PR-11790-revert-roll-back-10849-11697-per-instance-promoted-widget-values-3536d73d3650814094abd58b6b712d8d) by [Unito](https://www.unito.io)
… promoted widget values) (#11790) (#12098) *PR Created by the Glary-Bot Agent* --- ## Summary Backport of #11790 onto `cloud/1.43`. Reverts #10849 (per-instance promoted widget value storage) and its companion test-pinning PR #11697. **Why this is needed on `cloud/1.43`:** Glary-Bot's consolidated backport (#11926) cherry-picked #10849 into `cloud/1.43` on May 5 — four days *after* the same change was reverted on `main` in #11790. The audit didn't surface the upstream revert. As a result, `cloud/1.43` (1.43.16) currently ships the buggy #10849 implementation while `main` / nightly (1.45.1) doesn't. This is the cause of the Hub `rob_realistic_2k_images_quick_variations` model/vae/clip mixup regression reported in `#bug-dump`; the same template renders correctly on nightly. After this lands, `cloud/1.43` and `main` will be on the same code path for promoted-widget serialization. The replacement fix (#11811 with `_pendingWidgetsValuesReplay`) will land separately on `main` and can be backported afterward. ## Changes Mirrors the upstream revert of #10849 + #11697: - Removes `_instanceWidgetValues` map, `_pendingWidgetsValues` hydration, and the `widgets_values` write path in `SubgraphNode.serialize()` - Removes `sourceSerialize` field on `PromotedWidgetView` - Removes the multi-instance Vitest suite (`SubgraphNode.multiInstance.test.ts`) and the multi-instance E2E test + workflow asset ## Conflict Resolution Two conflicts surfaced (vs the original revert, which conflict-resolved against #11579 on `main`): 1. **`browser_tests/tests/subgraph/subgraphSerialization.spec.ts`** — `cloud/1.43` does not have the #11579 expanded test coverage (`Duplicate ID Remapping`, `Legacy Prefixed proxyWidget Normalization`) that the original revert preserved. Took the `cloud/1.43` HEAD structure and removed only the now-unreachable multi-instance test, its helper `getPromotedHostWidgetValues`, and the unused `ComfyPage` import. 2. **`src/lib/litegraph/src/subgraph/SubgraphNode.multiInstance.test.ts`** — `modify/delete` (file was present on `cloud/1.43`'s #10849 backport, deleted by the revert). Resolved by removing the file, matching the revert. ## Verification **Static analysis & tests:** - `pnpm typecheck` — clean - `pnpm typecheck:browser` — clean - `pnpm exec eslint` on all changed files — clean - `pnpm test:unit -- --run subgraph` — 506 tests passing across 34 suites (`SubgraphNode.test.ts`, `promotedWidgetView.test.ts`, `subgraphNodePromotion.test.ts`, etc.) **Manual verification (Playwright + local dev server):** - Started ComfyUI backend (`--cpu --port 8188`) and `pnpm dev` frontend; loaded the page successfully. - Loaded `subgraph-with-multiple-promoted-widgets.json` — subgraph node hydrated with 2 promoted widgets. - Set distinct values on each promoted widget (`first-promoted-value`, `second-promoted-value`), serialized via `app.graph.serialize()`, and reloaded via `app.loadGraphData(...)`. Both values round-tripped correctly to the right widget slots — confirming the revert restores the working single-instance path that nightly currently ships. - Hub-fetched template (`rob_realistic_2k_images_quick_variations`) could not be reproduced locally — `comfy.org/workflows/...` API returns 404 to anonymous curl from the sandbox, and the Hub UI flow needs auth wired up. The team has already confirmed this template renders correctly on nightly, which ships this same revert. ## Note on Oracle Review Oracle flagged the multi-instance regression and the cloud/1.43 forward-compat trade-off as "critical." These describe the *intended* behavior of this revert — the team has consciously chosen the legacy clobber path over #10849's broken per-instance code while the replacement (#11811) is finalized on `main`. Both findings are accepted trade-offs, not blockers. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-12098-backport-cloud-1-43-revert-roll-back-10849-11697-per-instance-promoted-widget-va-35b6d73d36508109a715fc9d3428a294) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
…ails (#11697) *PR Created by the Glary-Bot Agent* --- ## Summary #11579 restored *categorical* test coverage for subgraph serialization but didn't reproduce the specific Z-Image-Turbo regression introduced by #10849 — pre-#10849 templates whose `widgets_values` is leftover noise get corrupted on load because the new code applies that array positionally to promoted widget views. This PR adds two **vitest** cases that pin the user-visible symptom directly: after loading a misaligned legacy payload, the promoted widget value should reflect the source default, not the legacy `widgets_values[i]`. Both use `it.fails` so the suite stays green while the bug is present and flips to failing the moment the fix on `fix/subgraph-promoted-widget-inline-state` lands. ## Tests 1. `falls back to source widget value when proxyWidgets is in legacy 2-tuple shape` — configure() with `proxyWidgets: [['-1', 'widget']]` + `widgets_values: [999]` should leave the widget at the source default (42), not 999. 2. `does not corrupt unbound promoted widgets when widgets_values length mismatches view count` — same shape with longer/wrong-length array. ## Verification - All 8 cases in the file pass under `it.fails` (CI green). - Removing `.fails` locally produces the expected failures: `expected 42, received 999` and `expected 42, received 111` — confirming both tests catch the regression. - `pnpm typecheck`, `pnpm exec eslint`, `pnpm exec oxlint` all clean. ## Why `it.fails` and not plain failing tests The actual fix (`fix/subgraph-promoted-widget-inline-state`) is unmerged. Landing genuinely-failing tests on main would break CI for everyone. `it.fails` documents the bug runnably, keeps CI green, and signals when the fix lands so the marker can be dropped. ## Why these assertions, not "widgets_values must be undefined" A first draft asserted that `serialize()` should not write `widgets_values` at all. That conflicts with existing coverage in the same file (`preserves per-instance widget values after configure`, `round-trips per-instance widget values`) which deliberately uses `widgets_values` for round-trip persistence. These rewritten assertions target the load-time corruption symptom directly without contradicting the per-instance contract — feedback from Oracle review. ## Coordination Mirrors the failing tests already on commit `6a982675e` of the unmerged `fix/subgraph-promoted-widget-inline-state` branch, with the addition of `.fails` markers and a clarifying comment so they can land on main first. Follow-up to #11579. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11697-test-subgraph-pin-10849-promoted-widget-value-corruption-with-it-fails-34f6d73d365081d7a04dcf48ebeceafe) by [Unito](https://www.unito.io) --------- Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
…s) (#11790) ## Summary Reverts #10849 (per-instance promoted widget value storage) and its companion test-pinning PR #11697. The fix in #10849 caused regressions in promoted-widget serialization (notably the Z-Image-Turbo template, see #10146 follow-up). A replacement fix is being developed on `fix/subgraph-promoted-widget-inline-state` and will land separately. ## Changes - **Revert #11697** — drops the `it.fails`-marked tests that pin the #10849 corruption symptom. With #10849 reverted, those markers would falsely flip to passing. - **Revert #10849** — removes per-instance `_instanceWidgetValues` map, `_pendingWidgetsValues` configure-time hydration, the `widgets_values` write path in `SubgraphNode.serialize()`, the `sourceSerialize` field on `PromotedWidgetView`, the multi-instance Vitest suite, and the multi-instance E2E test + asset. - **Conflict resolution** in `browser_tests/tests/subgraph/subgraphSerialization.spec.ts`: kept the restored test coverage from #11579 (which is post-#10849 on main) and removed only the now-unreachable multi-instance test, its helper, and its workflow constant. Auto-merge with #11698 (`incrementVersion`) and #11699 (ID type aliases) was clean. ## Review Focus - Confirm no other on-main code path has come to depend on `PromotedWidgetView.sourceSerialize` or `SubgraphNode._instanceWidgetValues` since #10849 (grep is clean locally). - Confirm we want to land this revert before the replacement fix on `fix/subgraph-promoted-widget-inline-state` is ready — this leaves the original #10146 (multi-instance widget value collision) unfixed in the meantime. - The retained #11579 test coverage now exercises pre-#10849 behavior; some of those assertions were written expecting the #10849 code path. CI will surface any that need adjustment. ┆Issue is synchronized with this [Notion page](https://app.notion.com/p/PR-11790-revert-roll-back-10849-11697-per-instance-promoted-widget-values-3536d73d3650814094abd58b6b712d8d) by [Unito](https://www.unito.io)
PR Created by the Glary-Bot Agent
Summary
#11579 restored categorical test coverage for subgraph serialization but didn't reproduce the specific Z-Image-Turbo regression introduced by #10849 — pre-#10849 templates whose
widgets_valuesis leftover noise get corrupted on load because the new code applies that array positionally to promoted widget views.This PR adds two vitest cases that pin the user-visible symptom directly: after loading a misaligned legacy payload, the promoted widget value should reflect the source default, not the legacy
widgets_values[i].Both use
it.failsso the suite stays green while the bug is present and flips to failing the moment the fix onfix/subgraph-promoted-widget-inline-statelands.Tests
falls back to source widget value when proxyWidgets is in legacy 2-tuple shape— configure() withproxyWidgets: [['-1', 'widget']]+widgets_values: [999]should leave the widget at the source default (42), not 999.does not corrupt unbound promoted widgets when widgets_values length mismatches view count— same shape with longer/wrong-length array.Verification
it.fails(CI green)..failslocally produces the expected failures:expected 42, received 999andexpected 42, received 111— confirming both tests catch the regression.pnpm typecheck,pnpm exec eslint,pnpm exec oxlintall clean.Why
it.failsand not plain failing testsThe actual fix (
fix/subgraph-promoted-widget-inline-state) is unmerged. Landing genuinely-failing tests on main would break CI for everyone.it.failsdocuments the bug runnably, keeps CI green, and signals when the fix lands so the marker can be dropped.Why these assertions, not "widgets_values must be undefined"
A first draft asserted that
serialize()should not writewidgets_valuesat all. That conflicts with existing coverage in the same file (preserves per-instance widget values after configure,round-trips per-instance widget values) which deliberately useswidgets_valuesfor round-trip persistence. These rewritten assertions target the load-time corruption symptom directly without contradicting the per-instance contract — feedback from Oracle review.Coordination
Mirrors the failing tests already on commit
6a982675eof the unmergedfix/subgraph-promoted-widget-inline-statebranch, with the addition of.failsmarkers and a clarifying comment so they can land on main first.Follow-up to #11579.
┆Issue is synchronized with this Notion page by Unito