Skip to content

fix: update hardcoded osy-version from 5.0 to 5.5 in AddCase.js#454

Open
lil-aditya wants to merge 1 commit intoEAPD-DRB:mainfrom
lil-aditya:fix/osy-version-hardcoded-5.0
Open

fix: update hardcoded osy-version from 5.0 to 5.5 in AddCase.js#454
lil-aditya wants to merge 1 commit intoEAPD-DRB:mainfrom
lil-aditya:fix/osy-version-hardcoded-5.0

Conversation

@lil-aditya
Copy link
Copy Markdown
Contributor

Closes #453

Summary

  • What changed: "osy-version": "5.0""osy-version": "5.5" on line 232 of AddCase.js
  • Why: The version was not updated after the v5.5 sync. Every new model gets stamped "5.0" while the app displays "ver.5.5"

Impact

  1. Version mismatch: UI header says v5.5, saved genData.json says 5.0
  2. Export/import: UploadRoute.py reads osy-version to decide migration paths — wrong stamp = wrong handling
  3. Future compat: Any v5.5-specific logic keyed on osy-version won't fire for these models

Proof

image

And UI header shows "MUIO ver.5.5"

Existing related work reviewed

  • Reviewed all 24 open PRs — none touch the osy-version assignment in AddCase.js

Scope check

  • No unrelated refactors
  • Implemented from a feature branch
  • Change is deliverable without upstream 'OSeMOSYS/MuIO' dependency
  • Base repo/branch is 'EAPD-DRB/MUIOGO:main' (not upstream)

Copilot AI review requested due to automatic review settings April 18, 2026 18:23
@github-actions github-actions Bot added the needs-intake-fix PR intake structure needs maintainer follow-up label Apr 18, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the osy-version value stamped into newly created model genData.json payloads so the stored metadata matches the app’s reported version.

Changes:

  • Update hardcoded "osy-version" in AddCase.js from "5.0" to "5.5" for new model saves.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


let POSTDATA = {
"osy-version": "5.0",
"osy-version": "5.5",
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the stamped osy-version to 5.5 will cause exported models to be rejected on re-import: API/Routes/Upload/UploadRoute.py only recognizes versions up to '5.0' (handle_full_zip checks name == '5.0' and otherwise returns an error). Either keep osy-version aligned to the data-format version that the backend accepts, or update the upload validation/migration logic to accept '5.5' (and treat it equivalently to '5.0' if the format is unchanged).

Suggested change
"osy-version": "5.5",
"osy-version": "5.0",

Copilot uses AI. Check for mistakes.
@lil-aditya
Copy link
Copy Markdown
Contributor Author

@SeaCelo I’d appreciate it if you could review this.

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.

[Bug] New models stamped with osy-version "5.0" instead of "5.5"

2 participants