From f7b09617c5f8589424e2cba1a27e7576459c8918 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 20 Jul 2026 23:54:58 +0200 Subject: [PATCH] fix(test): preserve singleton lifecycle samples Keep one-item endpoint and checkpoint results as arrays under PowerShell strict mode so the uncapped reconnect session is validated by the same gate as the multi-checkpoint capped route. --- tools/run-connected-world-lifecycle-gate.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/run-connected-world-lifecycle-gate.ps1 b/tools/run-connected-world-lifecycle-gate.ps1 index f4360265..f0c599ef 100644 --- a/tools/run-connected-world-lifecycle-gate.ps1 +++ b/tools/run-connected-world-lifecycle-gate.ps1 @@ -219,11 +219,12 @@ function Invoke-Session( -RedirectStandardOutput $stdout -RedirectStandardError $stderr -PassThru Wait-ForPattern $client $stdout '[UI-PROBE] UI probe script complete' $SessionTimeoutSeconds - $clientPort = @(Get-NetUDPEndpoint -OwningProcess $client.Id -ErrorAction SilentlyContinue | + $clientPorts = @(Get-NetUDPEndpoint -OwningProcess $client.Id -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty LocalPort) - if ($clientPort.Count -ne 1) { + if ($clientPorts.Count -ne 1) { throw "could not resolve the client's UDP endpoint for ACE disconnect verification" } + $clientPort = [int]$clientPorts[0] $client.Refresh() $processSample = [pscustomobject][ordered]@{ @@ -234,7 +235,7 @@ function Invoke-Session( WindowTitle = $client.MainWindowTitle } - $checkpoints = Read-Checkpoints $timeline + $checkpoints = @(Read-Checkpoints $timeline) if ($checkpoints.Count -ne $ExpectedCheckpoints.Count) { $failures.Add("${Label}: expected $($ExpectedCheckpoints.Count) checkpoints, found $($checkpoints.Count)") }