feat(FN-4367): finalize structured workflow verdict contract

Fusion-Task-Id: FN-4367
Fusion-Task-Lineage: adbfac60-5cfe-4ae9-9706-1094dfe7d676
This commit is contained in:
Fusion
2026-05-14 11:08:10 -07:00
committed by gsxdsm
parent ff987b9832
commit 932ff90d53
2 changed files with 1 additions and 18 deletions

View File

@@ -1,5 +0,0 @@
---
"@runfusion/fusion": patch
---
Add structured JSON verdict output contract for prompt-mode workflow steps. Engine now parses `json-workflow-verdict` blocks for deterministic PASS/FAIL verdicts with graceful prose fallback. Updated WS-006 prompt to use structured fast-bail. Dashboard renders verdict badges and notes.

View File

@@ -6546,19 +6546,7 @@ ${failureFeedback}
});
}
/**
* Parse structured JSON verdict from workflow step output.
*
* Looks for a trailing JSON block of the form:
* ```json-workflow-verdict
* {"verdict":"PASS"|"FAIL","notes":"..."}
* ```
*
* If found, extracts verdict/notes and returns the prose before the block
* as `output`.
*
* Falls back to prose-only parsing (REQUEST REVISION) for backward compat.
*/
/** Parse structured JSON verdict from workflow step output. */
private parseWorkflowStepOutput(rawOutput: string): {
output: string;
verdict?: "APPROVE" | "APPROVE_WITH_NOTES" | "REVISE";