@@ -7,6 +7,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88---
99
10+ ## [ 3.3.1] — 2026-05-08
11+
12+ prevent interpreter corruption on second TF load in same process
13+
14+ ** 2026-05-08 · patch release · 2 commits since v3.3.0**
15+
16+ ---
17+
18+ ## Bug fixes
19+
20+ After loading TF 2.13.0 and exiting the context, a second
21+ ` with omnipkgLoader("tensorflow==2.12.0") ` block in the same process would
22+ fall through to in-process activation. The existing ` _tf_loaded_pids ` guard
23+ only fires when ` omnipkg.isolation.patchers ` was previously imported — in bare
24+ subprocesses (test runner, user scripts) that module is never loaded, so the
25+ guard was silently skipped and the loader attempted to activate the wrong
26+ version against an already-mapped ` .so ` .
27+
28+ Two fixes, both in ` loader.py ` :
29+
30+ - ** Second-load detection** — ` WorkerDelegationMixin.__enter__ ` now checks
31+ ` _tf_loaded_pids ` directly in addition to ` sys.modules ` , so a process that
32+ already initialized TF's C++ backend is caught even after ` __exit__ ` purged
33+ the Python layer.
34+ - ** Zombie purge guard** — the post-exit zombie scan (checking ` __file__ ` for
35+ ` .omnipkg_versions ` paths) was wiping ` tensorflow.* ` modules even when
36+ ` pywrap_tensorflow ` was still linker-mapped. Those modules are now skipped
37+ when the lock is active, matching the same guard already used by
38+ ` _aggressive_module_cleanup ` .
39+
40+ Result: the loader detects the locked ` .so ` , sets ` _abi_conflict_detected=True ` ,
41+ returns the already-loaded version, and refuses to corrupt state. No crash, no
42+ re-init failure. The daemon path remains the correct approach for genuine
43+ cross-version switching.
44+
45+ > ** Cross-platform note:** all ABI detection uses ` sys.modules ` +
46+ > ` _tf_loaded_pids ` — no platform-specific code. Works on Linux, macOS, and
47+ > Windows without changes.
48+
49+ ---
50+
51+ ## Refactoring
52+
53+ ` src/tests/ ` → ` src/omnipkg/tests/ ` so the test package no longer leaks a bare
54+ ` tests ` package into end-user ` site-packages ` . ` pyproject.toml ` include pattern
55+ and ` cli.py ` 's ` TESTS_DIR ` path updated to match.
56+
57+ ---
58+
59+ ## Cleanup
60+
61+ - Removed ungated ` ☢️ FATAL TENSORFLOW RELOAD DETECTED! ` print from
62+ ` patchers.py ` — the exception is still raised, just without the noise.
63+ - Removed stray ` [CTX-DEBUG] ` print from ` package_meta_builder.py ` .
64+ - ` .gitignore ` : exclude ` __pycache__/ ` , ` *.pyc ` , ` *.pyo ` .
65+ - Test subprocess runner: added ` stream=True ` mode so test 4 gets live stdout
66+ instead of buffered output.
67+
68+ ---
69+
70+ ** Other Changes:**
71+ - fix(loader): detect linker-locked TF .so via /proc/self/maps; guard zombie purge
72+ - fix(package_meta_builder): remove ungated CTX-DEBUG print
73+
74+ _ 21 files changed, 50 insertions(+), 25 deletions(-)_
75+
1076## [ 3.3.0] — 2026-05-07
1177
1278State Healing, Strict ABI Protection, and High-Performance C Dispatch Draft
0 commit comments