@@ -149,21 +149,36 @@ describe('splitForkClearedRefs', () => {
149149
150150describe ( 'forkBlockerResolution' , ( ) => {
151151 it ( 'phrases each blocker reason with its actionable resolution' , ( ) => {
152- expect ( forkBlockerResolution ( referenceRef ( 'table' , 'tbl-1' ) ) ) . toBe (
152+ expect ( forkBlockerResolution ( referenceRef ( 'table' , 'tbl-1' ) , 'Acme Prod' ) ) . toBe (
153153 'map it to a target or select it for copy'
154154 )
155- expect ( forkBlockerResolution ( referenceRef ( 'mcp-server' , 'srv-1' ) ) ) . toBe (
155+ expect ( forkBlockerResolution ( referenceRef ( 'mcp-server' , 'srv-1' ) , 'Acme Prod' ) ) . toBe (
156156 'map it to a target or select it for copy'
157157 )
158- expect ( forkBlockerResolution ( referenceRef ( 'knowledge-base' , 'kb-gone' , 'KB' , true ) ) ) . toBe (
159- 'deleted in the source — map it to an existing knowledge base in the target'
160- )
161- expect ( forkBlockerResolution ( workflowRef ( 'wf-other' , 'Workflow' ) ) ) . toBe (
158+ expect (
159+ forkBlockerResolution ( referenceRef ( ' knowledge- base' , 'kb-gone' , 'KB' , true ) , 'Acme Prod' )
160+ ) . toBe ( 'deleted in the source — map it to an existing knowledge base in Acme Prod' )
161+ expect ( forkBlockerResolution ( workflowRef ( 'wf-other' , 'Workflow' ) , 'Acme Prod' ) ) . toBe (
162162 'deploy "Source" in the source or remove the reference'
163163 )
164164 } )
165165
166+ /**
167+ * The source-deleted line phrases the same resolution as the mapping row's hint, so it must
168+ * name the workspace the sync writes - "the target" is what this copy set out to remove.
169+ */
170+ it ( 'names the target workspace in the source-deleted resolution' , ( ) => {
171+ const resolution = forkBlockerResolution (
172+ referenceRef ( 'knowledge-base' , 'kb-gone' , 'KB' , true ) ,
173+ 'this workspace'
174+ )
175+ expect ( resolution ) . toBe (
176+ 'deleted in the source — map it to an existing knowledge base in this workspace'
177+ )
178+ expect ( resolution ) . not . toContain ( 'in the target' )
179+ } )
180+
166181 it ( 'returns null for non-blocking dependent entries' , ( ) => {
167- expect ( forkBlockerResolution ( dependentRef ( 'credential' , 'cred-1' ) ) ) . toBeNull ( )
182+ expect ( forkBlockerResolution ( dependentRef ( 'credential' , 'cred-1' ) , 'Acme Prod' ) ) . toBeNull ( )
168183 } )
169184} )
0 commit comments