Repository navigation
Commit 92bb178
easonLiangWorldedtech
fix(integrations): never adopt an autosaved match for an unauthorized edit
Series alignment with fws/u6-apply-patch-wiring. The autosave adoption branch accepted ANY
GuardRejectedError when the buffer was clean. An "edit" save with no pre-open observation
is rejected by the unobserved-edit guard - an authorization verdict, not a moved-token
verdict - so if VS Code autosave had already written the buffer, adoption reported success
AND recorded a partial observation for a file the model never read, which would then
authorize a later targeted publish. Adoption is now limited to saves that were authorized
before open().
Also removes the dead committed flag in safeWriteText (declared and set, never read) and
corrects the comment describing a backup-restore guard that does not exist: the backup is
a copy and is never restored.1 parent e7138ab commit 92bb178
3 files changed
Lines changed: 40 additions & 8 deletions
File tree
- src
- integrations/editor
- __tests__
- services/file-safety
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
564 | 569 | | |
565 | 570 | | |
566 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2328 | 2328 | | |
2329 | 2329 | | |
2330 | 2330 | | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
2331 | 2364 | | |
2332 | 2365 | | |
2333 | 2366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | 303 | | |
308 | 304 | | |
309 | 305 | | |
| |||
482 | 478 | | |
483 | 479 | | |
484 | 480 | | |
485 | | - | |
486 | 481 | | |
487 | 482 | | |
488 | 483 | | |
| |||
548 | 543 | | |
549 | 544 | | |
550 | 545 | | |
551 | | - | |
552 | | - | |
553 | | - | |
| 546 | + | |
| 547 | + | |
554 | 548 | | |
555 | 549 | | |
556 | 550 | | |
| |||
0 commit comments