Repository navigation
Backport #18704 to cloud/1.55 - #19183
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. This is the same target-native conflict resolution as #19182 on cloud/1.55. It preserves the release reset flow while adding the refusal-state reset and the permanent refusal/error-notification behavior. The core-equivalent implementation passed 381 focused tests, full workspace typecheck, formatting, and dependency checks; cloud CI supplies branch-specific validation. |
0883424 to
229635b
Compare
🌾 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 a1300e95f8922aea5e93e9ecf0a9d0603d06eaa4
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: ✅ 2125 passed, 0 failed📊 Browser Reports
|
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.
229635b to
ec93d84
Compare
|
Closing as duplicate: the intended backport already merged in #19166. |
Pull request was closed
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 9 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 6 |
| 🟢 Low | 2 |
Panel: 8/8 reviewers contributed findings.
| resumeHeldOpsIfSubscribed() | ||
| } else { | ||
| lifecycle.onSubscribeRefused() | ||
| const refusal = handleSubscribeRefusal(detail, lifecycle) |
There was a problem hiding this comment.
🟠 High — handleSubscribeRefusal returns shouldNotify: false both for ordinary retryable refusals and for a permanent refusal the lifecycle deliberately discarded as a stale straggler, but this else branch still runs the full teardown: connected.value was already set to false above, and releaseHeldOps() + sender.abortIfUnbound() run unconditionally. So in exactly the race confirmedSinceLastSend exists to survive, the bridge has already nulled sentWorkflowId and a healthy confirmed channel is still reported disconnected, its in-flight human batch settled unconfirmed, and doc_updates dropped until the next status frame or stale probe. Distinguish "discarded as stale" from "retryable refusal" in SubscribeRefusalOutcome and skip the teardown for the former. Raised by 4 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, kimi-k3-max adversarial, kimi-k3-max edge-case).
| if (this.confirmedSinceLastSend) return false | ||
| this.clearAckTimer() | ||
| this.clearStaleProbe() | ||
| return this.giveUpPermanently(code, isNotifyingPermanentRefusalCode(code)) |
There was a problem hiding this comment.
🟡 Medium — doc_subscribed frames carry no attempt identity, so this guard only helps when the confirm happens to arrive first. In the reverse ordering — attempt N's permanent refusal lands while attempt N+1 (sent by the ack timeout) is still outstanding — giveUpPermanently latches gaveUp, and N+1's later confirm is filtered out at the bridge because sentWorkflowId was already cleared; with shouldDeferSubscribe() now true, status-frame reconciles are blocked and nothing resubscribes, leaving a dead channel behind a sticky "can't sync" toast until a reconnect or retarget (pre-diff the bounded retry self-healed this). Raised by 2 of 8 reviewers (kimi-k3-max adversarial, gpt-5.6-sol-max adversarial).
| // 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.
🟡 Medium — The discard path returns before arming any recovery, yet the bridge has already cleared sentWorkflowId for that same ok: false frame; the old code's unconditional scheduleSubscribeRetry() repaired that within 500 ms, so the follower now stays unsubscribed until the next status frame or the stale probe (up to 30 s). The same blind spot swallows a genuinely new refusal: an older attempt confirming late, or an unsolicited terminal refusal pushed after a confirm, is indistinguishable from a straggler and is dropped with no latch, no retry, and no onSyncError — the silent desync this feature exists to surface. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
| this.clearAckTimer() | ||
| this.clearStaleProbe() | ||
| this.scheduleSubscribeRetry() | ||
| return false |
There was a problem hiding this comment.
🟡 Medium — The confirmedSinceLastSend check guards only the permanent branch. A stale retryable refusal (e.g. doc_not_found) answering a superseded attempt still falls through to clearStaleProbe() + scheduleSubscribeRetry(), tearing down the healthy confirm's probe and resubscribing a working channel — and via the follower's shared else branch it also marks it disconnected and releases held ops. The race is identical in both branches, so the guard belongs before the code classification. Raised by 3 of 8 reviewers (gemini-3.1-pro adversarial, gemini-3.1-pro edge-case, claude-opus-5-thinking-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 — lastNotifiedGiveUpWorkflowId dedupes on workflow id alone, while the comment above describes the suppressed fact as the same permanent code recurring. A reconnect answered with a different permanent code for the same workflow (schema_version_mismatch, then catalog_mismatch after a server-side change) is a distinct failure with its own localized copy, but onSyncError, the dev event, and reportError are all suppressed — the person keeps the wrong explanation, or gets none if they dismissed the first sticky toast. Key the marker on the workflow id plus the code. Raised by 6 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, kimi-k3-max edge-case, gemini-3.1-pro 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 — gaveUp is also latched by the ack-timeout path (giveUp() below), which never notifies, so a permanent refusal arriving just after three unanswered acks hits this early return and produces no dev event, no reportError, and no onSyncError. The user is left with a silently dead channel even though that refusal is the first concrete reason received; a flag distinct from the ack-timeout latch would let the refusal still notify. Raised by 3 of 8 reviewers (gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case).
| 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.
🟡 Medium — This toast never auto-dismisses and is never removed programmatically, while the dedupe marker is cleared by clearForRetarget() — which the follower's watch([workflowId, isTargetActive]) runs on every change, including an isTargetActive flip with the workflow unchanged. Switching away from and back to a permanently incompatible workflow therefore re-notifies each round trip, stacking N undismissing error toasts for one unchanged fact, and those toasts survive a later successful resubscribe, still claiming the workflow can't sync after it recovered. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-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.
🟢 Low — if (!notify) return false sits before both recordDevEvent and reportError, so latching unsupported emits no signal at all — not even a dev-panel event. The comment only justifies suppressing the user-facing toast for a deployment-wide condition, but that same condition refuses every user's subscribe, so a fleet-wide agent-sync outage becomes invisible in telemetry; record the event and report before the notify check. Raised by 1 of 8 reviewers (kimi-k3-max adversarial).
| : '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 raw message is interpolated verbatim into a user-visible toast; the 200-char clamp bounds its length but validates nothing, so a misbehaving or compromised host can place arbitrary prose (e.g. a fake "sign in at …" instruction) inside legitimate-looking product copy — content spoofing rather than XSS, since PrimeVue escapes HTML — and embedded newlines or a clamp landing mid-surrogate-pair break the single-line detail's rendering. Consider keeping the raw developer text in telemetry and showing only the code-mapped localized detail. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case).
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.55 #19183 +/- ##
=============================================
Coverage ? 80.59%
=============================================
Files ? 2200
Lines ? 117518
Branches ? 33499
=============================================
Hits ? 94709
Misses ? 22463
Partials ? 346
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Backports #18704 (stops retrying permanently refused CRDT document subscriptions) to cloud/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: