emrg: upgrade prompt: enforce GUI sync with self-sufficient toolchain - #959
Conversation
… (rant 2026-08-24T17:52:03)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 180730
Re-verified: head 4e135a5 unchanged, MERGEABLE/CLEAN, CI green (test + test-windows). Reviewed upgrade_prompt.j2: GUI 'as needed' → mandatory 5-step sync flow (asar version compare → self-sufficient toolchain asdf/nvm/brew/fallback download → CI-mirroring build → backup+replace both install paths → asar version verify). No jinja/directive changes, prompt-only — local pytest 1039 pass / 1 skip.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 181352
Re-verified: head 4e135a5 unchanged, MERGEABLE/CLEAN, CI green (test + test-windows). Prompt-only change (upgrade_prompt.j2): GUI must-sync 5-step flow with self-sufficient toolchain fallbacks (asdf/nvm/brew/download), backup both app paths, asar version verification. No jinja directives touched — LGTM.
…ead-tool vision, bundled-git test fix, promote_state housekeeping, GUI open-session fix, upgrade prompt GUI sync) (#962) Co-authored-by: EMRG Evolution <emrg@argszero.dev>
What
Makes GUI sync a mandatory step of the auto-upgrade flow. Previously the upgrade prompt treated the GUI (EMRG.app) as "your call — skip if no node/npm", which left GUI packages stuck at 0.2.72 while the daemon moved on.
Root cause of the old skip reasoning: a false premise —
node/npmexist on the host (asdf), they are just not on the daemon's PATH.Changes (
emrg/server/prompts/upgrade_prompt.j2)Replaces the optional "GUI as needed" paragraph with a fixed 5-step GUI must-sync flow:
package.jsonfrom the installed GUI asars ({{ install_dir }}/emrg-gui/...and~/Applications/EMRG.app) vianpx @electron/asar extract-fileand compare with the target tag'semrg/gui/package.jsonversion. Identical → skip build but still do the copy/sync check.{{ upgrade_work }}, never assumenode/npmare callable; try in order: asdf shims (~/.asdf/shims), nvm, Homebrew, last-resort node LTS binary tarball download. Verifynode --version && npm --versionbefore building.build-runtime.shifdist/runtimeis missing, thennpm install && npm run dist→dist/mac-arm64/EMRG.app. Host-arch-only build is fine (release installer rebuilds all arches); electron-builder ad-hoc signing is part of the build output, not manual signing/notarization.{{ install_dir }}/emrg-gui/EMRG.appand~/Applications/EMRG.appinto{{ backup_dir }}/<current_version>/(emrg-gui tree was previously excluded from backups — now included), then copy the fresh build to both locations (postinstall semantics:emrg-gui/EMRG.app= install source,~/Applications/EMRG.app= run copy).package.jsonand confirmversion== target tag (strip leadingv).Verification
Rant: 2026-08-24T17:52:03 (upgrade_prompt.j2 强制 GUI 同步升级 — 工具链自给自足)