Commit 77a322e
committed
fix: harden uv daemon cache sync, target safety, and fs watcher stability
This patch stabilizes the daemonized uv execution path and fixes several
cache coherency and filesystem race issues discovered during real-world use.
Changes:
- Added uv executable healing / fallback resolution for bare PATH names and
bundled interpreter-local uv binaries.
- Added explicit --target safety bypass: target installs now always use
subprocess uv instead of the daemonized FFI path to avoid corrupting the
main environment.
- Exposed get_site_packages_cache() from uv_ffi and pre-populate the Rust
site-packages cache during worker warm-up so patch_cache works from the
first operation.
- Improved patch_cache logging to distinguish successful patches from normal
cache-not-yet-seeded cases.
- Increased filesystem watcher debounce windows to correctly absorb pip’s
uninstall/temp-write/rename behavior.
- Ignored pip temporary ~dist-info artifacts and excluded .omnipkg_versions
bubble paths from external site-packages watcher handling.
- Fixed move-event handling so only final rename destinations trigger package
state updates.
- Stopped forwarding patch_cache updates to normal CLI workers; only uv FFI
workers participate in cache coherency now.
- Added idle reaping for daemonized uv workers after long inactivity.
- Prevented unsafe auto-reinstall of uv_ffi into live interpreters while
workers may still have the extension loaded.
Net result:
- safer target installs
- fewer false external-change patches
- better daemon cache coherency
- reduced watcher race conditions
- more stable long-lived uv workers
Modified:
• src/omnipkg/_vendor/uv_ffi/__init__.py (+3/-0 lines)
• src/omnipkg/core.py (+27/-1 lines)
• src/omnipkg/isolation/fs_watcher.py (+27/-6 lines)
• src/omnipkg/isolation/worker_daemon.py (+44/-27 lines)
[gitship-generated]1 parent 834b027 commit 77a322e
4 files changed
Lines changed: 102 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15514 | 15514 | | |
15515 | 15515 | | |
15516 | 15516 | | |
| 15517 | + | |
| 15518 | + | |
| 15519 | + | |
| 15520 | + | |
| 15521 | + | |
| 15522 | + | |
| 15523 | + | |
| 15524 | + | |
| 15525 | + | |
15517 | 15526 | | |
15518 | 15527 | | |
15519 | 15528 | | |
| |||
15593 | 15602 | | |
15594 | 15603 | | |
15595 | 15604 | | |
15596 | | - | |
| 15605 | + | |
| 15606 | + | |
| 15607 | + | |
| 15608 | + | |
| 15609 | + | |
| 15610 | + | |
| 15611 | + | |
| 15612 | + | |
| 15613 | + | |
| 15614 | + | |
| 15615 | + | |
| 15616 | + | |
| 15617 | + | |
| 15618 | + | |
| 15619 | + | |
| 15620 | + | |
| 15621 | + | |
| 15622 | + | |
15597 | 15623 | | |
15598 | 15624 | | |
15599 | 15625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
263 | 269 | | |
264 | 270 | | |
265 | 271 | | |
| |||
323 | 329 | | |
324 | 330 | | |
325 | 331 | | |
326 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
327 | 337 | | |
328 | 338 | | |
329 | 339 | | |
330 | 340 | | |
331 | 341 | | |
332 | 342 | | |
333 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
334 | 351 | | |
335 | | - | |
336 | 352 | | |
337 | 353 | | |
338 | 354 | | |
| |||
376 | 392 | | |
377 | 393 | | |
378 | 394 | | |
379 | | - | |
380 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
381 | 398 | | |
382 | 399 | | |
383 | 400 | | |
| |||
455 | 472 | | |
456 | 473 | | |
457 | 474 | | |
458 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
459 | 478 | | |
460 | 479 | | |
461 | 480 | | |
462 | 481 | | |
463 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
464 | 485 | | |
465 | 486 | | |
466 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
908 | 921 | | |
909 | 922 | | |
910 | 923 | | |
| |||
1144 | 1157 | | |
1145 | 1158 | | |
1146 | 1159 | | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1150 | 1166 | | |
1151 | 1167 | | |
1152 | 1168 | | |
| |||
2950 | 2966 | | |
2951 | 2967 | | |
2952 | 2968 | | |
| 2969 | + | |
2953 | 2970 | | |
2954 | 2971 | | |
2955 | 2972 | | |
| |||
3150 | 3167 | | |
3151 | 3168 | | |
3152 | 3169 | | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
3153 | 3183 | | |
3154 | 3184 | | |
3155 | 3185 | | |
| |||
3640 | 3670 | | |
3641 | 3671 | | |
3642 | 3672 | | |
3643 | | - | |
3644 | | - | |
3645 | | - | |
3646 | | - | |
3647 | | - | |
3648 | | - | |
3649 | | - | |
3650 | | - | |
3651 | | - | |
3652 | | - | |
3653 | | - | |
3654 | | - | |
3655 | | - | |
3656 | | - | |
3657 | | - | |
3658 | | - | |
3659 | | - | |
3660 | | - | |
3661 | | - | |
3662 | | - | |
3663 | | - | |
3664 | | - | |
3665 | | - | |
3666 | | - | |
| 3673 | + | |
| 3674 | + | |
3667 | 3675 | | |
3668 | 3676 | | |
3669 | 3677 | | |
| |||
4150 | 4158 | | |
4151 | 4159 | | |
4152 | 4160 | | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
4153 | 4170 | | |
4154 | 4171 | | |
4155 | 4172 | | |
| |||
0 commit comments