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:
@@ -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.
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user