Commit e3f5b1b
committed
fix(core,fs-watcher,daemon): isolate FFI ops, eliminate false FS signals, and restore deterministic daemon boundaries
- Core (FFI path):
- Hoisted `_is_target_call` detection to ensure `finally` block safety
- Prevented daemon START/END signaling for `--target` installs (bubble isolation)
- Fixed incorrect FS watcher signaling that caused spurious invalidations during temp installs
- Ensured op marker lifecycle is always cleaned up, even on failure paths
- Reduced noisy stderr prints → consistent debug logging via `_dbg`
- FS Watcher:
- Eliminated false-positive invalidations by ignoring non-package FS noise (locks, cache, pycache)
- Added strict validation: only `.dist-info` events are considered authoritative package changes
- Introduced silent fast-path when no relevant events occurred (removes log spam)
- Improved external change detection with explicit culprit attribution
- Added per-path logging context for multi-env clarity
- Removed redundant/duplicate INFO logs during op lifecycle
- Added watcher process identity logging (PID + python exe) for debugging multi-daemon setups
- Refined patch pipeline: only triggers invalidation on real package deltas
- Daemon:
- Removed premature FS watcher thread startup (eliminates race conditions during init)
- Ensured watcher lifecycle aligns with actual daemon execution context
- System-level impact:
- Fixed cross-contamination between bubble installs and main environment
- Eliminated incorrect cache invalidation during internal operations
- Restored deterministic FS event → package state mapping
- Dramatically improved signal-to-noise ratio in logs
- Enabled clean, traceable operation lifecycle (START → validated → END)
Result:
Clean, high-fidelity logs with zero false positives, accurate package attribution,
and fully isolated operation boundaries across FFI, daemon, and filesystem layers.
Modified:
• src/omnipkg/core.py (+31/-20 lines)
• src/omnipkg/isolation/fs_watcher.py (+44/-30 lines)
• src/omnipkg/isolation/worker_daemon.py (+0/-3 lines)
[gitship-generated]1 parent 9ed2ecf commit e3f5b1b
3 files changed
Lines changed: 73 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16128 | 16128 | | |
16129 | 16129 | | |
16130 | 16130 | | |
16131 | | - | |
16132 | | - | |
| 16131 | + | |
| 16132 | + | |
| 16133 | + | |
| 16134 | + | |
| 16135 | + | |
| 16136 | + | |
| 16137 | + | |
| 16138 | + | |
| 16139 | + | |
| 16140 | + | |
| 16141 | + | |
| 16142 | + | |
| 16143 | + | |
| 16144 | + | |
| 16145 | + | |
16133 | 16146 | | |
16134 | | - | |
16135 | | - | |
16136 | | - | |
16137 | | - | |
16138 | | - | |
16139 | | - | |
16140 | | - | |
16141 | | - | |
16142 | | - | |
16143 | | - | |
16144 | | - | |
16145 | | - | |
| 16147 | + | |
| 16148 | + | |
| 16149 | + | |
| 16150 | + | |
| 16151 | + | |
| 16152 | + | |
16146 | 16153 | | |
16147 | 16154 | | |
16148 | 16155 | | |
| |||
16195 | 16202 | | |
16196 | 16203 | | |
16197 | 16204 | | |
16198 | | - | |
16199 | | - | |
| 16205 | + | |
| 16206 | + | |
| 16207 | + | |
| 16208 | + | |
| 16209 | + | |
16200 | 16210 | | |
16201 | 16211 | | |
16202 | 16212 | | |
16203 | 16213 | | |
16204 | 16214 | | |
16205 | | - | |
| 16215 | + | |
| 16216 | + | |
16206 | 16217 | | |
16207 | 16218 | | |
16208 | 16219 | | |
16209 | 16220 | | |
16210 | | - | |
| 16221 | + | |
16211 | 16222 | | |
16212 | 16223 | | |
16213 | | - | |
| 16224 | + | |
16214 | 16225 | | |
16215 | 16226 | | |
16216 | 16227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 318 | + | |
| 319 | + | |
321 | 320 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | 321 | | |
326 | 322 | | |
327 | 323 | | |
328 | 324 | | |
329 | 325 | | |
330 | 326 | | |
331 | | - | |
332 | | - | |
333 | 327 | | |
334 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
338 | 337 | | |
| 338 | + | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | | - | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
| |||
353 | 352 | | |
354 | 353 | | |
355 | 354 | | |
356 | | - | |
357 | | - | |
| 355 | + | |
| 356 | + | |
358 | 357 | | |
359 | 358 | | |
360 | 359 | | |
| |||
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
494 | | - | |
495 | | - | |
496 | | - | |
| 493 | + | |
497 | 494 | | |
498 | 495 | | |
499 | 496 | | |
500 | 497 | | |
501 | 498 | | |
502 | 499 | | |
503 | 500 | | |
| 501 | + | |
504 | 502 | | |
505 | 503 | | |
506 | 504 | | |
| |||
513 | 511 | | |
514 | 512 | | |
515 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
516 | 523 | | |
517 | | - | |
518 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
519 | 529 | | |
520 | 530 | | |
521 | 531 | | |
| |||
534 | 544 | | |
535 | 545 | | |
536 | 546 | | |
537 | | - | |
538 | | - | |
| 547 | + | |
539 | 548 | | |
540 | 549 | | |
541 | 550 | | |
542 | 551 | | |
543 | 552 | | |
544 | | - | |
545 | | - | |
| 553 | + | |
| 554 | + | |
546 | 555 | | |
547 | 556 | | |
548 | 557 | | |
549 | 558 | | |
550 | 559 | | |
551 | 560 | | |
552 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
553 | 566 | | |
554 | 567 | | |
555 | 568 | | |
| |||
876 | 889 | | |
877 | 890 | | |
878 | 891 | | |
879 | | - | |
880 | | - | |
881 | 892 | | |
882 | 893 | | |
883 | 894 | | |
| |||
887 | 898 | | |
888 | 899 | | |
889 | 900 | | |
890 | | - | |
891 | 901 | | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
892 | 907 | | |
893 | 908 | | |
894 | 909 | | |
| |||
897 | 912 | | |
898 | 913 | | |
899 | 914 | | |
900 | | - | |
901 | | - | |
| 915 | + | |
902 | 916 | | |
903 | 917 | | |
904 | 918 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3105 | 3105 | | |
3106 | 3106 | | |
3107 | 3107 | | |
3108 | | - | |
3109 | | - | |
3110 | | - | |
3111 | 3108 | | |
3112 | 3109 | | |
3113 | 3110 | | |
| |||
0 commit comments