Problem statement
There's currently no way to confirm the Flask backend is running correctly or to check whether solvers are available without actually starting a model run.
I ran into this while installing MUIO v5.5 on Windows 11 — the Flask backend failed to start due to Windows Defender blocking the PyInstaller subprocess, but there was no diagnostic endpoint I could hit to verify the issue. I ended up having to trace the failure manually. On macOS or Linux (which MUIOGO is targeting for cross-platform support), users will hit different solver availability issues and need a quick way to check what's working.
This becomes especially relevant for the cross-platform packaging work where we need a reliable way to verify that the backend came up correctly and that solvers resolved on the target OS.
Proposed solution
Add two lightweight GET endpoints under /api/health:
-
GET /api/health — basic liveness check: returns OS name, architecture, Python version, and confirms DataStorage is writable. This is the endpoint that the Electron startup guard (or any external health poller) can hit to know the backend is ready.
-
GET /api/health/solvers — reports GLPK and CBC availability. Uses the same three-tier resolution chain as Osemosys._resolve_solver_folder (env var → PATH → bundled). Returns which solver was found where, so users can debug solver issues before running a model.
Both endpoints go in a new API/Routes/System/HealthRoute.py blueprint, keeping the existing route structure clean. Includes a pytest test suite.
Acceptance criteria
Dependencies and constraints
None. This is additive — no existing endpoints or classes are modified beyond registering the new blueprint in app.py.
Related work checked
Searched open issues and PRs:
Proposed track
{"Track" => "Cross-Platform"}
Problem statement
There's currently no way to confirm the Flask backend is running correctly or to check whether solvers are available without actually starting a model run.
I ran into this while installing MUIO v5.5 on Windows 11 — the Flask backend failed to start due to Windows Defender blocking the PyInstaller subprocess, but there was no diagnostic endpoint I could hit to verify the issue. I ended up having to trace the failure manually. On macOS or Linux (which MUIOGO is targeting for cross-platform support), users will hit different solver availability issues and need a quick way to check what's working.
This becomes especially relevant for the cross-platform packaging work where we need a reliable way to verify that the backend came up correctly and that solvers resolved on the target OS.
Proposed solution
Add two lightweight GET endpoints under /api/health:
GET /api/health — basic liveness check: returns OS name, architecture, Python version, and confirms DataStorage is writable. This is the endpoint that the Electron startup guard (or any external health poller) can hit to know the backend is ready.
GET /api/health/solvers — reports GLPK and CBC availability. Uses the same three-tier resolution chain as Osemosys._resolve_solver_folder (env var → PATH → bundled). Returns which solver was found where, so users can debug solver issues before running a model.
Both endpoints go in a new API/Routes/System/HealthRoute.py blueprint, keeping the existing route structure clean. Includes a pytest test suite.
Acceptance criteria
Dependencies and constraints
None. This is additive — no existing endpoints or classes are modified beyond registering the new blueprint in app.py.
Related work checked
Searched open issues and PRs:
Proposed track
{"Track" => "Cross-Platform"}