@@ -16,6 +16,7 @@ import { GoalContext } from "../../../../../../src/application/context/goals/get
1616import { ComponentView } from "../../../../../../src/application/context/components/ComponentView.js" ;
1717import { DecisionView } from "../../../../../../src/application/context/decisions/DecisionView.js" ;
1818import { InvariantView } from "../../../../../../src/application/context/invariants/InvariantView.js" ;
19+ import { stripAnsi } from "../../../../../../src/presentation/cli/rendering/StyleConfig.js" ;
1920
2021describe ( "GoalStartOutputBuilder" , ( ) => {
2122 let builder : GoalStartOutputBuilder ;
@@ -106,6 +107,19 @@ describe("GoalStartOutputBuilder", () => {
106107 expect ( text ) . toContain ( "Completed step 2" ) ;
107108 } ) ;
108109
110+ it ( "should render review issues when restarting a rejected goal" , ( ) => {
111+ const view = makeView ( {
112+ status : "doing" ,
113+ reviewIssues : "Missing test coverage for rejected goal rework" ,
114+ } ) ;
115+ const output = builder . build ( view ) ;
116+ const text = stripAnsi ( output . toHumanReadable ( ) ) ;
117+
118+ expect ( text ) . toContain ( "Review Issues" ) ;
119+ expect ( text ) . toContain ( "Missing test coverage for rejected goal rework" ) ;
120+ expect ( text ) . toContain ( "MUST address these issues before submitting the goal again" ) ;
121+ } ) ;
122+
109123 it ( "should include submit instruction with goal ID" , ( ) => {
110124 const view = makeView ( { goalId : "goal_abc" } ) ;
111125 const output = builder . build ( view ) ;
0 commit comments