Repository navigation
Backport #18704 to core/1.55 - #19182
christian-byrne wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Self-review complete. The 1.55 conflict resolution deliberately preserves the release reset flow and adds only there; it does not import the newer undo-bracket dependency. The permanent refusal gate, durable error toast, and reset coverage remain intact. Local evidence: 381 focused tests, full workspace typecheck, formatting, and dependency checks passed. |
|
Correction: the release reset flow adds only resetNotifiedGiveUp(); it intentionally does not import the newer undo-bracket dependency. |
🌾 Fallow: ✅ PassedFallow 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 cc9fbc154c5612bfb341682efeb4340e45641024
Full docs: ADR-DEVEX-LINT-0015 🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
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 🎭 Playwright: ✅ 2119 passed, 0 failed · 3 flaky📊 Browser Reports
|
e2b7681 to
81fb929
Compare
Backport #18704 to the 1.55 release branch with its native reset path. Preserve the permanent schema-mismatch refusal gate, durable sync-error notification, and reset of the one-shot give-up latch.
81fb929 to
501edcf
Compare
|
Closing as duplicate: the intended backport already merged in #19165. |
Pull request was closed
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.55 #19182 +/- ##
===========================================
Coverage 84.65% 84.66%
===========================================
Files 2302 2303 +1
Lines 131881 132020 +139
Branches 35615 35651 +36
===========================================
+ Hits 111649 111772 +123
- Misses 19913 19929 +16
Partials 319 319
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 9 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 2 |
| 🟡 Medium | 3 |
| 🟢 Low | 3 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| // FE #16637 residual: a refusal is the earliest signal the sender can | ||
| // get that its in-flight batch's doc is gone — don't make it wait out | ||
| // the 10 s result-silence window to notice on its own. | ||
| releaseHeldOps() |
There was a problem hiding this comment.
🟠 High — Even when handleSubscribeRefusal classifies the frame as a stale straggler (shouldNotify: false), connected.value was already set to false above and releaseHeldOps() + sender.abortIfUnbound() still run unconditionally — so in the exact race confirmedSinceLastSend was added to defend, the healthy confirmed channel is still reported disconnected and the user's in-flight human-op batch is settled as unbound/unconfirmed. Gate the teardown (and the connected.value = ok assignment) on the refusal being fresh, or correlate acknowledgements by attempt/generation before mutating any bridge state. Raised by 5 of 8 reviewers (gemini-3.1-pro adversarial, gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, kimi-k3-max edge-case, claude-opus-5-thinking-max edge-case).
| // See `confirmedSinceLastSend`: bail out before touching any timer, | ||
| // so a stale straggler can't clear the probe/backoff state the | ||
| // confirm it raced behind already armed. | ||
| if (this.confirmedSinceLastSend) return false |
There was a problem hiding this comment.
🟠 High — The confirmedSinceLastSend bail-out sits inside the permanent-code branch, so a stale retryable refusal (e.g. a delayed doc_not_found answering attempt 1) landing after attempt 2 confirmed still runs clearStaleProbe() and scheduleSubscribeRetry(), cancelling the probe the confirm just armed and forcing a resubscribe on a healthy channel. The guard's own premise — a confirm and a refusal can never answer the same subscribe — is code-independent, so hoist the check above the branch. Raised by 4 of 8 reviewers (gemini-3.1-pro adversarial, gemini-3.1-pro edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max edge-case).
| // A redelivered/duplicate refusal frame answers nothing new once the | ||
| // latch is already set — without this guard it would re-run the report | ||
| // and the caller's `onGaveUp` (toast/telemetry) a second time. | ||
| if (this.gaveUp) return false |
There was a problem hiding this comment.
🟡 Medium — giveUp() (ack-timeout exhaustion) also sets gaveUp = true, so when a host slow enough to blow the ack budget finally answers with a permanent code, giveUpPermanently returns at this guard: no toast, no reportError naming the real cause, and no subscribe_refused_permanent dev event — telemetry reads "never acknowledged" instead of schema_version_mismatch. That is precisely the case where the explanation matters most; key the duplicate guard on a distinct permanent latch rather than the shared gaveUp flag. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max adversarial).
| // A reconnect that lands the same permanent code for the same workflow | ||
| // is one unchanged fact - only a different workflow (retarget/doc_reset, | ||
| // see `resetNotifiedGiveUp`) is a new one worth telling the person about. | ||
| if (workflowId !== null && workflowId === this.lastNotifiedGiveUpWorkflowId) |
There was a problem hiding this comment.
🟡 Medium — The comment says a reconnect landing "the same permanent code for the same workflow" is one unchanged fact, but only the workflow id is recorded and compared — code never is. A reconnect returning a different permanent reason for the same workflow (e.g. catalog_mismatch after schema_version_mismatch) is therefore suppressed, leaving the user with the wrong explanation — the very distinction the new code plumbing and workflowSyncFailedDetailCatalogMismatch copy exist to draw — and dropping the distinct cause from telemetry. Key the marker on (workflowId, code). Raised by 4 of 8 reviewers (gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case).
| this.gaveUp = false | ||
| this.usedCatchUpGrace = false | ||
| this.resetForNewAttempt() | ||
| this.resetNotifiedGiveUp() |
There was a problem hiding this comment.
🟡 Medium — clearForRetarget() now re-arms notification, but the follower's watcher calls it on every [workflowId, isTargetActive] change — including a deactivate/reactivate cycle for the same workflow. Switching tabs away from and back to a permanently unsyncable workflow therefore resubscribes, is refused again, and fires another never-expiring toast, so ordinary navigation stacks identical errors. Reset the marker only when the workflow/lineage actually changes, not when activity alone toggles. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max adversarial, claude-opus-5-thinking-max adversarial).
| summary: t('agent.workflowSyncFailedTitle'), | ||
| detail: formatWorkflowSyncErrorDetail(t, message, code), | ||
| // A permanent desync remains visible until the person dismisses it. | ||
| life: 0 |
There was a problem hiding this comment.
🟢 Low — Nothing ever removes this life: 0 toast and the toast store has no dedup or cap, while the permanent latch is explicitly recoverable (onReconnected() clears gaveUp, onSubscribeConfirmed() resets the marker) and onDocReset re-arms notification on every doc_reset. A stale "This workflow can't sync" error can therefore sit over a canvas that is syncing normally again, and a host in a reset/refuse loop stacks sticky toasts without bound. Capture the message and toast.remove() it on the next confirm, or give it a bounded life. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial).
| // see `resetNotifiedGiveUp`) is a new one worth telling the person about. | ||
| if (workflowId !== null && workflowId === this.lastNotifiedGiveUpWorkflowId) | ||
| return false | ||
| this.lastNotifiedGiveUpWorkflowId = workflowId |
There was a problem hiding this comment.
🟢 Low — null doubles as both "nothing notified yet" (the initial value and what resetNotifiedGiveUp() writes) and the recorded marker when this.workflowId() returns null, so a refusal notified with an unknown workflow id leaves the dedup silently void — the workflowId !== null short-circuit above then re-fires reportError and a fresh sticky toast on every later refusal. Use a separate "notified" flag, or skip recording when the id is unknown. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
| : 'agent.workflowSyncFailedDetail' | ||
| ) | ||
| if (!message) return detail | ||
| return `${detail} (${truncate(message, { length: SYNC_ERROR_RAW_MESSAGE_MAX_LENGTH })})` |
There was a problem hiding this comment.
🟢 Low — The doc-host's free-form message is appended verbatim into a persistent, trusted-looking toast with no sanitization beyond the 200-char clamp — newlines and control characters pass through — which discloses internal diagnostics to end users and lets a hostile or misconfigured host place attacker-chosen prose inside the app's own error UI. Consider rendering only the localized code-mapped copy and routing the raw message to reportError/dev logging. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial).
| // survive the permanent latch: its callback checks only `workflowId()`, | ||
| // not `gaveUp`, so left alone it would still fire a resubscribe later. | ||
| this.clearSubscribeRetry() | ||
| if (!notify) return false |
There was a problem hiding this comment.
⚪ Nit — This early return sits above recordDevEvent, so an unsupported refusal latches with no breadcrumb at all — not even in the debug-gated dev panel — in exactly the case that produces no other signal for why the channel stopped. Record the dev event before the notify check. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
Backports #18704 (stops retrying permanently refused CRDT document subscriptions) to core/1.55.
The automated cherry-pick conflicted where 1.55 lacks the newer undo-bracket API. This keeps the release branch reset path and adds the refusal-state reset directly, while preserving the permanent-error notification and retry gate.
Validation: