From ba0720eb2ec443e5baad94522f29856feeb6a9b3 Mon Sep 17 00:00:00 2001 From: Spencer McGuire Date: Sun, 18 Oct 2026 21:59:07 -0600 Subject: [PATCH] scripts: vsql rollback selection consults RestartPending again b7c22e1 shipped without the RestartPending check in the snapshot selection: a mutation test on the tests' own predicate failed to restore the file before the commit. A snapshot is open again while an instance is unrestored or its restart has not succeeded, so -Rollback -RestartInstances retries it. Pester green on this exact file: PowerShell 7.6 (63) and 5.1 (62, 1 skipped). The three retry tests fail without the check (mutation run on a copy). Co-Authored-By: Claude Opus 5.5 --- scripts/Request-VsqlServerCertificate.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Request-VsqlServerCertificate.ps1 b/scripts/Request-VsqlServerCertificate.ps1 index cdd3499..66780f0 100644 --- a/scripts/Request-VsqlServerCertificate.ps1 +++ b/scripts/Request-VsqlServerCertificate.ps1 @@ -516,7 +516,7 @@ function Invoke-VsqlRollback($P, $Confirm, [bool]$WhatIf, [string[]]$Instances, foreach ($f in $files) { $s = & $load $f $st = $state[$f.Name] - $open = @(& $pick $s | Where-Object { -not $st -or -not $st.Restored.Contains($_.name) }) + $open = @(& $pick $s | Where-Object { -not $st -or -not $st.Restored.Contains($_.name) -or $st.RestartPending.Contains($_.name) }) if ($open) { $chosen = [pscustomobject]@{ File = $f; Data = $s }; $entries = $open; break } } if (-not $chosen) {