Skip to content

Commit c4d580b

Browse files
committed
Make rename fixture plan scope explicit
1 parent 08327a1 commit c4d580b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎docs/experiments/review-summary-edge-cases.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Validated on 2026-09-23 from `5a2685c`, before selecting real issues for the pla
44

55
## Renamed-file reassignment
66

7-
A real-Git fixture declares `retry.ts` → `renamed.ts`, then creates an unplanned rename with a content edit. The review exposes removed and added text segments with `-` and `+` operations. The fixture resolves the removed side through `oldPath` and the added side through `path`, verifies both declared names, then manually assigns both segments. Each remains in scope.
7+
A real-Git fixture reduces the demo plan to P1, declares `retry.ts` → `renamed.ts`, then creates an unplanned rename with a content edit. The review exposes removed and added text segments with `-` and `+` operations. The fixture resolves the removed side through `oldPath` and the added side through `path`, verifies both declared names, then manually assigns both segments. Each remains in scope.
88

99
Result: no defect reproduced. `ReviewService` evaluates a manual assignment against both `path` and `renamed_from`. The integration fixture remains as coverage.
1010

‎test/review.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ it('expires a browser token after another view assigns a segment and recomputes
2020
it('keeps both sides of a declared rename in scope after manual reassignment',()=>{
2121
const {service,config}=fixture(),identity=config.identity,plan=service.store.getPlan(identity);
2222
plan.items=[{...plan.items[0]!,files:[{path:'renamed.ts',kind:'rename',renamed_from:'retry.ts',change:'Rename the implementation.'}],depends_on:[]}];
23+
expect(plan.items.map(item=>item.id)).toEqual(['P1']);
2324
service.store.importRevision(JSON.stringify(plan),'json',{identity,issue:plan.issue,baseEntries:['retry.ts','README.md','run.sh'].map(path=>({path,kind:'file' as const})),pathKey:path=>path,allowedCommands:[]},plan.revision);
2425
renameSync(join(config.repository,'retry.ts'),join(config.repository,'renamed.ts'));
2526
writeFileSync(join(config.repository,'renamed.ts'),'export function delay(attempt: number) {\n return Math.min(5000, 200 * 2 ** attempt);\n}\n');

0 commit comments

Comments
 (0)