{"id":5327,"agent":"capacity","title":"Move detection reads the draft's own lines first and lays out no file for an edit with no move (abso 714, piece 3 of Christopher's base fix)\n\n- expressMoves, before a publish, used to lay out every file the draft touched twice: before the draft and after it. It then read each line's deleters, so its cost grew with the files' length, not the change. For a 1470-shaped publish that was worker/src/index.ts's 12k lines, twice.\n- Now it reads the draft's own deleted lines (deletedLines) and written lines (eachInsertedLine) first. A move needs a written line with real content whose text the draft also deleted. With none, as in any edit that only changes lines, it returns before laying out anything.\n- When there may be a move, the files are laid out as before. But a line counts as deleted by the draft from that set of the draft's deleted lines, not from a lookup of each line's deleters. Moves come out the same.\n- Test: worker/project/test/express-moves-early.test.ts, with a host whose views throw if laid out. A line edit and a brackets-only match lay out nothing; a real line written again goes on to the files.\n\nChecks: tsc clean; Biome clean on both files; core tests (worker/project and src): 762 passed, none failed; the 17 move tests pass.\nLab, on abso's Oct 14 tables with abso 1476's disk route, 1470-shaped publish, 38 changed lines: 9,408 statements and 1,438 writes in one transaction of 1.5 s, inside the budget test's 10,600 and 3,280. It was 24,209 statements after piece 2 (6.1 s) and 36,038 before it. Record is unchanged (piece 4).","kind":"publish","note":null,"issue":null,"draft":null,"time":1792200889849,"timeIso":"2026-10-17T01:34:49.849Z","open":false,"versions":[{"version":311,"draft":null,"message":"Move detection reads the draft's own lines first and lays out no file for an edit with no move (abso 714, piece 3 of Christopher's base fix)\n\n- expressMoves, before a publish, used to lay out every file the draft touched twice: before the draft and after it. It then read each line's deleters, so its cost grew with the files' length, not the change. For a 1470-shaped publish that was worker/src/index.ts's 12k lines, twice.\n- Now it reads the draft's own deleted lines (deletedLines) and written lines (eachInsertedLine) first. A move needs a written line with real content whose text the draft also deleted. With none, as in any edit that only changes lines, it returns before laying out anything.\n- When there may be a move, the files are laid out as before. But a line counts as deleted by the draft from that set of the draft's deleted lines, not from a lookup of each line's deleters. Moves come out the same.\n- Test: worker/project/test/express-moves-early.test.ts, with a host whose views throw if laid out. A line edit and a brackets-only match lay out nothing; a real line written again goes on to the files.\n\nChecks: tsc clean; Biome clean on both files; core tests (worker/project and src): 762 passed, none failed; the 17 move tests pass.\nLab, on abso's Oct 14 tables with abso 1476's disk route, 1470-shaped publish, 38 changed lines: 9,408 statements and 1,438 writes in one transaction of 1.5 s, inside the budget test's 10,600 and 3,280. It was 24,209 statements after piece 2 (6.1 s) and 36,038 before it. Record is unchanged (piece 4).","time":1792200889849,"timeIso":"2026-10-17T01:34:49.849Z","files":["worker/project/express-moves.ts","worker/project/test/express-moves-early.test.ts"]}],"files":["worker/project/express-moves.ts","worker/project/test/express-moves-early.test.ts"],"settled":[],"refusals":[],"notes":[],"reviewers":[]}