Skip to content

emrg: auto-download update installer + GUI one-click install (rant 2026-08-12T12:10:12) - #700

Merged
argszero merged 1 commit into
masterfrom
feature/update-auto-download-install
Aug 12, 2026
Merged

emrg: auto-download update installer + GUI one-click install (rant 2026-08-12T12:10:12)#700
argszero merged 1 commit into
masterfrom
feature/update-auto-download-install

Conversation

@argszero

Copy link
Copy Markdown
Owner

Auto-download update packages + GUI one-click install (host decision 2026-08-12: automatically download the exe when a new version is found).

Check (frequency change)

  • [update] ttl_hours default 24h → 1h (host instruction); still user-configurable.
  • New [update] auto_download = true|false config (default true); check=false still disables everything including download.

Download (daemon, background)

  • update_check.download_release_asset(): after a check finds a newer version, the daemon downloads only the current platform's installer into ~/.emrg/updates/ (Windows EMRG-<ver>-windows-x64.exe, macOS -macos-<arch>.pkg, Linux -linux-<arch>.AppImage — asset names verified against the live v0.2.27 release).
  • Stream + Range header → interrupted downloads resume from the last byte (.part kept).
  • SHA256 verified against the GitHub release asset digest; mismatch → file deleted, retried next TTL; digest missing → skip verification + log (never blocks).
  • Runs in its own task — never blocks the check loop or chat; failures silent, retried at next TTL.
  • State persisted: downloaded_version / downloaded_path / downloaded_sha in ~/.emrg/.last_update_check.json.

GUI prompt + one-click install (user-initiated only)

  • Settings → About shows a "New version vX ready — click to install" button when a downloaded+verified installer is newer than the running version; startup system message + update_downloaded broadcast point to it.
  • Click → confirm dialog (SmartScreen hint on Windows) → main-process emrg:updateInstall launches the installer (spawn exe / open pkg / chmod+spawn AppImage) → EMRG quits, the installer takes over (installer itself stops remaining EMRG processes).
  • Never auto-installs — download is automatic, install always requires a user click.

Verification: pytest 705 → 729 (17 new: platform asset naming, digest extraction, download success/resume/Range/verify-fail/network-fail silent, config defaults, daemon gating), GUI 218 → 221 (3 new renderer smoke), import + CLI green, doc counts synced.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260812-122812 (reviewer: argszero)

Reviewed the full diff: update_check download machinery (platform asset mapping verified against live v0.2.27 asset names, Range resume, digest verification with delete-on-mismatch, silent failures), daemon gating (_maybe_auto_download: disabled/older/already-downloaded skips; background task never blocks), config defaults (ttl 1h, auto_download), GUI install IPC + ready-to-install UI, i18n parity, doc counts synced.

CI PASS (31563272507) — actionlint gate + doc-count guard + full pytest/GUI suites green. No issues found.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260812-1230 (reviewer: argszero)

Reviewed the full diff (update_check.py + daemon gating + config + GUI install IPC + tests):

  • platform_asset_name mapping verified against the live v0.2.27 release assets (EMRG-0.2.27-windows-x64.exe / -macos-arm64.pkg / -linux-x86_64.AppImage all present; arch detection correct).
  • Range resume logic is correct in both states: 206 → append, 200 → full rewrite.
  • SHA256 verification: digest present + mismatch → .part deleted, retried next TTL; digest missing → verification skipped, never blocks (graceful degradation).
  • daemon _maybe_auto_download gating: disabled config / not-newer / already-downloaded all short-circuit; download runs in its own task, never blocks the check loop or chat; failures silent.
  • config: ttl 24h→1h default, auto_download default true, check=false disables everything including download.
  • GUI install is strictly user-initiated (path existence check, platform-specific launch, quit after reply); no auto-install path exists.
  • Tests cover positive AND negative states (verify-fail deletes, network-fail silent keeps .part, unsupported platform skips, gating short-circuits).

CI PASS (31563272507) — actionlint + doc-count guard + pytest/GUI green. No issues found.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260812-123159 (reviewer: argszero)

3rd consecutive LGTM (122812 + 1230 parallel + this cycle). Code unchanged since my full review in cycle 122812; CI PASS (31563272507). Merge condition satisfied.

@argszero
argszero merged commit e7c83f2 into master Aug 12, 2026
1 check passed
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