Skip to content

[Windows] Add dependency-resolution preflight for downstream builds - #14565

Draft
alex-harvey-z3q wants to merge 1 commit into
actions:mainfrom
alex-harvey-z3q:codex/14564-windows-resolver-preflight
Draft

[Windows] Add dependency-resolution preflight for downstream builds#14565
alex-harvey-z3q wants to merge 1 commit into
actions:mainfrom
alex-harvey-z3q:codex/14564-windows-resolver-preflight

Conversation

@alex-harvey-z3q

@alex-harvey-z3q alex-harvey-z3q commented Aug 15, 2026

Copy link
Copy Markdown

Description

Adds an opt-in, non-installing Windows dependency-resolution preflight for downstream consumers to run from the exact revision they are about to build, before starting Packer.

-Image is required so that the template and toolset being checked always match the intended build. Supported targets are:

  • Windows2022
  • Windows2025
  • Windows2025VS2026
  • Windows11Arm64
  • Windows11VS2026Arm64

The preflight:

  • parses all Windows PowerShell scripts and validates the selected template’s local references;
  • resolves configured toolcache versions from the selected toolset’s manifests;
  • resolves every configured Chocolatey package, including each explicit package version, from the Chocolatey community feed;
  • resolves every configured PowerShell Gallery module, including each explicit module version, from the Gallery’s NuGet V2 endpoint;
  • checks selected GitHub release asset patterns, using GITHUB_TOKEN when supplied to avoid API-rate-limit false failures;
  • validates Visual Studio Marketplace metadata and the existing Microsoft VSIX download overrides; and
  • retries transient endpoint failures with bounded retries and clear final errors.

It does not create Azure resources, provision a VM, download installer payloads, or mutate the build machine. -SkipNetwork runs the static checks only.

The accompanying unit suite uses mocked endpoint responses and runs in the existing fast PowerShell-test workflow when the preflight changes.

Related issue:

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

Validation

  • Invoke-Pester -Output Detailed images/windows/scripts/preflight/tests (15 passed)
  • Static preflight for all five supported -Image values
  • Live Chocolatey probes for Bicep and toolset-pinned cmake.install 3.31.6
  • Live PowerShell Gallery probe for toolset-pinned Pester 5.9.0
  • PowerShell parser and whitespace checks

@alex-harvey-z3q
alex-harvey-z3q force-pushed the codex/14564-windows-resolver-preflight branch from 6fe8dc8 to 9650eff Compare August 15, 2026 13:26
@alex-harvey-z3q
alex-harvey-z3q force-pushed the codex/14564-windows-resolver-preflight branch from 9650eff to b3387f2 Compare August 16, 2026 00:39
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