Repository navigation
Commit 52628eb
committed
fix(#1918 r112): narrow four over-broad behaviours flagged in review
Review round r112, one change per thread, in the order the findings came in:
- ApplyPatchTool: forget a withdrawn observation only while the registry still
holds the exact entry this tool published, so a failed apply_patch can no longer
drop another writer's newer observation of the same file.
- DiffViewProvider: the three teardown sites that already know the absolute path
close only their own diff view; closeAllDiffViews stays as reset()'s fallback for
the case where no path is known.
- safeWriteText: create the target's parent directory before the private staging
directory, so a self-staged write no longer publishes its target into a directory
that only the staging mkdir made, with the staging mode.
- safeWriteText.spec: the two win32 cases that hand in their own platform no longer
skip themselves on a non-Windows host.
- safeWriteJson.test: undo the proper-lockfile capture with vi.doUnmock, the runtime
form, so a later import in the same file resolves the real module again.
Specs: applyPatchTool.execute 26/26, DiffViewProvider 158/158, safeWriteText 68/68
(also 68/68 with process.platform reported as linux), safeWriteJson 27 passed / 4
skipped, safeWriteJson.stagingDirectory 7/7. Reverting each fix reddens exactly the
test that names it: 4, 8, 1, 1 and one skipped case off Windows.1 parent 002b34f commit 52628eb
7 files changed
Lines changed: 496 additions & 96 deletions
File tree
- src
- core/tools
- __tests__
- integrations/editor
- __tests__
- services/file-safety
- __tests__
- utils/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
61 | 81 | | |
62 | 82 | | |
63 | 83 | | |
| |||
114 | 134 | | |
115 | 135 | | |
116 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
117 | 143 | | |
118 | 144 | | |
119 | 145 | | |
| |||
148 | 174 | | |
149 | 175 | | |
150 | 176 | | |
151 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
152 | 186 | | |
153 | 187 | | |
154 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
155 | 196 | | |
156 | 197 | | |
157 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
158 | 207 | | |
159 | 208 | | |
160 | 209 | | |
161 | 210 | | |
162 | 211 | | |
163 | 212 | | |
164 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
165 | 220 | | |
166 | 221 | | |
167 | 222 | | |
| |||
172 | 227 | | |
173 | 228 | | |
174 | 229 | | |
| 230 | + | |
175 | 231 | | |
176 | 232 | | |
177 | 233 | | |
| |||
277 | 333 | | |
278 | 334 | | |
279 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
280 | 339 | | |
281 | 340 | | |
282 | 341 | | |
| |||
291 | 350 | | |
292 | 351 | | |
293 | 352 | | |
| 353 | + | |
294 | 354 | | |
295 | 355 | | |
296 | 356 | | |
| |||
337 | 397 | | |
338 | 398 | | |
339 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
340 | 404 | | |
341 | 405 | | |
342 | 406 | | |
| |||
349 | 413 | | |
350 | 414 | | |
351 | 415 | | |
| 416 | + | |
352 | 417 | | |
353 | 418 | | |
354 | 419 | | |
| |||
519 | 584 | | |
520 | 585 | | |
521 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
522 | 593 | | |
523 | 594 | | |
524 | 595 | | |
| |||
549 | 620 | | |
550 | 621 | | |
551 | 622 | | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
552 | 627 | | |
553 | 628 | | |
554 | 629 | | |
| |||
582 | 657 | | |
583 | 658 | | |
584 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
585 | 663 | | |
586 | 664 | | |
587 | 665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
191 | 212 | | |
192 | 213 | | |
193 | 214 | | |
| |||
377 | 398 | | |
378 | 399 | | |
379 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
380 | 480 | | |
381 | 481 | | |
382 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
766 | 771 | | |
767 | 772 | | |
768 | 773 | | |
| |||
959 | 964 | | |
960 | 965 | | |
961 | 966 | | |
962 | | - | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
963 | 970 | | |
964 | 971 | | |
965 | 972 | | |
| |||
986 | 993 | | |
987 | 994 | | |
988 | 995 | | |
989 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
990 | 999 | | |
991 | 1000 | | |
992 | 1001 | | |
| |||
1032 | 1041 | | |
1033 | 1042 | | |
1034 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1035 | 1051 | | |
1036 | 1052 | | |
1037 | 1053 | | |
| |||
0 commit comments