comfyui-mcp 0.51.6 → 0.51.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2960,10 +2960,15 @@ function currentWorkflowFence(ctx) {
|
|
|
2960
2960
|
*/
|
|
2961
2961
|
function corroborateActiveForFence(parsed) {
|
|
2962
2962
|
const active = parsed.active;
|
|
2963
|
+
// Read once, up front, so every failure branch below can report it. Undefined
|
|
2964
|
+
// whenever the record is missing, unreadable, or carries no usable uuid.
|
|
2965
|
+
const seenUuid = active && typeof active === "object"
|
|
2966
|
+
? responseWorkflowUuid(active)
|
|
2967
|
+
: undefined;
|
|
2963
2968
|
if (!active || typeof active !== "object") {
|
|
2964
2969
|
// SETTLES: mid-restore the frontend genuinely has no active workflow yet —
|
|
2965
2970
|
// that is #1184's finding in this reply's terms, and it is the window here.
|
|
2966
|
-
return { ok: false, why: "the reply carried no active-workflow record", settles: true };
|
|
2971
|
+
return { ok: false, seenUuid, why: "the reply carried no active-workflow record", settles: true };
|
|
2967
2972
|
}
|
|
2968
2973
|
// #514: the panel says so itself when its active record is not confirmed. An
|
|
2969
2974
|
// explicit `false` is the panel telling us the value is untrustworthy — never
|
|
@@ -2974,6 +2979,7 @@ function corroborateActiveForFence(parsed) {
|
|
|
2974
2979
|
// and a moment later it says otherwise (#1292).
|
|
2975
2980
|
return {
|
|
2976
2981
|
ok: false,
|
|
2982
|
+
seenUuid,
|
|
2977
2983
|
why: "the panel reported its active workflow as UNCONFIRMED",
|
|
2978
2984
|
settles: true,
|
|
2979
2985
|
};
|
|
@@ -2987,6 +2993,7 @@ function corroborateActiveForFence(parsed) {
|
|
|
2987
2993
|
if (!Array.isArray(list)) {
|
|
2988
2994
|
return {
|
|
2989
2995
|
ok: false,
|
|
2996
|
+
seenUuid,
|
|
2990
2997
|
why: "the reply carried no open-workflow list to corroborate the active record against",
|
|
2991
2998
|
settles: false,
|
|
2992
2999
|
};
|
|
@@ -2994,6 +3001,7 @@ function corroborateActiveForFence(parsed) {
|
|
|
2994
3001
|
if (list.length === 0) {
|
|
2995
3002
|
return {
|
|
2996
3003
|
ok: false,
|
|
3004
|
+
seenUuid,
|
|
2997
3005
|
why: "the reply's open-workflow list was empty, so nothing corroborates the active record",
|
|
2998
3006
|
settles: true,
|
|
2999
3007
|
};
|
|
@@ -3005,6 +3013,7 @@ function corroborateActiveForFence(parsed) {
|
|
|
3005
3013
|
// SETTLES: a snapshot taken before the panel re-flagged its active tab.
|
|
3006
3014
|
return {
|
|
3007
3015
|
ok: false,
|
|
3016
|
+
seenUuid,
|
|
3008
3017
|
why: "no entry in the open-workflow list is marked active",
|
|
3009
3018
|
settles: true,
|
|
3010
3019
|
};
|
|
@@ -3014,6 +3023,7 @@ function corroborateActiveForFence(parsed) {
|
|
|
3014
3023
|
// uuid through, so it is refused rather than arbitrated.
|
|
3015
3024
|
return {
|
|
3016
3025
|
ok: false,
|
|
3026
|
+
seenUuid,
|
|
3017
3027
|
why: `${flaggedActive.length} entries in the open-workflow list are marked active (a mixed reply)`,
|
|
3018
3028
|
// SETTLES: "mixed" IS the half-reconciled state, by definition.
|
|
3019
3029
|
settles: true,
|
|
@@ -3026,6 +3036,7 @@ function corroborateActiveForFence(parsed) {
|
|
|
3026
3036
|
if (verdict === false) {
|
|
3027
3037
|
return {
|
|
3028
3038
|
ok: false,
|
|
3039
|
+
seenUuid,
|
|
3029
3040
|
why: "the active record and the entry marked active in the open-workflow list name DIFFERENT workflows (a stale or mixed reply)",
|
|
3030
3041
|
// SETTLES: a stale half of the snapshot catches up.
|
|
3031
3042
|
settles: true,
|
|
@@ -3034,6 +3045,7 @@ function corroborateActiveForFence(parsed) {
|
|
|
3034
3045
|
if (verdict !== true) {
|
|
3035
3046
|
return {
|
|
3036
3047
|
ok: false,
|
|
3048
|
+
seenUuid,
|
|
3037
3049
|
why: "the active record and the open-workflow list share no comparable identity field, so nothing corroborates it",
|
|
3038
3050
|
// DOES NOT SETTLE: a field the records do not carry will not appear by
|
|
3039
3051
|
// waiting — that is the reply's SHAPE, not its timing.
|
|
@@ -3208,6 +3220,7 @@ async function rebindWorkflowFence(ctx) {
|
|
|
3208
3220
|
kind: "uncorroborated",
|
|
3209
3221
|
why: corroborated.why,
|
|
3210
3222
|
rechecks: { attempts, waitedMs, settles: corroborated.settles },
|
|
3223
|
+
...(corroborated.seenUuid ? { seenUuid: corroborated.seenUuid } : {}),
|
|
3211
3224
|
};
|
|
3212
3225
|
}
|
|
3213
3226
|
const active = corroborated.active;
|
|
@@ -3579,6 +3592,39 @@ panelGapNote = "") {
|
|
|
3579
3592
|
`that is the answer.${remedy}`,
|
|
3580
3593
|
};
|
|
3581
3594
|
}
|
|
3595
|
+
// #1401 — the SAME uuid is not the same situation.
|
|
3596
|
+
//
|
|
3597
|
+
// The gate is right to refuse an uncorroborated identity, and nothing here
|
|
3598
|
+
// adopts one. What was wrong was the consequence asserted afterwards: when
|
|
3599
|
+
// the identity the panel reported EQUALS the fence this session already
|
|
3600
|
+
// holds, graph tools are not fenced to a different instance and generally
|
|
3601
|
+
// keep working — the reporter's next call was a panel_graph_outline that
|
|
3602
|
+
// succeeded, after being told it would keep failing and to hard-refresh.
|
|
3603
|
+
//
|
|
3604
|
+
// So this splits on evidence rather than reporting the worst case for both:
|
|
3605
|
+
// a MATCHING uuid rules OUT the fenced-to-another-instance case without ruling
|
|
3606
|
+
// IN liveness (codex: a stale/background record can carry the right uuid), so it
|
|
3607
|
+
// reports what is ruled out and sends the caller to the read that settles it; a
|
|
3608
|
+
// DIFFERENT or absent uuid keeps the original certain-failure wording.
|
|
3609
|
+
const fenceStillMatches = r.status === "no_identity" && r.seenUuid !== undefined && r.seenUuid === r.before.uuid;
|
|
3610
|
+
if (fenceStillMatches) {
|
|
3611
|
+
return {
|
|
3612
|
+
binding: "not_recovered",
|
|
3613
|
+
note: `${lead}. This session's fence was NOT re-derived, and whether that reply describes ` +
|
|
3614
|
+
`the LIVE canvas is exactly what could not be confirmed — a stale or background ` +
|
|
3615
|
+
`record can carry the right uuid and still not be the canvas in front of the user, ` +
|
|
3616
|
+
`so this is NOT a claim that graph tools work. What IS known is narrower and still ` +
|
|
3617
|
+
`useful: the identity it reported matches the fence this session already holds ` +
|
|
3618
|
+
`(${r.before.uuid}), so this is not the case where the session is fenced to a ` +
|
|
3619
|
+
`DIFFERENT workflow instance — which is the one that keeps graph tools failing.` +
|
|
3620
|
+
`
|
|
3621
|
+
|
|
3622
|
+
WHAT TO DO: settle it with a graph read — call panel_graph_outline. That ` +
|
|
3623
|
+
`answers the question this could not: if it succeeds, the binding was fine and this ` +
|
|
3624
|
+
`was a reconciliation race. If it fails with a workflow-instance mismatch, the ` +
|
|
3625
|
+
`reply was stale after all — then ${RELOAD_TAB_REMEDY}`,
|
|
3626
|
+
};
|
|
3627
|
+
}
|
|
3582
3628
|
return r.before.uuid
|
|
3583
3629
|
? {
|
|
3584
3630
|
binding: "not_recovered",
|