@@ -161,6 +161,27 @@ describe("workflow blocks", () => {
161161 expect ( nodes . find ( ( node ) => node . id === "report" ) ?. condition ) . toBe ( 'decision.output.verdict == "ACCEPT"' )
162162 } )
163163
164+ // Issue #304: a synthesize following a review is the route's final gate —
165+ // it must map the review output, otherwise an ACCEPTed review stays listed
166+ // as an unresolved review outcome forever.
167+ it ( "binds the review output into a following synthesize as the final gate" , ( ) => {
168+ const nodes = DagBlocks . compileWorkflowBlocks ( {
169+ objective : "Deliver a reviewed change with a bound final report" ,
170+ blocks : [
171+ { id : "implementation" , kind : "coding" } ,
172+ { id : "verification" , kind : "verify" , depends_on : [ "implementation" ] } ,
173+ { id : "decision" , kind : "review" , depends_on : [ "verification" ] } ,
174+ { id : "report" , kind : "synthesize" , depends_on : [ "decision" ] } ,
175+ { id : "side-note" , kind : "synthesize" , depends_on : [ "verification" ] } ,
176+ ] ,
177+ } )
178+
179+ expect ( nodes . find ( ( node ) => node . id === "report" ) ?. input_mapping ) . toEqual ( {
180+ decision_review : "decision.output" ,
181+ } )
182+ expect ( nodes . find ( ( node ) => node . id === "side-note" ) ?. input_mapping ) . toBeUndefined ( )
183+ } )
184+
164185 it ( "keeps every downstream branch behind a reporting scope gate" , ( ) => {
165186 const nodes = DagBlocks . compileWorkflowBlocks ( {
166187 objective : "Deliver only while the bounded route remains valid" ,
0 commit comments