@@ -25,9 +25,12 @@ it('keeps both sides of a declared rename in scope after manual reassignment',()
2525 writeFileSync ( join ( config . repository , 'renamed.ts' ) , 'export function delay(attempt: number) {\n return Math.min(5000, 200 * 2 ** attempt);\n}\n' ) ;
2626 execFileSync ( 'git' , [ '-c' , 'core.hooksPath=/dev/null' , 'add' , '-A' ] , { cwd :config . repository } ) ;
2727 execFileSync ( 'git' , [ '-c' , 'core.hooksPath=/dev/null' , 'commit' , '-m' , 'Rename retry implementation' ] , { cwd :config . repository , stdio :'pipe' } ) ;
28- let view = service . load ( ) ; const candidates = view . segments . filter ( segment => segment . row === 'Unplanned' && segment . kind === 'text' && [ '-' , '+' ] . includes ( segment . operation ) && [ 'retry.ts' , 'renamed.ts' ] . includes ( segment . operation === '-' ?segment . oldPath ?? segment . path :segment . path ) ) ;
28+ let view = service . load ( ) ; const segmentPath = ( segment :typeof view . segments [ number ] ) :string => {
29+ const path = segment . operation === '-' ?( segment . oldPath ?? segment . path ) :segment . path ; return path ?? '' ;
30+ } ;
31+ const candidates = view . segments . filter ( segment => segment . row === 'Unplanned' && segment . kind === 'text' && ( segment . operation === '-' || segment . operation === '+' ) && [ 'retry.ts' , 'renamed.ts' ] . includes ( segmentPath ( segment ) ) ) ;
2932 expect ( new Set ( candidates . map ( segment => segment . operation ) ) ) . toEqual ( new Set ( [ '-' , '+' ] ) ) ;
30- expect ( new Set ( candidates . map ( segment => segment . operation === '-' ? segment . oldPath ?? segment . path : segment . path ) ) ) . toEqual ( new Set ( [ 'retry.ts' , 'renamed.ts' ] ) ) ;
33+ expect ( new Set ( candidates . map ( segmentPath ) ) ) . toEqual ( new Set ( [ 'retry.ts' , 'renamed.ts' ] ) ) ;
3134 for ( const candidate of candidates ) { view = service . act ( { action :'assign' , key :candidate . key , item :'P1' , token :view . token } ) ; expect ( view . segments . find ( segment => segment . key === candidate . key ) ?. scope ) . toBe ( 'in-scope' ) ; }
3235} ) ;
3336it ( 'persists bounded per-item notes without creating a plan revision' , ( ) => {
0 commit comments