Skip to content

feat(converter): add native release update checks - #37

Merged
VincentAdamNemessisX merged 2 commits into
fix/mh3g-002-talisman-recordsfrom
feat/mh3g-converter-update-check
Aug 10, 2026
Merged

feat(converter): add native release update checks#37
VincentAdamNemessisX merged 2 commits into
fix/mh3g-002-talisman-recordsfrom
feat/mh3g-converter-update-check

Conversation

@VincentAdamNemessisX

@VincentAdamNemessisX VincentAdamNemessisX commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add About & Updates to the native macOS SwiftUI and Windows WinUI workbenches
  • check the official MHToolkit/mh-save-sync latest stable GitHub Release at most once per local calendar day on first launch
  • avoid the shared anonymous GitHub Release API quota by resolving /releases/latest and reading the official Atom release feed first
  • retain the Release API as a fallback, with source-specific diagnostics if both official paths fail
  • keep automatic failures silent and non-blocking; manual checks surface a retryable diagnostic
  • show release version, title, publication date, notes, and an official release-page action when a newer version exists
  • validate HTTPS/GitHub/repository/tag metadata before accepting or opening a release link
  • inject the Rust converter version into both Windows publish forms so ZIP, portable EXE, and installer compare the real release version

Root cause and fix evidence

The original implementation used the anonymous GitHub Release API as its only source and collapsed every non-200 response into a generic unexpected-response error. On the affected Mac/proxy, GitHub returned HTTP 403 with X-RateLimit-Remaining: 0 (60/60 anonymous requests consumed), while the official release redirect and Atom feed both remained reachable.

The new normal path performs a one-byte ranged request to the official /releases/latest URL, validates its final stable-tag URL, then matches that exact URL in the official Atom feed. This path does not consume the anonymous API quota.

Privacy and failure behavior

The request contains only normal GitHub headers and the packaged converter version. No save bytes, selected paths, hashes, or user account data are sent. Requests use short timeouts. The daily attempt is recorded before networking so blocked GitHub access is not retried on every launch. All conversion controls remain usable during and after an automatic failure.

Verification

  • cargo test -p mh3g-save-convert — 215 passed
  • native and x86_64-pc-windows-msvc Clippy with -D warnings — passed
  • swift test — 71 passed, including exact official Atom-entry parsing and spoof/missing-entry rejection
  • macOS production app build + synthetic smoke — passed
  • installed /Applications/MH3G Save Converter.app, opened Settings, clicked Check for Updates, and observed You are up to date (GitHub: v0.0.16) on the same network where the API returned 403
  • Windows source contract verifier — passed
  • Windows hosted package build at exact head 7984dafe6bd9b78ccadb097e1897bdde241c166f — passed (run 31372523550)
  • macOS hosted package build at the same exact head — passed (run 31372526985)
  • documentation contract, hosted-workflow contract, and git diff --check — passed

Runtime boundary

Cemu was not launched and no real MLC was touched. The update-check UI was verified against the locally installed production App; save conversion runtime behavior is outside this PR's scope.

Dependency

This is intentionally stacked on #36 because it includes that PR's shared-system safety text and converter baseline. Retarget to main after #36 merges.

@VincentAdamNemessisX
VincentAdamNemessisX requested a review from a team as a code owner August 10, 2026 08:18
@VincentAdamNemessisX
VincentAdamNemessisX force-pushed the feat/mh3g-converter-update-check branch from 9efdc20 to 24f2ef2 Compare August 10, 2026 08:27
@VincentAdamNemessisX
VincentAdamNemessisX merged commit e84da09 into fix/mh3g-002-talisman-records Aug 10, 2026
7 checks passed
@VincentAdamNemessisX
VincentAdamNemessisX deleted the feat/mh3g-converter-update-check branch August 10, 2026 09:22
VincentAdamNemessisX added a commit that referenced this pull request Aug 10, 2026
* test(windows): satisfy current cfg clippy checks

* fix(converter): align guide and appearance records

* fix(mh3g): merge shared system gallery flags safely

* test(mh3g): keep missing-target case clippy clean

* fix(windows): validate installed MSVC toolchain files

* feat(converter): add native release update checks (#37)

* feat(converter): add native release update checks

* fix(converter): avoid GitHub API rate-limit failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant