Windows in-app updater: download, staged install, relaunch - #446
Merged
Merged
Conversation
…launch Implements the Windows in-app updater matching macOS behaviour: - WindowsUpdateInstall.zig: HTTPS download with progress, SHA-256 checksum verification, ZIP extraction, and invocation of the existing GraphCode-Setup.ps1 -Command Upgrade, reusing the existing packaging verify/rollback logic rather than a second implementation. - UpdateInstallDialog.zig: native in-window progress indicator plus Relaunch Now/Later prompt with session-continuity messaging and a failure state. - UpdateOfferDialog.zig: Install is now conditionally enabled based on whether the real feed check resolved a Windows asset URL, instead of a permanently-disabled not-implemented label. - App.zig: wires the offer dialog's new .install action through runInstall()/relaunchAfterUpdate(). - UpdateInstallLiveRunner.zig + WindowsUpdateInstall.Live.Tests.ps1: real, non-simulated live evidence against real HTTPS infrastructure (GitHub API feed check, real asset download + checksum verify, and a deliberately-wrong-digest rejection proving the checksum gate is not vacuous). - investigation/ui-parity-matrix.md: Available update alert / Install progress / Relaunch prompt updated with honest Partial evidence notes. No Windows release asset is currently published (re-confirmed live), so the full extract+upgrade+relaunch happy path against a real Windows ZIP remains unproven and is left honestly Partial rather than asserted Validated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
coneilen
force-pushed
the
coneilen-microsoft-windows-in-app-updater
branch
from
September 24, 2026 16:58
1ab3666 to
e3b8bad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows in-app updater: download, staged install, relaunch
Implements the in-app Windows updater (download → checksum verify → extract →
staged install → Relaunch Now/Later), matching macOS behaviour, and unblocks
the
Install progress/Relaunch promptrows ininvestigation/ui-parity-matrix.mdplus advances
Available update alert.What changed
graphcode-windows/src/WindowsUpdateInstall.zig(new): download over HTTPSwith progress reporting, SHA-256 checksum verification (reusing the release
pipeline's checksum-sidecar format), ZIP extraction, and invocation of the
existing
GraphCode-Setup.ps1 -Command Upgrade— reusing the packaginglayer's shared verification/rollback logic rather than a second copy.
graphcode-windows/src/UpdateInstallDialog.zig(new): native in-windowprogress indicator (download %, verifying, extracting, installing) and the
post-install Relaunch Now / Later prompt with session-continuity copy, plus
a failure state.
graphcode-windows/src/UpdateOfferDialog.zig: Install is now conditionallyenabled (
buttonsFor(installable)) based on whether the real feed checkresolved a Windows asset URL, instead of being permanently disabled with a
"not implemented" label.
graphcode-windows/src/App.zig: wires the offer dialog's new.installaction to
runInstall()/relaunchAfterUpdate(); structural change to ashared file (new fields + two new methods on
App), flagged separately tothe fleet coordinator.
graphcode-windows/src/UpdateInstallLiveRunner.zig(new): azig run-onlydriver (no
testblocks, so outside the anti-drift guard) that exercisesthe real
install()path against real HTTPS infrastructure for liveevidence — not shipped in the app binary.
Tools/windows/Tests/WindowsUpdateInstall.Live.Tests.ps1(new): standalonelive-evidence script (network-using, intentionally not part of the
hermetic
WindowsShell.Tests.ps1suite) that runs the real feed check anda real download+checksum-verify against a real GitHub release asset.
investigation/ui-parity-matrix.md:Available update alertandInstall progressupdated toPartialwith honest evidence notes;Relaunch promptmoves fromBlockedtoPartial.Honest evidence limits (please read before merging)
No Windows release asset currently exists on
scgopi/GraphCode(re-confirmedlive at test time, not assumed) — only macOS DMGs are published. That means
the full download→extract→upgrade→relaunch happy path against a real
Windows ZIP cannot be exercised live in this PR, and neither can whether a
genuinely running
graphcode-windows.execan rename its own installdirectory during self-update, or whether zmx sessions survive an
Upgrade-triggered daemon restart specifically. These are left honestly
Partialin the ledger rather than assertedValidated. What is live-proven:a real HTTPS download of a real multi-megabyte GitHub asset streams genuine
progress and its SHA-256 is verified against the asset's real published
digest before extraction is attempted, and a deliberately wrong digest is
rejected with
ChecksumMismatchstrictly before extraction — proving thechecksum gate is not vacuous.
RED: zig run src\UpdateInstallLiveRunner.zig -- download-checksum https://github.com/scgopi/GraphCode/releases/download/v0.1.74/graphcode-macos-arm64.dmg 0000000000000000000000000000000000000000000000000000000000000000 -> result=error name=ChecksumMismatch, reached only as far as phase=verifying (never extracting), proving the check inspects real bytes
GREEN: pwsh Tools\windows\Tests\WindowsUpdateInstall.Live.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152 -> Windows update install live gate: PASS (real feed-check asset_url=none, real 21271139-byte download with 104 progress reports verified against the asset's real published sha256, wrong-digest rejection)
REGRESSION: pwsh Tools\windows\Tests\WindowsShell.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152 -> All 273 tests passed, Windows shell scaffold contract: PASS (42 source files executed)