param( [string]$ApiBaseUrl = "http://192.168.200.61:18121/api/v1", [string]$ClusterID = "cfc0743d-d960-49fb-9de8-96e063d5e4aa", [string]$ActorUserID = "f67d943f-5397-4b3a-a229-695fe67ad700", [string]$EntryNodeName = "test-1", [string]$RelayNodeName = "test-3", [string]$ExitNodeName = "test-2", [string]$EntryBaseUrl = "http://192.168.200.61:19131", [string]$DockerSSH = "test-docker", [int]$InitialBatchCount = 12, [int]$LearningBatchCount = 24, [int]$PostChurnBatchCount = 24, [int]$PacketsPerBatch = 8, [int]$BatchDelayMilliseconds = 25, [string]$ResultPath = "artifacts\c18z19-service-channel-parallel-flow-window-smoke-result.json" ) Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $repoRoot = (Resolve-Path (Join-Path $scriptDir "..\..")).ProviderPath $innerResultPath = "artifacts\c18z19-service-channel-parallel-flow-window-inner-result.json" $innerResultFullPath = Join-Path $repoRoot $innerResultPath $agentRoot = Join-Path $repoRoot "agents\rap-node-agent" Push-Location $agentRoot try { $unitTestOutput = & go test ./internal/vpnruntime -run "TestFabricClientPacketIngressParallelFlowWindowDoesNotBlockIndependentChannel" 2>&1 if ($LASTEXITCODE -ne 0) { $unitText = ($unitTestOutput | Out-String) throw "C18Z19 parallel flow window unit test failed:`n$unitText" } } finally { Pop-Location } & (Join-Path $scriptDir "c18z18-service-channel-session-scoped-fairness-smoke.ps1") ` -ApiBaseUrl $ApiBaseUrl ` -ClusterID $ClusterID ` -ActorUserID $ActorUserID ` -EntryNodeName $EntryNodeName ` -RelayNodeName $RelayNodeName ` -ExitNodeName $ExitNodeName ` -EntryBaseUrl $EntryBaseUrl ` -DockerSSH $DockerSSH ` -InitialBatchCount $InitialBatchCount ` -LearningBatchCount $LearningBatchCount ` -PostChurnBatchCount $PostChurnBatchCount ` -PacketsPerBatch $PacketsPerBatch ` -BatchDelayMilliseconds $BatchDelayMilliseconds ` -ResultPath $innerResultPath $result = Get-Content -Path $innerResultFullPath -Raw | ConvertFrom-Json $finalIngress = $result.telemetry.final_entry_ingress $maxParallel = 0 $parallelBatches = 0 if ($finalIngress.PSObject.Properties["max_parallel_flow_sends"]) { $maxParallel = [int]$finalIngress.max_parallel_flow_sends } if ($finalIngress.PSObject.Properties["send_flow_parallel_batches"]) { $parallelBatches = [int64]$finalIngress.send_flow_parallel_batches } $result.schema_version = "c18z19.service_channel_parallel_flow_window_smoke.v1" $result | Add-Member -NotePropertyName c18z19_checks -NotePropertyValue ([ordered]@{ unit_parallel_flow_window_does_not_block_independent_channel = ($unitTestOutput -join "`n").Contains("ok") live_parallel_window_enabled = ($maxParallel -ge 2) live_parallel_batches_observed = ($parallelBatches -gt 0) live_session_scoped_fairness_still_passed = ([bool]$result.passed) live_session_completed_without_backend_fallback = ([int]$result.backend_fallback_queue.depth -eq 0) live_session_completed_without_flow_drops = ([int]$result.flow_drops.delta -eq 0) }) -Force $result | Add-Member -NotePropertyName c18z19_summary -NotePropertyValue ([ordered]@{ unit_test_output = ($unitTestOutput | Out-String).Trim() max_parallel_flow_sends = $maxParallel send_flow_parallel_batches = $parallelBatches }) -Force $result.passed = [bool]($result.passed -and $result.c18z19_checks.unit_parallel_flow_window_does_not_block_independent_channel -and $result.c18z19_checks.live_parallel_window_enabled -and $result.c18z19_checks.live_parallel_batches_observed -and $result.c18z19_checks.live_session_completed_without_backend_fallback -and $result.c18z19_checks.live_session_completed_without_flow_drops) $resolvedResultPath = Join-Path $repoRoot $ResultPath $result | ConvertTo-Json -Depth 100 | Set-Content -Path $resolvedResultPath -Encoding UTF8 Remove-Item -Path $innerResultFullPath -Force -ErrorAction SilentlyContinue if (-not $result.passed) { throw "C18Z19 parallel flow window smoke failed. Result: $resolvedResultPath" } Write-Host "C18Z19 service-channel parallel flow window smoke passed. Result: $resolvedResultPath" $result