Fix native Windows checks against the GitHub release feed - #380
Merged
Merged
Conversation
Use the project repository and accept additive API metadata, preserve owned results on allocation failure, constrain browser release destinations, and keep background checks non-modal. Run updater regressions in the native shell gate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8a98a529-f045-4c43-979c-00bae7640885 Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Allow only a single safe version-tag segment so encoded dot paths, backslashes, and added URL components cannot navigate away from the release route. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8a98a529-f045-4c43-979c-00bae7640885 Signed-off-by: Colin Neilens <coneilen@microsoft.com>
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.
Summary
Make native Windows update checks work against GraphCode's real GitHub release feed, without enabling installer download or relaunch. The old default repository returned 404 and the strict decoder rejected normal GitHub metadata; existing updater tests were not included in the shell gate.
Changes
scgopi/GraphCode/releases?per_page=30. Accept additive GitHub metadata while retaining type checks on consumed fields.Test plan
RED:
zig test graphcode-windows\src\WindowsUpdates.zig -target x86_64-windows-msvc -lc -lwinhttpwith pinned provider headers -> wrong default repository,UnknownFieldon realistic release metadata, andMemoryLeakDetectedduring allocation-failure injection; 3 new tests failed.GREEN: The same native updater command with pinned headers -> all 18 tests pass, including real-response shape, malformed consumed fields, channel/version selection, trusted browser destinations, non-modal background checks, cancellation, and exhaustive allocation failures.
REGRESSION:
pwsh -NoProfile -File Tools\windows\Tests\WindowsShell.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152andValidationRunner.Tests.ps1-> pass; the actual ReleaseSafe shell build with pinned Winghostty also passes.zig fmt --check graphcode-windows\src\WindowsUpdates.zigandgit diff --checkpass.A local executable using the real default CheckClient/WinHTTP path, not a rewritten HTTP client, fetched:
v0.1.72,https://github.com/scgopi/GraphCode/releases/tag/v0.1.720.1.73-beta3,https://github.com/scgopi/GraphCode/releases/tag/0.1.73-beta3Follow-up RED/GREEN: the release-page test reproduced acceptance of a browser-normalized
../../..tag path. The tightened single-segment guard rejects literal/encoded dot paths and backslashes, while valid version/build-metadata tags and both real release URLs still pass. Full-pinned dispatch 35290537439 at superseded head44576a8was cancelled rather than reused as final-tip evidence.Boundaries
This is project-release discovery/browser handoff, not proof of an installable Windows update. The latest stable/beta assets inspected on 2026-09-17 are macOS DMGs. No installer is downloaded or executed, no signing policy is weakened, and the parity ledger's installer/relaunch rows remain Blocked.
Selection remains bounded to the fetched 30-release page; this PR does not add pagination or change the version/channel rules. Shared Swift/macOS behavior and provider pins are unchanged.
Exact-tip hosted evidence
Final head:
1ac61a391e0df06700826e1789336d7d932ad588. All eight required checks passed:Full-pinned hardening 35292975978 passed attempt 1 at that exact head after the required checks were green. The complete release gate executes the 18 updater tests. All three real-product repetitions and all seven typed resource-trend tuples pass. The gate reports 20 requests/20 responses; the real repetitions report 20/20, 19/19, and 20/20, each fully correlated with no unanswered commands. No timing, payload, resource, or correlation threshold was relaxed.
Main ancestry was freshly verified before dispatch and after completion. At superseded
44576a8, macOS attempt 1 failed during tool installation on a Zig signature-mirror HTTP 429; its isolated retry passed without code/pin changes. Final-head macOS passed attempt 1. Cancelled full-pinned run 35290537439 is not used as validation proof.Hosted physical-tray/WSL exclusions remain explicit; native UIA and protocol-independent remote checks still run. The earlier baseline's unexplained launcher failure is not claimed fixed by this unrelated updater work.
Checklist