Skip to content

feat: Port safe backend/runtime changes from MUIO v5.5 #397

Open
parthdagia05 wants to merge 1 commit intoEAPD-DRB:mainfrom
parthdagia05:feature/390-safe-backend-runtime-v55
Open

feat: Port safe backend/runtime changes from MUIO v5.5 #397
parthdagia05 wants to merge 1 commit intoEAPD-DRB:mainfrom
parthdagia05:feature/390-safe-backend-runtime-v55

Conversation

@parthdagia05
Copy link
Copy Markdown

PR: Safe Backend/Runtime Changes from MUIO v5.5

Linked Issues


Confirmed no existing PR addresses #390

Overlap Assessment

  • Classification: No overlap

Why this is not duplicate/superseded


Why this PR should proceed

Safety compliance

All changes follow MUIOGO rules:

  • Absolute paths
  • Safe subprocess usage
  • No shell=True

Summary

What changed

  • Added /readModelFile (GET)

    • Returns OSeMOSYS model .txt file as plain text
  • Added /readLogFile (GET)

    • Returns app log as plain text
    • Reads from Config.LOG_FILEAPI/app.log
  • Added constants in Config.py:

    API_PATH = BASE_DIR / "API"
    LOG_FILE = API_PATH / "app.log"

@github-actions github-actions bot added the needs-intake-fix PR intake structure needs maintainer follow-up label Apr 1, 2026
Add readModelFile and readLogFile diagnostic routes from upstream v5.5.

Use MUIOGO-safe log path (API/app.log) instead of upstream WebAPP/app.log to avoid exposing logs from the web root.

Add structured logging (logging.getLogger) to /run, /batchRun, /cleanUp routes.

Add LOG_FILE and API_PATH constants to Config.py.

Explicitly rejected from upstream: WebAPP/app.log path, shell=True, FileClassCompressed.py, stale unittest import.
@parthdagia05 parthdagia05 force-pushed the feature/390-safe-backend-runtime-v55 branch from e5a1bd3 to 081d3a9 Compare April 1, 2026 16:01
@parthdagia05
Copy link
Copy Markdown
Author

@SeaCelo could you review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-intake-fix PR intake structure needs maintainer follow-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Pull the safe backend/runtime changes from MUIO v5.5

1 participant