mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: preflight actions + badge false-positive pattern
- Auto-execute prerequisite actions (enable Nodes 2.0, load default workflow) BEFORE the agentic loop starts. Agent model ignores prompt hints but preflight guarantees nodes are on canvas. - Add "fails to reproduce" to NOT REPRODUCIBLE badge patterns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -166,7 +166,7 @@ fi
|
||||
REPRO_RESULT="" REPRO_COLOR="#9f9f9f"
|
||||
if echo "$SUMMARY_TEXT" | grep -iq 'INCONCLUSIVE'; then
|
||||
REPRO_RESULT="INCONCLUSIVE" REPRO_COLOR="#9f9f9f"
|
||||
elif echo "$SUMMARY_TEXT" | grep -iq 'not reproduced\|could not reproduce\|unable to reproduce\|was NOT\|NOT visible\|not observed'; then
|
||||
elif echo "$SUMMARY_TEXT" | grep -iq 'not reproduced\|could not reproduce\|unable to reproduce\|fails\? to reproduce\|was NOT\|NOT visible\|not observed'; then
|
||||
REPRO_RESULT="NOT REPRODUCIBLE" REPRO_COLOR="#9f9f9f"
|
||||
elif echo "$SUMMARY_TEXT" | grep -iq 'partially reproduced'; then
|
||||
REPRO_RESULT="PARTIAL" REPRO_COLOR="#dfb317"
|
||||
|
||||
@@ -1038,6 +1038,32 @@ function buildIssueSpecificHints(context: string): string {
|
||||
return `\n## Issue-Specific Action Plan\nBased on keyword analysis of this issue, you MUST follow these steps:\n${hints.map((h, i) => `${i + 1}. ${h}`).join('\n')}\nDo NOT skip these steps. They are the minimum required to attempt reproduction.\n`
|
||||
}
|
||||
|
||||
function buildPreflightActions(context: string): TestAction[] {
|
||||
const ctx = context.toLowerCase()
|
||||
const actions: TestAction[] = []
|
||||
|
||||
// Enable Nodes 2.0 if issue mentions it
|
||||
if (/nodes.*2\.0|vue.*node|new.*node|node.*beta/.test(ctx)) {
|
||||
actions.push({
|
||||
action: 'setSetting',
|
||||
id: 'Comfy.NodeBeta.Enabled',
|
||||
value: true
|
||||
})
|
||||
}
|
||||
|
||||
// Load default workflow for most reproduction scenarios
|
||||
if (
|
||||
/clone|z.?index|overlap|copy.*paste|paste|resize|drag|scroll.*leak|scroll.*text|spacebar|space.*pan|node.*shape|numeric/.test(
|
||||
ctx
|
||||
)
|
||||
) {
|
||||
actions.push({ action: 'loadDefaultWorkflow' })
|
||||
actions.push({ action: 'screenshot', name: 'preflight-default-workflow' })
|
||||
}
|
||||
|
||||
return actions
|
||||
}
|
||||
|
||||
function buildAgenticSystemPrompt(
|
||||
issueContext: string,
|
||||
subIssueFocus?: string,
|
||||
@@ -1182,6 +1208,18 @@ async function runAgenticLoop(
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-execute prerequisite actions based on issue keywords BEFORE the
|
||||
// agentic loop starts. This guarantees nodes are on canvas, settings are
|
||||
// correct, etc. — the agent model often ignores prompt-only hints.
|
||||
const preflight = buildPreflightActions(issueContext)
|
||||
if (preflight.length > 0) {
|
||||
console.warn(`Running ${preflight.length} preflight actions...`)
|
||||
for (const action of preflight) {
|
||||
await executeAction(page, action, outputDir)
|
||||
}
|
||||
await sleep(500)
|
||||
}
|
||||
|
||||
const systemInstruction = buildAgenticSystemPrompt(
|
||||
issueContext,
|
||||
subIssue?.focus,
|
||||
|
||||
Reference in New Issue
Block a user