You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upstream dev omits top-level ObjectivePkg re-export, so MSPackageManager.getpkg('ObjectivePkg') fails (kbdl-target e1155a4) #81
On upstream ModelSEEDpy dev (the kbdl-target pin, cshenry/ModelSEEDpy e1155a41fa53b921185b20c6cfbd083e5e3739a4 = upstream c0b94e3 + the alias commit), model.pkgmgr.getpkg("ObjectivePkg") raises PackageError("Package ObjectivePkg does not exist!"). The fork (0.4.2, production venv) does not.
Evidence (measured)
Source: KBUtilLib task-924f89ea (kbu-fva-panel), work record agent-io/work-records/kbu-fva-panel.md on branch maestro/developer/kbdl-recon-kbu-fva-panel @ b132407, section "The real finding".
MSPackageManager.__init__ builds available_packages from inspect.getmembers(sys.modules["modelseedpy"]), which is the TOP-LEVEL namespace.
modelseedpy.fbapkg.ObjectivePkg
top-level modelseedpy.ObjectivePkg
fork 0.4.2 (production)
present
present
upstream dev 0.4.3 e1155a4
present
absent
Consequence: every caller of KBUtilLib MSFBAUtils.set_objective_from_string (and so run_fva) fails on upstream. In the FVA parity run it silently produced zero FVA rows per medium.
What was done
kbu-fva-panel worked around it narrowly (_ensure_objective_package in KBUtilLib fva_panel.py, which registers the class on that model's own per-model registry; no global patch; ms_fba_utils.py unchanged). Nothing else is fixed.
Why it matters now
PRD kbdl-recon-thin-layer-v1 task 8 (cutover) moves the KBDL venv to kbdl-target. Any other MSFBAUtils objective/FVA caller in the deployed stack will hit this. The Q10 venv-regression gate should catch it, but it is better fixed before cutover than discovered there.
Options (a design decision, not made here)
Upstream-shaped fix in ModelSEEDpy: re-export ObjectivePkg (and audit the other *Pkg classes the fork exposed at top level) from modelseedpy/__init__.py, as a commit on kbdl-target. That gives a new pin SHA, re-published to cshenry/ModelSEEDpy, and KBUtilLib's [model] extra re-pinned. Coordinate with kbdl-fitness-off-gaa-v1, which also plans to fast-forward kbdl-target.
KBUtilLib-side fix in ms_fba_utils.py (register on demand, as the workaround does), leaving ModelSEEDpy untouched.
Decision: option 1, the upstream fix. ModelSEED#173 (ModelSEED#173) adds ObjectivePkg to the top-level fbapkg import in modelseedpy/init.py, commit 46ca956 on upstream dev c0b94e3. It also adds tests/fbapkg/test_package_manager_exports.py, which asserts that every *Pkg class exported by modelseedpy.fbapkg is also exported at top level. The new tests fail without the fix, and tests/fbapkg passes 26/26 with it.
Leaving this open until kbdl-target (currently e1155a4) carries 46ca956. The kbdl-fitness-off-gaa-v1 fast-forward of kbdl-target has been asked to include it. After that, KBUtilLib's _ensure_objective_package workaround in fva_panel.py can be removed.
Activity
cshenry commentedon Nov 16, 2026
Decision: option 1, the upstream fix. ModelSEED#173 (ModelSEED#173) adds ObjectivePkg to the top-level fbapkg import in modelseedpy/init.py, commit 46ca956 on upstream dev c0b94e3. It also adds tests/fbapkg/test_package_manager_exports.py, which asserts that every *Pkg class exported by modelseedpy.fbapkg is also exported at top level. The new tests fail without the fix, and tests/fbapkg passes 26/26 with it.
Leaving this open until kbdl-target (currently e1155a4) carries 46ca956. The kbdl-fitness-off-gaa-v1 fast-forward of kbdl-target has been asked to include it. After that, KBUtilLib's _ensure_objective_package workaround in fva_panel.py can be removed.
cshenry commentedon Nov 19, 2026
Resolved.
ObjectivePkgexport, plus a regression test) merged into upstreamdevon 2026-11-18 as 67e8284.kbdl-targetcarries the same fix as 02e091d, which is in its tip 08d239d. That tip is the modelseedpy pinKBDL's new reconstruction path uses.
_ensure_objective_packageworkaround infva_panel.py.Closing.