Skip to content

Releases

v50 patch 5

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 24 Oct 20:26

v50 patch 5 improves recovery-partition repair, preserves existing recovery images when servicing is unnecessary, and strengthens recovery from interrupted operations.

  • Dedicated recovery partitions take priority. Inadequate layouts are reassessed regardless of image ownership or unchanged deployment inputs. OS-fallback remains a constrained last resort when dedicated recovery cannot safely be established.
  • Layout-only repairs preserve image bytes. Existing images can be relocated without driver stripping, injection or recompression. Preserved foreign images remain distinct from manager-owned images and report PRESERVED-DEDICATED after successful verification.
  • Interrupted deployments retain recovery material. A protected, hash-verified candidate and pending-operation record support recovery after partition changes or process termination. Material is retired only after destination and saved-state verification.
  • Deferrals respond to current conditions. Capacity refusals are reassessed; execution failures use bounded retry delays rather than permanent suppression.
  • Stronger deployment checks. Unknown WinRE status, unresolved registration paths and incomplete partition inventories fail closed. Location handling preserves the exact registered folder.
  • Safer cleanup and maintenance installation. RestoreWork and backup deletion validate expected contents. Mount cleanup requires ownership checks, and SYSTEM-task installation verifies destination trust and script bytes.
  • Hyper-V and checksum fixes. INF parsing recognizes VMBUS storage IDs. OEM checksum handling accepts surrounding whitespace while continuing to reject malformed digests and mismatching downloads.
  • Clearer diagnostics. Test-WinRE.ps1 advances to v40 with stronger source-binding checks. Run summaries distinguish recorded changes, image preservation and WinRE enablement.

Validation includes 514 isolated checks plus eight renderer checks under each PowerShell runtime, physical evidence from seven machines across two source snapshots, and native Hyper-V deployment, post-deletion failure/retry, forced-interruption recovery, actual WinRE boot, foreign-image relocation and maintenance-installer checks. See the [validation record](https://github.com/ArthurJDurand/WinRE-Manager/blob/v50.5/docs/testing.md#recorded-hyper-v-validation) for source bindings and coverage limits.

ScriptVersion remains 50, with patch level 5. The DSI recipe is unchanged, so this release does not force a fleet-wide rebuild. Existing partition placement and the 2 GiB protection ceiling remain unchanged; v51 placement changes are deferred. The manager does not alter the OS volume’s BitLocker state.

Active recovery-partition replacement remains non-atomic: a failure can temporarily leave WinRE unavailable while recovery material is retained. Complete pending operations before downgrading; reverting the script does not undo partition changes.

v50 patch 4

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 20 Oct 00:26

v50 patch 4

ScriptVersion 50 · ScriptPatchLevel "4"

Ten fixes across the full-update failure paths, the trust-check helper's three copies, and the resume-task lifecycle. ScriptVersion remains 50; no DesiredStateId change; no fleet-wide rebuild. A machine that ran v50 patch 3 continues on the fast path.

Fixed

  • Step 5 deployment fails closed on an indeterminate WinRE status. The full-update Step 5 deployment region had no else branch when reagentc /info returned a status the parser could not classify. An indeterminate status now exits FATAL with the resume task preserved — the fifth instance of the fail-closed defect class named in .NOTES since v49 patch 2.

  • Twelve additional failure exits preserve the resume task. Every full-update exit where the operation has changed recovery state but cannot positively verify an acceptable final recovery route now sets $Script:ResumeTaskShouldPersist = $true. The persist-site total is now eighteen. The invariant: when the operation has changed recovery state and cannot positively verify an acceptable final route, the resume task must not be unregistered.

  • Int32 overflow in Get-PartitionPlan size arithmetic. The vulnerable [Math]::Max(0, …) form threw on a >2 GiB delta (Surface Pro 3, 2026-10-16, ~4.9 GB extend), and every subsequent invocation crashed identically, defeating the self-healing resume task. Replaced with explicit -gt comparisons on [int64] operands.

  • Internal-bus scoping on Remove-StrayRecoveryPartitions. The non-OS-disk recovery-partition sweep now applies the same internal-bus allowlist as the workspace selector. Type-coded recovery partitions on USB, SD/MMC, iSCSI, Fibre Channel, and unknown-bus disks are preserved individually. Field-verified on ASUS 2026-10-19: the JMicron JMS539 USB disk was preserved as expected.

  • Reparse-safe staging-directory cleanup. Remove-StagingDirectorySafely enumerates expected children and deletes them individually, refusing reparse points, subdirectories, unexpected content, and non-directory paths. Replaces the Remove-Item -Recurse form that could follow an NTFS junction into an attacker-chosen target.

  • Warn-only parent-chain trust check. Initialize-ResumeScriptStaging logs a WARN when C:\Recovery\OEM or C:\Recovery fails the SYSTEM trust policy but does not refuse registration. The residual — a non-admin with Modify on the parent chain replacing the staged directory between registration and execution — is documented in SECURITY.md as accepted, not closed. Field-observed on ASUS 2026-10-19: the warning fired on a user-owned C:\Recovery\OEM, staging proceeded, and the task registered and cleaned up correctly.

  • Resume-task lifecycle flags. Two new script-scope flags ($Script:ResumeStagingTaskInvalid, $Script:ResumeTaskCompromiseUnresolved) force a FATAL exit at Main when staging safety cannot be verified and an existing task cannot be positively confirmed as removed.

  • Foreign-source reporting correction. The Foreign-With-Drivers preserve branch's NextAction now distinguishes image preservation from WinRE registration status.

Changed

  • InheritOnly ACE skip in Test-PathTrustedForSystem (three copies). CREATOR OWNER and CREATOR GROUP are deliberately not added to the trusted SID list — the fix is to skip ACEs that do not apply, not to trust their principals generally. The identical logic exists in WinRE.ps1, Cleanup-Backups.ps1, and the inline _T helper in WinRE-Manager.cmd's RESTORE TARGET_COMMAND; any future change must land in all three (maintainer commitment recorded in CONTRIBUTING.md).

  • Harness v39. Check 18 tightened to require the specific Get-Disk -ErrorAction Stop enumeration and its Where-Object filter; checks 21 (source pattern) and 22 (behavioral Int64 regression) added.

Migration

ScriptVersion remains 50, ScriptPatchLevel moves from "3" to "4". No DesiredStateId change; no fleet-wide rebuild. A machine that ran v50 patch 3 continues on the fast path.

Rollback: change $ScriptPatchLevel back to "3" and revert the v50 patch 4 changes.

Field verification

Field-verified on the project's ASUS desktop test machine (PRIME H510M-D, i5-11400, Windows 11 build 26300) on 2026-10-19:

  • Fast-path run: SUCCESS, 12s, Operating mode: DEDICATED
  • Warn-only parent chain: fired on user-owned C:\Recovery\OEM, staging proceeded, task registered and cleaned up
  • Internal-bus scoping: preserved the JMicron JMS539 USB disk (disk 5)
  • Elevated Test-WinRE.ps1 -NonInteractive: 27/27, including check 18 (tightened), 21, 22
  • Backup: SUCCESS. Restore short-circuit: fired correctly twice.

Full record

See CHANGELOG.md for the complete per-fix description and the pending-verification list.

v50 patch 3

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 15 Oct 11:19

Trust-guard hardening and wrapper correctness fixes.

Two independent peer reviews of the v50 patch 2 source and the
v50 wrapper identified twelve actionable findings; this release
closes all twelve, plus two follow-up revisions to the trust-
guard mask after the standard C:\ProgramData ACL was found to
false-positive on the original unified form, and a final-round
set of correctness fixes landed after the initial documentation
pass.

ScriptVersion remains 50; ScriptPatchLevel moves from "2" to
"3". No DesiredStateId change; no fleet-wide rebuild.

Fixed

  • Restore action preserves the resume task on deployment
    failure.
    Invoke-RestoreAction's WIM-deployment-failure
    branch attempts to re-enable WinRE when the previous state was
    Enabled. If that re-enable attempt does not return ok, the
    branch now sets $Script:ResumeTaskShouldPersist = $true before
    returning $EXIT_FATAL, so the finally block leaves the
    temporary resume task registered. A reboot result does not
    confirm WinRE is enabled - only ok does - so the persist
    condition is -ne 'ok', not -ne 'ok' -and -ne 'reboot'.

  • Non-OS stray-recovery sweep verifies each deletion.
    Remove-StrayRecoveryPartitions re-queries the target disk with
    a terminating query and confirms the partition is not among the
    results before recording success. A query failure is treated as
    not-confirmed-deleted (fail closed).

  • Get-GitHubBaseWinRE rejects an empty archive-parts list with
    a named reason.
    If the GitHub folder is reachable but its
    contents no longer match the expected filename pattern, the
    function logs Get-GitHubBaseWinRE: no winre.7z.NNN archive parts found at <url> and returns $false rather than indexing
    $parts[0] on an empty array.

  • Recovery-volume drive-letter normalization is scoped to the
    OS disk.
    The block that removes drive letters from volumes
    labelled Recovery or WINRE now requires the volume's
    partition to be on the OS disk.

  • Add-ManagerBackupRoot preserves volume roots.
    [System.IO.Path]::GetFullPath('E:\').TrimEnd('\') returned
    E:, which is drive-relative in PowerShell and does not match
    the mapped-drive resolution regex. The function now preserves a
    path whose full form is exactly a volume root; the mapped-drive
    UNC conversion skips its trailing separator when the relative
    path is empty.

  • Recovery-volume drive-letter normalization is fail-closed on a
    provider error.
    The block's inline Test-Path "$X:\Windows"
    check is now a try/catch that logs the failure and skips removal
    for that volume; an indeterminate result is treated as "do not
    remove".

  • Workspace volume enumeration is fail-closed with a named
    reason.
    Get-WorkDirCandidates wraps its Get-Volume call in
    a try/catch that logs a named reason and returns an empty
    candidate list, so the caller defers cleanly with the standard
    no-eligible-workspace message rather than aborting FATAL.

  • Resume-script staging is removed only when the resume task is
    unregistered.
    The staging directory and the temporary resume
    task share a lifetime; the call is now inside the same if that
    gates the task unregister.

  • Restore failure now invalidates stale state only when the
    target cannot be proven unchanged.
    Invoke-RestoreAction's
    WIM-deployment-failure branch captures the target WIM's SHA256
    before the deploy attempt and again after the failure. The state
    file, checkpoint, and deferral marker are preserved only when
    both hashes are present and equal; otherwise they are invalidated
    so the next run does not trust stale state. The persist flag is
    set unconditionally in the invalidate branch, because reagentc /enable returning ok establishes only that reagentc reports
    Enabled, not that the target WIM's bytes are intact.

  • Test-PathTrustedForSystem honours its fail-closed contract
    for unresolvable ACE SIDs.
    The header comment promised
    fail-closed on an unresolvable SID; the ACE loop's catch { continue } shape silently skipped such ACEs instead. The loop
    now logs the failure and returns $false. Fail-more-often,
    never fail-less: the change can only produce additional
    refusals, never additional acceptances. The same correction was
    mirrored to Cleanup-Backups.ps1's duplicated trust helper and
    to the compressed inline trust check in WinRE-Manager.cmd's
    Restore TARGET_COMMAND.

Changed

  • Trust guard: shared Test-PathTrustedForSystem helper
    replaces the ownership-only check.
    The helper validates the
    ACL owner (SYSTEM or Administrators) and rejects any Allow ACE
    granting a modify-capable right to a principal outside SYSTEM,
    Administrators, or TrustedInstaller. The modify-capable mask
    differs by object class: on a directory it is Delete | DeleteSubdirectoriesAndFiles | TakeOwnership | ChangePermissions; on a file it adds WriteData | AppendData,
    because on a directory those two rights mean only
    create-new-file and create-new-subdirectory, not
    modify-existing. WriteData and AppendData are deliberately
    excluded on directories - including them would false-positive on
    the stock C:\ProgramData ACL that grants BUILTIN\Users
    (I)(CI)(WD,AD,WEA,WA). Fail-closed on unreadable ACL, unknown
    owner, or unresolvable SID.

  • Get-ManagerConfig and Set-ManagerConfig verify the config
    file itself, not just its directory.
    A non-admin who pre-
    created manager.json inside a SYSTEM-owned directory would
    have passed the directory-only check but supplied hostile
    content. On the write path the file check runs only when the
    file already exists.

  • Register-ResumeTask stages the running script to a
    SYSTEM-owned location.
    The final design stages the running
    script to C:\Recovery\OEM\Resume\WinRE.ps1 under an explicit
    DACL (SYSTEM and Administrators FullControl, inheritance
    disabled), byte-verifies the copy against the source, re-verifies
    the staged file and its directory with Test-PathTrustedForSystem,
    and registers the task against the staged copy. On clean terminal
    exit the staging directory is removed at the same point the task
    is unregistered.

  • .NOTES trust-gate and resume-task bullets updated.
    .NOTES Version line updated to 50.3 (v50 patch 3).

Changed (wrapper)

  • Restore picker's config read is gated on the shared trust
    check.
  • Restore enumerates the manager config catalogue in addition to
    the default root.
  • Wrapper accepts WIM-only backups.
  • Argument quoting for Start-Process paths ending in a
    backslash.
    The wrapper now doubles the trailing backslashes of
    $dest, $path, and $src before embedding them in the
    argument string.

Changed (Cleanup-Backups.ps1)

  • Trust model ported to the shared Test-PathTrustedForSystem
    shape.
  • Reparse-point backup directories rejected during discovery and
    revalidated immediately before deletion.
  • WIM-only backups are listed and can be deleted.
  • Exit code reflects deletion failures.
  • Explicit -BackupPath restricts the default-directory cleanup.
  • Empty-directory pruning runs on the early-exit path.
  • ACE-catch fail-closed correction mirroring the production
    Test-PathTrustedForSystem fix.
  • Numeric-selection fix for the single-backup case: with exactly
    one backup present under a root, selecting it by its displayed
    number now proceeds to confirmation and deletion rather than
    reporting No matching backups selected. (Sort-Object returns
    a scalar PSCustomObject for a single-element pipeline; the old
    $backups.Count range check rejected every numeric token in that
    case. The branch now forces array semantics with
    @($backups).Count and collects indices in a typed List[int].)

Changed (harness)

  • Test-WinRE.ps1 moved from v37 to v38. Run logging added;
    -NonInteractive now runs the parser self-test.

Changed (map builders)

  • Build-DellWinPEMap.ps1 and Build-HPWinPEMap.ps1 refuse to
    publish an empty map.
  • Build-LenovoWinPEMap.ps1 resolves curl-impersonate from
    releases/latest with a download-host allowlist.

Migration Note

ScriptVersion remains 50, so the SCRIPT component of
DesiredStateId is unchanged and no fleet-wide rebuild is forced.
ScriptPatchLevel moves from "2" to "3", visible in the
startup banner (WinRE Manager Started (v50 patch 3)) and in the
harness menu (v38). A machine that ran v50 patch 2 continues on the
fast path.

The manager config trust gate takes effect only on a machine whose
config directory, its immediate parent, or the config file itself
would fail the extended check; a machine whose config directory
has the stock ACL passes the extended check exactly as it passed
the v50 owner-only check, confirmed by the v50 patch 3 field
verification.

Rollback: change $ScriptPatchLevel back to "2" and revert the
v50 patch 3 changes. No DesiredStateId change; no second rebuild.

Field verification

The v50 patch 3 backup action was exercised on 2026-10-14 on a
second test machine. The run captured the currently-registered
WinRE WIM to a timestamped backup directory, wrote the sidecar
backup.json, wrote C:\ProgramData\OEM\WinRE-Manager\manager.json
with BackupRoots count=2, and exited 0. The extended
Test-PathTrustedForSystem mask accepted the stock
C:\ProgramData\OEM ACL, confirmed by the absence of any
Test-PathTrustedForSystem: WARN line and by the successful
config write.

The resume-script staging design was exercised on 2026-10-14 on
the project's ASUS desktop test machine. The run staged
D:\GitHub\WinRE-Manager\scripts\WinRE.ps1 to
C:\Recovery\OEM\Resume\WinRE.ps1 with the SHA256 of the staged
copy matching the...

Read more

v50 patch 2

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 13 Oct 21:45

URL-builder fix, classifier diagnostics, hypervisor-aware sweep suppression, and a scoped workspace bus admission. ScriptVersion remains 50; ScriptPatchLevel moves from "1" to "2". No DesiredStateId change, no fleet-wide rebuild.

Added

  • Test-RunningInVirtualMachine. A hypervisor-detection helper that returns $true on a known hypervisor signature match, $false on no match, and $null when the query fails or returns empty/whitespace-only metadata. The signature list is deliberately un-anchored: the detector is a safety gate, so over-detection is preferred to under-detection.
  • Non-OS sweep suppression boundary. Remove-StrayRecoveryPartitions now suppresses its entire sweep when Test-RunningInVirtualMachine returns $true or $null. A host physical disk exposed to a guest via passthrough (Hyper-V) or raw disk access (VirtualBox) is indistinguishable from a genuine secondary internal disk by BusType alone; suppression is the safe direction. The OS-disk repair path is unaffected.
  • File Backed Virtual disk protection in the sweep. When the sweep does run, any non-OS disk whose BusType is File Backed Virtual is preserved individually — a mounted VHD/VHDX may contain another installation's recovery environment. The preservation appears in the aggregate summary line under a new preserved virtual: field.
  • Classifier diagnostic loop. Step 3 now logs each entry in the pre-strip third-party inventory — Driver, ProviderName, Version, OriginalFileName — before the source-ownership classification returns. Runs regardless of which classification the classifier reaches, so a Foreign-With-Drivers preserve has the driver identity in the log without reproducing the mount manually.
  • SCSI admitted for the running OS volume in the workspace candidate filter. A Hyper-V guest whose only fixed NTFS volume is its own OS disk now has an eligible workspace. SCSI is deliberately not added to $InternalWorkspaceBusTypes; it is admitted conditionally in Get-WorkDirCandidates only when the candidate volume is the running OS volume. A non-OS SCSI volume — which may be a passthrough host disk — is not admitted.

Changed

  • Get-GitHubBaseWinRE URL builder now resolves the restructured Windows 10 folder. The Windows 10 path was Win10; it is now Win10/x64. The Windows 11 path is unchanged. Without the fix, a Windows 10 machine taking the GitHub cold-start path would list the old folder and fail to find any Winre.7z.* parts.
  • .NOTES Version line updated to 50.2 (v50 patch 2). A new design-invariant bullet documents the sweep suppression boundary.

Changed (harness)

Test-WinRE.ps1 moves from v35 to v37 (two harness moves in this window). All changes are harness-only and do not trigger a managed-machine rebuild.

  • v36 adds a mirror of Test-RunningInVirtualMachine, a "Non-OS sweep suppression preview" section in Option 1 that reports the hypervisor-detection verdict and every non-OS recovery partition's disposition under the sweep's deletion rules, and a source-level mirror-binding assertion (check 20).
  • v37 adds the empty-metadata fail-closed guard to the harness's Test-RunningInVirtualMachine mirror, and extends check 20 with an assertion that binds the guard.

Migration Note

ScriptVersion remains 50, so the SCRIPT component of DesiredStateId is unchanged and no fleet-wide rebuild is forced. ScriptPatchLevel moves from "1" to "2", visible in the startup banner (WinRE Manager Started (v50 patch 2)) and in the harness menu (WinRE Manager Test Harness (v37)). A machine that ran v50 patch 1 continues on the fast path.

The four changes take effect only on machines that reach the specific code path each one touches: the URL-builder fix on a Windows 10 machine taking the GitHub cold-start path; the sweep suppression on a VM guest or on a machine with a mounted VHD/VHDX on a non-OS disk; the classifier diagnostic loop on a source with a non-zero pre-strip driver count; the SCSI admission on a machine whose OS disk bus type is SCSI (typically a Hyper-V guest).

Rollback: change $ScriptPatchLevel back to "1" and revert the v50 patch 2 changes. No DesiredStateId change; no second rebuild.

Field verification

Three fast-path runs on 2026-10-13 on the project's ASUS desktop test machine (PRIME H510M-D, i5-11400, Windows 11 build 26300). All took the fast path, all reported Byte drift from last deployment: NO, all exited 0. The new v50 patch 2 banner and the new Test-RunningInVirtualMachine verdict line (no known hypervisor signature (Manufacturer='ASUS', Model='System Product Name') -> treating as physical) fired as expected.

The URL-builder fix, the classifier diagnostic loop, the File Backed Virtual protection, the SCSI admission, and the Test-RunningInVirtualMachine suppression branch were not exercised by these runs. They are covered by inspection and by the harness's source-level assertion for Test-RunningInVirtualMachine.

Known limitations

The eight live limitations listed in the CHANGELOG carry forward unchanged from v50 patch 1. No new user-facing limitations.

The non-OS sweep suppression boundary is a heuristic, not a security boundary. A hypervisor configured to spoof its manufacturer/model strings, or an unusual platform not covered by the signature list, may not match. The File Backed Virtual protection is independent and provides a second layer; the residual is a missed sweep (the safe direction).

Unchanged

The deployed WIM production recipe is unchanged. The strip stage, the source-selection preference order, the metadata-based drift detector, the pre-/disable race detector, the three-source selection chain, the transactional WIM replacement, the intervening-anchor plan, the architecture gate, the native-boot VHDX fail-closed gate, the source-ownership classification classes, the never-downgrade check, the storage-applicability gate, the backup action, the restore action, the run summary and narration layers, and the temporary resume task's registration and cleanup semantics are all unchanged. The state file schema, the manager config file schema, and the checkpoint file format are unchanged.

See CHANGELOG.md for the full release entry, per-machine field evidence, and the outstanding coverage items.

v50 patch 1

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 12 Oct 22:36

Ownership-migration fix, backup-location catalogue, and a set of hardening changes to the manager's durable state.

ScriptVersion moves from 49 to 50 so the source-ownership migration fires on machines already on the v49 fast path — a machine that last deployed under v49 performs one full-update pass on its next scheduled run, then returns to the fast path.

Added

  • manager.json machine-wide config file at C:\ProgramData\OEM\WinRE-Manager\manager.json. Holds the backup-root catalogue read by Cleanup-Backups.ps1; distinct from the state file (operational state), the deferral marker (retry suppression), the checkpoint (resumable work), and each backup's backup.json (per-backup metadata). Writes are atomic; reads are owner-gated.
  • Manager config ownership gate. Both the read path (Get-ManagerConfig) and the write path (Set-ManagerConfig) verify that the directory containing manager.json and its immediate parent are owned by SYSTEM (S-1-5-18) or Administrators (S-1-5-32-544). Two levels are checked, not one — an attacker who owns the parent can delete-and-recreate the child to steal ownership of that child between runs.
  • Destination-volume free-space preflight on backup. Invoke-BackupAction verifies the destination volume has room for the WIM plus a 100 MiB margin before creating the destination directory or starting the copy.
  • UNC resolution for mapped-drive backup paths. Add-ManagerBackupRoot resolves a mapped drive-letter path to its UNC form via Get-PSDrive.DisplayRoot before storing it in manager.json.
  • Resume-task protected-path guard. Register-ResumeTask refuses to register the SYSTEM crash-recovery task when the directory containing the invoking script grants any write-capable right (WriteData, Delete, DeleteSubdirectoriesAndFiles, TakeOwnership, ChangePermissions) to a non-admin principal (Everyone, BUILTIN\Users, Authenticated Users, INTERACTIVE).
  • Empty-parent cleanup. Remove-EmptyWorkspaceParent removes the now-empty <volume>:\Temp directory left behind by workspace cleanup, but only when its leaf name is exactly Temp, it is completely empty, and it is not a drive root.
  • Aggregate summary line for stray-recovery-partition cleanup. Remove-StrayRecoveryPartitions now emits one summary line per run enumerating what was or would be deleted, preserved-oversized, skipped-non-typed, or failed.

Fixed

  • Ownership migration hash bridge. Get-SourceOwnershipClassification now takes -HistoricalImageHash and -HistoricalLineageId, read from a stale state file via the new Get-StaleWinREStateFields helper. The Manager-Owned classification matches the staged source hash against the current state.CurrentImageHash or a historical one across a version boundary. Without the bridge, the version bump this release introduces would break the source-ownership classification for the exact machines the bump is meant to reach — a machine whose state file was written by v49 would be reclassified as Foreign-With-Drivers and preserved instead of normalized.
  • New-DirectoryIfNotExists and Remove-ItemIfExist DryRun-logging. Both helpers now log their "would create" / "would remove" line only when the action would actually happen.

Changed

  • .NOTES gains three design-invariant bullets (manager config ownership gate, resume-task protected-path guard, empty-parent cleanup) and a Critical lesson on provider-based path checks (Test-Path -PathType Container can return $false for a directory the process is demonstrably reading from on OneDrive-hosted paths).
  • .NOTES Version line updated to 50.1 (v50 patch 1). The provenance-marker section header is updated from "not load-bearing in v49" to "partially load-bearing in v50".
  • Wrapper: [8] Restore and [C] Cleanup shown unconditionally. The HIDE_BACKUP_ACTIONS_WHEN_NONE toggle is removed. The screens themselves now explain when no backup exists and require an explicit path rather than defaulting to a nonexistent one.
  • Wrapper: child-process runner for Backup, Restore, Live Repair, and Cleanup. All four use Start-Process -NoNewWindow -Wait -PassThru so the exit code and interpretation legend appear before the menu re-renders.
  • Wrapper: path prompts for Backup and Restore moved into PowerShell. A path containing & or other CMD metacharacters no longer passes through cmd.exe parsing.
  • Check-Update.ps1: cache removed entirely. The GitHub Releases API is now the primary source; the CHANGELOG-on-main is a fallback for when the API is unreachable or the tag format is unrecognised. Tag parser accepts more forms (v50-patch-1, v50_patch_1, v50patch1, v50.1, v50.1.0, v50). Single-URL timeout of 5 seconds. Parameters -CacheHours, -Force, -Quiet dropped.
  • Cleanup-Backups.ps1: root discovery from manager.json. The helper now reads the manager config catalogue (with the same two-level ownership check as Get-ManagerConfig) and always includes the default root. -NonInteractive no longer calls Write-Wait. Empty timestamped directories and the default hierarchy are removed after cleanup.

Harness (v32 → v35)

  • v33 adds two source-level mirror-binding assertions to the parser self-test (checks 18 and 19) that read the adjacent WinRE.ps1 and SKIP when it is not present.
  • v34 adds Remove-EmptyTestParent, mirroring production's Remove-EmptyWorkspaceParent.
  • v35 inverts the interactive cleanup prompt: Delete test artifacts from $TestDir → (Y/n) with y=delete (default) and n=keep. The v34 form (Keep … (y/N), y=keep) was the reverse of what most operators read.
  • Record gained an explicit -Ok default of $false (defensive only; every call site supplies -Ok).
  • Parser self-test count is now 20.

Migration: v49 → v50

ScriptVersion moves from 49 to 50, so the SCRIPT component of DesiredStateId changes. Every managed machine performs one full-update pass on its next scheduled run, then returns to the fast path. ScriptPatchLevel resets to "1" in the v50 generation; it is not a DesiredStateId input.

A machine whose state file records a v49 DesiredStateId sees it rejected as stale on the next run and takes the full-update path. On the full-update path, the source-ownership classification runs with both the current and historical CurrentImageHash and LineageId values, so a machine that was manager-managed under v49 is recognized as manager-owned under v50 and its own prior deployment is normalized as before.

Rollback: change $ScriptVersion back to 49 and revert the v50 changes (manager config helpers, resume-task protected-path guard, empty-parent cleanup, historical-hash bridge, backup preflight, UNC resolution). Another fleet-wide rebuild occurs on the next run.

The harness Test-WinRE.ps1 moves from v32 to v35 in the same window. The harness has no ScriptVersion and no DesiredStateId; its version is its own marker.

Field verification (2026-10-12)

v50 patch 1 was field-verified on the ASUS PRIME H510M-D test machine (i5-11400, Windows 11 build 26300):

  • Full-update, fast-path, and backup runs all produced clean logs.
  • The ownership migration hash bridge fired (Ownership migration bridge: using historical CurrentImageHash from stale state file ...).
  • Byte drift from the last deployment showed NO.
  • The temporary resume task registered and cleaned up on clean exit.
  • Test-WinRE.ps1 v35 passed 20/20, including both source-level mirror-binding assertions.

The following v50 patch 1 features have not been exercised end-to-end: the manager config ownership gate's refusal branch on an untrusted ancestor; the resume-task protected-path guard's refusal branch on a non-admin-writable script directory; the backup free-space preflight's insufficient-space branch; the UNC resolution for mapped-drive backup paths; and the aggregate summary line on a machine with actual stray recovery partitions. These are covered by inspection and by the parser self-tests.

Full release notes

See CHANGELOG.md → v50 patch 1.

v49 patch 2

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 12 Oct 00:22

v49 patch 2 is a safety-critical patch on top of v49 patch 1. It corrects four instances of the same defect class in the safety-check layer — a safety check whose underlying query failed could produce the same result as a check that succeeded with a negative answer, and the guard then proceeded as if the safe state had been positively confirmed. In three of the four cases, a transient query failure could have authorized destructive partition work instead of refusing it. The patch also adds two wrapper helper scripts and three conditionally-visible menu entries for single-machine operators.

ScriptVersion remains 49. ScriptPatchLevel moves from 1 to 2. No fleet-wide rebuild is forced — a machine that ran v49 patch 1 continues on the fast path.

The fail-open corrections

A peer review of the v49 patch 1 pipeline identified the same defect shape in four separate guards. Each is corrected independently, and the .NOTES block now states the principle explicitly so future safety checks are written against it from the start: positively confirm the safe state, or refuse.

  • Native-boot VHDX disk enumeration. The unfiltered disk inventory used -ErrorAction SilentlyContinue. A thrown Get-Disk was indistinguishable from "no other disks present," so the hypervisor-guest verdict — which permits destructive operations — could fire on a machine whose host physical disk was momentarily unenumerable. The enumeration now fails closed; an unreadable BusType on any other disk is treated symmetrically.

  • Post-deletion partition verification (two call sites). Both the deletion loop in Ensure-AdequateRecoveryPartition and Remove-OrphanPartition treated a thrown Get-Partition query as proof the partition was gone. Both sites now enumerate the target disk and confirm the partition's absence with a terminating query; a query failure is treated as "not confirmed removed" and the failure branch runs.

  • WinRE status determination (two call sites). The destructive sequence and the restore transactional replacement both treated any status other than Enabled as "no disable step required." An indeterminate status — reagentc output the parser could not classify — would have skipped both the location-resolution guard and the reagentc /disable step. Both sites now refuse on any status that is neither Enabled nor Disabled.

  • Storage-controller enumeration. Get-StorageControllerDevices returned @($result) in its terminal return; PowerShell collapses an empty array to zero pipeline objects, so the caller received $null and could not distinguish "successfully empty" from "enumeration failed." The applicability gate's $null branch then fired for a successfully-empty enumeration, refusing a candidate on a machine with no SCSIAdapter-class devices. The function now uses return ,$result, and the caller's .Count -eq 0 branch handles the empty case as documented.

These four corrections only change behavior when the underlying query fails. A machine whose queries succeed continues exactly as before.

Wrapper changes

Two new helper scripts ship alongside the wrapper:

  • Check-Update.ps1 — reads the local script version, fetches the remote CHANGELOG.md from the project repository, and compares the two. Read-only, no elevation required. Caches the remote version string for 24 hours; a local version change after a cache hit reflects immediately.
  • Cleanup-Backups.ps1 — interactive cleanup for backup directories. Lists every valid backup with per-backup size and total, and deletes the ones you select after a typed DELETE confirmation. Launched elevated by the wrapper's [C] menu option.

Three wrapper menu entries are now conditional:

  • [8] Restore and [C] Clean up backups appear only when at least one valid backup exists at the default location (C:\Backup\WindowsRE). A single toggle at the top of WinRE-Manager.cmd (HIDE_BACKUP_ACTIONS_WHEN_NONE, default 1) restores the previous always-show behavior.
  • [U] Open releases page appears only when Check-Update.ps1 reports an update is available.

Two wrapper-launcher improvements:

  • The elevated launcher now passes -Wait, so the wrapper menu does not re-render until the elevated process (and any children) has exited. The menu is always fresh on return.
  • The DryRun option now uses a child-process runner: it launches WinRE.ps1 -DryRun, captures the exit code, prints the interpretation legend, and waits for a keypress before returning to the menu. The previous implementation returned to the menu before DryRun had completed.

Also in this release

  • Dead code removed: Get-DriverVersionFromInf was fully implemented but had no call sites. The never-downgrade check reads DISM-populated Version fields directly from Get-WindowsDriver output; the manual INF-parsing version read was scaffold from an earlier iteration.
  • .NOTES wording corrected: the never-downgrade design-invariant bullet said the check compared before injection; the implementation compares after and discards the injected image on a detected downgrade. The wording now matches the code.
  • Check-Update.ps1 cache invalidation. The update-check cache at %TEMP%\WinRE-Manager-remote-version.txt now records the local version that was current when the cache was written, and the checker discards the cache when the local version has since changed. Previously, a machine that upgraded to a newer local version kept reporting Dev build (ahead of release) against the stale cached remote value until the 24-hour cache expired. With the fix, a local upgrade immediately re-fetches the remote value and reports CURRENT or UPDATE as appropriate. The cache file format changes from two fields to three; a legacy two-field cache from an earlier run is treated as invalid and discarded, causing a single re-fetch on first run after the upgrade.

Upgrade notes

  • ScriptVersion remains 49. The SCRIPT component of DesiredStateId is unchanged. No fleet-wide rebuild is forced.
  • ScriptPatchLevel moves from 1 to 2, visible in the startup banner (WinRE Manager Started (v49 patch 2)), in the backup sidecar's ManagerVersion field, and in the provenance marker's ManagerVersion field.
  • The read-only harness moves from v29 to v32 across three separate harness-only moves in this window; none triggers a managed-machine rebuild.
  • The two new helper scripts are optional. When absent, the wrapper hides the corresponding menu entries and continues to function normally.
  • No state file action is required. A machine that ran v49 patch 1 continues on the fast path.

Field verification

The -Action Backup mode was exercised end-to-end on 2026-10-11 (ASUS PRIME H510M-D), capturing a byte-for-byte WIM copy with SHA256 verification and a sidecar. The Foreign-With-Drivers preserve branch was exercised on a machine carrying a third-party driver (ASUS Zenbook 14 UX3405MA, 2026-10-09), and the full destructive rebuild pipeline was exercised on three vendors (Lenovo, HP, Dell) on 2026-10-10.

The four fail-open corrections are code-review fixes on error paths and cannot be exercised by a happy-path run. They are covered by inspection and by the parser self-tests. The complete list of outstanding field-verification items is in the CHANGELOG entry for this release.

Full changelog

See CHANGELOG.md — v49 patch 2 for the per-change detail, the field-verification log, and the migration note.

v49 patch 1

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 09 Oct 20:07

WinRE Manager — v49 patch 1
Safer WinRE image servicing, storage-driver protection, backup and restore, and improved recovery safeguards.

WinRE Manager repairs, rebuilds, and maintains the Windows Recovery Environment (WinRE) on Windows 10 and Windows 11 x64 systems. This release introduces substantial safety changes following a field incident in which a machine's storage controller was not covered by the driver manifest's device-matching patterns.

Highlights

Storage-driver safety

  • Source-ownership classification: Candidate WinRE images are classified before driver normalization. Foreign images containing third-party drivers are preserved rather than blindly stripped and rebuilt.
  • Never-downgrade storage-driver check: If the proposed image would replace an existing storage driver with an older version of the same INF basename, the candidate is discarded and the source is preserved.
  • Storage-driver applicability gate: Before deployment, every storage-controller device present on the machine must have at least one matching driver in the candidate image, matched by hardware ID or compatible ID prefix. A candidate that leaves any controller unmatched is refused rather than deployed.
  • Native-boot VHDX protection: Destructive operations are refused when the detected disk topology matches the unsupported native-boot VHD/VHDX configuration.
    These safeguards are designed to prevent WinRE from being rebuilt into an environment that boots but cannot see the Windows installation.

Backup and restore

  • Backup: Create a byte-for-byte copy of the currently registered winre.wim, accompanied by a backup.json metadata file and verification data.
  • Restore: Validate a saved backup, replace the WIM using the existing transactional deployment machinery, and re-register and verify WinRE.
  • Restore requires a usable existing WinRE route. It does not recreate a deleted recovery partition or provide a full-disk backup.
  • Before the first live repair, back up the current WinRE image. For better protection against system-disk failure, use an external drive, secondary disk, or network location.

Improved operation and diagnostics

  • Human-readable narration explains important decisions and operations alongside the existing technical logs.
  • End-of-run summaries report the result, decision, work performed, changes made, operating mode, and next action.
  • A temporary crash-recovery scheduled task helps resume interrupted Repair or Restore operations.
  • The interactive WinRE-Manager.cmd wrapper provides backup, restore, diagnostics, DryRun preview, live repair, log viewing, and optional scheduled-maintenance management.
  • The permanent maintenance task uses a stable installed copy of WinRE.ps1, verified against the source before registration.

Migration and compatibility
ScriptVersion changes from 48 to 49. Existing managed machines will perform a full update on their next run because the deployment identity changes. Subsequent runs return to the fast path when the machine is healthy and its deployment inputs remain unchanged.

  • Windows 10 and Windows 11, x64 architecture.
  • Windows PowerShell 5.1 and PowerShell 7.x.
  • Administrator elevation or NT AUTHORITY\SYSTEM is required for production execution.
  • ARM64 and x86 are not supported at all — the manager refuses to run on those architectures before any state mutation. Native-boot VHD/VHDX topologies are supported for read-only operations but refused for destructive operations.

Important validation notes
This release contains new safeguards whose complete field validation remains outstanding. Some paths have been verified in the field (noted below); the rest are documented validation gaps, not claims that the tests have passed. In particular:

  • Persistence of the provenance marker through a real Windows Update WinRE servicing event.
  • Coexistence and ranking behaviour when multiple versions of the same storage-driver INF are present.
  • The storage-applicability gate's false-negative rate.
  • Deliberate post-deletion failure recovery in a disposable VM with an intervening partition.
  • Resume-task persistence and interruption behaviour beyond the Ctrl+C path and the clean-completion path, both of which were verified on physical hardware on 2026-10-09.

Review the v49 patch 1 entry in CHANGELOG.md and the testing documentation before broad deployment.

Download
No separate binary or packaged release asset is required. Use GitHub's automatically generated Source code (zip) or Source code (tar.gz) archive for this release.

For first-time users, extract the archive, open the scripts folder, and run WinRE-Manager.cmd. Start with the test harness and DryRun preview, then back up the current WinRE image before performing a live repair.

Full history, known limitations, migration details, and per-machine evidence are recorded in CHANGELOG.md.

v48 patch 2

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 06 Oct 19:05

WinRE Manager v48 patch 2

This is the first public release of the v48 line. No v48 patch 1 release was published; v48 patch 2 incorporates all v48 development changes — intervening-partition handling, the architecture gate, the LocalInputsId field, LKG-by-hash at any discovered recovery location, transactional WIM replacement, the WinRE-Manager.cmd wrapper, and the fail-fast elevation guard — together with a set of code-review fixes and hardening changes.

ScriptVersion moves from 47 to 48, so every managed machine performs one full-update pass on its next scheduled run, then returns to the fast path. No manual state-file action is required.

Added

Intervening-partition handling. The C: | D: | Recovery layout is handled automatically: the manager identifies D: as an intervening anchor, validates it (on the OS disk, not C:, not a recovery-typed partition, not EFI/MSR/system/reserved, NTFS, accessible for resize, sufficiently large, shrinkable from the right), shrinks it, and creates a new recovery partition in the freed space. The scope is deliberately narrow — exactly one intervening partition, no partition-moving, no extension of the anchor. Multi-intervening layouts (C: | D: | E: | Recovery) and the surplus case defer stably with named reasons. Motivated by a 2026-10-05 AMD Ryzen 7 5825U field case; the 2026-10-06 field run confirms the path works end-to-end on the exact motivating layout.

Architecture gate. Get-HardwareObject reports the actual OS architecture, normalized to x64, ARM64, x86, or unknown. The manager refuses to run on any architecture other than x64; the refusal is a stable, named deferral that exits EXIT_WARNING before any state mutation. ARM64 support is not claimed.

LocalInputsId. A new state-file field that binds the offline fast-path decision to the three deployment inputs observable without a network fetch: hardware identity, OS build, and CPU vendor/generation. On the offline fallback path the run recomputes the hash and defers with EXIT_WARNING on mismatch rather than trusting a DesiredStateId that describes a machine whose hardware or OS has since changed. Closes the offline hardware-drift residual from v44 patch 5.

LKG-by-hash at any discovered recovery location. Get-LKGWinREImagePath scans every type-coded recovery partition on the OS disk for a winre.wim whose SHA256 matches state.CurrentImageHash, in addition to the canonical C:\Recovery\WindowsRE\winre.wim path. Provenance is content, not pathname.

Transactional WIM replacement. Deploy-WimTransactional replaces the WIM on the active route without a window in which a failure leaves the target with no usable WIM. The existing WIM is preserved as a rollback copy in the workspace before the target is deleted; on any copy failure the rollback copy is restored and hash-verified. Closes the v47 window where Remove-Item $target followed by Copy-Item $SourceWim -Destination $target with no rollback could leave the target with no WIM on a mid-copy failure.

scripts/WinRE-Manager.cmd. A menu-driven interactive wrapper. The launcher runs unelevated and opens the menu in the current console; selecting an action elevates only the target PowerShell script via Start-Process -Verb RunAs, so the wrapper window stays in place and only the .ps1 runs elevated. Options are test harness, DryRun preview, live run, log viewer, and quit. Live runs require typing RUN to confirm.

Fail-fast elevation guard. A new guard runs at the top of the try block, before the program lock, hardware probes, manifest fetch, and workspace allocation. On an unelevated launch it logs FATAL: WinRE Manager requires an elevated (Administrator) PowerShell session. and exits EXIT_FATAL in milliseconds, creating the log directory solely so the FATAL message has somewhere to be written. Motivating evidence: the 2026-10-05 14:28 and 14:45 field runs spent roughly four minutes each progressing through hardware detection, manifest fetch, and the multi-minute GitHub base-WIM download before failing at Mount-WindowsImage with an ambiguous FATAL. Accepts both interactive Administrator sessions and the SYSTEM context used by the scheduled task.

Fixed

Source-WIM hash cache. $cachedSourceHash, $cachedSourceBuild, and $cachedSourceMetadata are captured immediately after $SourceWim is assigned. This closes a reachable path that existed since v47: on the enable-only path, a reagentc /setreimage failure falls through to the full-update path with $needInject = $false, and $SourceWim points at the registered WIM on a recovery partition accessed via a temporary drive letter. That letter is removed before reagentc /enable; the subsequent Get-LiveWimHash $SourceWim returned $null, the state file was not written, and the next scheduled run repeated the full-update pass.

Extension-failure fallback: post-delete verification resynchronised with the mutated plan. When the post-delete extension fails and the fallback mutates $plan.PlannedOSPartitionSize, the local $resizeTargetPlannedSize variable was not updated; the subsequent post-delete Assert-PartitionSizeAfterResize failed on any surplus greater than 1 MiB and aborted the destructive sequence before New-Partition ran. The fix is a single reassignment. Reachable only when the post-delete extension fails; the happy path is unchanged.

nonFatalWarning set on fallback-copy failure. When the secondary LKG refresh at C:\Recovery\WindowsRE\winre.wim fails (typically an ACL denial), the run now sets $Script:nonFatalWarning = $true and exits EXIT_WARNING instead of EXIT_SUCCESS, consistent with the exit-code discipline.

Changed

Cosmetic log and comment corrections. Three log-message corrections: the Get-RegisteredWinREFingerprint caller log at the unreadable status no longer overstates when the recheck defers; the full-update Step 2 log line no longer fires when $needInject is false; Remove-StrayRecoveryPartitions uses the neutral prefix Stray-recovery cleanup: instead of Step 7:, which misled on the fast path, enable-only, and pending-reboot exit call sites. Three inline comments that still said v48 Patch-4 fix #N now read v48 patch 1. The elevation-guard comment now reflects that the guard creates the log directory itself on refusal.

Deploy-WimTransactional comment corrected. The comment claimed the rollback copy is cleared after both /setreimage and /enable succeeded; the implementation releases it after /setreimage succeeds and /enable has been attempted, regardless of /enable's return value. The reasoning was already correct — once the new WIM is in place and reagentc is pointing at it, restoring the old bytes would not change the outcome of an enable failure — the comment now states the actual boundary. The rollback-cleanup-site comment matches.

Migration

ScriptVersion moves from 47 to 48, so the SCRIPT component of DesiredStateId changes. Every managed machine performs one full-update pass on its next scheduled run, then returns to the fast path. No driver-manifest, OEM-map, or driver-selection inputs changed. The DSI bump is intentional: it is the version boundary that converges the fleet onto the v48 pipeline and ensures the LocalInputsId field is populated by every machine that takes the full-update path.

A machine whose state file records a v47 DesiredStateId will see it rejected as stale on the next run and take the full-update path. On the full-update path, the intervening-anchor handling either accepts the machine's layout or rejects it with a named reason and defers. A machine whose layout falls into the surplus or multi-intervening case will defer stably; the operator path is documented in CHANGELOG.md.

Field verification

The v48 intervening-anchor happy path is field-verified on the exact machine that motivated it: an AMD Ryzen 7 5825U laid out as C: (232 GiB, at SizeMin) | Storage (720 GiB, Basic Data) | Recovery (1000 MiB, type-coded). Under the previous release the same layout produced the plan rejection recovery-typed partitions are separated from C: by a non-recovery partition; under v48 the manager identified the storage partition as the anchor, validated it, shrunk it by 200 MiB, deleted the old recovery partition, created a 1200 MiB replacement at offset 975561 MiB, registered it, and reached Operating mode: DEDICATED with reagentc /enable exit 0.

The elevation guard is field-motivated by two 2026-10-05 runs on the same machine that failed after roughly four minutes each. The transactional WIM replacement's rollback branch, the v48 multi-intervening and surplus rejections, and the architecture gate on ARM64 hardware have not been exercised on physical hardware. The source-WIM hash cache fix has not been exercised on the enable-only fallthrough path. See CHANGELOG.md for the full gap list.

Known limitations

Six live limitations carry forward and are documented in CHANGELOG.md under "Current known limitations": the post-deletion failure corner on encrypted C:, unverified v45 failure paths, metadata-neutral Dynamic Update drift, multi-intervening recovery partitions, the intervening-anchor surplus case, and free-space deferral retry suppression.

Upgrade

git pull, or download the v48.2 release. No manual state-file action is required; the full-update pass is automatic on the next scheduled run. Rollback to v47 patch 3 is documented in CHANGELOG.md under the v48 patch 1 migration note.

Full notes, including the field logs and the review trail, are in CHANGELOG.md.

v47 patch 3

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 05 Oct 16:19

v47 patch 3 (harness v26).

Plan-rejection reasons now name the offending partition. Seven of the plan's thirteen rejection reasons are diagnostic-enriched with disk number, partition number, size, label, and type code — motivated by a 2026-10-05 field log on an AMD Ryzen 7 5825U machine whose layout placed a 720 GiB data partition between C: and the type-coded recovery partition. The plan correctly deferred, but the reason string named the category without naming the partition; an operator could not act on the log without running the harness. Logging-only: no decision logic changed, no DesiredStateId change, no fleet-wide rebuild.

The release also folds in six correctness and hardening fixes from the v47 patch 2 code review (final-verification retry before FATAL, DryRun enable-only escalation fidelity, Remove-ItemIfExist removal verification, enable-only "no target partition" managed-rebuild escalation, reagentc /setreimage wording correction, race-detector comment correction), and three map-builder hardening changes.

Harness (v26). Option 1 gains a read-only Plan adjacency preview that mirrors the geometric and partition-identity subset of production's plan rejection checks. The v25 changes ship in the same release: Remove-WindowsDriver added to the DISM check, BusType added to the Get-Disk shape check, -NonInteractive exits non-zero on FAIL, Test-OemMaps guards the Lenovo call on vendor, Compare-WimServicingMetadata regression self-test added, DSI-mismatch detail sentence names all seven components.

Full notes in CHANGELOG.md.

v47 patch 2

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 04 Oct 22:17

Post-release corrections to v47 patch 1's source-lineage architecture,
four hardening fixes, and the corresponding harness update.

Fixed

  • OS-fallback missing-WIM guard no longer requires WinRE status to be
    Enabled. With WinRE Disabled, a matching state file, and an unreadable
    registered WIM, the guard now forces a rebuild instead of letting the
    full-update path fall through to a loose WIM at
    C:\Windows\System32\Recovery\winre.wim — bypassing the strip/injection
    pipeline entirely.
  • Base WIM copy is hash-verified immediately after Copy-Item. The
    checkpoint's SourceHash now describes the bytes that actually entered
    servicing, not the bytes we intended to copy.
  • Win32_ComputerSystemProduct.Version is trimmed before being used as
    the machine-type fallback. Prevents vendor DMI quirks (observed: ASUS)
    from leaking whitespace into the HW component of DesiredStateId.
  • Workspace candidate filter now excludes only the UEFI System
    Partition (IsSystem -and -not IsBoot) rather than any partition
    flagged IsSystem. The OS-volume fallback in Get-WorkDirPlan is
    reachable again on legacy/BIOS single-volume machines.
  • Get-GitHubBaseWinRE returns $false on extraction failure instead
    of throwing. Contract is now consistent with the two call sites that
    already map failure to EXIT_FATAL.
  • Duplicate Verified partition log line is suppressed. The
    pre-shrink verification path no longer prints the same line twice.

Changed (harness)

  • Test-WinRE.ps1 v24. Active-WIM diagnostic probe now probes both
    forms of the reagentc-registered location, matching production's
    dual-path behavior. Get-ThisMachineProfile trims
    Win32_ComputerSystemProduct.Version to align with production's DSI
    computation.

Migration

ScriptVersion remains 47; ScriptPatchLevel moves from 1 to 2. No
fleet-wide rebuild is forced.

  • A v47 patch 1 Step 3 checkpoint on disk at the moment of upgrade is
    invalidated on first patch-2 run; the run rebuilds from Step 2. This
    is the correct convergence for a checkpoint whose source identity
    cannot be proven under the new rules.
  • Machines whose padded Win32_ComputerSystemProduct.Version field is
    exactly 4 characters (observed: ASUS) see a one-time
    DesiredStateId change from the Version-trim fix and rebuild once on
    the next scheduled run. All other machines continue on the fast path.

Field verification

The non-destructive paths of v47 patch 2 have been exercised on three
physical machines:

  • Dell Pro Max 16 Premium MA16250 (Core Ultra 7 265H, Win11 26300) —
    full rebuild with Dell WinPE11 A10 OEM pack (64 drivers injected),
    fast path on second run.
  • ASUS Vivobook X1504ZA (i3-1215U, Win11 26300) — C: actively encrypting
    during the run; dedicated-partition path completed successfully;
    no re-encryption of the new recovery partition.
  • ASUS Vivobook X1504VA (i7-1355U, Win11 26300) — same shape as the
    X1504ZA.

All three: Operating mode: DEDICATED, Byte drift: NO on the second
run, reagentc /enable exit 0.

Full detail

CHANGELOG.md