This commit is contained in:
2026-05-14 23:30:34 +03:00
parent 26cb65e936
commit 04c46042d9
239 changed files with 34102 additions and 438 deletions
@@ -0,0 +1,101 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z10-remote-workspace-mailbox-preflight-checklist-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z10-remote-workspace-mailbox-preflight-checklist-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ChecklistStep {
param([object]$Checklist, [string]$Step)
foreach ($item in @($Checklist)) {
if (
[string](Get-PropertyValue -Item $item -Name "step" -Default "") -eq $Step -and
[bool](Get-PropertyValue -Item $item -Name "required" -Default $false) -and
-not [bool](Get-PropertyValue -Item $item -Name "satisfied" -Default $true) -and
[bool](Get-PropertyValue -Item $item -Name "source_hint" -Default $false)
) {
return $true
}
}
return $false
}
function Test-PreflightChecklist {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
$checklist = Get-PropertyValue -Item $rollup -Name "remediation_checklist" -Default @()
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $rollup -Name "operator_status" -Default "") -eq "resync_required" -and
[string](Get-PropertyValue -Item $rollup -Name "operator_severity" -Default "") -eq "warn" -and
@($checklist).Count -eq 3 -and
(Test-ChecklistStep -Checklist $checklist -Step "reset_consumer_cursor") -and
(Test-ChecklistStep -Checklist $checklist -Step "request_full_adapter_resync") -and
(Test-ChecklistStep -Checklist $checklist -Step "resume_from_checkpoint_after_resync")
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z9-remote-workspace-mailbox-preflight-retained-window-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_checklist_visible = (Test-PreflightChecklist -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_checklist_visible = (Test-PreflightChecklist -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z10.remote_workspace_mailbox_preflight_checklist_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z10 remote workspace mailbox preflight checklist smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z10 remote workspace mailbox preflight checklist smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,145 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z100-remote-workspace-real-adapter-runtime-gate-health-probe-validation-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z100-remote-workspace-real-adapter-runtime-gate-health-probe-validation-source-result.json"
$requiredValidationFields = @(
"schema_version",
"source_supervisor_validation_schema",
"validation_key",
"validation_status",
"health_probe_validation_required",
"health_probe_contract_verified",
"failure_detection_verified",
"remaining_required_validations",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$remainingRequiredValidations = @(
"payload_gate_validation"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z99-remote-workspace-real-adapter-runtime-gate-health-probe-validation-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$validation = Get-PropertyValue -Item $sourceResult -Name "runtime_gate_health_probe_validation" -Default $null
$guardrails = Get-PropertyValue -Item $validation -Name "guardrail_summary" -Default $null
$validationFieldsCompatible = Test-ObjectHasFields -Item $validation -Fields $requiredValidationFields
$remainingValidationsCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $validation -Name "remaining_required_validations" -Default @()) -Required $remainingRequiredValidations
$validationValuesCompatible = (
[string](Get-PropertyValue -Item $validation -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_health_probe_validation.v1" -and
[string](Get-PropertyValue -Item $validation -Name "source_supervisor_validation_schema" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_supervisor_validation.v1" -and
[string](Get-PropertyValue -Item $validation -Name "validation_key" -Default "") -eq "health_probe_validation" -and
[string](Get-PropertyValue -Item $validation -Name "validation_status" -Default "") -eq "satisfied_contract_only" -and
[bool](Get-PropertyValue -Item $validation -Name "health_probe_validation_required" -Default $false) -and
[bool](Get-PropertyValue -Item $validation -Name "health_probe_contract_verified" -Default $false) -and
[bool](Get-PropertyValue -Item $validation -Name "failure_detection_verified" -Default $false) -and
[string](Get-PropertyValue -Item $validation -Name "runtime_gate_state" -Default "") -eq "blocked_pending_remaining_validations" -and
[string](Get-PropertyValue -Item $validation -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $validation -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $validation -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $validation -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z99.remote_workspace_real_adapter_runtime_gate_health_probe_validation_smoke.v1")
health_probe_validation_present = ($null -ne $validation)
validation_fields_compatible = $validationFieldsCompatible
validation_values_compatible = $validationValuesCompatible
remaining_validations_compatible = $remainingValidationsCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z100.remote_workspace_real_adapter_runtime_gate_health_probe_validation_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_validation_fields = $requiredValidationFields
remaining_required_validations = $remainingRequiredValidations
required_guardrail_fields = $requiredGuardrailFields
runtime_gate_health_probe_validation = $validation
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z100 remote workspace real-adapter runtime gate health probe validation compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z100 remote workspace real-adapter runtime gate health probe validation compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,161 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z101-remote-workspace-real-adapter-runtime-gate-payload-gate-validation-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z101-remote-workspace-real-adapter-runtime-gate-payload-gate-validation-source-result.json"
$requiredValidationFields = @(
"schema_version",
"source_health_probe_validation_schema",
"validation_key",
"validation_status",
"payload_gate_validation_required",
"payload_policy_verified",
"payload_isolation_verified",
"remaining_required_validations",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$remainingRequiredValidations = @()
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayEquals {
param([object[]]$Actual, [string[]]$Expected)
$actualValues = @($Actual | ForEach-Object { [string]$_ })
if ($actualValues.Count -ne $Expected.Count) { return $false }
foreach ($item in $Expected) {
if ($actualValues -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z100-remote-workspace-real-adapter-runtime-gate-health-probe-validation-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$healthProbeValidation = Get-PropertyValue -Item $sourceResult -Name "runtime_gate_health_probe_validation" -Default $null
$guardrails = Get-PropertyValue -Item $healthProbeValidation -Name "guardrail_summary" -Default $null
$validation = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_runtime_gate_payload_gate_validation.v1"
source_health_probe_validation_schema = Get-PropertyValue -Item $healthProbeValidation -Name "schema_version" -Default $null
validation_key = "payload_gate_validation"
validation_status = "satisfied_contract_only"
payload_gate_validation_required = $true
payload_policy_verified = $true
payload_isolation_verified = $true
remaining_required_validations = $remainingRequiredValidations
runtime_gate_state = "validated_contract_only_not_enabled"
runtime_effect = "contract_only_no_runtime_enablement"
operator_default_action = Get-PropertyValue -Item $healthProbeValidation -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$validationFieldsCompatible = Test-ObjectHasFields -Item $validation -Fields $requiredValidationFields
$remainingValidationsCompatible = Test-ArrayEquals -Actual @(Get-PropertyValue -Item $validation -Name "remaining_required_validations" -Default @()) -Expected $remainingRequiredValidations
$validationValuesCompatible = (
[string](Get-PropertyValue -Item $validation -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_payload_gate_validation.v1" -and
[string](Get-PropertyValue -Item $validation -Name "source_health_probe_validation_schema" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_health_probe_validation.v1" -and
[string](Get-PropertyValue -Item $validation -Name "validation_key" -Default "") -eq "payload_gate_validation" -and
[string](Get-PropertyValue -Item $validation -Name "validation_status" -Default "") -eq "satisfied_contract_only" -and
[bool](Get-PropertyValue -Item $validation -Name "payload_gate_validation_required" -Default $false) -and
[bool](Get-PropertyValue -Item $validation -Name "payload_policy_verified" -Default $false) -and
[bool](Get-PropertyValue -Item $validation -Name "payload_isolation_verified" -Default $false) -and
[string](Get-PropertyValue -Item $validation -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $validation -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $validation -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $validation -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $validation -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z100.remote_workspace_real_adapter_runtime_gate_health_probe_validation_compatibility_smoke.v1")
health_probe_validation_present = ($null -ne $healthProbeValidation)
validation_fields_compatible = $validationFieldsCompatible
validation_values_compatible = $validationValuesCompatible
remaining_validations_compatible = $remainingValidationsCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z101.remote_workspace_real_adapter_runtime_gate_payload_gate_validation_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_validation_fields = $requiredValidationFields
remaining_required_validations = $remainingRequiredValidations
required_guardrail_fields = $requiredGuardrailFields
runtime_gate_payload_gate_validation = $validation
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z101 remote workspace real-adapter runtime gate payload gate validation smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z101 remote workspace real-adapter runtime gate payload gate validation smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,144 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z102-remote-workspace-real-adapter-runtime-gate-payload-gate-validation-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z102-remote-workspace-real-adapter-runtime-gate-payload-gate-validation-source-result.json"
$requiredValidationFields = @(
"schema_version",
"source_health_probe_validation_schema",
"validation_key",
"validation_status",
"payload_gate_validation_required",
"payload_policy_verified",
"payload_isolation_verified",
"remaining_required_validations",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$remainingRequiredValidations = @()
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayEquals {
param([object[]]$Actual, [string[]]$Expected)
$actualValues = @($Actual | ForEach-Object { [string]$_ })
if ($actualValues.Count -ne $Expected.Count) { return $false }
foreach ($item in $Expected) {
if ($actualValues -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z101-remote-workspace-real-adapter-runtime-gate-payload-gate-validation-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$validation = Get-PropertyValue -Item $sourceResult -Name "runtime_gate_payload_gate_validation" -Default $null
$guardrails = Get-PropertyValue -Item $validation -Name "guardrail_summary" -Default $null
$validationFieldsCompatible = Test-ObjectHasFields -Item $validation -Fields $requiredValidationFields
$remainingValidationsCompatible = Test-ArrayEquals -Actual @(Get-PropertyValue -Item $validation -Name "remaining_required_validations" -Default @()) -Expected $remainingRequiredValidations
$validationValuesCompatible = (
[string](Get-PropertyValue -Item $validation -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_payload_gate_validation.v1" -and
[string](Get-PropertyValue -Item $validation -Name "source_health_probe_validation_schema" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_health_probe_validation.v1" -and
[string](Get-PropertyValue -Item $validation -Name "validation_key" -Default "") -eq "payload_gate_validation" -and
[string](Get-PropertyValue -Item $validation -Name "validation_status" -Default "") -eq "satisfied_contract_only" -and
[bool](Get-PropertyValue -Item $validation -Name "payload_gate_validation_required" -Default $false) -and
[bool](Get-PropertyValue -Item $validation -Name "payload_policy_verified" -Default $false) -and
[bool](Get-PropertyValue -Item $validation -Name "payload_isolation_verified" -Default $false) -and
[string](Get-PropertyValue -Item $validation -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $validation -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $validation -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $validation -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $validation -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z101.remote_workspace_real_adapter_runtime_gate_payload_gate_validation_smoke.v1")
payload_gate_validation_present = ($null -ne $validation)
validation_fields_compatible = $validationFieldsCompatible
validation_values_compatible = $validationValuesCompatible
remaining_validations_compatible = $remainingValidationsCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z102.remote_workspace_real_adapter_runtime_gate_payload_gate_validation_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_validation_fields = $requiredValidationFields
remaining_required_validations = $remainingRequiredValidations
required_guardrail_fields = $requiredGuardrailFields
runtime_gate_payload_gate_validation = $validation
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z102 remote workspace real-adapter runtime gate payload gate validation compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z102 remote workspace real-adapter runtime gate payload gate validation compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,180 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z103-remote-workspace-real-adapter-runtime-gate-validation-closeout-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z103-remote-workspace-real-adapter-runtime-gate-validation-closeout-source-result.json"
$requiredCloseoutFields = @(
"schema_version",
"source_payload_gate_validation_schema",
"phase_name",
"validation_chain_status",
"enablement_boundary",
"enablement_status",
"required_validations",
"remaining_required_validations",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredValidations = @(
"operator_confirmation",
"binary_validation",
"permission_validation",
"supervisor_validation",
"health_probe_validation",
"payload_gate_validation"
)
$remainingRequiredValidations = @()
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
function Test-ArrayEquals {
param([object[]]$Actual, [string[]]$Expected)
$actualValues = @($Actual | ForEach-Object { [string]$_ })
if ($actualValues.Count -ne $Expected.Count) { return $false }
foreach ($item in $Expected) {
if ($actualValues -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z102-remote-workspace-real-adapter-runtime-gate-payload-gate-validation-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$payloadGateValidation = Get-PropertyValue -Item $sourceResult -Name "runtime_gate_payload_gate_validation" -Default $null
$guardrails = Get-PropertyValue -Item $payloadGateValidation -Name "guardrail_summary" -Default $null
$closeout = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_runtime_gate_validation_closeout.v1"
source_payload_gate_validation_schema = Get-PropertyValue -Item $payloadGateValidation -Name "schema_version" -Default $null
phase_name = "explicit_real_runtime_gate_enablement_validation"
validation_chain_status = "complete_contract_only"
enablement_boundary = "explicit_operator_enablement_required"
enablement_status = "not_enabled"
required_validations = $requiredValidations
remaining_required_validations = $remainingRequiredValidations
runtime_gate_state = "validated_contract_only_not_enabled"
runtime_effect = "contract_only_no_runtime_enablement"
operator_default_action = Get-PropertyValue -Item $payloadGateValidation -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$requiredValidationsCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $closeout -Name "required_validations" -Default @()) -Required $requiredValidations
$remainingValidationsCompatible = Test-ArrayEquals -Actual @(Get-PropertyValue -Item $closeout -Name "remaining_required_validations" -Default @()) -Expected $remainingRequiredValidations
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_validation_closeout.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_payload_gate_validation_schema" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_payload_gate_validation.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "phase_name" -Default "") -eq "explicit_real_runtime_gate_enablement_validation" -and
[string](Get-PropertyValue -Item $closeout -Name "validation_chain_status" -Default "") -eq "complete_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z102.remote_workspace_real_adapter_runtime_gate_payload_gate_validation_compatibility_smoke.v1")
payload_gate_validation_present = ($null -ne $payloadGateValidation)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
required_validations_compatible = $requiredValidationsCompatible
remaining_validations_compatible = $remainingValidationsCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z103.remote_workspace_real_adapter_runtime_gate_validation_closeout_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_validations = $requiredValidations
remaining_required_validations = $remainingRequiredValidations
required_guardrail_fields = $requiredGuardrailFields
runtime_gate_validation_closeout = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z103 remote workspace real-adapter runtime gate validation closeout smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z103 remote workspace real-adapter runtime gate validation closeout smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,163 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z104-remote-workspace-real-adapter-runtime-gate-validation-closeout-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z104-remote-workspace-real-adapter-runtime-gate-validation-closeout-source-result.json"
$requiredCloseoutFields = @(
"schema_version",
"source_payload_gate_validation_schema",
"phase_name",
"validation_chain_status",
"enablement_boundary",
"enablement_status",
"required_validations",
"remaining_required_validations",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredValidations = @(
"operator_confirmation",
"binary_validation",
"permission_validation",
"supervisor_validation",
"health_probe_validation",
"payload_gate_validation"
)
$remainingRequiredValidations = @()
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
function Test-ArrayEquals {
param([object[]]$Actual, [string[]]$Expected)
$actualValues = @($Actual | ForEach-Object { [string]$_ })
if ($actualValues.Count -ne $Expected.Count) { return $false }
foreach ($item in $Expected) {
if ($actualValues -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z103-remote-workspace-real-adapter-runtime-gate-validation-closeout-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "runtime_gate_validation_closeout" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$requiredValidationsCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $closeout -Name "required_validations" -Default @()) -Required $requiredValidations
$remainingValidationsCompatible = Test-ArrayEquals -Actual @(Get-PropertyValue -Item $closeout -Name "remaining_required_validations" -Default @()) -Expected $remainingRequiredValidations
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_validation_closeout.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_payload_gate_validation_schema" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_payload_gate_validation.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "phase_name" -Default "") -eq "explicit_real_runtime_gate_enablement_validation" -and
[string](Get-PropertyValue -Item $closeout -Name "validation_chain_status" -Default "") -eq "complete_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z103.remote_workspace_real_adapter_runtime_gate_validation_closeout_smoke.v1")
closeout_present = ($null -ne $closeout)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
required_validations_compatible = $requiredValidationsCompatible
remaining_validations_compatible = $remainingValidationsCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z104.remote_workspace_real_adapter_runtime_gate_validation_closeout_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_validations = $requiredValidations
remaining_required_validations = $remainingRequiredValidations
required_guardrail_fields = $requiredGuardrailFields
runtime_gate_validation_closeout = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z104 remote workspace real-adapter runtime gate validation closeout compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z104 remote workspace real-adapter runtime gate validation closeout compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,177 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z105-remote-workspace-real-adapter-operator-enablement-readiness-package-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z105-remote-workspace-real-adapter-operator-enablement-readiness-package-source-result.json"
$requiredPackageFields = @(
"schema_version",
"source_closeout_schema",
"package_status",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"included_contracts",
"required_operator_actions",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$includedContracts = @(
"operator_confirmation_validation",
"binary_validation",
"permission_validation",
"supervisor_validation",
"health_probe_validation",
"payload_gate_validation",
"validation_closeout"
)
$requiredOperatorActions = @(
"review_validation_closeout",
"confirm_real_runtime_enablement_intent",
"select_runtime_targets",
"approve_process_start",
"approve_payload_traffic"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z104-remote-workspace-real-adapter-runtime-gate-validation-closeout-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "runtime_gate_validation_closeout" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$package = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_enablement_readiness_package.v1"
source_closeout_schema = Get-PropertyValue -Item $closeout -Name "schema_version" -Default $null
package_status = "ready_for_operator_review"
operator_review_status = "not_reviewed"
enablement_boundary = "explicit_operator_enablement_required"
enablement_status = "not_enabled"
included_contracts = $includedContracts
required_operator_actions = $requiredOperatorActions
runtime_gate_state = Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$packageFieldsCompatible = Test-ObjectHasFields -Item $package -Fields $requiredPackageFields
$includedContractsCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $package -Name "included_contracts" -Default @()) -Required $includedContracts
$operatorActionsCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $package -Name "required_operator_actions" -Default @()) -Required $requiredOperatorActions
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $package -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package.v1" -and
[string](Get-PropertyValue -Item $package -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_validation_closeout.v1" -and
[string](Get-PropertyValue -Item $package -Name "package_status" -Default "") -eq "ready_for_operator_review" -and
[string](Get-PropertyValue -Item $package -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $package -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $package -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $package -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $package -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $package -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $package -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $package -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z104.remote_workspace_real_adapter_runtime_gate_validation_closeout_compatibility_smoke.v1")
closeout_present = ($null -ne $closeout)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
included_contracts_compatible = $includedContractsCompatible
operator_actions_compatible = $operatorActionsCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z105.remote_workspace_real_adapter_operator_enablement_readiness_package_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
included_contracts = $includedContracts
required_operator_actions = $requiredOperatorActions
required_guardrail_fields = $requiredGuardrailFields
operator_enablement_readiness_package = $package
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z105 remote workspace real-adapter operator enablement readiness package smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z105 remote workspace real-adapter operator enablement readiness package smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,160 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z106-remote-workspace-real-adapter-operator-enablement-readiness-package-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z106-remote-workspace-real-adapter-operator-enablement-readiness-package-source-result.json"
$requiredPackageFields = @(
"schema_version",
"source_closeout_schema",
"package_status",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"included_contracts",
"required_operator_actions",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$includedContracts = @(
"operator_confirmation_validation",
"binary_validation",
"permission_validation",
"supervisor_validation",
"health_probe_validation",
"payload_gate_validation",
"validation_closeout"
)
$requiredOperatorActions = @(
"review_validation_closeout",
"confirm_real_runtime_enablement_intent",
"select_runtime_targets",
"approve_process_start",
"approve_payload_traffic"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z105-remote-workspace-real-adapter-operator-enablement-readiness-package-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$package = Get-PropertyValue -Item $sourceResult -Name "operator_enablement_readiness_package" -Default $null
$guardrails = Get-PropertyValue -Item $package -Name "guardrail_summary" -Default $null
$packageFieldsCompatible = Test-ObjectHasFields -Item $package -Fields $requiredPackageFields
$includedContractsCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $package -Name "included_contracts" -Default @()) -Required $includedContracts
$operatorActionsCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $package -Name "required_operator_actions" -Default @()) -Required $requiredOperatorActions
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $package -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package.v1" -and
[string](Get-PropertyValue -Item $package -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_runtime_gate_validation_closeout.v1" -and
[string](Get-PropertyValue -Item $package -Name "package_status" -Default "") -eq "ready_for_operator_review" -and
[string](Get-PropertyValue -Item $package -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $package -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $package -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $package -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $package -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $package -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $package -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $package -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z105.remote_workspace_real_adapter_operator_enablement_readiness_package_smoke.v1")
package_present = ($null -ne $package)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
included_contracts_compatible = $includedContractsCompatible
operator_actions_compatible = $operatorActionsCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z106.remote_workspace_real_adapter_operator_enablement_readiness_package_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
included_contracts = $includedContracts
required_operator_actions = $requiredOperatorActions
required_guardrail_fields = $requiredGuardrailFields
operator_enablement_readiness_package = $package
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z106 remote workspace real-adapter operator enablement readiness package compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z106 remote workspace real-adapter operator enablement readiness package compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,145 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z107-remote-workspace-real-adapter-operator-enablement-readiness-release-marker-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z107-remote-workspace-real-adapter-operator-enablement-readiness-release-marker-source-result.json"
$requiredReleaseFields = @(
"schema_version",
"source_package_schema",
"release_status",
"release_marker",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z106-remote-workspace-real-adapter-operator-enablement-readiness-package-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$package = Get-PropertyValue -Item $sourceResult -Name "operator_enablement_readiness_package" -Default $null
$guardrails = Get-PropertyValue -Item $package -Name "guardrail_summary" -Default $null
$releaseMarker = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_enablement_readiness_release_marker.v1"
source_package_schema = Get-PropertyValue -Item $package -Name "schema_version" -Default $null
release_status = "operator_readiness_package_contract_only"
release_marker = "c19z107_real_adapter_operator_enablement_readiness_contract_only"
operator_review_status = Get-PropertyValue -Item $package -Name "operator_review_status" -Default $null
enablement_boundary = Get-PropertyValue -Item $package -Name "enablement_boundary" -Default $null
enablement_status = Get-PropertyValue -Item $package -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $package -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $package -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $package -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$releaseFieldsCompatible = Test-ObjectHasFields -Item $releaseMarker -Fields $requiredReleaseFields
$releaseValuesCompatible = (
[string](Get-PropertyValue -Item $releaseMarker -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_release_marker.v1" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "source_package_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package.v1" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "release_status" -Default "") -eq "operator_readiness_package_contract_only" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "release_marker" -Default "") -eq "c19z107_real_adapter_operator_enablement_readiness_contract_only" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $releaseMarker -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $releaseMarker -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $releaseMarker -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z106.remote_workspace_real_adapter_operator_enablement_readiness_package_compatibility_smoke.v1")
package_present = ($null -ne $package)
release_fields_compatible = $releaseFieldsCompatible
release_values_compatible = $releaseValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z107.remote_workspace_real_adapter_operator_enablement_readiness_release_marker_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_release_fields = $requiredReleaseFields
required_guardrail_fields = $requiredGuardrailFields
operator_enablement_readiness_release_marker = $releaseMarker
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z107 remote workspace real-adapter operator enablement readiness release marker smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z107 remote workspace real-adapter operator enablement readiness release marker smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,129 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z108-remote-workspace-real-adapter-operator-enablement-readiness-release-marker-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z108-remote-workspace-real-adapter-operator-enablement-readiness-release-marker-source-result.json"
$requiredReleaseFields = @(
"schema_version",
"source_package_schema",
"release_status",
"release_marker",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z107-remote-workspace-real-adapter-operator-enablement-readiness-release-marker-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$marker = Get-PropertyValue -Item $sourceResult -Name "operator_enablement_readiness_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $marker -Name "guardrail_summary" -Default $null
$releaseFieldsCompatible = Test-ObjectHasFields -Item $marker -Fields $requiredReleaseFields
$releaseValuesCompatible = (
[string](Get-PropertyValue -Item $marker -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_release_marker.v1" -and
[string](Get-PropertyValue -Item $marker -Name "source_package_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package.v1" -and
[string](Get-PropertyValue -Item $marker -Name "release_status" -Default "") -eq "operator_readiness_package_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "release_marker" -Default "") -eq "c19z107_real_adapter_operator_enablement_readiness_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $marker -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z107.remote_workspace_real_adapter_operator_enablement_readiness_release_marker_smoke.v1")
release_marker_present = ($null -ne $marker)
release_fields_compatible = $releaseFieldsCompatible
release_values_compatible = $releaseValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z108.remote_workspace_real_adapter_operator_enablement_readiness_release_marker_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_release_fields = $requiredReleaseFields
required_guardrail_fields = $requiredGuardrailFields
operator_enablement_readiness_release_marker = $marker
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z108 remote workspace real-adapter operator enablement readiness release marker compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z108 remote workspace real-adapter operator enablement readiness release marker compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,175 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z109-remote-workspace-real-adapter-operator-enablement-readiness-package-index-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z109-remote-workspace-real-adapter-operator-enablement-readiness-package-index-source-result.json"
$requiredPackageFields = @(
"schema_version",
"source_release_marker_schema",
"package_status",
"package_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"closeout_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCloseoutNotes = @(
"operator_enablement_readiness_package_indexed",
"operator_review_not_started",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z108-remote-workspace-real-adapter-operator-enablement-readiness-release-marker-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$marker = Get-PropertyValue -Item $sourceResult -Name "operator_enablement_readiness_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $marker -Name "guardrail_summary" -Default $null
$packageIndex = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_enablement_readiness_package_index.v1"
source_release_marker_schema = Get-PropertyValue -Item $marker -Name "schema_version" -Default $null
package_status = "indexed_contract_only"
package_marker = "c19z109_real_adapter_operator_enablement_readiness_package_index_contract_only"
covered_stage_range = "C19Z89-C19Z108"
covered_stage_count = 20
latest_compatibility_stage = "C19Z108"
operator_review_status = Get-PropertyValue -Item $marker -Name "operator_review_status" -Default $null
enablement_boundary = Get-PropertyValue -Item $marker -Name "enablement_boundary" -Default $null
enablement_status = Get-PropertyValue -Item $marker -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $marker -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $marker -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $marker -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
closeout_notes = $requiredCloseoutNotes
}
$packageFieldsCompatible = Test-ObjectHasFields -Item $packageIndex -Fields $requiredPackageFields
$closeoutNotesCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $packageIndex -Name "closeout_notes" -Default @()) -Required $requiredCloseoutNotes
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package_index.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "source_release_marker_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_release_marker.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_status" -Default "") -eq "indexed_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_marker" -Default "") -eq "c19z109_real_adapter_operator_enablement_readiness_package_index_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "covered_stage_range" -Default "") -eq "C19Z89-C19Z108" -and
[int](Get-PropertyValue -Item $packageIndex -Name "covered_stage_count" -Default -1) -eq 20 -and
[string](Get-PropertyValue -Item $packageIndex -Name "latest_compatibility_stage" -Default "") -eq "C19Z108" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z108.remote_workspace_real_adapter_operator_enablement_readiness_release_marker_compatibility_smoke.v1")
release_marker_present = ($null -ne $marker)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
closeout_notes_compatible = $closeoutNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z109.remote_workspace_real_adapter_operator_enablement_readiness_package_index_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
required_guardrail_fields = $requiredGuardrailFields
required_closeout_notes = $requiredCloseoutNotes
operator_enablement_readiness_package_index = $packageIndex
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z109 remote workspace real-adapter operator enablement readiness package index smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z109 remote workspace real-adapter operator enablement readiness package index smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,87 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z11-remote-workspace-mailbox-preflight-checklist-status-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z11-remote-workspace-mailbox-preflight-checklist-status-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ChecklistStatus {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
$counts = Get-PropertyValue -Item $rollup -Name "remediation_checklist_counts" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $rollup -Name "operator_status" -Default "") -eq "resync_required" -and
[string](Get-PropertyValue -Item $rollup -Name "remediation_checklist_status" -Default "") -eq "action_required" -and
[string](Get-PropertyValue -Item $counts -Name "status" -Default "") -eq "action_required" -and
[int](Get-PropertyValue -Item $counts -Name "total_count" -Default -1) -eq 3 -and
[int](Get-PropertyValue -Item $counts -Name "required_count" -Default -1) -eq 3 -and
[int](Get-PropertyValue -Item $counts -Name "satisfied_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $counts -Name "pending_count" -Default -1) -eq 3
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z10-remote-workspace-mailbox-preflight-checklist-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_checklist_status_visible = (Test-ChecklistStatus -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_checklist_status_visible = (Test-ChecklistStatus -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z11.remote_workspace_mailbox_preflight_checklist_status_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z11 remote workspace mailbox preflight checklist status smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z11 remote workspace mailbox preflight checklist status smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,156 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z110-remote-workspace-real-adapter-operator-enablement-readiness-package-index-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z110-remote-workspace-real-adapter-operator-enablement-readiness-package-index-source-result.json"
$requiredPackageFields = @(
"schema_version",
"source_release_marker_schema",
"package_status",
"package_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"closeout_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCloseoutNotes = @(
"operator_enablement_readiness_package_indexed",
"operator_review_not_started",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z109-remote-workspace-real-adapter-operator-enablement-readiness-package-index-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$packageIndex = Get-PropertyValue -Item $sourceResult -Name "operator_enablement_readiness_package_index" -Default $null
$guardrails = Get-PropertyValue -Item $packageIndex -Name "guardrail_summary" -Default $null
$closeoutNotes = @(Get-PropertyValue -Item $packageIndex -Name "closeout_notes" -Default @())
$packageFieldsCompatible = Test-ObjectHasFields -Item $packageIndex -Fields $requiredPackageFields
$closeoutNotesCompatible = Test-ArrayContainsAll -Actual $closeoutNotes -Required $requiredCloseoutNotes
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package_index.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "source_release_marker_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_release_marker.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_status" -Default "") -eq "indexed_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_marker" -Default "") -eq "c19z109_real_adapter_operator_enablement_readiness_package_index_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "covered_stage_range" -Default "") -eq "C19Z89-C19Z108" -and
[int](Get-PropertyValue -Item $packageIndex -Name "covered_stage_count" -Default -1) -eq 20 -and
[string](Get-PropertyValue -Item $packageIndex -Name "latest_compatibility_stage" -Default "") -eq "C19Z108" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z109.remote_workspace_real_adapter_operator_enablement_readiness_package_index_smoke.v1")
package_index_present = ($null -ne $packageIndex)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
closeout_notes_compatible = $closeoutNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z110.remote_workspace_real_adapter_operator_enablement_readiness_package_index_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
required_guardrail_fields = $requiredGuardrailFields
required_closeout_notes = $requiredCloseoutNotes
operator_enablement_readiness_package_index = $packageIndex
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z110 remote workspace real-adapter operator enablement readiness package index compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z110 remote workspace real-adapter operator enablement readiness package index compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,157 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z111-remote-workspace-real-adapter-operator-readiness-closeout-summary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z111-remote-workspace-real-adapter-operator-readiness-closeout-summary-source-result.json"
$requiredCloseoutFields = @(
"schema_version",
"source_package_index_schema",
"closeout_status",
"closeout_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z110-remote-workspace-real-adapter-operator-enablement-readiness-package-index-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$packageIndex = Get-PropertyValue -Item $sourceResult -Name "operator_enablement_readiness_package_index" -Default $null
$guardrails = Get-PropertyValue -Item $packageIndex -Name "guardrail_summary" -Default $null
$closeout = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_readiness_closeout_summary.v1"
source_package_index_schema = Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default $null
closeout_status = "closed_contract_only_ready_for_operator_review"
closeout_marker = "c19z111_real_adapter_operator_readiness_closed_contract_only"
covered_stage_range = Get-PropertyValue -Item $packageIndex -Name "covered_stage_range" -Default $null
covered_stage_count = Get-PropertyValue -Item $packageIndex -Name "covered_stage_count" -Default $null
latest_compatibility_stage = Get-PropertyValue -Item $packageIndex -Name "latest_compatibility_stage" -Default $null
operator_review_status = Get-PropertyValue -Item $packageIndex -Name "operator_review_status" -Default $null
enablement_boundary = Get-PropertyValue -Item $packageIndex -Name "enablement_boundary" -Default $null
enablement_status = Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $packageIndex -Name "operator_default_action" -Default $null
next_required_phase = "explicit_operator_review_and_enablement_decision"
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_readiness_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_package_index_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package_index.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_status" -Default "") -eq "closed_contract_only_ready_for_operator_review" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_marker" -Default "") -eq "c19z111_real_adapter_operator_readiness_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "covered_stage_range" -Default "") -eq "C19Z89-C19Z108" -and
[int](Get-PropertyValue -Item $closeout -Name "covered_stage_count" -Default -1) -eq 20 -and
[string](Get-PropertyValue -Item $closeout -Name "latest_compatibility_stage" -Default "") -eq "C19Z108" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $closeout -Name "next_required_phase" -Default "") -eq "explicit_operator_review_and_enablement_decision" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z110.remote_workspace_real_adapter_operator_enablement_readiness_package_index_compatibility_smoke.v1")
package_index_present = ($null -ne $packageIndex)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z111.remote_workspace_real_adapter_operator_readiness_closeout_summary_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_guardrail_fields = $requiredGuardrailFields
operator_readiness_closeout_summary = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z111 remote workspace real-adapter operator readiness closeout summary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z111 remote workspace real-adapter operator readiness closeout summary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,137 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z112-remote-workspace-real-adapter-operator-readiness-closeout-summary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z112-remote-workspace-real-adapter-operator-readiness-closeout-summary-source-result.json"
$requiredCloseoutFields = @(
"schema_version",
"source_package_index_schema",
"closeout_status",
"closeout_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z111-remote-workspace-real-adapter-operator-readiness-closeout-summary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "operator_readiness_closeout_summary" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_readiness_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_package_index_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_enablement_readiness_package_index.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_status" -Default "") -eq "closed_contract_only_ready_for_operator_review" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_marker" -Default "") -eq "c19z111_real_adapter_operator_readiness_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "covered_stage_range" -Default "") -eq "C19Z89-C19Z108" -and
[int](Get-PropertyValue -Item $closeout -Name "covered_stage_count" -Default -1) -eq 20 -and
[string](Get-PropertyValue -Item $closeout -Name "latest_compatibility_stage" -Default "") -eq "C19Z108" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_review_status" -Default "") -eq "not_reviewed" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $closeout -Name "next_required_phase" -Default "") -eq "explicit_operator_review_and_enablement_decision" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z111.remote_workspace_real_adapter_operator_readiness_closeout_summary_smoke.v1")
closeout_summary_present = ($null -ne $closeout)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z112.remote_workspace_real_adapter_operator_readiness_closeout_summary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_guardrail_fields = $requiredGuardrailFields
operator_readiness_closeout_summary = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z112 remote workspace real-adapter operator readiness closeout summary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z112 remote workspace real-adapter operator readiness closeout summary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,172 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z113-remote-workspace-real-adapter-operator-review-decision-request-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z113-remote-workspace-real-adapter-operator-review-decision-request-source-result.json"
$requiredRequestFields = @(
"schema_version",
"source_closeout_schema",
"review_request_status",
"review_request_marker",
"requested_decision",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"decision_prerequisites",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$decisionPrerequisites = @(
"operator_reviews_closeout_summary",
"operator_confirms_real_runtime_enablement_intent",
"operator_selects_runtime_targets",
"operator_approves_process_start",
"operator_approves_payload_traffic"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z112-remote-workspace-real-adapter-operator-readiness-closeout-summary-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "operator_readiness_closeout_summary" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$request = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_review_decision_request.v1"
source_closeout_schema = Get-PropertyValue -Item $closeout -Name "schema_version" -Default $null
review_request_status = "pending_operator_decision"
review_request_marker = "c19z113_real_adapter_operator_review_decision_request_contract_only"
requested_decision = "review_real_runtime_enablement"
enablement_decision = "not_approved"
operator_review_status = "pending"
enablement_boundary = Get-PropertyValue -Item $closeout -Name "enablement_boundary" -Default $null
enablement_status = Get-PropertyValue -Item $closeout -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default $null
decision_prerequisites = $decisionPrerequisites
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$requestFieldsCompatible = Test-ObjectHasFields -Item $request -Fields $requiredRequestFields
$prerequisitesCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $request -Name "decision_prerequisites" -Default @()) -Required $decisionPrerequisites
$requestValuesCompatible = (
[string](Get-PropertyValue -Item $request -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_review_decision_request.v1" -and
[string](Get-PropertyValue -Item $request -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_readiness_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $request -Name "review_request_status" -Default "") -eq "pending_operator_decision" -and
[string](Get-PropertyValue -Item $request -Name "review_request_marker" -Default "") -eq "c19z113_real_adapter_operator_review_decision_request_contract_only" -and
[string](Get-PropertyValue -Item $request -Name "requested_decision" -Default "") -eq "review_real_runtime_enablement" -and
[string](Get-PropertyValue -Item $request -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $request -Name "operator_review_status" -Default "") -eq "pending" -and
[string](Get-PropertyValue -Item $request -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $request -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $request -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $request -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $request -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $request -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $request -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z112.remote_workspace_real_adapter_operator_readiness_closeout_summary_compatibility_smoke.v1")
closeout_summary_present = ($null -ne $closeout)
request_fields_compatible = $requestFieldsCompatible
request_values_compatible = $requestValuesCompatible
prerequisites_compatible = $prerequisitesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z113.remote_workspace_real_adapter_operator_review_decision_request_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_request_fields = $requiredRequestFields
decision_prerequisites = $decisionPrerequisites
required_guardrail_fields = $requiredGuardrailFields
operator_review_decision_request = $request
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z113 remote workspace real-adapter operator review decision request smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z113 remote workspace real-adapter operator review decision request smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,153 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z114-remote-workspace-real-adapter-operator-review-decision-request-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z114-remote-workspace-real-adapter-operator-review-decision-request-source-result.json"
$requiredRequestFields = @(
"schema_version",
"source_closeout_schema",
"review_request_status",
"review_request_marker",
"requested_decision",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"decision_prerequisites",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$decisionPrerequisites = @(
"operator_reviews_closeout_summary",
"operator_confirms_real_runtime_enablement_intent",
"operator_selects_runtime_targets",
"operator_approves_process_start",
"operator_approves_payload_traffic"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z113-remote-workspace-real-adapter-operator-review-decision-request-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$request = Get-PropertyValue -Item $sourceResult -Name "operator_review_decision_request" -Default $null
$guardrails = Get-PropertyValue -Item $request -Name "guardrail_summary" -Default $null
$requestFieldsCompatible = Test-ObjectHasFields -Item $request -Fields $requiredRequestFields
$prerequisitesCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $request -Name "decision_prerequisites" -Default @()) -Required $decisionPrerequisites
$requestValuesCompatible = (
[string](Get-PropertyValue -Item $request -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_review_decision_request.v1" -and
[string](Get-PropertyValue -Item $request -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_readiness_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $request -Name "review_request_status" -Default "") -eq "pending_operator_decision" -and
[string](Get-PropertyValue -Item $request -Name "review_request_marker" -Default "") -eq "c19z113_real_adapter_operator_review_decision_request_contract_only" -and
[string](Get-PropertyValue -Item $request -Name "requested_decision" -Default "") -eq "review_real_runtime_enablement" -and
[string](Get-PropertyValue -Item $request -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $request -Name "operator_review_status" -Default "") -eq "pending" -and
[string](Get-PropertyValue -Item $request -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $request -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $request -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $request -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $request -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $request -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $request -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z113.remote_workspace_real_adapter_operator_review_decision_request_smoke.v1")
decision_request_present = ($null -ne $request)
request_fields_compatible = $requestFieldsCompatible
request_values_compatible = $requestValuesCompatible
prerequisites_compatible = $prerequisitesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z114.remote_workspace_real_adapter_operator_review_decision_request_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_request_fields = $requiredRequestFields
decision_prerequisites = $decisionPrerequisites
required_guardrail_fields = $requiredGuardrailFields
operator_review_decision_request = $request
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z114 remote workspace real-adapter operator review decision request compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z114 remote workspace real-adapter operator review decision request compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,154 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z115-remote-workspace-real-adapter-operator-decision-status-summary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z115-remote-workspace-real-adapter-operator-decision-status-summary-source-result.json"
$requiredSummaryFields = @(
"schema_version",
"source_decision_request_schema",
"decision_status",
"decision_summary_marker",
"requested_decision",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z114-remote-workspace-real-adapter-operator-review-decision-request-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$request = Get-PropertyValue -Item $sourceResult -Name "operator_review_decision_request" -Default $null
$guardrails = Get-PropertyValue -Item $request -Name "guardrail_summary" -Default $null
$summary = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_decision_status_summary.v1"
source_decision_request_schema = Get-PropertyValue -Item $request -Name "schema_version" -Default $null
decision_status = "pending_not_approved"
decision_summary_marker = "c19z115_real_adapter_operator_decision_status_pending_contract_only"
requested_decision = Get-PropertyValue -Item $request -Name "requested_decision" -Default $null
enablement_decision = Get-PropertyValue -Item $request -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $request -Name "operator_review_status" -Default $null
enablement_boundary = Get-PropertyValue -Item $request -Name "enablement_boundary" -Default $null
enablement_status = Get-PropertyValue -Item $request -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $request -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $request -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $request -Name "operator_default_action" -Default $null
next_required_phase = "explicit_operator_approval_or_rejection"
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$summaryFieldsCompatible = Test-ObjectHasFields -Item $summary -Fields $requiredSummaryFields
$summaryValuesCompatible = (
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_decision_status_summary.v1" -and
[string](Get-PropertyValue -Item $summary -Name "source_decision_request_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_review_decision_request.v1" -and
[string](Get-PropertyValue -Item $summary -Name "decision_status" -Default "") -eq "pending_not_approved" -and
[string](Get-PropertyValue -Item $summary -Name "decision_summary_marker" -Default "") -eq "c19z115_real_adapter_operator_decision_status_pending_contract_only" -and
[string](Get-PropertyValue -Item $summary -Name "requested_decision" -Default "") -eq "review_real_runtime_enablement" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $summary -Name "operator_review_status" -Default "") -eq "pending" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $summary -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $summary -Name "next_required_phase" -Default "") -eq "explicit_operator_approval_or_rejection" -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z114.remote_workspace_real_adapter_operator_review_decision_request_compatibility_smoke.v1")
decision_request_present = ($null -ne $request)
summary_fields_compatible = $summaryFieldsCompatible
summary_values_compatible = $summaryValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z115.remote_workspace_real_adapter_operator_decision_status_summary_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_summary_fields = $requiredSummaryFields
required_guardrail_fields = $requiredGuardrailFields
operator_decision_status_summary = $summary
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z115 remote workspace real-adapter operator decision status summary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z115 remote workspace real-adapter operator decision status summary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,135 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z116-remote-workspace-real-adapter-operator-decision-status-summary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z116-remote-workspace-real-adapter-operator-decision-status-summary-source-result.json"
$requiredSummaryFields = @(
"schema_version",
"source_decision_request_schema",
"decision_status",
"decision_summary_marker",
"requested_decision",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z115-remote-workspace-real-adapter-operator-decision-status-summary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$summary = Get-PropertyValue -Item $sourceResult -Name "operator_decision_status_summary" -Default $null
$guardrails = Get-PropertyValue -Item $summary -Name "guardrail_summary" -Default $null
$summaryFieldsCompatible = Test-ObjectHasFields -Item $summary -Fields $requiredSummaryFields
$summaryValuesCompatible = (
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_decision_status_summary.v1" -and
[string](Get-PropertyValue -Item $summary -Name "source_decision_request_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_review_decision_request.v1" -and
[string](Get-PropertyValue -Item $summary -Name "decision_status" -Default "") -eq "pending_not_approved" -and
[string](Get-PropertyValue -Item $summary -Name "decision_summary_marker" -Default "") -eq "c19z115_real_adapter_operator_decision_status_pending_contract_only" -and
[string](Get-PropertyValue -Item $summary -Name "requested_decision" -Default "") -eq "review_real_runtime_enablement" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $summary -Name "operator_review_status" -Default "") -eq "pending" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $summary -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $summary -Name "next_required_phase" -Default "") -eq "explicit_operator_approval_or_rejection" -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z115.remote_workspace_real_adapter_operator_decision_status_summary_smoke.v1")
decision_status_summary_present = ($null -ne $summary)
summary_fields_compatible = $summaryFieldsCompatible
summary_values_compatible = $summaryValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z116.remote_workspace_real_adapter_operator_decision_status_summary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_summary_fields = $requiredSummaryFields
required_guardrail_fields = $requiredGuardrailFields
operator_decision_status_summary = $summary
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z116 remote workspace real-adapter operator decision status summary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z116 remote workspace real-adapter operator decision status summary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,154 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z117-remote-workspace-real-adapter-operator-approval-rejection-outcome-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z117-remote-workspace-real-adapter-operator-approval-rejection-outcome-source-result.json"
$requiredOutcomeFields = @(
"schema_version",
"source_decision_status_schema",
"outcome_status",
"outcome_marker",
"requested_decision",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z116-remote-workspace-real-adapter-operator-decision-status-summary-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$summary = Get-PropertyValue -Item $sourceResult -Name "operator_decision_status_summary" -Default $null
$guardrails = Get-PropertyValue -Item $summary -Name "guardrail_summary" -Default $null
$outcome = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_approval_rejection_outcome.v1"
source_decision_status_schema = Get-PropertyValue -Item $summary -Name "schema_version" -Default $null
outcome_status = "rejected_or_not_approved_contract_only"
outcome_marker = "c19z117_real_adapter_operator_outcome_not_approved_contract_only"
requested_decision = Get-PropertyValue -Item $summary -Name "requested_decision" -Default $null
enablement_decision = "not_approved"
operator_review_status = "closed_without_approval"
enablement_boundary = Get-PropertyValue -Item $summary -Name "enablement_boundary" -Default $null
enablement_status = Get-PropertyValue -Item $summary -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $summary -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $summary -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $summary -Name "operator_default_action" -Default $null
next_required_phase = "explicit_operator_reopen_or_new_enablement_request"
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$outcomeFieldsCompatible = Test-ObjectHasFields -Item $outcome -Fields $requiredOutcomeFields
$outcomeValuesCompatible = (
[string](Get-PropertyValue -Item $outcome -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_approval_rejection_outcome.v1" -and
[string](Get-PropertyValue -Item $outcome -Name "source_decision_status_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_decision_status_summary.v1" -and
[string](Get-PropertyValue -Item $outcome -Name "outcome_status" -Default "") -eq "rejected_or_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $outcome -Name "outcome_marker" -Default "") -eq "c19z117_real_adapter_operator_outcome_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $outcome -Name "requested_decision" -Default "") -eq "review_real_runtime_enablement" -and
[string](Get-PropertyValue -Item $outcome -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $outcome -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $outcome -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $outcome -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $outcome -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $outcome -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $outcome -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $outcome -Name "next_required_phase" -Default "") -eq "explicit_operator_reopen_or_new_enablement_request" -and
-not [bool](Get-PropertyValue -Item $outcome -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $outcome -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z116.remote_workspace_real_adapter_operator_decision_status_summary_compatibility_smoke.v1")
decision_status_summary_present = ($null -ne $summary)
outcome_fields_compatible = $outcomeFieldsCompatible
outcome_values_compatible = $outcomeValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z117.remote_workspace_real_adapter_operator_approval_rejection_outcome_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_outcome_fields = $requiredOutcomeFields
required_guardrail_fields = $requiredGuardrailFields
operator_approval_rejection_outcome = $outcome
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z117 remote workspace real-adapter operator approval rejection outcome smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z117 remote workspace real-adapter operator approval rejection outcome smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,135 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z118-remote-workspace-real-adapter-operator-approval-rejection-outcome-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z118-remote-workspace-real-adapter-operator-approval-rejection-outcome-source-result.json"
$requiredOutcomeFields = @(
"schema_version",
"source_decision_status_schema",
"outcome_status",
"outcome_marker",
"requested_decision",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z117-remote-workspace-real-adapter-operator-approval-rejection-outcome-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$outcome = Get-PropertyValue -Item $sourceResult -Name "operator_approval_rejection_outcome" -Default $null
$guardrails = Get-PropertyValue -Item $outcome -Name "guardrail_summary" -Default $null
$outcomeFieldsCompatible = Test-ObjectHasFields -Item $outcome -Fields $requiredOutcomeFields
$outcomeValuesCompatible = (
[string](Get-PropertyValue -Item $outcome -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_approval_rejection_outcome.v1" -and
[string](Get-PropertyValue -Item $outcome -Name "source_decision_status_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_decision_status_summary.v1" -and
[string](Get-PropertyValue -Item $outcome -Name "outcome_status" -Default "") -eq "rejected_or_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $outcome -Name "outcome_marker" -Default "") -eq "c19z117_real_adapter_operator_outcome_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $outcome -Name "requested_decision" -Default "") -eq "review_real_runtime_enablement" -and
[string](Get-PropertyValue -Item $outcome -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $outcome -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $outcome -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $outcome -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $outcome -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $outcome -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $outcome -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $outcome -Name "next_required_phase" -Default "") -eq "explicit_operator_reopen_or_new_enablement_request" -and
-not [bool](Get-PropertyValue -Item $outcome -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $outcome -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z117.remote_workspace_real_adapter_operator_approval_rejection_outcome_smoke.v1")
outcome_present = ($null -ne $outcome)
outcome_fields_compatible = $outcomeFieldsCompatible
outcome_values_compatible = $outcomeValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z118.remote_workspace_real_adapter_operator_approval_rejection_outcome_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_outcome_fields = $requiredOutcomeFields
required_guardrail_fields = $requiredGuardrailFields
operator_approval_rejection_outcome = $outcome
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z118 remote workspace real-adapter operator approval rejection outcome compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z118 remote workspace real-adapter operator approval rejection outcome compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,157 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z119-remote-workspace-real-adapter-operator-outcome-closeout-reopen-boundary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z119-remote-workspace-real-adapter-operator-outcome-closeout-reopen-boundary-source-result.json"
$requiredBoundaryFields = @(
"schema_version",
"source_outcome_schema",
"boundary_status",
"boundary_marker",
"closed_outcome_status",
"reopen_policy",
"next_required_phase",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z118-remote-workspace-real-adapter-operator-approval-rejection-outcome-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$outcome = Get-PropertyValue -Item $sourceResult -Name "operator_approval_rejection_outcome" -Default $null
$guardrails = Get-PropertyValue -Item $outcome -Name "guardrail_summary" -Default $null
$boundary = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary.v1"
source_outcome_schema = Get-PropertyValue -Item $outcome -Name "schema_version" -Default $null
boundary_status = "closed_not_approved_reopen_required"
boundary_marker = "c19z119_real_adapter_operator_outcome_closeout_reopen_required"
closed_outcome_status = Get-PropertyValue -Item $outcome -Name "outcome_status" -Default $null
reopen_policy = "new_explicit_enablement_request_required"
next_required_phase = "explicit_operator_reopen_or_new_enablement_request"
enablement_decision = Get-PropertyValue -Item $outcome -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $outcome -Name "operator_review_status" -Default $null
enablement_boundary = Get-PropertyValue -Item $outcome -Name "enablement_boundary" -Default $null
enablement_status = Get-PropertyValue -Item $outcome -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $outcome -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $outcome -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $outcome -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$boundaryFieldsCompatible = Test-ObjectHasFields -Item $boundary -Fields $requiredBoundaryFields
$boundaryValuesCompatible = (
[string](Get-PropertyValue -Item $boundary -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary.v1" -and
[string](Get-PropertyValue -Item $boundary -Name "source_outcome_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_approval_rejection_outcome.v1" -and
[string](Get-PropertyValue -Item $boundary -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $boundary -Name "boundary_marker" -Default "") -eq "c19z119_real_adapter_operator_outcome_closeout_reopen_required" -and
[string](Get-PropertyValue -Item $boundary -Name "closed_outcome_status" -Default "") -eq "rejected_or_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $boundary -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $boundary -Name "next_required_phase" -Default "") -eq "explicit_operator_reopen_or_new_enablement_request" -and
[string](Get-PropertyValue -Item $boundary -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $boundary -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $boundary -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $boundary -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $boundary -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $boundary -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $boundary -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $boundary -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $boundary -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z118.remote_workspace_real_adapter_operator_approval_rejection_outcome_compatibility_smoke.v1")
outcome_present = ($null -ne $outcome)
boundary_fields_compatible = $boundaryFieldsCompatible
boundary_values_compatible = $boundaryValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z119.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_boundary_fields = $requiredBoundaryFields
required_guardrail_fields = $requiredGuardrailFields
operator_outcome_closeout_reopen_boundary = $boundary
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z119 remote workspace real-adapter operator outcome closeout reopen boundary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z119 remote workspace real-adapter operator outcome closeout reopen boundary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,89 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z12-remote-workspace-mailbox-preflight-status-counts-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z12-remote-workspace-mailbox-preflight-status-counts-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-StatusCounts {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
$readinessStatusCounts = Get-PropertyValue -Item $readiness -Name "mailbox_preflight_operator_status_counts" -Default $null
$readinessSeverityCounts = Get-PropertyValue -Item $readiness -Name "mailbox_preflight_operator_severity_counts" -Default $null
$rollupStatusCounts = Get-PropertyValue -Item $rollup -Name "operator_status_counts" -Default $null
$rollupSeverityCounts = Get-PropertyValue -Item $rollup -Name "operator_severity_counts" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $rollup -Name "operator_status" -Default "") -eq "resync_required" -and
[string](Get-PropertyValue -Item $rollup -Name "operator_severity" -Default "") -eq "warn" -and
[int64](Get-PropertyValue -Item $readinessStatusCounts -Name "resync_required" -Default 0) -ge 1 -and
[int64](Get-PropertyValue -Item $readinessSeverityCounts -Name "warn" -Default 0) -ge 1 -and
[int64](Get-PropertyValue -Item $rollupStatusCounts -Name "resync_required" -Default 0) -ge 1 -and
[int64](Get-PropertyValue -Item $rollupSeverityCounts -Name "warn" -Default 0) -ge 1
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z11-remote-workspace-mailbox-preflight-checklist-status-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_status_counts_visible = (Test-StatusCounts -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_status_counts_visible = (Test-StatusCounts -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z12.remote_workspace_mailbox_preflight_status_counts_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z12 remote workspace mailbox preflight status counts smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z12 remote workspace mailbox preflight status counts smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,137 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z120-remote-workspace-real-adapter-operator-outcome-closeout-reopen-boundary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z120-remote-workspace-real-adapter-operator-outcome-closeout-reopen-boundary-source-result.json"
$requiredBoundaryFields = @(
"schema_version",
"source_outcome_schema",
"boundary_status",
"boundary_marker",
"closed_outcome_status",
"reopen_policy",
"next_required_phase",
"enablement_decision",
"operator_review_status",
"enablement_boundary",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z119-remote-workspace-real-adapter-operator-outcome-closeout-reopen-boundary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$boundary = Get-PropertyValue -Item $sourceResult -Name "operator_outcome_closeout_reopen_boundary" -Default $null
$guardrails = Get-PropertyValue -Item $boundary -Name "guardrail_summary" -Default $null
$boundaryFieldsCompatible = Test-ObjectHasFields -Item $boundary -Fields $requiredBoundaryFields
$boundaryValuesCompatible = (
[string](Get-PropertyValue -Item $boundary -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary.v1" -and
[string](Get-PropertyValue -Item $boundary -Name "source_outcome_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_approval_rejection_outcome.v1" -and
[string](Get-PropertyValue -Item $boundary -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $boundary -Name "boundary_marker" -Default "") -eq "c19z119_real_adapter_operator_outcome_closeout_reopen_required" -and
[string](Get-PropertyValue -Item $boundary -Name "closed_outcome_status" -Default "") -eq "rejected_or_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $boundary -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $boundary -Name "next_required_phase" -Default "") -eq "explicit_operator_reopen_or_new_enablement_request" -and
[string](Get-PropertyValue -Item $boundary -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $boundary -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $boundary -Name "enablement_boundary" -Default "") -eq "explicit_operator_enablement_required" -and
[string](Get-PropertyValue -Item $boundary -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $boundary -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $boundary -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $boundary -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $boundary -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $boundary -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z119.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary_smoke.v1")
boundary_present = ($null -ne $boundary)
boundary_fields_compatible = $boundaryFieldsCompatible
boundary_values_compatible = $boundaryValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z120.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_boundary_fields = $requiredBoundaryFields
required_guardrail_fields = $requiredGuardrailFields
operator_outcome_closeout_reopen_boundary = $boundary
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z120 remote workspace real-adapter operator outcome closeout reopen boundary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z120 remote workspace real-adapter operator outcome closeout reopen boundary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,154 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z121-remote-workspace-real-adapter-not-approved-outcome-release-marker-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z121-remote-workspace-real-adapter-not-approved-outcome-release-marker-source-result.json"
$requiredReleaseFields = @(
"schema_version",
"source_boundary_schema",
"release_status",
"release_marker",
"boundary_status",
"closed_outcome_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z120-remote-workspace-real-adapter-operator-outcome-closeout-reopen-boundary-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$boundary = Get-PropertyValue -Item $sourceResult -Name "operator_outcome_closeout_reopen_boundary" -Default $null
$guardrails = Get-PropertyValue -Item $boundary -Name "guardrail_summary" -Default $null
$marker = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_release_marker.v1"
source_boundary_schema = Get-PropertyValue -Item $boundary -Name "schema_version" -Default $null
release_status = "not_approved_outcome_closed_contract_only"
release_marker = "c19z121_real_adapter_not_approved_outcome_release_marker"
boundary_status = Get-PropertyValue -Item $boundary -Name "boundary_status" -Default $null
closed_outcome_status = Get-PropertyValue -Item $boundary -Name "closed_outcome_status" -Default $null
reopen_policy = Get-PropertyValue -Item $boundary -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $boundary -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $boundary -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $boundary -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $boundary -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $boundary -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $boundary -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$releaseFieldsCompatible = Test-ObjectHasFields -Item $marker -Fields $requiredReleaseFields
$releaseValuesCompatible = (
[string](Get-PropertyValue -Item $marker -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_release_marker.v1" -and
[string](Get-PropertyValue -Item $marker -Name "source_boundary_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary.v1" -and
[string](Get-PropertyValue -Item $marker -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "release_marker" -Default "") -eq "c19z121_real_adapter_not_approved_outcome_release_marker" -and
[string](Get-PropertyValue -Item $marker -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $marker -Name "closed_outcome_status" -Default "") -eq "rejected_or_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $marker -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $marker -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z120.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary_compatibility_smoke.v1")
boundary_present = ($null -ne $boundary)
release_fields_compatible = $releaseFieldsCompatible
release_values_compatible = $releaseValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z121.remote_workspace_real_adapter_not_approved_outcome_release_marker_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_release_fields = $requiredReleaseFields
required_guardrail_fields = $requiredGuardrailFields
not_approved_outcome_release_marker = $marker
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z121 remote workspace real-adapter not-approved outcome release marker smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z121 remote workspace real-adapter not-approved outcome release marker smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,135 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z122-remote-workspace-real-adapter-not-approved-outcome-release-marker-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z122-remote-workspace-real-adapter-not-approved-outcome-release-marker-source-result.json"
$requiredReleaseFields = @(
"schema_version",
"source_boundary_schema",
"release_status",
"release_marker",
"boundary_status",
"closed_outcome_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z121-remote-workspace-real-adapter-not-approved-outcome-release-marker-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$marker = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $marker -Name "guardrail_summary" -Default $null
$releaseFieldsCompatible = Test-ObjectHasFields -Item $marker -Fields $requiredReleaseFields
$releaseValuesCompatible = (
[string](Get-PropertyValue -Item $marker -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_release_marker.v1" -and
[string](Get-PropertyValue -Item $marker -Name "source_boundary_schema" -Default "") -eq "rap.remote_workspace_real_adapter_operator_outcome_closeout_reopen_boundary.v1" -and
[string](Get-PropertyValue -Item $marker -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "release_marker" -Default "") -eq "c19z121_real_adapter_not_approved_outcome_release_marker" -and
[string](Get-PropertyValue -Item $marker -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $marker -Name "closed_outcome_status" -Default "") -eq "rejected_or_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $marker -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $marker -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z121.remote_workspace_real_adapter_not_approved_outcome_release_marker_smoke.v1")
release_marker_present = ($null -ne $marker)
release_fields_compatible = $releaseFieldsCompatible
release_values_compatible = $releaseValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z122.remote_workspace_real_adapter_not_approved_outcome_release_marker_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_release_fields = $requiredReleaseFields
required_guardrail_fields = $requiredGuardrailFields
not_approved_outcome_release_marker = $marker
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z122 remote workspace real-adapter not-approved outcome release marker compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z122 remote workspace real-adapter not-approved outcome release marker compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,185 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z123-remote-workspace-real-adapter-not-approved-outcome-package-index-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z123-remote-workspace-real-adapter-not-approved-outcome-package-index-source-result.json"
$requiredPackageFields = @(
"schema_version",
"source_release_marker_schema",
"package_status",
"package_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"closeout_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCloseoutNotes = @(
"not_approved_outcome_package_indexed",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z122-remote-workspace-real-adapter-not-approved-outcome-release-marker-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$marker = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $marker -Name "guardrail_summary" -Default $null
$packageIndex = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_package_index.v1"
source_release_marker_schema = Get-PropertyValue -Item $marker -Name "schema_version" -Default $null
package_status = "closed_not_approved_contract_only"
package_marker = "c19z123_real_adapter_not_approved_outcome_package_index"
covered_stage_range = "C19Z117-C19Z122"
covered_stage_count = 6
latest_compatibility_stage = "C19Z122"
release_status = Get-PropertyValue -Item $marker -Name "release_status" -Default $null
boundary_status = Get-PropertyValue -Item $marker -Name "boundary_status" -Default $null
reopen_policy = Get-PropertyValue -Item $marker -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $marker -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $marker -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $marker -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $marker -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $marker -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $marker -Name "operator_default_action" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
closeout_notes = $requiredCloseoutNotes
}
$packageFieldsCompatible = Test-ObjectHasFields -Item $packageIndex -Fields $requiredPackageFields
$closeoutNotesCompatible = Test-ArrayContainsAll -Actual @(Get-PropertyValue -Item $packageIndex -Name "closeout_notes" -Default @()) -Required $requiredCloseoutNotes
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_package_index.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "source_release_marker_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_release_marker.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_status" -Default "") -eq "closed_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_marker" -Default "") -eq "c19z123_real_adapter_not_approved_outcome_package_index" -and
[string](Get-PropertyValue -Item $packageIndex -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $packageIndex -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $packageIndex -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $packageIndex -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z122.remote_workspace_real_adapter_not_approved_outcome_release_marker_compatibility_smoke.v1")
release_marker_present = ($null -ne $marker)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
closeout_notes_compatible = $closeoutNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z123.remote_workspace_real_adapter_not_approved_outcome_package_index_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
required_guardrail_fields = $requiredGuardrailFields
required_closeout_notes = $requiredCloseoutNotes
not_approved_outcome_package_index = $packageIndex
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z123 remote workspace real-adapter not-approved outcome package index smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z123 remote workspace real-adapter not-approved outcome package index smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,163 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z124-remote-workspace-real-adapter-not-approved-outcome-package-index-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z124-remote-workspace-real-adapter-not-approved-outcome-package-index-source-result.json"
$requiredPackageFields = @(
"schema_version",
"source_release_marker_schema",
"package_status",
"package_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"closeout_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCloseoutNotes = @(
"not_approved_outcome_package_indexed",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Required)
$values = @($Actual | ForEach-Object { [string]$_ })
foreach ($item in $Required) {
if ($values -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z123-remote-workspace-real-adapter-not-approved-outcome-package-index-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$packageIndex = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_package_index" -Default $null
$guardrails = Get-PropertyValue -Item $packageIndex -Name "guardrail_summary" -Default $null
$closeoutNotes = @(Get-PropertyValue -Item $packageIndex -Name "closeout_notes" -Default @())
$packageFieldsCompatible = Test-ObjectHasFields -Item $packageIndex -Fields $requiredPackageFields
$closeoutNotesCompatible = Test-ArrayContainsAll -Actual $closeoutNotes -Required $requiredCloseoutNotes
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_package_index.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "source_release_marker_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_release_marker.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_status" -Default "") -eq "closed_not_approved_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_marker" -Default "") -eq "c19z123_real_adapter_not_approved_outcome_package_index" -and
[string](Get-PropertyValue -Item $packageIndex -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $packageIndex -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $packageIndex -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $packageIndex -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z123.remote_workspace_real_adapter_not_approved_outcome_package_index_smoke.v1")
package_index_present = ($null -ne $packageIndex)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
closeout_notes_compatible = $closeoutNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z124.remote_workspace_real_adapter_not_approved_outcome_package_index_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
required_guardrail_fields = $requiredGuardrailFields
required_closeout_notes = $requiredCloseoutNotes
not_approved_outcome_package_index = $packageIndex
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z124 remote workspace real-adapter not-approved outcome package index compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z124 remote workspace real-adapter not-approved outcome package index compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,166 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z125-remote-workspace-real-adapter-not-approved-outcome-closeout-summary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z125-remote-workspace-real-adapter-not-approved-outcome-closeout-summary-source-result.json"
$requiredCloseoutFields = @(
"schema_version",
"source_package_index_schema",
"closeout_status",
"closeout_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z124-remote-workspace-real-adapter-not-approved-outcome-package-index-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$packageIndex = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_package_index" -Default $null
$guardrails = Get-PropertyValue -Item $packageIndex -Name "guardrail_summary" -Default $null
$closeout = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_closeout_summary.v1"
source_package_index_schema = Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default $null
closeout_status = "closed_not_approved_package_complete"
closeout_marker = "c19z125_real_adapter_not_approved_outcome_closed_contract_only"
covered_stage_range = Get-PropertyValue -Item $packageIndex -Name "covered_stage_range" -Default $null
covered_stage_count = Get-PropertyValue -Item $packageIndex -Name "covered_stage_count" -Default $null
latest_compatibility_stage = Get-PropertyValue -Item $packageIndex -Name "latest_compatibility_stage" -Default $null
release_status = Get-PropertyValue -Item $packageIndex -Name "release_status" -Default $null
boundary_status = Get-PropertyValue -Item $packageIndex -Name "boundary_status" -Default $null
reopen_policy = Get-PropertyValue -Item $packageIndex -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $packageIndex -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $packageIndex -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $packageIndex -Name "operator_default_action" -Default $null
next_required_phase = "explicit_new_enablement_request_only"
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
}
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_package_index_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_package_index.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_marker" -Default "") -eq "c19z125_real_adapter_not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $closeout -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $closeout -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $closeout -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $closeout -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $closeout -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z124.remote_workspace_real_adapter_not_approved_outcome_package_index_compatibility_smoke.v1")
package_index_present = ($null -ne $packageIndex)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z125.remote_workspace_real_adapter_not_approved_outcome_closeout_summary_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_guardrail_fields = $requiredGuardrailFields
not_approved_outcome_closeout_summary = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z125 remote workspace real-adapter not-approved outcome closeout summary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z125 remote workspace real-adapter not-approved outcome closeout summary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,143 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z126-remote-workspace-real-adapter-not-approved-outcome-closeout-summary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z126-remote-workspace-real-adapter-not-approved-outcome-closeout-summary-source-result.json"
$requiredCloseoutFields = @(
"schema_version",
"source_package_index_schema",
"closeout_status",
"closeout_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z125-remote-workspace-real-adapter-not-approved-outcome-closeout-summary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_closeout_summary" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_package_index_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_package_index.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_marker" -Default "") -eq "c19z125_real_adapter_not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $closeout -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $closeout -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $closeout -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $closeout -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $closeout -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z125.remote_workspace_real_adapter_not_approved_outcome_closeout_summary_smoke.v1")
closeout_summary_present = ($null -ne $closeout)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z126.remote_workspace_real_adapter_not_approved_outcome_closeout_summary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_guardrail_fields = $requiredGuardrailFields
not_approved_outcome_closeout_summary = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z126 remote workspace real-adapter not-approved outcome closeout summary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z126 remote workspace real-adapter not-approved outcome closeout summary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,190 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z127-remote-workspace-real-adapter-not-approved-outcome-final-release-marker-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z127-remote-workspace-real-adapter-not-approved-outcome-final-release-marker-source-result.json"
$requiredFinalReleaseFields = @(
"schema_version",
"source_closeout_schema",
"final_release_status",
"final_release_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"closeout_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"final_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredFinalNotes = @(
"not_approved_outcome_final_release_marked",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z126-remote-workspace-real-adapter-not-approved-outcome-closeout-summary-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_closeout_summary" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$marker = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_final_release_marker.v1"
source_closeout_schema = Get-PropertyValue -Item $closeout -Name "schema_version" -Default $null
final_release_status = "closed_not_approved_final_contract_only"
final_release_marker = "c19z127_real_adapter_not_approved_outcome_final_release_marker"
covered_stage_range = Get-PropertyValue -Item $closeout -Name "covered_stage_range" -Default $null
covered_stage_count = Get-PropertyValue -Item $closeout -Name "covered_stage_count" -Default $null
latest_compatibility_stage = Get-PropertyValue -Item $closeout -Name "latest_compatibility_stage" -Default $null
release_status = Get-PropertyValue -Item $closeout -Name "release_status" -Default $null
closeout_status = Get-PropertyValue -Item $closeout -Name "closeout_status" -Default $null
boundary_status = Get-PropertyValue -Item $closeout -Name "boundary_status" -Default $null
reopen_policy = Get-PropertyValue -Item $closeout -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $closeout -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $closeout -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $closeout -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $closeout -Name "operator_default_action" -Default $null
next_required_phase = Get-PropertyValue -Item $closeout -Name "next_required_phase" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
final_notes = $requiredFinalNotes
}
$finalReleaseFieldsCompatible = Test-ObjectHasFields -Item $marker -Fields $requiredFinalReleaseFields
$finalReleaseValuesCompatible = (
[string](Get-PropertyValue -Item $marker -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_release_marker.v1" -and
[string](Get-PropertyValue -Item $marker -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $marker -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "final_release_marker" -Default "") -eq "c19z127_real_adapter_not_approved_outcome_final_release_marker" -and
[string](Get-PropertyValue -Item $marker -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $marker -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $marker -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $marker -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $marker -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $marker -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $marker -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $marker -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $marker -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_payload_traffic" -Default $true)
)
$finalNotesCompatible = Test-ArrayContainsAll -Actual @($marker.final_notes) -Expected $requiredFinalNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z126.remote_workspace_real_adapter_not_approved_outcome_closeout_summary_compatibility_smoke.v1")
closeout_summary_present = ($null -ne $closeout)
final_release_fields_compatible = $finalReleaseFieldsCompatible
final_release_values_compatible = $finalReleaseValuesCompatible
final_notes_compatible = $finalNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z127.remote_workspace_real_adapter_not_approved_outcome_final_release_marker_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_final_release_fields = $requiredFinalReleaseFields
required_guardrail_fields = $requiredGuardrailFields
required_final_notes = $requiredFinalNotes
not_approved_outcome_final_release_marker = $marker
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z127 remote workspace real-adapter not-approved outcome final release marker smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z127 remote workspace real-adapter not-approved outcome final release marker smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,166 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z128-remote-workspace-real-adapter-not-approved-outcome-final-release-marker-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z128-remote-workspace-real-adapter-not-approved-outcome-final-release-marker-source-result.json"
$requiredFinalReleaseFields = @(
"schema_version",
"source_closeout_schema",
"final_release_status",
"final_release_marker",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"closeout_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"final_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredFinalNotes = @(
"not_approved_outcome_final_release_marked",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z127-remote-workspace-real-adapter-not-approved-outcome-final-release-marker-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$marker = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_final_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $marker -Name "guardrail_summary" -Default $null
$finalNotes = @(Get-PropertyValue -Item $marker -Name "final_notes" -Default @())
$finalReleaseFieldsCompatible = Test-ObjectHasFields -Item $marker -Fields $requiredFinalReleaseFields
$finalReleaseValuesCompatible = (
[string](Get-PropertyValue -Item $marker -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_release_marker.v1" -and
[string](Get-PropertyValue -Item $marker -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $marker -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "final_release_marker" -Default "") -eq "c19z127_real_adapter_not_approved_outcome_final_release_marker" -and
[string](Get-PropertyValue -Item $marker -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $marker -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $marker -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $marker -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $marker -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $marker -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $marker -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $marker -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $marker -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $marker -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $marker -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $marker -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $marker -Name "allows_payload_traffic" -Default $true)
)
$finalNotesCompatible = Test-ArrayContainsAll -Actual $finalNotes -Expected $requiredFinalNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z127.remote_workspace_real_adapter_not_approved_outcome_final_release_marker_smoke.v1")
final_release_marker_present = ($null -ne $marker)
final_release_fields_compatible = $finalReleaseFieldsCompatible
final_release_values_compatible = $finalReleaseValuesCompatible
final_notes_compatible = $finalNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z128.remote_workspace_real_adapter_not_approved_outcome_final_release_marker_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_final_release_fields = $requiredFinalReleaseFields
required_guardrail_fields = $requiredGuardrailFields
required_final_notes = $requiredFinalNotes
not_approved_outcome_final_release_marker = $marker
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z128 remote workspace real-adapter not-approved outcome final release marker compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z128 remote workspace real-adapter not-approved outcome final release marker compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,197 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z129-remote-workspace-real-adapter-not-approved-outcome-final-package-index-archive-marker-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z129-remote-workspace-real-adapter-not-approved-outcome-final-package-index-archive-marker-source-result.json"
$requiredArchiveFields = @(
"schema_version",
"source_final_release_schema",
"archive_status",
"archive_marker",
"package_status",
"final_release_status",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"closeout_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"archive_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredArchiveNotes = @(
"not_approved_outcome_final_package_indexed",
"not_approved_outcome_archived_contract_only",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z128-remote-workspace-real-adapter-not-approved-outcome-final-release-marker-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$finalRelease = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_final_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $finalRelease -Name "guardrail_summary" -Default $null
$archive = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker.v1"
source_final_release_schema = Get-PropertyValue -Item $finalRelease -Name "schema_version" -Default $null
archive_status = "closed_not_approved_archived_contract_only"
archive_marker = "c19z129_real_adapter_not_approved_outcome_final_package_index_archive_marker"
package_status = "final_package_indexed_and_archived_contract_only"
final_release_status = Get-PropertyValue -Item $finalRelease -Name "final_release_status" -Default $null
covered_stage_range = Get-PropertyValue -Item $finalRelease -Name "covered_stage_range" -Default $null
covered_stage_count = Get-PropertyValue -Item $finalRelease -Name "covered_stage_count" -Default $null
latest_compatibility_stage = Get-PropertyValue -Item $finalRelease -Name "latest_compatibility_stage" -Default $null
release_status = Get-PropertyValue -Item $finalRelease -Name "release_status" -Default $null
closeout_status = Get-PropertyValue -Item $finalRelease -Name "closeout_status" -Default $null
boundary_status = Get-PropertyValue -Item $finalRelease -Name "boundary_status" -Default $null
reopen_policy = Get-PropertyValue -Item $finalRelease -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $finalRelease -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $finalRelease -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $finalRelease -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $finalRelease -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $finalRelease -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $finalRelease -Name "operator_default_action" -Default $null
next_required_phase = Get-PropertyValue -Item $finalRelease -Name "next_required_phase" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
archive_notes = $requiredArchiveNotes
}
$archiveFieldsCompatible = Test-ObjectHasFields -Item $archive -Fields $requiredArchiveFields
$archiveValuesCompatible = (
[string](Get-PropertyValue -Item $archive -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker.v1" -and
[string](Get-PropertyValue -Item $archive -Name "source_final_release_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_release_marker.v1" -and
[string](Get-PropertyValue -Item $archive -Name "archive_status" -Default "") -eq "closed_not_approved_archived_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "archive_marker" -Default "") -eq "c19z129_real_adapter_not_approved_outcome_final_package_index_archive_marker" -and
[string](Get-PropertyValue -Item $archive -Name "package_status" -Default "") -eq "final_package_indexed_and_archived_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $archive -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $archive -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $archive -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $archive -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $archive -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $archive -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $archive -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $archive -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $archive -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $archive -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_payload_traffic" -Default $true)
)
$archiveNotesCompatible = Test-ArrayContainsAll -Actual @($archive.archive_notes) -Expected $requiredArchiveNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z128.remote_workspace_real_adapter_not_approved_outcome_final_release_marker_compatibility_smoke.v1")
final_release_marker_present = ($null -ne $finalRelease)
archive_fields_compatible = $archiveFieldsCompatible
archive_values_compatible = $archiveValuesCompatible
archive_notes_compatible = $archiveNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z129.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_archive_fields = $requiredArchiveFields
required_guardrail_fields = $requiredGuardrailFields
required_archive_notes = $requiredArchiveNotes
not_approved_outcome_final_package_index_archive_marker = $archive
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z129 remote workspace real-adapter not-approved outcome final package index archive marker smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z129 remote workspace real-adapter not-approved outcome final package index archive marker smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,83 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z13-remote-workspace-mailbox-preflight-attention-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z13-remote-workspace-mailbox-preflight-attention-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-AttentionStatus {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_status" -Default "") -eq "needs_attention" -and
[string](Get-PropertyValue -Item $rollup -Name "preflight_attention_status" -Default "") -eq "needs_attention" -and
[string](Get-PropertyValue -Item $rollup -Name "operator_status" -Default "") -eq "resync_required" -and
[string](Get-PropertyValue -Item $rollup -Name "operator_severity" -Default "") -eq "warn"
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z12-remote-workspace-mailbox-preflight-status-counts-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_attention_visible = (Test-AttentionStatus -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_attention_visible = (Test-AttentionStatus -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z13.remote_workspace_mailbox_preflight_attention_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z13 remote workspace mailbox preflight attention smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z13 remote workspace mailbox preflight attention smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,171 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z130-remote-workspace-real-adapter-not-approved-outcome-final-package-index-archive-marker-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z130-remote-workspace-real-adapter-not-approved-outcome-final-package-index-archive-marker-source-result.json"
$requiredArchiveFields = @(
"schema_version",
"source_final_release_schema",
"archive_status",
"archive_marker",
"package_status",
"final_release_status",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"closeout_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"archive_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredArchiveNotes = @(
"not_approved_outcome_final_package_indexed",
"not_approved_outcome_archived_contract_only",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z129-remote-workspace-real-adapter-not-approved-outcome-final-package-index-archive-marker-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$archive = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_final_package_index_archive_marker" -Default $null
$guardrails = Get-PropertyValue -Item $archive -Name "guardrail_summary" -Default $null
$archiveNotes = @(Get-PropertyValue -Item $archive -Name "archive_notes" -Default @())
$archiveFieldsCompatible = Test-ObjectHasFields -Item $archive -Fields $requiredArchiveFields
$archiveValuesCompatible = (
[string](Get-PropertyValue -Item $archive -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker.v1" -and
[string](Get-PropertyValue -Item $archive -Name "source_final_release_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_release_marker.v1" -and
[string](Get-PropertyValue -Item $archive -Name "archive_status" -Default "") -eq "closed_not_approved_archived_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "archive_marker" -Default "") -eq "c19z129_real_adapter_not_approved_outcome_final_package_index_archive_marker" -and
[string](Get-PropertyValue -Item $archive -Name "package_status" -Default "") -eq "final_package_indexed_and_archived_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $archive -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $archive -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $archive -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $archive -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $archive -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $archive -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $archive -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $archive -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $archive -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $archive -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_payload_traffic" -Default $true)
)
$archiveNotesCompatible = Test-ArrayContainsAll -Actual $archiveNotes -Expected $requiredArchiveNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z129.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker_smoke.v1")
archive_marker_present = ($null -ne $archive)
archive_fields_compatible = $archiveFieldsCompatible
archive_values_compatible = $archiveValuesCompatible
archive_notes_compatible = $archiveNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z130.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_archive_fields = $requiredArchiveFields
required_guardrail_fields = $requiredGuardrailFields
required_archive_notes = $requiredArchiveNotes
not_approved_outcome_final_package_index_archive_marker = $archive
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z130 remote workspace real-adapter not-approved outcome final package index archive marker compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z130 remote workspace real-adapter not-approved outcome final package index archive marker compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,200 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z131-remote-workspace-real-adapter-not-approved-outcome-archive-closeout-manifest-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z131-remote-workspace-real-adapter-not-approved-outcome-archive-closeout-manifest-source-result.json"
$requiredManifestFields = @(
"schema_version",
"source_archive_schema",
"manifest_status",
"manifest_marker",
"archive_status",
"package_status",
"final_release_status",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"closeout_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"manifest_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredManifestNotes = @(
"not_approved_archive_closeout_manifested",
"not_approved_branch_closed_until_new_request",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z130-remote-workspace-real-adapter-not-approved-outcome-final-package-index-archive-marker-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$archive = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_final_package_index_archive_marker" -Default $null
$guardrails = Get-PropertyValue -Item $archive -Name "guardrail_summary" -Default $null
$manifest = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest.v1"
source_archive_schema = Get-PropertyValue -Item $archive -Name "schema_version" -Default $null
manifest_status = "closed_not_approved_archive_manifest_complete"
manifest_marker = "c19z131_real_adapter_not_approved_outcome_archive_closeout_manifest"
archive_status = Get-PropertyValue -Item $archive -Name "archive_status" -Default $null
package_status = Get-PropertyValue -Item $archive -Name "package_status" -Default $null
final_release_status = Get-PropertyValue -Item $archive -Name "final_release_status" -Default $null
covered_stage_range = Get-PropertyValue -Item $archive -Name "covered_stage_range" -Default $null
covered_stage_count = Get-PropertyValue -Item $archive -Name "covered_stage_count" -Default $null
latest_compatibility_stage = Get-PropertyValue -Item $archive -Name "latest_compatibility_stage" -Default $null
release_status = Get-PropertyValue -Item $archive -Name "release_status" -Default $null
closeout_status = Get-PropertyValue -Item $archive -Name "closeout_status" -Default $null
boundary_status = Get-PropertyValue -Item $archive -Name "boundary_status" -Default $null
reopen_policy = Get-PropertyValue -Item $archive -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $archive -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $archive -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $archive -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $archive -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $archive -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $archive -Name "operator_default_action" -Default $null
next_required_phase = Get-PropertyValue -Item $archive -Name "next_required_phase" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
manifest_notes = $requiredManifestNotes
}
$manifestFieldsCompatible = Test-ObjectHasFields -Item $manifest -Fields $requiredManifestFields
$manifestValuesCompatible = (
[string](Get-PropertyValue -Item $manifest -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "source_archive_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "manifest_status" -Default "") -eq "closed_not_approved_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "manifest_marker" -Default "") -eq "c19z131_real_adapter_not_approved_outcome_archive_closeout_manifest" -and
[string](Get-PropertyValue -Item $manifest -Name "archive_status" -Default "") -eq "closed_not_approved_archived_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "package_status" -Default "") -eq "final_package_indexed_and_archived_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $manifest -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $manifest -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $manifest -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $manifest -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $manifest -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $manifest -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $manifest -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_payload_traffic" -Default $true)
)
$manifestNotesCompatible = Test-ArrayContainsAll -Actual @($manifest.manifest_notes) -Expected $requiredManifestNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z130.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker_compatibility_smoke.v1")
archive_marker_present = ($null -ne $archive)
manifest_fields_compatible = $manifestFieldsCompatible
manifest_values_compatible = $manifestValuesCompatible
manifest_notes_compatible = $manifestNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z131.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_manifest_fields = $requiredManifestFields
required_guardrail_fields = $requiredGuardrailFields
required_manifest_notes = $requiredManifestNotes
not_approved_outcome_archive_closeout_manifest = $manifest
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z131 remote workspace real-adapter not-approved outcome archive closeout manifest smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z131 remote workspace real-adapter not-approved outcome archive closeout manifest smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,173 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z132-remote-workspace-real-adapter-not-approved-outcome-archive-closeout-manifest-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z132-remote-workspace-real-adapter-not-approved-outcome-archive-closeout-manifest-source-result.json"
$requiredManifestFields = @(
"schema_version",
"source_archive_schema",
"manifest_status",
"manifest_marker",
"archive_status",
"package_status",
"final_release_status",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"closeout_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"manifest_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredManifestNotes = @(
"not_approved_archive_closeout_manifested",
"not_approved_branch_closed_until_new_request",
"operator_outcome_closed_without_approval",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z131-remote-workspace-real-adapter-not-approved-outcome-archive-closeout-manifest-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$manifest = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_archive_closeout_manifest" -Default $null
$guardrails = Get-PropertyValue -Item $manifest -Name "guardrail_summary" -Default $null
$manifestNotes = @(Get-PropertyValue -Item $manifest -Name "manifest_notes" -Default @())
$manifestFieldsCompatible = Test-ObjectHasFields -Item $manifest -Fields $requiredManifestFields
$manifestValuesCompatible = (
[string](Get-PropertyValue -Item $manifest -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "source_archive_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_final_package_index_archive_marker.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "manifest_status" -Default "") -eq "closed_not_approved_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "manifest_marker" -Default "") -eq "c19z131_real_adapter_not_approved_outcome_archive_closeout_manifest" -and
[string](Get-PropertyValue -Item $manifest -Name "archive_status" -Default "") -eq "closed_not_approved_archived_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "package_status" -Default "") -eq "final_package_indexed_and_archived_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $manifest -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $manifest -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $manifest -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $manifest -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $manifest -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $manifest -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $manifest -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_payload_traffic" -Default $true)
)
$manifestNotesCompatible = Test-ArrayContainsAll -Actual $manifestNotes -Expected $requiredManifestNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z131.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest_smoke.v1")
manifest_present = ($null -ne $manifest)
manifest_fields_compatible = $manifestFieldsCompatible
manifest_values_compatible = $manifestValuesCompatible
manifest_notes_compatible = $manifestNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z132.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_manifest_fields = $requiredManifestFields
required_guardrail_fields = $requiredGuardrailFields
required_manifest_notes = $requiredManifestNotes
not_approved_outcome_archive_closeout_manifest = $manifest
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z132 remote workspace real-adapter not-approved outcome archive closeout manifest compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z132 remote workspace real-adapter not-approved outcome archive closeout manifest compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,208 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z133-remote-workspace-real-adapter-not-approved-outcome-stopped-branch-sentinel-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z133-remote-workspace-real-adapter-not-approved-outcome-stopped-branch-sentinel-source-result.json"
$requiredSentinelFields = @(
"schema_version",
"source_manifest_schema",
"sentinel_status",
"sentinel_marker",
"branch_state",
"continuation_policy",
"manifest_status",
"archive_status",
"package_status",
"final_release_status",
"covered_stage_range",
"covered_stage_count",
"latest_compatibility_stage",
"release_status",
"closeout_status",
"boundary_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"sentinel_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredSentinelNotes = @(
"not_approved_branch_stopped",
"no_further_not_approved_layers_required",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z132-remote-workspace-real-adapter-not-approved-outcome-archive-closeout-manifest-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$manifest = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_archive_closeout_manifest" -Default $null
$guardrails = Get-PropertyValue -Item $manifest -Name "guardrail_summary" -Default $null
$sentinel = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel.v1"
source_manifest_schema = Get-PropertyValue -Item $manifest -Name "schema_version" -Default $null
sentinel_status = "stopped_until_new_explicit_enablement_request"
sentinel_marker = "c19z133_real_adapter_not_approved_outcome_stopped_branch_sentinel"
branch_state = "not_approved_branch_closed"
continuation_policy = "do_not_continue_without_new_explicit_enablement_request"
manifest_status = Get-PropertyValue -Item $manifest -Name "manifest_status" -Default $null
archive_status = Get-PropertyValue -Item $manifest -Name "archive_status" -Default $null
package_status = Get-PropertyValue -Item $manifest -Name "package_status" -Default $null
final_release_status = Get-PropertyValue -Item $manifest -Name "final_release_status" -Default $null
covered_stage_range = Get-PropertyValue -Item $manifest -Name "covered_stage_range" -Default $null
covered_stage_count = Get-PropertyValue -Item $manifest -Name "covered_stage_count" -Default $null
latest_compatibility_stage = Get-PropertyValue -Item $manifest -Name "latest_compatibility_stage" -Default $null
release_status = Get-PropertyValue -Item $manifest -Name "release_status" -Default $null
closeout_status = Get-PropertyValue -Item $manifest -Name "closeout_status" -Default $null
boundary_status = Get-PropertyValue -Item $manifest -Name "boundary_status" -Default $null
reopen_policy = Get-PropertyValue -Item $manifest -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $manifest -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $manifest -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $manifest -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $manifest -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $manifest -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $manifest -Name "operator_default_action" -Default $null
next_required_phase = Get-PropertyValue -Item $manifest -Name "next_required_phase" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
sentinel_notes = $requiredSentinelNotes
}
$sentinelFieldsCompatible = Test-ObjectHasFields -Item $sentinel -Fields $requiredSentinelFields
$sentinelValuesCompatible = (
[string](Get-PropertyValue -Item $sentinel -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel.v1" -and
[string](Get-PropertyValue -Item $sentinel -Name "source_manifest_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest.v1" -and
[string](Get-PropertyValue -Item $sentinel -Name "sentinel_status" -Default "") -eq "stopped_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $sentinel -Name "sentinel_marker" -Default "") -eq "c19z133_real_adapter_not_approved_outcome_stopped_branch_sentinel" -and
[string](Get-PropertyValue -Item $sentinel -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $sentinel -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $sentinel -Name "manifest_status" -Default "") -eq "closed_not_approved_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $sentinel -Name "archive_status" -Default "") -eq "closed_not_approved_archived_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "package_status" -Default "") -eq "final_package_indexed_and_archived_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $sentinel -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $sentinel -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $sentinel -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $sentinel -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $sentinel -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $sentinel -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $sentinel -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $sentinel -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $sentinel -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $sentinel -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $sentinel -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $sentinel -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $sentinel -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $sentinel -Name "allows_payload_traffic" -Default $true)
)
$sentinelNotesCompatible = Test-ArrayContainsAll -Actual @($sentinel.sentinel_notes) -Expected $requiredSentinelNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z132.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest_compatibility_smoke.v1")
manifest_present = ($null -ne $manifest)
sentinel_fields_compatible = $sentinelFieldsCompatible
sentinel_values_compatible = $sentinelValuesCompatible
sentinel_notes_compatible = $sentinelNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z133.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_sentinel_fields = $requiredSentinelFields
required_guardrail_fields = $requiredGuardrailFields
required_sentinel_notes = $requiredSentinelNotes
not_approved_outcome_stopped_branch_sentinel = $sentinel
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z133 remote workspace real-adapter not-approved outcome stopped branch sentinel smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z133 remote workspace real-adapter not-approved outcome stopped branch sentinel smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,142 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z134-remote-workspace-real-adapter-not-approved-outcome-stopped-branch-sentinel-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z134-remote-workspace-real-adapter-not-approved-outcome-stopped-branch-sentinel-source-result.json"
$requiredSentinelFields = @("schema_version", "source_manifest_schema", "sentinel_status", "sentinel_marker", "branch_state", "continuation_policy", "manifest_status", "archive_status", "package_status", "final_release_status", "covered_stage_range", "covered_stage_count", "latest_compatibility_stage", "release_status", "closeout_status", "boundary_status", "reopen_policy", "enablement_decision", "operator_review_status", "enablement_status", "runtime_gate_state", "runtime_effect", "operator_default_action", "next_required_phase", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "sentinel_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredSentinelNotes = @("not_approved_branch_stopped", "no_further_not_approved_layers_required", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z133-remote-workspace-real-adapter-not-approved-outcome-stopped-branch-sentinel-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$sentinel = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_stopped_branch_sentinel" -Default $null
$guardrails = Get-PropertyValue -Item $sentinel -Name "guardrail_summary" -Default $null
$sentinelNotes = @(Get-PropertyValue -Item $sentinel -Name "sentinel_notes" -Default @())
$sentinelFieldsCompatible = Test-ObjectHasFields -Item $sentinel -Fields $requiredSentinelFields
$sentinelValuesCompatible = (
[string](Get-PropertyValue -Item $sentinel -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel.v1" -and
[string](Get-PropertyValue -Item $sentinel -Name "source_manifest_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_archive_closeout_manifest.v1" -and
[string](Get-PropertyValue -Item $sentinel -Name "sentinel_status" -Default "") -eq "stopped_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $sentinel -Name "sentinel_marker" -Default "") -eq "c19z133_real_adapter_not_approved_outcome_stopped_branch_sentinel" -and
[string](Get-PropertyValue -Item $sentinel -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $sentinel -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $sentinel -Name "manifest_status" -Default "") -eq "closed_not_approved_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $sentinel -Name "archive_status" -Default "") -eq "closed_not_approved_archived_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "package_status" -Default "") -eq "final_package_indexed_and_archived_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "final_release_status" -Default "") -eq "closed_not_approved_final_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "covered_stage_range" -Default "") -eq "C19Z117-C19Z122" -and
[int](Get-PropertyValue -Item $sentinel -Name "covered_stage_count" -Default -1) -eq 6 -and
[string](Get-PropertyValue -Item $sentinel -Name "latest_compatibility_stage" -Default "") -eq "C19Z122" -and
[string](Get-PropertyValue -Item $sentinel -Name "release_status" -Default "") -eq "not_approved_outcome_closed_contract_only" -and
[string](Get-PropertyValue -Item $sentinel -Name "closeout_status" -Default "") -eq "closed_not_approved_package_complete" -and
[string](Get-PropertyValue -Item $sentinel -Name "boundary_status" -Default "") -eq "closed_not_approved_reopen_required" -and
[string](Get-PropertyValue -Item $sentinel -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $sentinel -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $sentinel -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $sentinel -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $sentinel -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $sentinel -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $sentinel -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $sentinel -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $sentinel -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $sentinel -Name "allows_payload_traffic" -Default $true)
)
$sentinelNotesCompatible = Test-ArrayContainsAll -Actual $sentinelNotes -Expected $requiredSentinelNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z133.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel_smoke.v1")
sentinel_present = ($null -ne $sentinel)
sentinel_fields_compatible = $sentinelFieldsCompatible
sentinel_values_compatible = $sentinelValuesCompatible
sentinel_notes_compatible = $sentinelNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z134.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_sentinel_fields = $requiredSentinelFields
required_guardrail_fields = $requiredGuardrailFields
required_sentinel_notes = $requiredSentinelNotes
not_approved_outcome_stopped_branch_sentinel = $sentinel
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z134 remote workspace real-adapter not-approved outcome stopped branch sentinel compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z134 remote workspace real-adapter not-approved outcome stopped branch sentinel compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,186 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z135-remote-workspace-real-adapter-not-approved-outcome-no-continuation-guard-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z135-remote-workspace-real-adapter-not-approved-outcome-no-continuation-guard-source-result.json"
$requiredGuardFields = @(
"schema_version",
"source_sentinel_schema",
"guard_status",
"guard_marker",
"branch_state",
"continuation_policy",
"next_allowed_entrypoint",
"blocks_not_approved_extension",
"sentinel_status",
"reopen_policy",
"enablement_decision",
"operator_review_status",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"operator_default_action",
"next_required_phase",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"guard_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredGuardNotes = @(
"not_approved_branch_no_continuation_guard_active",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z134-remote-workspace-real-adapter-not-approved-outcome-stopped-branch-sentinel-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$sentinel = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_stopped_branch_sentinel" -Default $null
$guardrails = Get-PropertyValue -Item $sentinel -Name "guardrail_summary" -Default $null
$guard = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard.v1"
source_sentinel_schema = Get-PropertyValue -Item $sentinel -Name "schema_version" -Default $null
guard_status = "no_continuation_without_new_explicit_enablement_request"
guard_marker = "c19z135_real_adapter_not_approved_outcome_no_continuation_guard"
branch_state = Get-PropertyValue -Item $sentinel -Name "branch_state" -Default $null
continuation_policy = Get-PropertyValue -Item $sentinel -Name "continuation_policy" -Default $null
next_allowed_entrypoint = "new_explicit_enablement_request_only"
blocks_not_approved_extension = $true
sentinel_status = Get-PropertyValue -Item $sentinel -Name "sentinel_status" -Default $null
reopen_policy = Get-PropertyValue -Item $sentinel -Name "reopen_policy" -Default $null
enablement_decision = Get-PropertyValue -Item $sentinel -Name "enablement_decision" -Default $null
operator_review_status = Get-PropertyValue -Item $sentinel -Name "operator_review_status" -Default $null
enablement_status = Get-PropertyValue -Item $sentinel -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $sentinel -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $sentinel -Name "runtime_effect" -Default $null
operator_default_action = Get-PropertyValue -Item $sentinel -Name "operator_default_action" -Default $null
next_required_phase = Get-PropertyValue -Item $sentinel -Name "next_required_phase" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
guard_notes = $requiredGuardNotes
}
$guardFieldsCompatible = Test-ObjectHasFields -Item $guard -Fields $requiredGuardFields
$guardValuesCompatible = (
[string](Get-PropertyValue -Item $guard -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard.v1" -and
[string](Get-PropertyValue -Item $guard -Name "source_sentinel_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel.v1" -and
[string](Get-PropertyValue -Item $guard -Name "guard_status" -Default "") -eq "no_continuation_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $guard -Name "guard_marker" -Default "") -eq "c19z135_real_adapter_not_approved_outcome_no_continuation_guard" -and
[string](Get-PropertyValue -Item $guard -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $guard -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $guard -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $guard -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $guard -Name "sentinel_status" -Default "") -eq "stopped_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $guard -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $guard -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $guard -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $guard -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $guard -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $guard -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $guard -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $guard -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $guard -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guard -Name "allows_payload_traffic" -Default $true)
)
$guardNotesCompatible = Test-ArrayContainsAll -Actual @($guard.guard_notes) -Expected $requiredGuardNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z134.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel_compatibility_smoke.v1")
sentinel_present = ($null -ne $sentinel)
guard_fields_compatible = $guardFieldsCompatible
guard_values_compatible = $guardValuesCompatible
guard_notes_compatible = $guardNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z135.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_guard_fields = $requiredGuardFields
required_guardrail_fields = $requiredGuardrailFields
required_guard_notes = $requiredGuardNotes
not_approved_outcome_no_continuation_guard = $guard
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z135 remote workspace real-adapter not-approved outcome no-continuation guard smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z135 remote workspace real-adapter not-approved outcome no-continuation guard smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,135 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z136-remote-workspace-real-adapter-not-approved-outcome-no-continuation-guard-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z136-remote-workspace-real-adapter-not-approved-outcome-no-continuation-guard-source-result.json"
$requiredGuardFields = @("schema_version", "source_sentinel_schema", "guard_status", "guard_marker", "branch_state", "continuation_policy", "next_allowed_entrypoint", "blocks_not_approved_extension", "sentinel_status", "reopen_policy", "enablement_decision", "operator_review_status", "enablement_status", "runtime_gate_state", "runtime_effect", "operator_default_action", "next_required_phase", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "guard_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredGuardNotes = @("not_approved_branch_no_continuation_guard_active", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z135-remote-workspace-real-adapter-not-approved-outcome-no-continuation-guard-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$guard = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_no_continuation_guard" -Default $null
$guardrails = Get-PropertyValue -Item $guard -Name "guardrail_summary" -Default $null
$guardNotes = @(Get-PropertyValue -Item $guard -Name "guard_notes" -Default @())
$guardFieldsCompatible = Test-ObjectHasFields -Item $guard -Fields $requiredGuardFields
$guardValuesCompatible = (
[string](Get-PropertyValue -Item $guard -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard.v1" -and
[string](Get-PropertyValue -Item $guard -Name "source_sentinel_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_stopped_branch_sentinel.v1" -and
[string](Get-PropertyValue -Item $guard -Name "guard_status" -Default "") -eq "no_continuation_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $guard -Name "guard_marker" -Default "") -eq "c19z135_real_adapter_not_approved_outcome_no_continuation_guard" -and
[string](Get-PropertyValue -Item $guard -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $guard -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $guard -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $guard -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $guard -Name "sentinel_status" -Default "") -eq "stopped_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $guard -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $guard -Name "enablement_decision" -Default "") -eq "not_approved" -and
[string](Get-PropertyValue -Item $guard -Name "operator_review_status" -Default "") -eq "closed_without_approval" -and
[string](Get-PropertyValue -Item $guard -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $guard -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $guard -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
[string](Get-PropertyValue -Item $guard -Name "operator_default_action" -Default "") -eq "keep_real_adapter_disabled" -and
[string](Get-PropertyValue -Item $guard -Name "next_required_phase" -Default "") -eq "explicit_new_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $guard -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guard -Name "allows_payload_traffic" -Default $true)
)
$guardNotesCompatible = Test-ArrayContainsAll -Actual $guardNotes -Expected $requiredGuardNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z135.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard_smoke.v1")
guard_present = ($null -ne $guard)
guard_fields_compatible = $guardFieldsCompatible
guard_values_compatible = $guardValuesCompatible
guard_notes_compatible = $guardNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z136.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_guard_fields = $requiredGuardFields
required_guardrail_fields = $requiredGuardrailFields
required_guard_notes = $requiredGuardNotes
not_approved_outcome_no_continuation_guard = $guard
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z136 remote workspace real-adapter not-approved outcome no-continuation guard compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z136 remote workspace real-adapter not-approved outcome no-continuation guard compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,183 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z137-remote-workspace-real-adapter-not-approved-outcome-continuation-block-enforcement-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z137-remote-workspace-real-adapter-not-approved-outcome-continuation-block-enforcement-source-result.json"
$requiredEnforcementFields = @(
"schema_version",
"source_guard_schema",
"enforcement_status",
"enforcement_marker",
"attempted_action",
"attempt_allowed",
"block_reason",
"next_allowed_entrypoint",
"blocks_not_approved_extension",
"guard_status",
"branch_state",
"continuation_policy",
"reopen_policy",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"enforcement_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredEnforcementNotes = @(
"continuation_attempt_blocked",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z136-remote-workspace-real-adapter-not-approved-outcome-no-continuation-guard-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$guard = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_no_continuation_guard" -Default $null
$guardrails = Get-PropertyValue -Item $guard -Name "guardrail_summary" -Default $null
$enforcement = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement.v1"
source_guard_schema = Get-PropertyValue -Item $guard -Name "schema_version" -Default $null
enforcement_status = "blocked_continuation_enforced"
enforcement_marker = "c19z137_real_adapter_not_approved_outcome_continuation_block_enforcement"
attempted_action = "continue_not_approved_branch_without_new_explicit_enablement_request"
attempt_allowed = $false
block_reason = "new_explicit_enablement_request_required"
next_allowed_entrypoint = Get-PropertyValue -Item $guard -Name "next_allowed_entrypoint" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $guard -Name "blocks_not_approved_extension" -Default $null
guard_status = Get-PropertyValue -Item $guard -Name "guard_status" -Default $null
branch_state = Get-PropertyValue -Item $guard -Name "branch_state" -Default $null
continuation_policy = Get-PropertyValue -Item $guard -Name "continuation_policy" -Default $null
reopen_policy = Get-PropertyValue -Item $guard -Name "reopen_policy" -Default $null
enablement_status = Get-PropertyValue -Item $guard -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $guard -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $guard -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
enforcement_notes = $requiredEnforcementNotes
}
$enforcementFieldsCompatible = Test-ObjectHasFields -Item $enforcement -Fields $requiredEnforcementFields
$enforcementValuesCompatible = (
[string](Get-PropertyValue -Item $enforcement -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement.v1" -and
[string](Get-PropertyValue -Item $enforcement -Name "source_guard_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard.v1" -and
[string](Get-PropertyValue -Item $enforcement -Name "enforcement_status" -Default "") -eq "blocked_continuation_enforced" -and
[string](Get-PropertyValue -Item $enforcement -Name "attempted_action" -Default "") -eq "continue_not_approved_branch_without_new_explicit_enablement_request" -and
-not [bool](Get-PropertyValue -Item $enforcement -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $enforcement -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $enforcement -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $enforcement -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $enforcement -Name "guard_status" -Default "") -eq "no_continuation_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $enforcement -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $enforcement -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $enforcement -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $enforcement -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $enforcement -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $enforcement -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $enforcement -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $enforcement -Name "allows_payload_traffic" -Default $true)
)
$enforcementNotesCompatible = Test-ArrayContainsAll -Actual @($enforcement.enforcement_notes) -Expected $requiredEnforcementNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z136.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard_compatibility_smoke.v1")
guard_present = ($null -ne $guard)
enforcement_fields_compatible = $enforcementFieldsCompatible
enforcement_values_compatible = $enforcementValuesCompatible
enforcement_notes_compatible = $enforcementNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z137.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_enforcement_fields = $requiredEnforcementFields
required_guardrail_fields = $requiredGuardrailFields
required_enforcement_notes = $requiredEnforcementNotes
not_approved_outcome_continuation_block_enforcement = $enforcement
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z137 remote workspace real-adapter not-approved outcome continuation block enforcement smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z137 remote workspace real-adapter not-approved outcome continuation block enforcement smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,133 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z138-remote-workspace-real-adapter-not-approved-outcome-continuation-block-enforcement-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z138-remote-workspace-real-adapter-not-approved-outcome-continuation-block-enforcement-source-result.json"
$requiredEnforcementFields = @("schema_version", "source_guard_schema", "enforcement_status", "enforcement_marker", "attempted_action", "attempt_allowed", "block_reason", "next_allowed_entrypoint", "blocks_not_approved_extension", "guard_status", "branch_state", "continuation_policy", "reopen_policy", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "enforcement_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredEnforcementNotes = @("continuation_attempt_blocked", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z137-remote-workspace-real-adapter-not-approved-outcome-continuation-block-enforcement-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$enforcement = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_continuation_block_enforcement" -Default $null
$guardrails = Get-PropertyValue -Item $enforcement -Name "guardrail_summary" -Default $null
$enforcementNotes = @(Get-PropertyValue -Item $enforcement -Name "enforcement_notes" -Default @())
$enforcementFieldsCompatible = Test-ObjectHasFields -Item $enforcement -Fields $requiredEnforcementFields
$enforcementValuesCompatible = (
[string](Get-PropertyValue -Item $enforcement -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement.v1" -and
[string](Get-PropertyValue -Item $enforcement -Name "source_guard_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_no_continuation_guard.v1" -and
[string](Get-PropertyValue -Item $enforcement -Name "enforcement_status" -Default "") -eq "blocked_continuation_enforced" -and
[string](Get-PropertyValue -Item $enforcement -Name "attempted_action" -Default "") -eq "continue_not_approved_branch_without_new_explicit_enablement_request" -and
-not [bool](Get-PropertyValue -Item $enforcement -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $enforcement -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $enforcement -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $enforcement -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $enforcement -Name "guard_status" -Default "") -eq "no_continuation_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $enforcement -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $enforcement -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $enforcement -Name "reopen_policy" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $enforcement -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $enforcement -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $enforcement -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $enforcement -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $enforcement -Name "allows_payload_traffic" -Default $true)
)
$enforcementNotesCompatible = Test-ArrayContainsAll -Actual $enforcementNotes -Expected $requiredEnforcementNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z137.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement_smoke.v1")
enforcement_present = ($null -ne $enforcement)
enforcement_fields_compatible = $enforcementFieldsCompatible
enforcement_values_compatible = $enforcementValuesCompatible
enforcement_notes_compatible = $enforcementNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z138.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_enforcement_fields = $requiredEnforcementFields
required_guardrail_fields = $requiredGuardrailFields
required_enforcement_notes = $requiredEnforcementNotes
not_approved_outcome_continuation_block_enforcement = $enforcement
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z138 remote workspace real-adapter not-approved outcome continuation block enforcement compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z138 remote workspace real-adapter not-approved outcome continuation block enforcement compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,180 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z139-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-record-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z139-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-record-source-result.json"
$requiredAuditFields = @(
"schema_version",
"source_enforcement_schema",
"audit_status",
"audit_marker",
"audit_event_type",
"attempted_action",
"attempt_allowed",
"block_reason",
"next_allowed_entrypoint",
"blocks_not_approved_extension",
"branch_state",
"continuation_policy",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"audit_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredAuditNotes = @(
"blocked_continuation_audit_recorded",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z138-remote-workspace-real-adapter-not-approved-outcome-continuation-block-enforcement-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$enforcement = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_continuation_block_enforcement" -Default $null
$guardrails = Get-PropertyValue -Item $enforcement -Name "guardrail_summary" -Default $null
$audit = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record.v1"
source_enforcement_schema = Get-PropertyValue -Item $enforcement -Name "schema_version" -Default $null
audit_status = "blocked_continuation_audit_recorded"
audit_marker = "c19z139_real_adapter_not_approved_outcome_continuation_block_audit_record"
audit_event_type = "not_approved_continuation_block"
attempted_action = Get-PropertyValue -Item $enforcement -Name "attempted_action" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $enforcement -Name "block_reason" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $enforcement -Name "next_allowed_entrypoint" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $enforcement -Name "blocks_not_approved_extension" -Default $null
branch_state = Get-PropertyValue -Item $enforcement -Name "branch_state" -Default $null
continuation_policy = Get-PropertyValue -Item $enforcement -Name "continuation_policy" -Default $null
enablement_status = Get-PropertyValue -Item $enforcement -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $enforcement -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $enforcement -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
audit_notes = $requiredAuditNotes
}
$auditFieldsCompatible = Test-ObjectHasFields -Item $audit -Fields $requiredAuditFields
$auditValuesCompatible = (
[string](Get-PropertyValue -Item $audit -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record.v1" -and
[string](Get-PropertyValue -Item $audit -Name "source_enforcement_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement.v1" -and
[string](Get-PropertyValue -Item $audit -Name "audit_status" -Default "") -eq "blocked_continuation_audit_recorded" -and
[string](Get-PropertyValue -Item $audit -Name "audit_event_type" -Default "") -eq "not_approved_continuation_block" -and
[string](Get-PropertyValue -Item $audit -Name "attempted_action" -Default "") -eq "continue_not_approved_branch_without_new_explicit_enablement_request" -and
-not [bool](Get-PropertyValue -Item $audit -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $audit -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $audit -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $audit -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $audit -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $audit -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $audit -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $audit -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $audit -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $audit -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $audit -Name "allows_payload_traffic" -Default $true)
)
$auditNotesCompatible = Test-ArrayContainsAll -Actual @($audit.audit_notes) -Expected $requiredAuditNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z138.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement_compatibility_smoke.v1")
enforcement_present = ($null -ne $enforcement)
audit_fields_compatible = $auditFieldsCompatible
audit_values_compatible = $auditValuesCompatible
audit_notes_compatible = $auditNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z139.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_audit_fields = $requiredAuditFields
required_guardrail_fields = $requiredGuardrailFields
required_audit_notes = $requiredAuditNotes
not_approved_outcome_continuation_block_audit_record = $audit
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z139 remote workspace real-adapter not-approved outcome continuation block audit record smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z139 remote workspace real-adapter not-approved outcome continuation block audit record smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,170 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z14-remote-workspace-mailbox-preflight-repeated-attention-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z14-remote-workspace-mailbox-preflight-repeated-attention-source-result.json"
$adapterSessionID = ""
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Invoke-Preflight {
param([string]$SessionID)
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/mailbox/preflight?consumer_id=rdp-worker-probe&resume_from=ack&limit=3"
$response = Invoke-WebRequest -Method GET -Uri $url -TimeoutSec 35
$json = $null
if ($response.Content) { $json = $response.Content | ConvertFrom-Json }
return [ordered]@{ status_code = [int]$response.StatusCode; body = $response.Content; json = $json }
}
function Invoke-Control {
param([string]$SessionID)
if ([string]::IsNullOrWhiteSpace($SessionID)) { return $null }
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/control"
$body = @{ action = "close"; reason = "c19z14 repeated preflight close" } | ConvertTo-Json -Compress
return Invoke-RestMethod -Method POST -Uri $url -ContentType "application/json" -Body $body -TimeoutSec 30
}
function Test-RepeatedAttention {
param([object]$Sink, [string]$SessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
$statusCounts = Get-PropertyValue -Item $rollup -Name "operator_status_counts" -Default $null
$severityCounts = Get-PropertyValue -Item $rollup -Name "operator_severity_counts" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $SessionID -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_status" -Default "") -eq "repeated_resync_required" -and
[string](Get-PropertyValue -Item $rollup -Name "preflight_attention_status" -Default "") -eq "repeated_resync_required" -and
[int64](Get-PropertyValue -Item $statusCounts -Name "resync_required" -Default 0) -ge 2 -and
[int64](Get-PropertyValue -Item $severityCounts -Name "warn" -Default 0) -ge 2
)
}
try {
$entryNode = Get-NodeByName -Name $EntryNodeName
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z3-remote-workspace-mailbox-stale-preflight-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath `
-SkipClose
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$secondPreflight = Invoke-Preflight -SessionID $adapterSessionID
$observed = $null
$deadline = (Get-Date).AddSeconds(90)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-RepeatedAttention -Sink $observed.workload_sink -SessionID $adapterSessionID) -and
(Test-RepeatedAttention -Sink $observed.telemetry_sink -SessionID $adapterSessionID)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$control = Invoke-Control -SessionID $adapterSessionID
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
second_preflight_stale = ([int]$secondPreflight.status_code -eq 200 -and [string]$secondPreflight.json.operator_status -eq "resync_required" -and [string]$secondPreflight.json.operator_severity -eq "warn")
workload_repeated_attention_visible = (Test-RepeatedAttention -Sink $observed.workload_sink -SessionID $adapterSessionID)
telemetry_repeated_attention_visible = (Test-RepeatedAttention -Sink $observed.telemetry_sink -SessionID $adapterSessionID)
close_accepted = ([bool]$control.accepted -and [string]$control.session_state -eq "closed")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z14.remote_workspace_mailbox_preflight_repeated_attention_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
second_preflight = $secondPreflight
observed = $observed
control = $control
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
} finally {
if ($adapterSessionID) {
try { [void](Invoke-Control -SessionID $adapterSessionID) } catch {}
}
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z14 remote workspace mailbox preflight repeated-attention smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z14 remote workspace mailbox preflight repeated-attention smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,132 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z140-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-record-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z140-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-record-source-result.json"
$requiredAuditFields = @("schema_version", "source_enforcement_schema", "audit_status", "audit_marker", "audit_event_type", "attempted_action", "attempt_allowed", "block_reason", "next_allowed_entrypoint", "blocks_not_approved_extension", "branch_state", "continuation_policy", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "audit_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredAuditNotes = @("blocked_continuation_audit_recorded", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z139-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-record-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$audit = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_continuation_block_audit_record" -Default $null
$guardrails = Get-PropertyValue -Item $audit -Name "guardrail_summary" -Default $null
$auditNotes = @(Get-PropertyValue -Item $audit -Name "audit_notes" -Default @())
$auditFieldsCompatible = Test-ObjectHasFields -Item $audit -Fields $requiredAuditFields
$auditValuesCompatible = (
[string](Get-PropertyValue -Item $audit -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record.v1" -and
[string](Get-PropertyValue -Item $audit -Name "source_enforcement_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_enforcement.v1" -and
[string](Get-PropertyValue -Item $audit -Name "audit_status" -Default "") -eq "blocked_continuation_audit_recorded" -and
[string](Get-PropertyValue -Item $audit -Name "audit_event_type" -Default "") -eq "not_approved_continuation_block" -and
[string](Get-PropertyValue -Item $audit -Name "attempted_action" -Default "") -eq "continue_not_approved_branch_without_new_explicit_enablement_request" -and
-not [bool](Get-PropertyValue -Item $audit -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $audit -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $audit -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $audit -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $audit -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $audit -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $audit -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $audit -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $audit -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $audit -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $audit -Name "allows_payload_traffic" -Default $true)
)
$auditNotesCompatible = Test-ArrayContainsAll -Actual $auditNotes -Expected $requiredAuditNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z139.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record_smoke.v1")
audit_present = ($null -ne $audit)
audit_fields_compatible = $auditFieldsCompatible
audit_values_compatible = $auditValuesCompatible
audit_notes_compatible = $auditNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z140.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_audit_fields = $requiredAuditFields
required_guardrail_fields = $requiredGuardrailFields
required_audit_notes = $requiredAuditNotes
not_approved_outcome_continuation_block_audit_record = $audit
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z140 remote workspace real-adapter not-approved outcome continuation block audit record compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z140 remote workspace real-adapter not-approved outcome continuation block audit record compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,183 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z141-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-rollup-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z141-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-rollup-source-result.json"
$requiredRollupFields = @(
"schema_version",
"source_audit_schema",
"rollup_status",
"rollup_marker",
"operator_status",
"audit_status",
"audit_event_type",
"attempt_allowed",
"block_reason",
"next_allowed_entrypoint",
"blocks_not_approved_extension",
"branch_state",
"continuation_policy",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"rollup_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredRollupNotes = @(
"blocked_continuation_audit_rollup_complete",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z140-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-record-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$audit = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_continuation_block_audit_record" -Default $null
$guardrails = Get-PropertyValue -Item $audit -Name "guardrail_summary" -Default $null
$rollup = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup.v1"
source_audit_schema = Get-PropertyValue -Item $audit -Name "schema_version" -Default $null
rollup_status = "blocked_continuation_audit_rollup_complete"
rollup_marker = "c19z141_real_adapter_not_approved_outcome_continuation_block_audit_rollup"
operator_status = "not_approved_branch_closed_new_request_required"
audit_status = Get-PropertyValue -Item $audit -Name "audit_status" -Default $null
audit_event_type = Get-PropertyValue -Item $audit -Name "audit_event_type" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $audit -Name "block_reason" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $audit -Name "next_allowed_entrypoint" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $audit -Name "blocks_not_approved_extension" -Default $null
branch_state = Get-PropertyValue -Item $audit -Name "branch_state" -Default $null
continuation_policy = Get-PropertyValue -Item $audit -Name "continuation_policy" -Default $null
enablement_status = Get-PropertyValue -Item $audit -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $audit -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $audit -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
rollup_notes = $requiredRollupNotes
}
$rollupFieldsCompatible = Test-ObjectHasFields -Item $rollup -Fields $requiredRollupFields
$rollupValuesCompatible = (
[string](Get-PropertyValue -Item $rollup -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup.v1" -and
[string](Get-PropertyValue -Item $rollup -Name "source_audit_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record.v1" -and
[string](Get-PropertyValue -Item $rollup -Name "rollup_status" -Default "") -eq "blocked_continuation_audit_rollup_complete" -and
[string](Get-PropertyValue -Item $rollup -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $rollup -Name "audit_status" -Default "") -eq "blocked_continuation_audit_recorded" -and
[string](Get-PropertyValue -Item $rollup -Name "audit_event_type" -Default "") -eq "not_approved_continuation_block" -and
-not [bool](Get-PropertyValue -Item $rollup -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $rollup -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $rollup -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $rollup -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $rollup -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $rollup -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $rollup -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $rollup -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $rollup -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $rollup -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $rollup -Name "allows_payload_traffic" -Default $true)
)
$rollupNotesCompatible = Test-ArrayContainsAll -Actual @($rollup.rollup_notes) -Expected $requiredRollupNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z140.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record_compatibility_smoke.v1")
audit_present = ($null -ne $audit)
rollup_fields_compatible = $rollupFieldsCompatible
rollup_values_compatible = $rollupValuesCompatible
rollup_notes_compatible = $rollupNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z141.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_rollup_fields = $requiredRollupFields
required_guardrail_fields = $requiredGuardrailFields
required_rollup_notes = $requiredRollupNotes
not_approved_outcome_continuation_block_audit_rollup = $rollup
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z141 remote workspace real-adapter not-approved outcome continuation block audit rollup smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z141 remote workspace real-adapter not-approved outcome continuation block audit rollup smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,133 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z142-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-rollup-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z142-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-rollup-source-result.json"
$requiredRollupFields = @("schema_version", "source_audit_schema", "rollup_status", "rollup_marker", "operator_status", "audit_status", "audit_event_type", "attempt_allowed", "block_reason", "next_allowed_entrypoint", "blocks_not_approved_extension", "branch_state", "continuation_policy", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "rollup_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredRollupNotes = @("blocked_continuation_audit_rollup_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z141-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-rollup-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$rollup = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_continuation_block_audit_rollup" -Default $null
$guardrails = Get-PropertyValue -Item $rollup -Name "guardrail_summary" -Default $null
$rollupNotes = @(Get-PropertyValue -Item $rollup -Name "rollup_notes" -Default @())
$rollupFieldsCompatible = Test-ObjectHasFields -Item $rollup -Fields $requiredRollupFields
$rollupValuesCompatible = (
[string](Get-PropertyValue -Item $rollup -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup.v1" -and
[string](Get-PropertyValue -Item $rollup -Name "source_audit_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_record.v1" -and
[string](Get-PropertyValue -Item $rollup -Name "rollup_status" -Default "") -eq "blocked_continuation_audit_rollup_complete" -and
[string](Get-PropertyValue -Item $rollup -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $rollup -Name "audit_status" -Default "") -eq "blocked_continuation_audit_recorded" -and
[string](Get-PropertyValue -Item $rollup -Name "audit_event_type" -Default "") -eq "not_approved_continuation_block" -and
-not [bool](Get-PropertyValue -Item $rollup -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $rollup -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $rollup -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $rollup -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $rollup -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $rollup -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $rollup -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $rollup -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $rollup -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $rollup -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $rollup -Name "allows_payload_traffic" -Default $true)
)
$rollupNotesCompatible = Test-ArrayContainsAll -Actual $rollupNotes -Expected $requiredRollupNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z141.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup_smoke.v1")
rollup_present = ($null -ne $rollup)
rollup_fields_compatible = $rollupFieldsCompatible
rollup_values_compatible = $rollupValuesCompatible
rollup_notes_compatible = $rollupNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z142.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_rollup_fields = $requiredRollupFields
required_guardrail_fields = $requiredGuardrailFields
required_rollup_notes = $requiredRollupNotes
not_approved_outcome_continuation_block_audit_rollup = $rollup
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z142 remote workspace real-adapter not-approved outcome continuation block audit rollup compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z142 remote workspace real-adapter not-approved outcome continuation block audit rollup compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,183 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z143-remote-workspace-real-adapter-not-approved-outcome-operator-stop-summary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z143-remote-workspace-real-adapter-not-approved-outcome-operator-stop-summary-source-result.json"
$requiredSummaryFields = @(
"schema_version",
"source_rollup_schema",
"summary_status",
"summary_marker",
"operator_status",
"operator_action",
"operator_message",
"attempt_allowed",
"block_reason",
"next_allowed_entrypoint",
"blocks_not_approved_extension",
"branch_state",
"continuation_policy",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"summary_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredSummaryNotes = @(
"operator_stop_summary_complete",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z142-remote-workspace-real-adapter-not-approved-outcome-continuation-block-audit-rollup-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$rollup = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_continuation_block_audit_rollup" -Default $null
$guardrails = Get-PropertyValue -Item $rollup -Name "guardrail_summary" -Default $null
$summary = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary.v1"
source_rollup_schema = Get-PropertyValue -Item $rollup -Name "schema_version" -Default $null
summary_status = "operator_stop_summary_complete"
summary_marker = "c19z143_real_adapter_not_approved_outcome_operator_stop_summary"
operator_status = Get-PropertyValue -Item $rollup -Name "operator_status" -Default $null
operator_action = "keep_real_adapter_disabled_until_new_explicit_enablement_request"
operator_message = "not_approved_branch_closed_new_request_required"
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $rollup -Name "block_reason" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $rollup -Name "next_allowed_entrypoint" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $rollup -Name "blocks_not_approved_extension" -Default $null
branch_state = Get-PropertyValue -Item $rollup -Name "branch_state" -Default $null
continuation_policy = Get-PropertyValue -Item $rollup -Name "continuation_policy" -Default $null
enablement_status = Get-PropertyValue -Item $rollup -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $rollup -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $rollup -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
summary_notes = $requiredSummaryNotes
}
$summaryFieldsCompatible = Test-ObjectHasFields -Item $summary -Fields $requiredSummaryFields
$summaryValuesCompatible = (
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary.v1" -and
[string](Get-PropertyValue -Item $summary -Name "source_rollup_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup.v1" -and
[string](Get-PropertyValue -Item $summary -Name "summary_status" -Default "") -eq "operator_stop_summary_complete" -and
[string](Get-PropertyValue -Item $summary -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $summary -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $summary -Name "operator_message" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
-not [bool](Get-PropertyValue -Item $summary -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $summary -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $summary -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $summary -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $summary -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $summary -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_payload_traffic" -Default $true)
)
$summaryNotesCompatible = Test-ArrayContainsAll -Actual @($summary.summary_notes) -Expected $requiredSummaryNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z142.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup_compatibility_smoke.v1")
rollup_present = ($null -ne $rollup)
summary_fields_compatible = $summaryFieldsCompatible
summary_values_compatible = $summaryValuesCompatible
summary_notes_compatible = $summaryNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z143.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_summary_fields = $requiredSummaryFields
required_guardrail_fields = $requiredGuardrailFields
required_summary_notes = $requiredSummaryNotes
not_approved_outcome_operator_stop_summary = $summary
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z143 remote workspace real-adapter not-approved outcome operator stop summary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z143 remote workspace real-adapter not-approved outcome operator stop summary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,133 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z144-remote-workspace-real-adapter-not-approved-outcome-operator-stop-summary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z144-remote-workspace-real-adapter-not-approved-outcome-operator-stop-summary-source-result.json"
$requiredSummaryFields = @("schema_version", "source_rollup_schema", "summary_status", "summary_marker", "operator_status", "operator_action", "operator_message", "attempt_allowed", "block_reason", "next_allowed_entrypoint", "blocks_not_approved_extension", "branch_state", "continuation_policy", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "summary_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredSummaryNotes = @("operator_stop_summary_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z143-remote-workspace-real-adapter-not-approved-outcome-operator-stop-summary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$summary = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_summary" -Default $null
$guardrails = Get-PropertyValue -Item $summary -Name "guardrail_summary" -Default $null
$summaryNotes = @(Get-PropertyValue -Item $summary -Name "summary_notes" -Default @())
$summaryFieldsCompatible = Test-ObjectHasFields -Item $summary -Fields $requiredSummaryFields
$summaryValuesCompatible = (
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary.v1" -and
[string](Get-PropertyValue -Item $summary -Name "source_rollup_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_continuation_block_audit_rollup.v1" -and
[string](Get-PropertyValue -Item $summary -Name "summary_status" -Default "") -eq "operator_stop_summary_complete" -and
[string](Get-PropertyValue -Item $summary -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $summary -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $summary -Name "operator_message" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
-not [bool](Get-PropertyValue -Item $summary -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $summary -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[string](Get-PropertyValue -Item $summary -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
[bool](Get-PropertyValue -Item $summary -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $summary -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $summary -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $summary -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $summary -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $summary -Name "allows_payload_traffic" -Default $true)
)
$summaryNotesCompatible = Test-ArrayContainsAll -Actual $summaryNotes -Expected $requiredSummaryNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z143.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary_smoke.v1")
summary_present = ($null -ne $summary)
summary_fields_compatible = $summaryFieldsCompatible
summary_values_compatible = $summaryValuesCompatible
summary_notes_compatible = $summaryNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z144.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_summary_fields = $requiredSummaryFields
required_guardrail_fields = $requiredGuardrailFields
required_summary_notes = $requiredSummaryNotes
not_approved_outcome_operator_stop_summary = $summary
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z144 remote workspace real-adapter not-approved outcome operator stop summary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z144 remote workspace real-adapter not-approved outcome operator stop summary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,186 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z145-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z145-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-source-result.json"
$requiredHandoffFields = @(
"schema_version",
"source_summary_schema",
"handoff_status",
"handoff_marker",
"operator_status",
"operator_action",
"operator_message",
"display_severity",
"next_allowed_entrypoint",
"attempt_allowed",
"block_reason",
"blocks_not_approved_extension",
"branch_state",
"continuation_policy",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"handoff_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredHandoffNotes = @(
"operator_stop_handoff_complete",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z144-remote-workspace-real-adapter-not-approved-outcome-operator-stop-summary-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$summary = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_summary" -Default $null
$guardrails = Get-PropertyValue -Item $summary -Name "guardrail_summary" -Default $null
$handoff = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff.v1"
source_summary_schema = Get-PropertyValue -Item $summary -Name "schema_version" -Default $null
handoff_status = "operator_stop_handoff_complete"
handoff_marker = "c19z145_real_adapter_not_approved_outcome_operator_stop_handoff"
operator_status = Get-PropertyValue -Item $summary -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $summary -Name "operator_action" -Default $null
operator_message = Get-PropertyValue -Item $summary -Name "operator_message" -Default $null
display_severity = "blocked"
next_allowed_entrypoint = Get-PropertyValue -Item $summary -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $summary -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $summary -Name "blocks_not_approved_extension" -Default $null
branch_state = Get-PropertyValue -Item $summary -Name "branch_state" -Default $null
continuation_policy = Get-PropertyValue -Item $summary -Name "continuation_policy" -Default $null
enablement_status = Get-PropertyValue -Item $summary -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $summary -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $summary -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
handoff_notes = $requiredHandoffNotes
}
$handoffFieldsCompatible = Test-ObjectHasFields -Item $handoff -Fields $requiredHandoffFields
$handoffValuesCompatible = (
[string](Get-PropertyValue -Item $handoff -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff.v1" -and
[string](Get-PropertyValue -Item $handoff -Name "source_summary_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary.v1" -and
[string](Get-PropertyValue -Item $handoff -Name "handoff_status" -Default "") -eq "operator_stop_handoff_complete" -and
[string](Get-PropertyValue -Item $handoff -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $handoff -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $handoff -Name "operator_message" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $handoff -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $handoff -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $handoff -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $handoff -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $handoff -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $handoff -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $handoff -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $handoff -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $handoff -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $handoff -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $handoff -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $handoff -Name "allows_payload_traffic" -Default $true)
)
$handoffNotesCompatible = Test-ArrayContainsAll -Actual @($handoff.handoff_notes) -Expected $requiredHandoffNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z144.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary_compatibility_smoke.v1")
summary_present = ($null -ne $summary)
handoff_fields_compatible = $handoffFieldsCompatible
handoff_values_compatible = $handoffValuesCompatible
handoff_notes_compatible = $handoffNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z145.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_handoff_fields = $requiredHandoffFields
required_guardrail_fields = $requiredGuardrailFields
required_handoff_notes = $requiredHandoffNotes
not_approved_outcome_operator_stop_handoff = $handoff
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z145 remote workspace real-adapter not-approved outcome operator stop handoff smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z145 remote workspace real-adapter not-approved outcome operator stop handoff smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,134 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z146-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z146-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-source-result.json"
$requiredHandoffFields = @("schema_version", "source_summary_schema", "handoff_status", "handoff_marker", "operator_status", "operator_action", "operator_message", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "branch_state", "continuation_policy", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "handoff_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredHandoffNotes = @("operator_stop_handoff_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z145-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$handoff = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_handoff" -Default $null
$guardrails = Get-PropertyValue -Item $handoff -Name "guardrail_summary" -Default $null
$handoffNotes = @(Get-PropertyValue -Item $handoff -Name "handoff_notes" -Default @())
$handoffFieldsCompatible = Test-ObjectHasFields -Item $handoff -Fields $requiredHandoffFields
$handoffValuesCompatible = (
[string](Get-PropertyValue -Item $handoff -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff.v1" -and
[string](Get-PropertyValue -Item $handoff -Name "source_summary_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_summary.v1" -and
[string](Get-PropertyValue -Item $handoff -Name "handoff_status" -Default "") -eq "operator_stop_handoff_complete" -and
[string](Get-PropertyValue -Item $handoff -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $handoff -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $handoff -Name "operator_message" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $handoff -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $handoff -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $handoff -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $handoff -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $handoff -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $handoff -Name "branch_state" -Default "") -eq "not_approved_branch_closed" -and
[string](Get-PropertyValue -Item $handoff -Name "continuation_policy" -Default "") -eq "do_not_continue_without_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $handoff -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $handoff -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $handoff -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $handoff -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $handoff -Name "allows_payload_traffic" -Default $true)
)
$handoffNotesCompatible = Test-ArrayContainsAll -Actual $handoffNotes -Expected $requiredHandoffNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z145.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_smoke.v1")
handoff_present = ($null -ne $handoff)
handoff_fields_compatible = $handoffFieldsCompatible
handoff_values_compatible = $handoffValuesCompatible
handoff_notes_compatible = $handoffNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z146.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_handoff_fields = $requiredHandoffFields
required_guardrail_fields = $requiredGuardrailFields
required_handoff_notes = $requiredHandoffNotes
not_approved_outcome_operator_stop_handoff = $handoff
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z146 remote workspace real-adapter not-approved outcome operator stop handoff compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z146 remote workspace real-adapter not-approved outcome operator stop handoff compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,177 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z147-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-digest-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z147-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-digest-source-result.json"
$requiredDigestFields = @(
"schema_version",
"source_handoff_schema",
"digest_status",
"digest_marker",
"operator_status",
"operator_action",
"display_severity",
"next_allowed_entrypoint",
"attempt_allowed",
"block_reason",
"blocks_not_approved_extension",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"digest_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredDigestNotes = @(
"operator_stop_handoff_digest_complete",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z146-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$handoff = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_handoff" -Default $null
$guardrails = Get-PropertyValue -Item $handoff -Name "guardrail_summary" -Default $null
$digest = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest.v1"
source_handoff_schema = Get-PropertyValue -Item $handoff -Name "schema_version" -Default $null
digest_status = "operator_stop_handoff_digest_complete"
digest_marker = "c19z147_real_adapter_not_approved_outcome_operator_stop_handoff_digest"
operator_status = Get-PropertyValue -Item $handoff -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $handoff -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $handoff -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $handoff -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $handoff -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $handoff -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $handoff -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $handoff -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $handoff -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
digest_notes = $requiredDigestNotes
}
$digestFieldsCompatible = Test-ObjectHasFields -Item $digest -Fields $requiredDigestFields
$digestValuesCompatible = (
[string](Get-PropertyValue -Item $digest -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest.v1" -and
[string](Get-PropertyValue -Item $digest -Name "source_handoff_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff.v1" -and
[string](Get-PropertyValue -Item $digest -Name "digest_status" -Default "") -eq "operator_stop_handoff_digest_complete" -and
[string](Get-PropertyValue -Item $digest -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $digest -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $digest -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $digest -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $digest -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $digest -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $digest -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $digest -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $digest -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $digest -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $digest -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $digest -Name "allows_payload_traffic" -Default $true)
)
$digestNotesCompatible = Test-ArrayContainsAll -Actual @($digest.digest_notes) -Expected $requiredDigestNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z146.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_compatibility_smoke.v1")
handoff_present = ($null -ne $handoff)
digest_fields_compatible = $digestFieldsCompatible
digest_values_compatible = $digestValuesCompatible
digest_notes_compatible = $digestNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z147.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_digest_fields = $requiredDigestFields
required_guardrail_fields = $requiredGuardrailFields
required_digest_notes = $requiredDigestNotes
not_approved_outcome_operator_stop_handoff_digest = $digest
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z147 remote workspace real-adapter not-approved outcome operator stop handoff digest smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z147 remote workspace real-adapter not-approved outcome operator stop handoff digest smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,131 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z148-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-digest-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z148-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-digest-source-result.json"
$requiredDigestFields = @("schema_version", "source_handoff_schema", "digest_status", "digest_marker", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "digest_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredDigestNotes = @("operator_stop_handoff_digest_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z147-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-digest-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$digest = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_handoff_digest" -Default $null
$guardrails = Get-PropertyValue -Item $digest -Name "guardrail_summary" -Default $null
$digestNotes = @(Get-PropertyValue -Item $digest -Name "digest_notes" -Default @())
$digestFieldsCompatible = Test-ObjectHasFields -Item $digest -Fields $requiredDigestFields
$digestValuesCompatible = (
[string](Get-PropertyValue -Item $digest -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest.v1" -and
[string](Get-PropertyValue -Item $digest -Name "source_handoff_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff.v1" -and
[string](Get-PropertyValue -Item $digest -Name "digest_status" -Default "") -eq "operator_stop_handoff_digest_complete" -and
[string](Get-PropertyValue -Item $digest -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $digest -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $digest -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $digest -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $digest -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $digest -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $digest -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $digest -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $digest -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $digest -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $digest -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $digest -Name "allows_payload_traffic" -Default $true)
)
$digestNotesCompatible = Test-ArrayContainsAll -Actual $digestNotes -Expected $requiredDigestNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z147.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest_smoke.v1")
digest_present = ($null -ne $digest)
digest_fields_compatible = $digestFieldsCompatible
digest_values_compatible = $digestValuesCompatible
digest_notes_compatible = $digestNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z148.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_digest_fields = $requiredDigestFields
required_guardrail_fields = $requiredGuardrailFields
required_digest_notes = $requiredDigestNotes
not_approved_outcome_operator_stop_handoff_digest = $digest
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z148 remote workspace real-adapter not-approved outcome operator stop handoff digest compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z148 remote workspace real-adapter not-approved outcome operator stop handoff digest compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,177 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z149-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z149-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-source-result.json"
$requiredSnapshotFields = @(
"schema_version",
"source_digest_schema",
"snapshot_status",
"snapshot_marker",
"operator_status",
"operator_action",
"display_severity",
"next_allowed_entrypoint",
"attempt_allowed",
"block_reason",
"blocks_not_approved_extension",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"snapshot_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredSnapshotNotes = @(
"operator_stop_status_snapshot_complete",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z148-remote-workspace-real-adapter-not-approved-outcome-operator-stop-handoff-digest-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$digest = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_handoff_digest" -Default $null
$guardrails = Get-PropertyValue -Item $digest -Name "guardrail_summary" -Default $null
$snapshot = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot.v1"
source_digest_schema = Get-PropertyValue -Item $digest -Name "schema_version" -Default $null
snapshot_status = "operator_stop_status_snapshot_complete"
snapshot_marker = "c19z149_real_adapter_not_approved_outcome_operator_stop_status_snapshot"
operator_status = Get-PropertyValue -Item $digest -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $digest -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $digest -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $digest -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $digest -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $digest -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $digest -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $digest -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $digest -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
snapshot_notes = $requiredSnapshotNotes
}
$snapshotFieldsCompatible = Test-ObjectHasFields -Item $snapshot -Fields $requiredSnapshotFields
$snapshotValuesCompatible = (
[string](Get-PropertyValue -Item $snapshot -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot.v1" -and
[string](Get-PropertyValue -Item $snapshot -Name "source_digest_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest.v1" -and
[string](Get-PropertyValue -Item $snapshot -Name "snapshot_status" -Default "") -eq "operator_stop_status_snapshot_complete" -and
[string](Get-PropertyValue -Item $snapshot -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $snapshot -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $snapshot -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $snapshot -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $snapshot -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $snapshot -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $snapshot -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $snapshot -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $snapshot -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $snapshot -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $snapshot -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $snapshot -Name "allows_payload_traffic" -Default $true)
)
$snapshotNotesCompatible = Test-ArrayContainsAll -Actual @($snapshot.snapshot_notes) -Expected $requiredSnapshotNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z148.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest_compatibility_smoke.v1")
digest_present = ($null -ne $digest)
snapshot_fields_compatible = $snapshotFieldsCompatible
snapshot_values_compatible = $snapshotValuesCompatible
snapshot_notes_compatible = $snapshotNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z149.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_snapshot_fields = $requiredSnapshotFields
required_guardrail_fields = $requiredGuardrailFields
required_snapshot_notes = $requiredSnapshotNotes
not_approved_outcome_operator_stop_status_snapshot = $snapshot
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z149 remote workspace real-adapter not-approved outcome operator stop status snapshot smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z149 remote workspace real-adapter not-approved outcome operator stop status snapshot smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,83 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z15-remote-workspace-mailbox-preflight-attention-reason-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z15-remote-workspace-mailbox-preflight-attention-reason-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-AttentionReason {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_status" -Default "") -eq "repeated_resync_required" -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_reason" -Default "") -eq "resync_required_preflight_repeated" -and
[string](Get-PropertyValue -Item $rollup -Name "preflight_attention_status" -Default "") -eq "repeated_resync_required" -and
[string](Get-PropertyValue -Item $rollup -Name "preflight_attention_reason" -Default "") -eq "resync_required_preflight_repeated"
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z14-remote-workspace-mailbox-preflight-repeated-attention-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_attention_reason_visible = (Test-AttentionReason -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_attention_reason_visible = (Test-AttentionReason -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z15.remote_workspace_mailbox_preflight_attention_reason_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z15 remote workspace mailbox preflight attention reason smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z15 remote workspace mailbox preflight attention reason smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,131 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z150-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z150-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-source-result.json"
$requiredSnapshotFields = @("schema_version", "source_digest_schema", "snapshot_status", "snapshot_marker", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "snapshot_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredSnapshotNotes = @("operator_stop_status_snapshot_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z149-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$snapshot = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_snapshot" -Default $null
$guardrails = Get-PropertyValue -Item $snapshot -Name "guardrail_summary" -Default $null
$snapshotNotes = @(Get-PropertyValue -Item $snapshot -Name "snapshot_notes" -Default @())
$snapshotFieldsCompatible = Test-ObjectHasFields -Item $snapshot -Fields $requiredSnapshotFields
$snapshotValuesCompatible = (
[string](Get-PropertyValue -Item $snapshot -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot.v1" -and
[string](Get-PropertyValue -Item $snapshot -Name "source_digest_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_handoff_digest.v1" -and
[string](Get-PropertyValue -Item $snapshot -Name "snapshot_status" -Default "") -eq "operator_stop_status_snapshot_complete" -and
[string](Get-PropertyValue -Item $snapshot -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $snapshot -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $snapshot -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $snapshot -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $snapshot -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $snapshot -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $snapshot -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $snapshot -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $snapshot -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $snapshot -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $snapshot -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $snapshot -Name "allows_payload_traffic" -Default $true)
)
$snapshotNotesCompatible = Test-ArrayContainsAll -Actual $snapshotNotes -Expected $requiredSnapshotNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z149.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_smoke.v1")
snapshot_present = ($null -ne $snapshot)
snapshot_fields_compatible = $snapshotFieldsCompatible
snapshot_values_compatible = $snapshotValuesCompatible
snapshot_notes_compatible = $snapshotNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z150.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_snapshot_fields = $requiredSnapshotFields
required_guardrail_fields = $requiredGuardrailFields
required_snapshot_notes = $requiredSnapshotNotes
not_approved_outcome_operator_stop_status_snapshot = $snapshot
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z150 remote workspace real-adapter not-approved outcome operator stop status snapshot compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z150 remote workspace real-adapter not-approved outcome operator stop status snapshot compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,180 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z151-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-index-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z151-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-index-source-result.json"
$requiredIndexFields = @(
"schema_version",
"source_snapshot_schema",
"index_status",
"index_marker",
"indexed_snapshot_status",
"operator_status",
"operator_action",
"display_severity",
"next_allowed_entrypoint",
"attempt_allowed",
"block_reason",
"blocks_not_approved_extension",
"enablement_status",
"runtime_gate_state",
"runtime_effect",
"allows_process_start",
"allows_payload_traffic",
"guardrail_summary",
"index_notes"
)
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredIndexNotes = @(
"operator_stop_status_snapshot_index_complete",
"not_approved_branch_remains_closed",
"new_explicit_enablement_request_required",
"real_runtime_gate_not_enabled",
"process_start_disabled",
"payload_forwarding_disabled"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z150-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$snapshot = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_snapshot" -Default $null
$guardrails = Get-PropertyValue -Item $snapshot -Name "guardrail_summary" -Default $null
$index = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index.v1"
source_snapshot_schema = Get-PropertyValue -Item $snapshot -Name "schema_version" -Default $null
index_status = "operator_stop_status_snapshot_index_complete"
index_marker = "c19z151_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index"
indexed_snapshot_status = Get-PropertyValue -Item $snapshot -Name "snapshot_status" -Default $null
operator_status = Get-PropertyValue -Item $snapshot -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $snapshot -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $snapshot -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $snapshot -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $snapshot -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $snapshot -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $snapshot -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $snapshot -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $snapshot -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
index_notes = $requiredIndexNotes
}
$indexFieldsCompatible = Test-ObjectHasFields -Item $index -Fields $requiredIndexFields
$indexValuesCompatible = (
[string](Get-PropertyValue -Item $index -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index.v1" -and
[string](Get-PropertyValue -Item $index -Name "source_snapshot_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot.v1" -and
[string](Get-PropertyValue -Item $index -Name "index_status" -Default "") -eq "operator_stop_status_snapshot_index_complete" -and
[string](Get-PropertyValue -Item $index -Name "indexed_snapshot_status" -Default "") -eq "operator_stop_status_snapshot_complete" -and
[string](Get-PropertyValue -Item $index -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $index -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $index -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $index -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $index -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $index -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $index -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $index -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $index -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $index -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $index -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $index -Name "allows_payload_traffic" -Default $true)
)
$indexNotesCompatible = Test-ArrayContainsAll -Actual @($index.index_notes) -Expected $requiredIndexNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z150.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_compatibility_smoke.v1")
snapshot_present = ($null -ne $snapshot)
index_fields_compatible = $indexFieldsCompatible
index_values_compatible = $indexValuesCompatible
index_notes_compatible = $indexNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z151.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_index_fields = $requiredIndexFields
required_guardrail_fields = $requiredGuardrailFields
required_index_notes = $requiredIndexNotes
not_approved_outcome_operator_stop_status_snapshot_index = $index
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z151 remote workspace real-adapter not-approved outcome operator stop status snapshot index smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z151 remote workspace real-adapter not-approved outcome operator stop status snapshot index smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,132 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z152-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-index-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z152-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-index-source-result.json"
$requiredIndexFields = @("schema_version", "source_snapshot_schema", "index_status", "index_marker", "indexed_snapshot_status", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "index_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredIndexNotes = @("operator_stop_status_snapshot_index_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z151-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-index-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$index = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_snapshot_index" -Default $null
$guardrails = Get-PropertyValue -Item $index -Name "guardrail_summary" -Default $null
$indexNotes = @(Get-PropertyValue -Item $index -Name "index_notes" -Default @())
$indexFieldsCompatible = Test-ObjectHasFields -Item $index -Fields $requiredIndexFields
$indexValuesCompatible = (
[string](Get-PropertyValue -Item $index -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index.v1" -and
[string](Get-PropertyValue -Item $index -Name "source_snapshot_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot.v1" -and
[string](Get-PropertyValue -Item $index -Name "index_status" -Default "") -eq "operator_stop_status_snapshot_index_complete" -and
[string](Get-PropertyValue -Item $index -Name "indexed_snapshot_status" -Default "") -eq "operator_stop_status_snapshot_complete" -and
[string](Get-PropertyValue -Item $index -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $index -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $index -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $index -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $index -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $index -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $index -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $index -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $index -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $index -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $index -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $index -Name "allows_payload_traffic" -Default $true)
)
$indexNotesCompatible = Test-ArrayContainsAll -Actual $indexNotes -Expected $requiredIndexNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z151.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index_smoke.v1")
index_present = ($null -ne $index)
index_fields_compatible = $indexFieldsCompatible
index_values_compatible = $indexValuesCompatible
index_notes_compatible = $indexNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z152.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_index_fields = $requiredIndexFields
required_guardrail_fields = $requiredGuardrailFields
required_index_notes = $requiredIndexNotes
not_approved_outcome_operator_stop_status_snapshot_index = $index
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z152 remote workspace real-adapter not-approved outcome operator stop status snapshot index compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z152 remote workspace real-adapter not-approved outcome operator stop status snapshot index compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,153 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z153-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z153-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-source-result.json"
$requiredCatalogFields = @("schema_version", "source_index_schema", "catalog_status", "catalog_marker", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "catalog_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCatalogNotes = @("operator_stop_status_catalog_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z152-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-snapshot-index-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$index = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_snapshot_index" -Default $null
$guardrails = Get-PropertyValue -Item $index -Name "guardrail_summary" -Default $null
$catalog = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog.v1"
source_index_schema = Get-PropertyValue -Item $index -Name "schema_version" -Default $null
catalog_status = "operator_stop_status_catalog_complete"
catalog_marker = "c19z153_real_adapter_not_approved_outcome_operator_stop_status_catalog"
catalog_entry_type = "blocked_not_approved_operator_stop"
operator_status = Get-PropertyValue -Item $index -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $index -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $index -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $index -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $index -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $index -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $index -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $index -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $index -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
catalog_notes = $requiredCatalogNotes
}
$catalogFieldsCompatible = Test-ObjectHasFields -Item $catalog -Fields $requiredCatalogFields
$catalogValuesCompatible = (
[string](Get-PropertyValue -Item $catalog -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog.v1" -and
[string](Get-PropertyValue -Item $catalog -Name "source_index_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index.v1" -and
[string](Get-PropertyValue -Item $catalog -Name "catalog_status" -Default "") -eq "operator_stop_status_catalog_complete" -and
[string](Get-PropertyValue -Item $catalog -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $catalog -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $catalog -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $catalog -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $catalog -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $catalog -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $catalog -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $catalog -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $catalog -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $catalog -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $catalog -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $catalog -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $catalog -Name "allows_payload_traffic" -Default $true)
)
$catalogNotesCompatible = Test-ArrayContainsAll -Actual @($catalog.catalog_notes) -Expected $requiredCatalogNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z152.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index_compatibility_smoke.v1")
index_present = ($null -ne $index)
catalog_fields_compatible = $catalogFieldsCompatible
catalog_values_compatible = $catalogValuesCompatible
catalog_notes_compatible = $catalogNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z153.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_catalog_fields = $requiredCatalogFields
required_guardrail_fields = $requiredGuardrailFields
required_catalog_notes = $requiredCatalogNotes
not_approved_outcome_operator_stop_status_catalog = $catalog
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z153 remote workspace real-adapter not-approved outcome operator stop status catalog smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z153 remote workspace real-adapter not-approved outcome operator stop status catalog smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,132 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z154-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z154-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-source-result.json"
$requiredCatalogFields = @("schema_version", "source_index_schema", "catalog_status", "catalog_marker", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "catalog_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCatalogNotes = @("operator_stop_status_catalog_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z153-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$catalog = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog" -Default $null
$guardrails = Get-PropertyValue -Item $catalog -Name "guardrail_summary" -Default $null
$catalogNotes = @(Get-PropertyValue -Item $catalog -Name "catalog_notes" -Default @())
$catalogFieldsCompatible = Test-ObjectHasFields -Item $catalog -Fields $requiredCatalogFields
$catalogValuesCompatible = (
[string](Get-PropertyValue -Item $catalog -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog.v1" -and
[string](Get-PropertyValue -Item $catalog -Name "source_index_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_snapshot_index.v1" -and
[string](Get-PropertyValue -Item $catalog -Name "catalog_status" -Default "") -eq "operator_stop_status_catalog_complete" -and
[string](Get-PropertyValue -Item $catalog -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $catalog -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $catalog -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $catalog -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $catalog -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $catalog -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $catalog -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $catalog -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $catalog -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $catalog -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $catalog -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $catalog -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $catalog -Name "allows_payload_traffic" -Default $true)
)
$catalogNotesCompatible = Test-ArrayContainsAll -Actual $catalogNotes -Expected $requiredCatalogNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z153.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_smoke.v1")
catalog_present = ($null -ne $catalog)
catalog_fields_compatible = $catalogFieldsCompatible
catalog_values_compatible = $catalogValuesCompatible
catalog_notes_compatible = $catalogNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z154.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_catalog_fields = $requiredCatalogFields
required_guardrail_fields = $requiredGuardrailFields
required_catalog_notes = $requiredCatalogNotes
not_approved_outcome_operator_stop_status_catalog = $catalog
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z154 remote workspace real-adapter not-approved outcome operator stop status catalog compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z154 remote workspace real-adapter not-approved outcome operator stop status catalog compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,155 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z155-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-release-marker-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z155-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-release-marker-source-result.json"
$requiredReleaseFields = @("schema_version", "source_catalog_schema", "release_status", "release_marker", "catalog_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "release_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredReleaseNotes = @("operator_stop_status_catalog_release_marked", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z154-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$catalog = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog" -Default $null
$guardrails = Get-PropertyValue -Item $catalog -Name "guardrail_summary" -Default $null
$release = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker.v1"
source_catalog_schema = Get-PropertyValue -Item $catalog -Name "schema_version" -Default $null
release_status = "operator_stop_status_catalog_released_contract_only"
release_marker = "c19z155_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker"
catalog_status = Get-PropertyValue -Item $catalog -Name "catalog_status" -Default $null
catalog_entry_type = Get-PropertyValue -Item $catalog -Name "catalog_entry_type" -Default $null
operator_status = Get-PropertyValue -Item $catalog -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $catalog -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $catalog -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $catalog -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $catalog -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $catalog -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $catalog -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $catalog -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $catalog -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
release_notes = $requiredReleaseNotes
}
$releaseFieldsCompatible = Test-ObjectHasFields -Item $release -Fields $requiredReleaseFields
$releaseValuesCompatible = (
[string](Get-PropertyValue -Item $release -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker.v1" -and
[string](Get-PropertyValue -Item $release -Name "source_catalog_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog.v1" -and
[string](Get-PropertyValue -Item $release -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $release -Name "catalog_status" -Default "") -eq "operator_stop_status_catalog_complete" -and
[string](Get-PropertyValue -Item $release -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $release -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $release -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $release -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $release -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $release -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $release -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $release -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $release -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $release -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $release -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $release -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $release -Name "allows_payload_traffic" -Default $true)
)
$releaseNotesCompatible = Test-ArrayContainsAll -Actual @($release.release_notes) -Expected $requiredReleaseNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z154.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_compatibility_smoke.v1")
catalog_present = ($null -ne $catalog)
release_fields_compatible = $releaseFieldsCompatible
release_values_compatible = $releaseValuesCompatible
release_notes_compatible = $releaseNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z155.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_release_fields = $requiredReleaseFields
required_guardrail_fields = $requiredGuardrailFields
required_release_notes = $requiredReleaseNotes
not_approved_outcome_operator_stop_status_catalog_release_marker = $release
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z155 remote workspace real-adapter not-approved outcome operator stop status catalog release marker smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z155 remote workspace real-adapter not-approved outcome operator stop status catalog release marker smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,133 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z156-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-release-marker-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z156-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-release-marker-source-result.json"
$requiredReleaseFields = @("schema_version", "source_catalog_schema", "release_status", "release_marker", "catalog_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "release_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredReleaseNotes = @("operator_stop_status_catalog_release_marked", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z155-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-release-marker-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$release = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $release -Name "guardrail_summary" -Default $null
$releaseNotes = @(Get-PropertyValue -Item $release -Name "release_notes" -Default @())
$releaseFieldsCompatible = Test-ObjectHasFields -Item $release -Fields $requiredReleaseFields
$releaseValuesCompatible = (
[string](Get-PropertyValue -Item $release -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker.v1" -and
[string](Get-PropertyValue -Item $release -Name "source_catalog_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog.v1" -and
[string](Get-PropertyValue -Item $release -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $release -Name "catalog_status" -Default "") -eq "operator_stop_status_catalog_complete" -and
[string](Get-PropertyValue -Item $release -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $release -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $release -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $release -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $release -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $release -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $release -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $release -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $release -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $release -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $release -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $release -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $release -Name "allows_payload_traffic" -Default $true)
)
$releaseNotesCompatible = Test-ArrayContainsAll -Actual $releaseNotes -Expected $requiredReleaseNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z155.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker_smoke.v1")
release_present = ($null -ne $release)
release_fields_compatible = $releaseFieldsCompatible
release_values_compatible = $releaseValuesCompatible
release_notes_compatible = $releaseNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z156.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_release_fields = $requiredReleaseFields
required_guardrail_fields = $requiredGuardrailFields
required_release_notes = $requiredReleaseNotes
not_approved_outcome_operator_stop_status_catalog_release_marker = $release
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z156 remote workspace real-adapter not-approved outcome operator stop status catalog release marker compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z156 remote workspace real-adapter not-approved outcome operator stop status catalog release marker compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,155 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z157-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-package-index-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z157-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-package-index-source-result.json"
$requiredPackageFields = @("schema_version", "source_release_schema", "package_status", "package_marker", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "package_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredPackageNotes = @("operator_stop_status_catalog_package_index_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z156-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-release-marker-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$release = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog_release_marker" -Default $null
$guardrails = Get-PropertyValue -Item $release -Name "guardrail_summary" -Default $null
$packageIndex = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index.v1"
source_release_schema = Get-PropertyValue -Item $release -Name "schema_version" -Default $null
package_status = "operator_stop_status_catalog_package_index_complete"
package_marker = "c19z157_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index"
release_status = Get-PropertyValue -Item $release -Name "release_status" -Default $null
catalog_entry_type = Get-PropertyValue -Item $release -Name "catalog_entry_type" -Default $null
operator_status = Get-PropertyValue -Item $release -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $release -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $release -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $release -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $release -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $release -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $release -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $release -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $release -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
package_notes = $requiredPackageNotes
}
$packageFieldsCompatible = Test-ObjectHasFields -Item $packageIndex -Fields $requiredPackageFields
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "source_release_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $packageIndex -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $packageIndex -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $packageIndex -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $packageIndex -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $packageIndex -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_payload_traffic" -Default $true)
)
$packageNotesCompatible = Test-ArrayContainsAll -Actual @($packageIndex.package_notes) -Expected $requiredPackageNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z156.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker_compatibility_smoke.v1")
release_present = ($null -ne $release)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
package_notes_compatible = $packageNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z157.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
required_guardrail_fields = $requiredGuardrailFields
required_package_notes = $requiredPackageNotes
not_approved_outcome_operator_stop_status_catalog_package_index = $packageIndex
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z157 remote workspace real-adapter not-approved outcome operator stop status catalog package index smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z157 remote workspace real-adapter not-approved outcome operator stop status catalog package index smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,133 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z158-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-package-index-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z158-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-package-index-source-result.json"
$requiredPackageFields = @("schema_version", "source_release_schema", "package_status", "package_marker", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "package_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredPackageNotes = @("operator_stop_status_catalog_package_index_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z157-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-package-index-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$packageIndex = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog_package_index" -Default $null
$guardrails = Get-PropertyValue -Item $packageIndex -Name "guardrail_summary" -Default $null
$packageNotes = @(Get-PropertyValue -Item $packageIndex -Name "package_notes" -Default @())
$packageFieldsCompatible = Test-ObjectHasFields -Item $packageIndex -Fields $requiredPackageFields
$packageValuesCompatible = (
[string](Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "source_release_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_release_marker.v1" -and
[string](Get-PropertyValue -Item $packageIndex -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $packageIndex -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $packageIndex -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $packageIndex -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $packageIndex -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $packageIndex -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $packageIndex -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $packageIndex -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $packageIndex -Name "allows_payload_traffic" -Default $true)
)
$packageNotesCompatible = Test-ArrayContainsAll -Actual $packageNotes -Expected $requiredPackageNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z157.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index_smoke.v1")
package_present = ($null -ne $packageIndex)
package_fields_compatible = $packageFieldsCompatible
package_values_compatible = $packageValuesCompatible
package_notes_compatible = $packageNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z158.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_package_fields = $requiredPackageFields
required_guardrail_fields = $requiredGuardrailFields
required_package_notes = $requiredPackageNotes
not_approved_outcome_operator_stop_status_catalog_package_index = $packageIndex
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z158 remote workspace real-adapter not-approved outcome operator stop status catalog package index compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z158 remote workspace real-adapter not-approved outcome operator stop status catalog package index compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,157 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z159-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-closeout-summary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z159-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-closeout-summary-source-result.json"
$requiredCloseoutFields = @("schema_version", "source_package_schema", "closeout_status", "closeout_marker", "package_status", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "closeout_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCloseoutNotes = @("operator_stop_status_catalog_closeout_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z158-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-package-index-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$packageIndex = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog_package_index" -Default $null
$guardrails = Get-PropertyValue -Item $packageIndex -Name "guardrail_summary" -Default $null
$closeout = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary.v1"
source_package_schema = Get-PropertyValue -Item $packageIndex -Name "schema_version" -Default $null
closeout_status = "operator_stop_status_catalog_package_closed_contract_only"
closeout_marker = "c19z159_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary"
package_status = Get-PropertyValue -Item $packageIndex -Name "package_status" -Default $null
release_status = Get-PropertyValue -Item $packageIndex -Name "release_status" -Default $null
catalog_entry_type = Get-PropertyValue -Item $packageIndex -Name "catalog_entry_type" -Default $null
operator_status = Get-PropertyValue -Item $packageIndex -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $packageIndex -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $packageIndex -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $packageIndex -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $packageIndex -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $packageIndex -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $packageIndex -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $packageIndex -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $packageIndex -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
closeout_notes = $requiredCloseoutNotes
}
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_package_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_status" -Default "") -eq "operator_stop_status_catalog_package_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $closeout -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $closeout -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $closeout -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $closeout -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $closeout -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$closeoutNotesCompatible = Test-ArrayContainsAll -Actual @($closeout.closeout_notes) -Expected $requiredCloseoutNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z158.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index_compatibility_smoke.v1")
package_present = ($null -ne $packageIndex)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
closeout_notes_compatible = $closeoutNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z159.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_guardrail_fields = $requiredGuardrailFields
required_closeout_notes = $requiredCloseoutNotes
not_approved_outcome_operator_stop_status_catalog_closeout_summary = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z159 remote workspace real-adapter not-approved outcome operator stop status catalog closeout summary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z159 remote workspace real-adapter not-approved outcome operator stop status catalog closeout summary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,83 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z16-remote-workspace-mailbox-preflight-attention-reason-coverage-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z16-remote-workspace-mailbox-preflight-attention-reason-coverage-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-SingleAttentionReason {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_status" -Default "") -eq "needs_attention" -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_reason" -Default "") -eq "resync_required_preflight_observed" -and
[string](Get-PropertyValue -Item $rollup -Name "preflight_attention_status" -Default "") -eq "needs_attention" -and
[string](Get-PropertyValue -Item $rollup -Name "preflight_attention_reason" -Default "") -eq "resync_required_preflight_observed"
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z13-remote-workspace-mailbox-preflight-attention-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_single_attention_reason_visible = (Test-SingleAttentionReason -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_single_attention_reason_visible = (Test-SingleAttentionReason -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z16.remote_workspace_mailbox_preflight_attention_reason_coverage_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z16 remote workspace mailbox preflight attention reason coverage smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z16 remote workspace mailbox preflight attention reason coverage smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,134 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z160-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-closeout-summary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z160-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-closeout-summary-source-result.json"
$requiredCloseoutFields = @("schema_version", "source_package_schema", "closeout_status", "closeout_marker", "package_status", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "closeout_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredCloseoutNotes = @("operator_stop_status_catalog_closeout_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z159-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-closeout-summary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog_closeout_summary" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$closeoutNotes = @(Get-PropertyValue -Item $closeout -Name "closeout_notes" -Default @())
$closeoutFieldsCompatible = Test-ObjectHasFields -Item $closeout -Fields $requiredCloseoutFields
$closeoutValuesCompatible = (
[string](Get-PropertyValue -Item $closeout -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "source_package_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_package_index.v1" -and
[string](Get-PropertyValue -Item $closeout -Name "closeout_status" -Default "") -eq "operator_stop_status_catalog_package_closed_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $closeout -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $closeout -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $closeout -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $closeout -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $closeout -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $closeout -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $closeout -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $closeout -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $closeout -Name "allows_payload_traffic" -Default $true)
)
$closeoutNotesCompatible = Test-ArrayContainsAll -Actual $closeoutNotes -Expected $requiredCloseoutNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z159.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary_smoke.v1")
closeout_present = ($null -ne $closeout)
closeout_fields_compatible = $closeoutFieldsCompatible
closeout_values_compatible = $closeoutValuesCompatible
closeout_notes_compatible = $closeoutNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z160.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_closeout_fields = $requiredCloseoutFields
required_guardrail_fields = $requiredGuardrailFields
required_closeout_notes = $requiredCloseoutNotes
not_approved_outcome_operator_stop_status_catalog_closeout_summary = $closeout
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z160 remote workspace real-adapter not-approved outcome operator stop status catalog closeout summary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z160 remote workspace real-adapter not-approved outcome operator stop status catalog closeout summary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,159 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z161-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-marker-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z161-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-marker-source-result.json"
$requiredArchiveFields = @("schema_version", "source_closeout_schema", "archive_status", "archive_marker", "closeout_status", "package_status", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "archive_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredArchiveNotes = @("operator_stop_status_final_archive_marked", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z160-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-catalog-closeout-summary-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$closeout = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_catalog_closeout_summary" -Default $null
$guardrails = Get-PropertyValue -Item $closeout -Name "guardrail_summary" -Default $null
$archive = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker.v1"
source_closeout_schema = Get-PropertyValue -Item $closeout -Name "schema_version" -Default $null
archive_status = "operator_stop_status_final_archived_contract_only"
archive_marker = "c19z161_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker"
closeout_status = Get-PropertyValue -Item $closeout -Name "closeout_status" -Default $null
package_status = Get-PropertyValue -Item $closeout -Name "package_status" -Default $null
release_status = Get-PropertyValue -Item $closeout -Name "release_status" -Default $null
catalog_entry_type = Get-PropertyValue -Item $closeout -Name "catalog_entry_type" -Default $null
operator_status = Get-PropertyValue -Item $closeout -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $closeout -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $closeout -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $closeout -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $closeout -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $closeout -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $closeout -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $closeout -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $closeout -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
archive_notes = $requiredArchiveNotes
}
$archiveFieldsCompatible = Test-ObjectHasFields -Item $archive -Fields $requiredArchiveFields
$archiveValuesCompatible = (
[string](Get-PropertyValue -Item $archive -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker.v1" -and
[string](Get-PropertyValue -Item $archive -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $archive -Name "archive_status" -Default "") -eq "operator_stop_status_final_archived_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "closeout_status" -Default "") -eq "operator_stop_status_catalog_package_closed_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $archive -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $archive -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $archive -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $archive -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $archive -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $archive -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $archive -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $archive -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $archive -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_payload_traffic" -Default $true)
)
$archiveNotesCompatible = Test-ArrayContainsAll -Actual @($archive.archive_notes) -Expected $requiredArchiveNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z160.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary_compatibility_smoke.v1")
closeout_present = ($null -ne $closeout)
archive_fields_compatible = $archiveFieldsCompatible
archive_values_compatible = $archiveValuesCompatible
archive_notes_compatible = $archiveNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z161.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_archive_fields = $requiredArchiveFields
required_guardrail_fields = $requiredGuardrailFields
required_archive_notes = $requiredArchiveNotes
not_approved_outcome_operator_stop_status_final_archive_marker = $archive
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z161 remote workspace real-adapter not-approved outcome operator stop status final archive marker smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z161 remote workspace real-adapter not-approved outcome operator stop status final archive marker smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,135 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z162-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-marker-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z162-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-marker-source-result.json"
$requiredArchiveFields = @("schema_version", "source_closeout_schema", "archive_status", "archive_marker", "closeout_status", "package_status", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "archive_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredArchiveNotes = @("operator_stop_status_final_archive_marked", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z161-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-marker-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$archive = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_final_archive_marker" -Default $null
$guardrails = Get-PropertyValue -Item $archive -Name "guardrail_summary" -Default $null
$archiveNotes = @(Get-PropertyValue -Item $archive -Name "archive_notes" -Default @())
$archiveFieldsCompatible = Test-ObjectHasFields -Item $archive -Fields $requiredArchiveFields
$archiveValuesCompatible = (
[string](Get-PropertyValue -Item $archive -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker.v1" -and
[string](Get-PropertyValue -Item $archive -Name "source_closeout_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_catalog_closeout_summary.v1" -and
[string](Get-PropertyValue -Item $archive -Name "archive_status" -Default "") -eq "operator_stop_status_final_archived_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "closeout_status" -Default "") -eq "operator_stop_status_catalog_package_closed_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $archive -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $archive -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $archive -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $archive -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $archive -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $archive -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $archive -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $archive -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $archive -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $archive -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $archive -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $archive -Name "allows_payload_traffic" -Default $true)
)
$archiveNotesCompatible = Test-ArrayContainsAll -Actual $archiveNotes -Expected $requiredArchiveNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z161.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker_smoke.v1")
archive_present = ($null -ne $archive)
archive_fields_compatible = $archiveFieldsCompatible
archive_values_compatible = $archiveValuesCompatible
archive_notes_compatible = $archiveNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z162.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_archive_fields = $requiredArchiveFields
required_guardrail_fields = $requiredGuardrailFields
required_archive_notes = $requiredArchiveNotes
not_approved_outcome_operator_stop_status_final_archive_marker = $archive
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z162 remote workspace real-adapter not-approved outcome operator stop status final archive marker compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z162 remote workspace real-adapter not-approved outcome operator stop status final archive marker compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,161 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z163-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-manifest-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z163-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-manifest-source-result.json"
$requiredManifestFields = @("schema_version", "source_archive_schema", "manifest_status", "manifest_marker", "archive_status", "closeout_status", "package_status", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "manifest_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredManifestNotes = @("operator_stop_status_final_archive_manifest_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z162-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-marker-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$archive = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_final_archive_marker" -Default $null
$guardrails = Get-PropertyValue -Item $archive -Name "guardrail_summary" -Default $null
$manifest = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest.v1"
source_archive_schema = Get-PropertyValue -Item $archive -Name "schema_version" -Default $null
manifest_status = "operator_stop_status_final_archive_manifest_complete"
manifest_marker = "c19z163_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest"
archive_status = Get-PropertyValue -Item $archive -Name "archive_status" -Default $null
closeout_status = Get-PropertyValue -Item $archive -Name "closeout_status" -Default $null
package_status = Get-PropertyValue -Item $archive -Name "package_status" -Default $null
release_status = Get-PropertyValue -Item $archive -Name "release_status" -Default $null
catalog_entry_type = Get-PropertyValue -Item $archive -Name "catalog_entry_type" -Default $null
operator_status = Get-PropertyValue -Item $archive -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $archive -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $archive -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $archive -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $archive -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $archive -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $archive -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $archive -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $archive -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
manifest_notes = $requiredManifestNotes
}
$manifestFieldsCompatible = Test-ObjectHasFields -Item $manifest -Fields $requiredManifestFields
$manifestValuesCompatible = (
[string](Get-PropertyValue -Item $manifest -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "source_archive_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "manifest_status" -Default "") -eq "operator_stop_status_final_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "archive_status" -Default "") -eq "operator_stop_status_final_archived_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "closeout_status" -Default "") -eq "operator_stop_status_catalog_package_closed_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $manifest -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $manifest -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $manifest -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $manifest -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $manifest -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $manifest -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_payload_traffic" -Default $true)
)
$manifestNotesCompatible = Test-ArrayContainsAll -Actual @($manifest.manifest_notes) -Expected $requiredManifestNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z162.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker_compatibility_smoke.v1")
archive_present = ($null -ne $archive)
manifest_fields_compatible = $manifestFieldsCompatible
manifest_values_compatible = $manifestValuesCompatible
manifest_notes_compatible = $manifestNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z163.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_manifest_fields = $requiredManifestFields
required_guardrail_fields = $requiredGuardrailFields
required_manifest_notes = $requiredManifestNotes
not_approved_outcome_operator_stop_status_final_archive_manifest = $manifest
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z163 remote workspace real-adapter not-approved outcome operator stop status final archive manifest smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z163 remote workspace real-adapter not-approved outcome operator stop status final archive manifest smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,136 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z164-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-manifest-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z164-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-manifest-source-result.json"
$requiredManifestFields = @("schema_version", "source_archive_schema", "manifest_status", "manifest_marker", "archive_status", "closeout_status", "package_status", "release_status", "catalog_entry_type", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "manifest_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredManifestNotes = @("operator_stop_status_final_archive_manifest_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z163-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-manifest-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$manifest = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_final_archive_manifest" -Default $null
$guardrails = Get-PropertyValue -Item $manifest -Name "guardrail_summary" -Default $null
$manifestNotes = @(Get-PropertyValue -Item $manifest -Name "manifest_notes" -Default @())
$manifestFieldsCompatible = Test-ObjectHasFields -Item $manifest -Fields $requiredManifestFields
$manifestValuesCompatible = (
[string](Get-PropertyValue -Item $manifest -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "source_archive_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_marker.v1" -and
[string](Get-PropertyValue -Item $manifest -Name "manifest_status" -Default "") -eq "operator_stop_status_final_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "archive_status" -Default "") -eq "operator_stop_status_final_archived_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "closeout_status" -Default "") -eq "operator_stop_status_catalog_package_closed_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "package_status" -Default "") -eq "operator_stop_status_catalog_package_index_complete" -and
[string](Get-PropertyValue -Item $manifest -Name "release_status" -Default "") -eq "operator_stop_status_catalog_released_contract_only" -and
[string](Get-PropertyValue -Item $manifest -Name "catalog_entry_type" -Default "") -eq "blocked_not_approved_operator_stop" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $manifest -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $manifest -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $manifest -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $manifest -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $manifest -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $manifest -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $manifest -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $manifest -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $manifest -Name "allows_payload_traffic" -Default $true)
)
$manifestNotesCompatible = Test-ArrayContainsAll -Actual $manifestNotes -Expected $requiredManifestNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z163.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest_smoke.v1")
manifest_present = ($null -ne $manifest)
manifest_fields_compatible = $manifestFieldsCompatible
manifest_values_compatible = $manifestValuesCompatible
manifest_notes_compatible = $manifestNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z164.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_manifest_fields = $requiredManifestFields
required_guardrail_fields = $requiredGuardrailFields
required_manifest_notes = $requiredManifestNotes
not_approved_outcome_operator_stop_status_final_archive_manifest = $manifest
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z164 remote workspace real-adapter not-approved outcome operator stop status final archive manifest compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z164 remote workspace real-adapter not-approved outcome operator stop status final archive manifest compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,157 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z165-remote-workspace-real-adapter-not-approved-outcome-factory-terminal-complete-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z165-remote-workspace-real-adapter-not-approved-outcome-factory-terminal-complete-source-result.json"
$requiredTerminalFields = @("schema_version", "source_manifest_schema", "terminal_status", "terminal_marker", "factory_status", "archive_status", "manifest_status", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "terminal_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredTerminalNotes = @("operator_stop_factory_terminal_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z164-remote-workspace-real-adapter-not-approved-outcome-operator-stop-status-final-archive-manifest-compatibility-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$manifest = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_operator_stop_status_final_archive_manifest" -Default $null
$guardrails = Get-PropertyValue -Item $manifest -Name "guardrail_summary" -Default $null
$terminal = [ordered]@{
schema_version = "rap.remote_workspace_real_adapter_not_approved_outcome_factory_terminal_complete.v1"
source_manifest_schema = Get-PropertyValue -Item $manifest -Name "schema_version" -Default $null
terminal_status = "factory_terminal_complete_contract_only"
terminal_marker = "c19z165_real_adapter_not_approved_outcome_factory_terminal_complete"
factory_status = "complete_no_more_not_approved_layers_required"
archive_status = Get-PropertyValue -Item $manifest -Name "archive_status" -Default $null
manifest_status = Get-PropertyValue -Item $manifest -Name "manifest_status" -Default $null
operator_status = Get-PropertyValue -Item $manifest -Name "operator_status" -Default $null
operator_action = Get-PropertyValue -Item $manifest -Name "operator_action" -Default $null
display_severity = Get-PropertyValue -Item $manifest -Name "display_severity" -Default $null
next_allowed_entrypoint = Get-PropertyValue -Item $manifest -Name "next_allowed_entrypoint" -Default $null
attempt_allowed = $false
block_reason = Get-PropertyValue -Item $manifest -Name "block_reason" -Default $null
blocks_not_approved_extension = Get-PropertyValue -Item $manifest -Name "blocks_not_approved_extension" -Default $null
enablement_status = Get-PropertyValue -Item $manifest -Name "enablement_status" -Default $null
runtime_gate_state = Get-PropertyValue -Item $manifest -Name "runtime_gate_state" -Default $null
runtime_effect = Get-PropertyValue -Item $manifest -Name "runtime_effect" -Default $null
allows_process_start = $false
allows_payload_traffic = $false
guardrail_summary = $guardrails
terminal_notes = $requiredTerminalNotes
}
$terminalFieldsCompatible = Test-ObjectHasFields -Item $terminal -Fields $requiredTerminalFields
$terminalValuesCompatible = (
[string](Get-PropertyValue -Item $terminal -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_factory_terminal_complete.v1" -and
[string](Get-PropertyValue -Item $terminal -Name "source_manifest_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest.v1" -and
[string](Get-PropertyValue -Item $terminal -Name "terminal_status" -Default "") -eq "factory_terminal_complete_contract_only" -and
[string](Get-PropertyValue -Item $terminal -Name "factory_status" -Default "") -eq "complete_no_more_not_approved_layers_required" -and
[string](Get-PropertyValue -Item $terminal -Name "archive_status" -Default "") -eq "operator_stop_status_final_archived_contract_only" -and
[string](Get-PropertyValue -Item $terminal -Name "manifest_status" -Default "") -eq "operator_stop_status_final_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $terminal -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $terminal -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $terminal -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $terminal -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $terminal -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $terminal -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $terminal -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $terminal -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $terminal -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $terminal -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $terminal -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $terminal -Name "allows_payload_traffic" -Default $true)
)
$terminalNotesCompatible = Test-ArrayContainsAll -Actual @($terminal.terminal_notes) -Expected $requiredTerminalNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z164.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest_compatibility_smoke.v1")
manifest_present = ($null -ne $manifest)
terminal_fields_compatible = $terminalFieldsCompatible
terminal_values_compatible = $terminalValuesCompatible
terminal_notes_compatible = $terminalNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z165.remote_workspace_real_adapter_not_approved_outcome_factory_terminal_complete_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_terminal_fields = $requiredTerminalFields
required_guardrail_fields = $requiredGuardrailFields
required_terminal_notes = $requiredTerminalNotes
not_approved_outcome_factory_terminal_complete = $terminal
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z165 remote workspace real-adapter not-approved outcome factory terminal complete smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z165 remote workspace real-adapter not-approved outcome factory terminal complete smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,134 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$MatrixNodeName = "test-1",
[string]$ResultPath = "artifacts\c19z166-remote-workspace-real-adapter-not-approved-outcome-factory-terminal-complete-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z166-remote-workspace-real-adapter-not-approved-outcome-factory-terminal-complete-source-result.json"
$requiredTerminalFields = @("schema_version", "source_manifest_schema", "terminal_status", "terminal_marker", "factory_status", "archive_status", "manifest_status", "operator_status", "operator_action", "display_severity", "next_allowed_entrypoint", "attempt_allowed", "block_reason", "blocks_not_approved_extension", "enablement_status", "runtime_gate_state", "runtime_effect", "allows_process_start", "allows_payload_traffic", "guardrail_summary", "terminal_notes")
$requiredGuardrailFields = @("activation_blocked", "process_start_allowed", "health_probe_enabled", "payload_traffic", "allows_process_start", "allows_payload_traffic")
$requiredTerminalNotes = @("operator_stop_factory_terminal_complete", "not_approved_branch_remains_closed", "new_explicit_enablement_request_required", "real_runtime_gate_not_enabled", "process_start_disabled", "payload_forwarding_disabled")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ObjectHasFields {
param([object]$Item, [string[]]$Fields)
if ($null -eq $Item) { return $false }
foreach ($field in $Fields) {
if ($Item -is [System.Collections.IDictionary]) {
if (-not $Item.Contains($field)) { return $false }
continue
}
if ($null -eq $Item.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ArrayContainsAll {
param([object[]]$Actual, [string[]]$Expected)
foreach ($item in $Expected) {
if ($Actual -notcontains $item) { return $false }
}
return $true
}
& powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z165-remote-workspace-real-adapter-not-approved-outcome-factory-terminal-complete-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-RequestedNodeName $RequestedNodeName `
-DefaultNodeName $DefaultNodeName `
-MatrixNodeName $MatrixNodeName `
-ResultPath $sourceResultPath | Out-Null
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$terminal = Get-PropertyValue -Item $sourceResult -Name "not_approved_outcome_factory_terminal_complete" -Default $null
$guardrails = Get-PropertyValue -Item $terminal -Name "guardrail_summary" -Default $null
$terminalNotes = @(Get-PropertyValue -Item $terminal -Name "terminal_notes" -Default @())
$terminalFieldsCompatible = Test-ObjectHasFields -Item $terminal -Fields $requiredTerminalFields
$terminalValuesCompatible = (
[string](Get-PropertyValue -Item $terminal -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_factory_terminal_complete.v1" -and
[string](Get-PropertyValue -Item $terminal -Name "source_manifest_schema" -Default "") -eq "rap.remote_workspace_real_adapter_not_approved_outcome_operator_stop_status_final_archive_manifest.v1" -and
[string](Get-PropertyValue -Item $terminal -Name "terminal_status" -Default "") -eq "factory_terminal_complete_contract_only" -and
[string](Get-PropertyValue -Item $terminal -Name "factory_status" -Default "") -eq "complete_no_more_not_approved_layers_required" -and
[string](Get-PropertyValue -Item $terminal -Name "archive_status" -Default "") -eq "operator_stop_status_final_archived_contract_only" -and
[string](Get-PropertyValue -Item $terminal -Name "manifest_status" -Default "") -eq "operator_stop_status_final_archive_manifest_complete" -and
[string](Get-PropertyValue -Item $terminal -Name "operator_status" -Default "") -eq "not_approved_branch_closed_new_request_required" -and
[string](Get-PropertyValue -Item $terminal -Name "operator_action" -Default "") -eq "keep_real_adapter_disabled_until_new_explicit_enablement_request" -and
[string](Get-PropertyValue -Item $terminal -Name "display_severity" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $terminal -Name "next_allowed_entrypoint" -Default "") -eq "new_explicit_enablement_request_only" -and
-not [bool](Get-PropertyValue -Item $terminal -Name "attempt_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $terminal -Name "block_reason" -Default "") -eq "new_explicit_enablement_request_required" -and
[bool](Get-PropertyValue -Item $terminal -Name "blocks_not_approved_extension" -Default $false) -and
[string](Get-PropertyValue -Item $terminal -Name "enablement_status" -Default "") -eq "not_enabled" -and
[string](Get-PropertyValue -Item $terminal -Name "runtime_gate_state" -Default "") -eq "validated_contract_only_not_enabled" -and
[string](Get-PropertyValue -Item $terminal -Name "runtime_effect" -Default "") -eq "contract_only_no_runtime_enablement" -and
-not [bool](Get-PropertyValue -Item $terminal -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $terminal -Name "allows_payload_traffic" -Default $true)
)
$terminalNotesCompatible = Test-ArrayContainsAll -Actual $terminalNotes -Expected $requiredTerminalNotes
$guardrailsCompatible = (
(Test-ObjectHasFields -Item $guardrails -Fields $requiredGuardrailFields) -and
[bool](Get-PropertyValue -Item $guardrails -Name "activation_blocked" -Default $false) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "process_start_allowed" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "health_probe_enabled" -Default $true) -and
[string](Get-PropertyValue -Item $guardrails -Name "payload_traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_process_start" -Default $true) -and
-not [bool](Get-PropertyValue -Item $guardrails -Name "allows_payload_traffic" -Default $true)
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
source_schema_expected = ([string]$sourceResult.schema_version -eq "c19z165.remote_workspace_real_adapter_not_approved_outcome_factory_terminal_complete_smoke.v1")
terminal_present = ($null -ne $terminal)
terminal_fields_compatible = $terminalFieldsCompatible
terminal_values_compatible = $terminalValuesCompatible
terminal_notes_compatible = $terminalNotesCompatible
guardrails_compatible = $guardrailsCompatible
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z166.remote_workspace_real_adapter_not_approved_outcome_factory_terminal_complete_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_terminal_fields = $requiredTerminalFields
required_guardrail_fields = $requiredGuardrailFields
required_terminal_notes = $requiredTerminalNotes
not_approved_outcome_factory_terminal_complete = $terminal
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z166 remote workspace real-adapter not-approved outcome factory terminal complete compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z166 remote workspace real-adapter not-approved outcome factory terminal complete compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,93 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z17-remote-workspace-mailbox-preflight-contract-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z17-remote-workspace-mailbox-preflight-contract-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ContractItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-PreflightContract {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
$contract = Get-PropertyValue -Item $rollup -Name "diagnostics_contract" -Default @()
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $rollup -Name "diagnostics_schema_version" -Default "") -eq "rap.remote_workspace_adapter_mailbox_preflight_diagnostics.v1" -and
(Test-ContractItem -Items $contract -Want "retained_window") -and
(Test-ContractItem -Items $contract -Want "remediation_checklist") -and
(Test-ContractItem -Items $contract -Want "attention") -and
(Test-ContractItem -Items $contract -Want "operator_counts")
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z16-remote-workspace-mailbox-preflight-attention-reason-coverage-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_contract_visible = (Test-PreflightContract -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_contract_visible = (Test-PreflightContract -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z17.remote_workspace_mailbox_preflight_contract_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z17 remote workspace mailbox preflight contract smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z17 remote workspace mailbox preflight contract smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,90 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z18-remote-workspace-mailbox-preflight-feature-flags-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z18-remote-workspace-mailbox-preflight-feature-flags-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-FeatureFlag {
param([object]$Features, [string]$Name)
return ([bool](Get-PropertyValue -Item $Features -Name $Name -Default $false))
}
function Test-PreflightFeatureFlags {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
$features = Get-PropertyValue -Item $rollup -Name "diagnostics_features" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $rollup -Name "diagnostics_schema_version" -Default "") -eq "rap.remote_workspace_adapter_mailbox_preflight_diagnostics.v1" -and
(Test-FeatureFlag -Features $features -Name "retained_window") -and
(Test-FeatureFlag -Features $features -Name "remediation_checklist") -and
(Test-FeatureFlag -Features $features -Name "attention") -and
(Test-FeatureFlag -Features $features -Name "operator_counts")
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z17-remote-workspace-mailbox-preflight-contract-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_feature_flags_visible = (Test-PreflightFeatureFlags -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_feature_flags_visible = (Test-PreflightFeatureFlags -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z18.remote_workspace_mailbox_preflight_feature_flags_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z18 remote workspace mailbox preflight feature flags smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z18 remote workspace mailbox preflight feature flags smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,100 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z19-remote-workspace-mailbox-preflight-contract-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z19-remote-workspace-mailbox-preflight-contract-compatibility-source-result.json"
$requiredFeatures = @("retained_window", "remediation_checklist", "attention", "operator_counts")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ContractItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-FeatureFlag {
param([object]$Features, [string]$Name)
return ([bool](Get-PropertyValue -Item $Features -Name $Name -Default $false))
}
function Test-PreflightCompatibility {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
if ($null -eq $rollup) { return $false }
$contract = Get-PropertyValue -Item $rollup -Name "diagnostics_contract" -Default @()
$features = Get-PropertyValue -Item $rollup -Name "diagnostics_features" -Default $null
if ([string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -ne $AdapterSessionID) { return $false }
if ([string](Get-PropertyValue -Item $rollup -Name "diagnostics_schema_version" -Default "") -ne "rap.remote_workspace_adapter_mailbox_preflight_diagnostics.v1") { return $false }
foreach ($feature in $requiredFeatures) {
if (-not (Test-ContractItem -Items $contract -Want $feature)) { return $false }
if (-not (Test-FeatureFlag -Features $features -Name $feature)) { return $false }
}
return $true
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z18-remote-workspace-mailbox-preflight-feature-flags-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_contract_feature_compatibility = (Test-PreflightCompatibility -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_contract_feature_compatibility = (Test-PreflightCompatibility -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z19.remote_workspace_mailbox_preflight_contract_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = $adapterSessionID
required_features = $requiredFeatures
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z19 remote workspace mailbox preflight contract compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z19 remote workspace mailbox preflight contract compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,171 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z2-remote-workspace-mailbox-preflight-telemetry-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z2-remote-workspace-mailbox-preflight-source-result.json"
$consumerID = "rdp-worker-probe"
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$workloadStatus = $null
$workloadSink = $null
$telemetry = $null
$telemetrySink = $null
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Test-PreflightTelemetry {
param(
[object]$Sink,
[object]$BaselineSink,
[string]$AdapterSessionID,
[int64]$ResumeSequence,
[int]$AvailableCount,
[int]$ReturnedCount,
[int]$SkippedCount
)
if ($null -eq $Sink) { return $false }
$baselineTotal = [int64](Get-PropertyValue -Item $BaselineSink -Name "mailbox_preflight_total" -Default 0)
$baselineAck = [int64](Get-PropertyValue -Item $BaselineSink -Name "mailbox_preflight_ack_total" -Default 0)
$baselineCheckpoint = [int64](Get-PropertyValue -Item $BaselineSink -Name "mailbox_preflight_checkpoint_total" -Default 0)
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
return (
[string](Get-PropertyValue -Item $Sink -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_sink_report.v1" -and
[int64](Get-PropertyValue -Item $Sink -Name "mailbox_preflight_total" -Default 0) -ge ($baselineTotal + 2) -and
[int64](Get-PropertyValue -Item $Sink -Name "mailbox_preflight_ack_total" -Default 0) -ge ($baselineAck + 1) -and
[int64](Get-PropertyValue -Item $Sink -Name "mailbox_preflight_checkpoint_total" -Default 0) -ge ($baselineCheckpoint + 1) -and
[string](Get-PropertyValue -Item $Sink -Name "last_mailbox_preflight_adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $Sink -Name "last_mailbox_preflight_consumer_id" -Default "") -eq $consumerID -and
[string](Get-PropertyValue -Item $Sink -Name "last_mailbox_preflight_resume_from" -Default "") -eq "checkpoint" -and
[int64](Get-PropertyValue -Item $Sink -Name "last_mailbox_preflight_resume_sequence" -Default -1) -eq $ResumeSequence -and
[int](Get-PropertyValue -Item $Sink -Name "last_mailbox_preflight_available_count" -Default -1) -eq $AvailableCount -and
[int](Get-PropertyValue -Item $Sink -Name "last_mailbox_preflight_returned_count" -Default -1) -eq $ReturnedCount -and
[int](Get-PropertyValue -Item $Sink -Name "last_mailbox_preflight_skipped_count" -Default -1) -eq $SkippedCount -and
$null -ne $readiness -and
[int64](Get-PropertyValue -Item $readiness -Name "mailbox_preflight_total" -Default 0) -ge 2
)
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$baseline = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
$baselineWorkloadSink = $baseline.workload_sink
$baselineTelemetrySink = $baseline.telemetry_sink
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z1-remote-workspace-mailbox-preflight-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$checkpoint = Get-PropertyValue -Item $sourceResult -Name "preflight_checkpoint" -Default $null
$checkpointJson = Get-PropertyValue -Item $checkpoint -Name "json" -Default $null
$resumeSequence = [int64](Get-PropertyValue -Item $checkpointJson -Name "resume_sequence" -Default 0)
$availableCount = [int](Get-PropertyValue -Item $checkpointJson -Name "expected_available_count" -Default -1)
$returnedCount = [int](Get-PropertyValue -Item $checkpointJson -Name "expected_returned_count" -Default -1)
$skippedCount = [int](Get-PropertyValue -Item $checkpointJson -Name "expected_skipped_count" -Default -1)
$observed = $null
$deadline = (Get-Date).AddSeconds(90)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-PreflightTelemetry -Sink $observed.workload_sink -BaselineSink $baselineWorkloadSink -AdapterSessionID $adapterSessionID -ResumeSequence $resumeSequence -AvailableCount $availableCount -ReturnedCount $returnedCount -SkippedCount $skippedCount) -and
(Test-PreflightTelemetry -Sink $observed.telemetry_sink -BaselineSink $baselineTelemetrySink -AdapterSessionID $adapterSessionID -ResumeSequence $resumeSequence -AvailableCount $availableCount -ReturnedCount $returnedCount -SkippedCount $skippedCount)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
checkpoint_preflight_shape_visible = ([string](Get-PropertyValue -Item $checkpointJson -Name "resume_from" -Default "") -eq "checkpoint" -and $resumeSequence -gt 0 -and $availableCount -eq 0 -and $returnedCount -eq 0 -and $skippedCount -eq 3)
workload_preflight_telemetry_visible = (Test-PreflightTelemetry -Sink $observed.workload_sink -BaselineSink $baselineWorkloadSink -AdapterSessionID $adapterSessionID -ResumeSequence $resumeSequence -AvailableCount $availableCount -ReturnedCount $returnedCount -SkippedCount $skippedCount)
telemetry_preflight_telemetry_visible = (Test-PreflightTelemetry -Sink $observed.telemetry_sink -BaselineSink $baselineTelemetrySink -AdapterSessionID $adapterSessionID -ResumeSequence $resumeSequence -AvailableCount $availableCount -ReturnedCount $returnedCount -SkippedCount $skippedCount)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z2.remote_workspace_mailbox_preflight_telemetry_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
adapter_session_id = $adapterSessionID
baseline = $baseline
source = $sourceResult
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z2 remote workspace mailbox preflight telemetry smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z2 remote workspace mailbox preflight telemetry smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,161 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z20-remote-workspace-mailbox-preflight-absence-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z20-remote-workspace-mailbox-preflight-absence-source-result.json"
$adapterSessionID = ""
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Invoke-Control {
param([string]$SessionID)
if ([string]::IsNullOrWhiteSpace($SessionID)) { return $null }
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/control"
$body = @{ action = "close"; reason = "c19z20 mailbox preflight absence close" } | ConvertTo-Json -Compress
return Invoke-RestMethod -Method POST -Uri $url -ContentType "application/json" -Body $body -TimeoutSec 30
}
function Test-NoPreflightReadiness {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[int64](Get-PropertyValue -Item $readiness -Name "mailbox_preflight_total" -Default -1) -eq 0 -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_status" -Default "") -eq "unknown" -and
[string](Get-PropertyValue -Item $readiness -Name "preflight_attention_reason" -Default "") -eq "no_preflight_observed" -and
$null -eq $rollup -and
[string](Get-PropertyValue -Item $readiness -Name "last_preflight_diagnostic_state" -Default "") -eq "" -and
[string](Get-PropertyValue -Item $readiness -Name "last_preflight_recommended_action" -Default "") -eq ""
)
}
try {
$entryNode = Get-NodeByName -Name $EntryNodeName
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19x-remote-workspace-mailbox-consumer-resume-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath `
-SkipClose
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$observed = $null
$deadline = (Get-Date).AddSeconds(90)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-NoPreflightReadiness -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID) -and
(Test-NoPreflightReadiness -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$control = Invoke-Control -SessionID $adapterSessionID
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_no_preflight_readiness_visible = (Test-NoPreflightReadiness -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_no_preflight_readiness_visible = (Test-NoPreflightReadiness -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
close_accepted = ([bool]$control.accepted -and [string]$control.session_state -eq "closed")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z20.remote_workspace_mailbox_preflight_absence_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
adapter_session_id = $adapterSessionID
source = $sourceResult
observed = $observed
control = $control
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
} finally {
if ($adapterSessionID) {
try { [void](Invoke-Control -SessionID $adapterSessionID) } catch {}
}
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z20 remote workspace mailbox preflight absence smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z20 remote workspace mailbox preflight absence smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,164 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z21-remote-workspace-no-active-session-readiness-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z21-remote-workspace-no-active-session-readiness-source-result.json"
$adapterSessionID = ""
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Invoke-Control {
param([string]$SessionID)
if ([string]::IsNullOrWhiteSpace($SessionID)) { return $null }
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/control"
$body = @{ action = "close"; reason = "c19z21 no active session readiness close" } | ConvertTo-Json -Compress
return Invoke-RestMethod -Method POST -Uri $url -ContentType "application/json" -Body $body -TimeoutSec 30
}
function Test-NoActiveSessionReadiness {
param([object]$Sink, [string]$AdapterSessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$activeAdapterSessionID = Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_runtime_readiness.v1" -and
[string](Get-PropertyValue -Item $readiness -Name "status" -Default "") -eq "idle" -and
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "last_session_terminal_or_expired" -and
-not [bool](Get-PropertyValue -Item $readiness -Name "ready" -Default $true) -and
[int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1) -eq 0 -and
[string](Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $readiness -Name "last_session_state" -Default "") -eq "closed" -and
$null -eq $activeAdapterSessionID -and
$null -eq $rollup
)
}
try {
$entryNode = Get-NodeByName -Name $EntryNodeName
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19x-remote-workspace-mailbox-consumer-resume-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath `
-SkipClose
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$control = Invoke-Control -SessionID $adapterSessionID
$observed = $null
$deadline = (Get-Date).AddSeconds(90)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-NoActiveSessionReadiness -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID) -and
(Test-NoActiveSessionReadiness -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
close_accepted = ([bool]$control.accepted -and [string]$control.session_state -eq "closed")
workload_no_active_session_readiness_visible = (Test-NoActiveSessionReadiness -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID)
telemetry_no_active_session_readiness_visible = (Test-NoActiveSessionReadiness -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z21.remote_workspace_no_active_session_readiness_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
adapter_session_id = $adapterSessionID
source = $sourceResult
control = $control
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
} finally {
if ($adapterSessionID) {
try { [void](Invoke-Control -SessionID $adapterSessionID) } catch {}
}
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z21 remote workspace no-active-session readiness smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z21 remote workspace no-active-session readiness smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,178 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z22-remote-workspace-terminal-state-readiness-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Invoke-Control {
param([string]$SessionID, [string]$Action)
if ([string]::IsNullOrWhiteSpace($SessionID)) { return $null }
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/control"
$body = @{ action = $Action; reason = "c19z22 terminal state readiness $Action" } | ConvertTo-Json -Compress
return Invoke-RestMethod -Method POST -Uri $url -ContentType "application/json" -Body $body -TimeoutSec 30
}
function Test-TerminalReadiness {
param([object]$Sink, [string]$AdapterSessionID, [string]$TerminalState)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$activeAdapterSessionID = Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default $null
$rollup = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_runtime_readiness.v1" -and
[string](Get-PropertyValue -Item $readiness -Name "status" -Default "") -eq "idle" -and
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "last_session_terminal_or_expired" -and
-not [bool](Get-PropertyValue -Item $readiness -Name "ready" -Default $true) -and
[int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1) -eq 0 -and
[string](Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $readiness -Name "last_session_state" -Default "") -eq $TerminalState -and
$null -eq $activeAdapterSessionID -and
$null -eq $rollup
)
}
function Invoke-TerminalStateProbe {
param([object]$EntryNode, [string]$Action, [string]$TerminalState)
$sourceResultPath = "artifacts\c19z22-remote-workspace-terminal-state-readiness-$Action-source-result.json"
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19x-remote-workspace-mailbox-consumer-resume-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath `
-SkipClose
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
$control = Invoke-Control -SessionID $adapterSessionID -Action $Action
$observed = $null
$deadline = (Get-Date).AddSeconds(90)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $EntryNode.id
if (
(Test-TerminalReadiness -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID -TerminalState $TerminalState) -and
(Test-TerminalReadiness -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID -TerminalState $TerminalState)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $EntryNode.id
}
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
control_accepted = ([bool]$control.accepted -and [string]$control.action -eq $Action -and [string]$control.session_state -eq $TerminalState)
workload_terminal_readiness_visible = (Test-TerminalReadiness -Sink $observed.workload_sink -AdapterSessionID $adapterSessionID -TerminalState $TerminalState)
telemetry_terminal_readiness_visible = (Test-TerminalReadiness -Sink $observed.telemetry_sink -AdapterSessionID $adapterSessionID -TerminalState $TerminalState)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
return [ordered]@{
action = $Action
terminal_state = $TerminalState
source_result_path = $sourceFile
adapter_session_id = $adapterSessionID
source = $sourceResult
control = $control
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$expireProbe = Invoke-TerminalStateProbe -EntryNode $entryNode -Action "expire" -TerminalState "expired"
$resetProbe = Invoke-TerminalStateProbe -EntryNode $entryNode -Action "reset" -TerminalState "reset"
$checks = [ordered]@{
expire_terminal_readiness_visible = ([bool]$expireProbe.passed)
reset_terminal_readiness_visible = ([bool]$resetProbe.passed)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z22.remote_workspace_terminal_state_readiness_smoke.v1"
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
expire_probe = $expireProbe
reset_probe = $resetProbe
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z22 remote workspace terminal-state readiness smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z22 remote workspace terminal-state readiness smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,94 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z23-remote-workspace-terminal-session-summary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z23-remote-workspace-terminal-session-summary-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-TerminalSummary {
param([object]$Sink, [string]$AdapterSessionID, [string]$TerminalState)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$summary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
if ($null -eq $summary) { return $false }
return (
[string](Get-PropertyValue -Item $readiness -Name "status" -Default "") -eq "idle" -and
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "last_session_terminal_or_expired" -and
[string](Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $readiness -Name "last_session_state" -Default "") -eq $TerminalState -and
[string](Get-PropertyValue -Item $summary -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $summary -Name "session_state" -Default "") -eq $TerminalState -and
[string](Get-PropertyValue -Item $summary -Name "reason" -Default "") -like "c19z22 terminal state readiness*" -and
[string](Get-PropertyValue -Item $summary -Name "controlled_at" -Default "") -match "^\d{4}-\d{2}-\d{2}T"
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z22-remote-workspace-terminal-state-readiness-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$expireProbe = Get-PropertyValue -Item $sourceResult -Name "expire_probe" -Default $null
$resetProbe = Get-PropertyValue -Item $sourceResult -Name "reset_probe" -Default $null
$expireObserved = Get-PropertyValue -Item $expireProbe -Name "observed" -Default $null
$resetObserved = Get-PropertyValue -Item $resetProbe -Name "observed" -Default $null
$expireSessionID = [string](Get-PropertyValue -Item $expireProbe -Name "adapter_session_id" -Default "")
$resetSessionID = [string](Get-PropertyValue -Item $resetProbe -Name "adapter_session_id" -Default "")
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
expire_adapter_session_id_present = ($expireSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
reset_adapter_session_id_present = ($resetSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_expire_terminal_summary_visible = (Test-TerminalSummary -Sink $expireObserved.workload_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
telemetry_expire_terminal_summary_visible = (Test-TerminalSummary -Sink $expireObserved.telemetry_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
workload_reset_terminal_summary_visible = (Test-TerminalSummary -Sink $resetObserved.workload_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
telemetry_reset_terminal_summary_visible = (Test-TerminalSummary -Sink $resetObserved.telemetry_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z23.remote_workspace_terminal_session_summary_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
expire_adapter_session_id = $expireSessionID
reset_adapter_session_id = $resetSessionID
source = $sourceResult
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z23 remote workspace terminal-session summary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z23 remote workspace terminal-session summary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,105 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z24-remote-workspace-terminal-summary-contract-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z24-remote-workspace-terminal-summary-contract-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ContractItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-TerminalSummaryContract {
param([object]$Sink, [string]$AdapterSessionID, [string]$TerminalState)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$summary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
if ($null -eq $summary) { return $false }
$contract = Get-PropertyValue -Item $summary -Name "summary_contract" -Default @()
return (
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "last_session_terminal_or_expired" -and
[string](Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_terminal_session_summary.v1" -and
(Test-ContractItem -Items $contract -Want "adapter_session_id") -and
(Test-ContractItem -Items $contract -Want "session_state") -and
(Test-ContractItem -Items $contract -Want "reason") -and
(Test-ContractItem -Items $contract -Want "controlled_at") -and
[string](Get-PropertyValue -Item $summary -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $summary -Name "session_state" -Default "") -eq $TerminalState
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z23-remote-workspace-terminal-session-summary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$sourceInner = Get-PropertyValue -Item $sourceResult -Name "source" -Default $null
$expireProbe = Get-PropertyValue -Item $sourceInner -Name "expire_probe" -Default $null
$resetProbe = Get-PropertyValue -Item $sourceInner -Name "reset_probe" -Default $null
$expireObserved = Get-PropertyValue -Item $expireProbe -Name "observed" -Default $null
$resetObserved = Get-PropertyValue -Item $resetProbe -Name "observed" -Default $null
$expireSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "expire_adapter_session_id" -Default "")
$resetSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "reset_adapter_session_id" -Default "")
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
expire_adapter_session_id_present = ($expireSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
reset_adapter_session_id_present = ($resetSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_expire_summary_contract_visible = (Test-TerminalSummaryContract -Sink $expireObserved.workload_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
telemetry_expire_summary_contract_visible = (Test-TerminalSummaryContract -Sink $expireObserved.telemetry_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
workload_reset_summary_contract_visible = (Test-TerminalSummaryContract -Sink $resetObserved.workload_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
telemetry_reset_summary_contract_visible = (Test-TerminalSummaryContract -Sink $resetObserved.telemetry_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z24.remote_workspace_terminal_summary_contract_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
expire_adapter_session_id = $expireSessionID
reset_adapter_session_id = $resetSessionID
source = $sourceResult
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z24 remote workspace terminal-summary contract smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z24 remote workspace terminal-summary contract smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,101 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z25-remote-workspace-terminal-summary-features-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z25-remote-workspace-terminal-summary-features-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-FeatureFlag {
param([object]$Features, [string]$Name)
return ([bool](Get-PropertyValue -Item $Features -Name $Name -Default $false))
}
function Test-TerminalSummaryFeatures {
param([object]$Sink, [string]$AdapterSessionID, [string]$TerminalState)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$summary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
if ($null -eq $summary) { return $false }
$features = Get-PropertyValue -Item $summary -Name "summary_features" -Default $null
return (
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_terminal_session_summary.v1" -and
[string](Get-PropertyValue -Item $summary -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $summary -Name "session_state" -Default "") -eq $TerminalState -and
(Test-FeatureFlag -Features $features -Name "adapter_session_id") -and
(Test-FeatureFlag -Features $features -Name "session_state") -and
(Test-FeatureFlag -Features $features -Name "reason") -and
(Test-FeatureFlag -Features $features -Name "controlled_at")
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z24-remote-workspace-terminal-summary-contract-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$sourceC19Z23 = Get-PropertyValue -Item $sourceResult -Name "source" -Default $null
$sourceC19Z22 = Get-PropertyValue -Item $sourceC19Z23 -Name "source" -Default $null
$expireProbe = Get-PropertyValue -Item $sourceC19Z22 -Name "expire_probe" -Default $null
$resetProbe = Get-PropertyValue -Item $sourceC19Z22 -Name "reset_probe" -Default $null
$expireObserved = Get-PropertyValue -Item $expireProbe -Name "observed" -Default $null
$resetObserved = Get-PropertyValue -Item $resetProbe -Name "observed" -Default $null
$expireSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "expire_adapter_session_id" -Default "")
$resetSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "reset_adapter_session_id" -Default "")
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
expire_adapter_session_id_present = ($expireSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
reset_adapter_session_id_present = ($resetSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_expire_summary_features_visible = (Test-TerminalSummaryFeatures -Sink $expireObserved.workload_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
telemetry_expire_summary_features_visible = (Test-TerminalSummaryFeatures -Sink $expireObserved.telemetry_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
workload_reset_summary_features_visible = (Test-TerminalSummaryFeatures -Sink $resetObserved.workload_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
telemetry_reset_summary_features_visible = (Test-TerminalSummaryFeatures -Sink $resetObserved.telemetry_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z25.remote_workspace_terminal_summary_features_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
expire_adapter_session_id = $expireSessionID
reset_adapter_session_id = $resetSessionID
source = $sourceResult
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z25 remote workspace terminal-summary features smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z25 remote workspace terminal-summary features smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,112 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z26-remote-workspace-terminal-summary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z26-remote-workspace-terminal-summary-compatibility-source-result.json"
$requiredFeatures = @("adapter_session_id", "session_state", "reason", "controlled_at")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ContractItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-FeatureFlag {
param([object]$Features, [string]$Name)
return ([bool](Get-PropertyValue -Item $Features -Name $Name -Default $false))
}
function Test-TerminalSummaryCompatibility {
param([object]$Sink, [string]$AdapterSessionID, [string]$TerminalState)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$summary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
if ($null -eq $summary) { return $false }
$contract = Get-PropertyValue -Item $summary -Name "summary_contract" -Default @()
$features = Get-PropertyValue -Item $summary -Name "summary_features" -Default $null
if ([string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -ne "rap.remote_workspace_adapter_terminal_session_summary.v1") { return $false }
if ([string](Get-PropertyValue -Item $summary -Name "adapter_session_id" -Default "") -ne $AdapterSessionID) { return $false }
if ([string](Get-PropertyValue -Item $summary -Name "session_state" -Default "") -ne $TerminalState) { return $false }
foreach ($feature in $requiredFeatures) {
if (-not (Test-ContractItem -Items $contract -Want $feature)) { return $false }
if (-not (Test-FeatureFlag -Features $features -Name $feature)) { return $false }
}
return $true
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z25-remote-workspace-terminal-summary-features-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$sourceC19Z24 = Get-PropertyValue -Item $sourceResult -Name "source" -Default $null
$sourceC19Z23 = Get-PropertyValue -Item $sourceC19Z24 -Name "source" -Default $null
$sourceC19Z22 = Get-PropertyValue -Item $sourceC19Z23 -Name "source" -Default $null
$expireProbe = Get-PropertyValue -Item $sourceC19Z22 -Name "expire_probe" -Default $null
$resetProbe = Get-PropertyValue -Item $sourceC19Z22 -Name "reset_probe" -Default $null
$expireObserved = Get-PropertyValue -Item $expireProbe -Name "observed" -Default $null
$resetObserved = Get-PropertyValue -Item $resetProbe -Name "observed" -Default $null
$expireSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "expire_adapter_session_id" -Default "")
$resetSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "reset_adapter_session_id" -Default "")
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
expire_adapter_session_id_present = ($expireSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
reset_adapter_session_id_present = ($resetSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_expire_summary_compatibility = (Test-TerminalSummaryCompatibility -Sink $expireObserved.workload_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
telemetry_expire_summary_compatibility = (Test-TerminalSummaryCompatibility -Sink $expireObserved.telemetry_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
workload_reset_summary_compatibility = (Test-TerminalSummaryCompatibility -Sink $resetObserved.workload_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
telemetry_reset_summary_compatibility = (Test-TerminalSummaryCompatibility -Sink $resetObserved.telemetry_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z26.remote_workspace_terminal_summary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
expire_adapter_session_id = $expireSessionID
reset_adapter_session_id = $resetSessionID
required_features = $requiredFeatures
source = $sourceResult
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z26 remote workspace terminal-summary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z26 remote workspace terminal-summary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,126 @@
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]$ResultPath = "artifacts\c19z27-remote-workspace-terminal-summary-absence-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Test-TerminalSummaryAbsent {
param([object]$Sink)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$lastAdapterSessionID = Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default $null
$lastSessionState = Get-PropertyValue -Item $readiness -Name "last_session_state" -Default $null
$terminalSummary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
$lastPreflight = Get-PropertyValue -Item $readiness -Name "last_preflight" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_runtime_readiness.v1" -and
[string](Get-PropertyValue -Item $readiness -Name "status" -Default "") -eq "idle" -and
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "waiting_for_session" -and
-not [bool](Get-PropertyValue -Item $readiness -Name "ready" -Default $true) -and
[int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $readiness -Name "terminal_session_count" -Default -1) -eq 0 -and
$null -eq $lastAdapterSessionID -and
$null -eq $lastSessionState -and
$null -eq $terminalSummary -and
$null -eq $lastPreflight
)
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$observed = $null
$deadline = (Get-Date).AddSeconds(60)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-TerminalSummaryAbsent -Sink $observed.workload_sink) -and
(Test-TerminalSummaryAbsent -Sink $observed.telemetry_sink)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$checks = [ordered]@{
workload_terminal_summary_absent = (Test-TerminalSummaryAbsent -Sink $observed.workload_sink)
telemetry_terminal_summary_absent = (Test-TerminalSummaryAbsent -Sink $observed.telemetry_sink)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z27.remote_workspace_terminal_summary_absence_smoke.v1"
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z27 remote workspace terminal-summary absence smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z27 remote workspace terminal-summary absence smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,135 @@
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]$ResultPath = "artifacts\c19z28-remote-workspace-no-session-summary-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ContractItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Test-NoSessionSummary {
param([object]$Sink)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$summary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
if ($null -eq $summary) { return $false }
$contract = Get-PropertyValue -Item $summary -Name "summary_contract" -Default @()
return (
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "waiting_for_session" -and
[int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $readiness -Name "terminal_session_count" -Default -1) -eq 0 -and
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_no_session_summary.v1" -and
(Test-ContractItem -Items $contract -Want "status") -and
(Test-ContractItem -Items $contract -Want "diagnostic_state") -and
(Test-ContractItem -Items $contract -Want "active_session_count") -and
(Test-ContractItem -Items $contract -Want "terminal_session_count") -and
[string](Get-PropertyValue -Item $summary -Name "status" -Default "") -eq "idle" -and
[string](Get-PropertyValue -Item $summary -Name "diagnostic_state" -Default "") -eq "waiting_for_session" -and
[int](Get-PropertyValue -Item $summary -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $summary -Name "terminal_session_count" -Default -1) -eq 0
)
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$observed = $null
$deadline = (Get-Date).AddSeconds(60)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-NoSessionSummary -Sink $observed.workload_sink) -and
(Test-NoSessionSummary -Sink $observed.telemetry_sink)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$checks = [ordered]@{
workload_no_session_summary_visible = (Test-NoSessionSummary -Sink $observed.workload_sink)
telemetry_no_session_summary_visible = (Test-NoSessionSummary -Sink $observed.telemetry_sink)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z28.remote_workspace_no_session_summary_smoke.v1"
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z28 remote workspace no-session summary smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z28 remote workspace no-session summary smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,147 @@
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]$ResultPath = "artifacts\c19z29-remote-workspace-no-session-summary-features-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ContractItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-FeatureFlag {
param([object]$Features, [string]$Name)
if ($null -eq $Features) { return $false }
$value = Get-PropertyValue -Item $Features -Name $Name -Default $false
return [bool]$value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Test-NoSessionSummaryFeatures {
param([object]$Sink)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$summary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
if ($null -eq $summary) { return $false }
$contract = Get-PropertyValue -Item $summary -Name "summary_contract" -Default @()
$features = Get-PropertyValue -Item $summary -Name "summary_features" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "waiting_for_session" -and
[int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $readiness -Name "terminal_session_count" -Default -1) -eq 0 -and
[string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_no_session_summary.v1" -and
(Test-ContractItem -Items $contract -Want "status") -and
(Test-ContractItem -Items $contract -Want "diagnostic_state") -and
(Test-ContractItem -Items $contract -Want "active_session_count") -and
(Test-ContractItem -Items $contract -Want "terminal_session_count") -and
(Test-FeatureFlag -Features $features -Name "status") -and
(Test-FeatureFlag -Features $features -Name "diagnostic_state") -and
(Test-FeatureFlag -Features $features -Name "active_session_count") -and
(Test-FeatureFlag -Features $features -Name "terminal_session_count") -and
[string](Get-PropertyValue -Item $summary -Name "status" -Default "") -eq "idle" -and
[string](Get-PropertyValue -Item $summary -Name "diagnostic_state" -Default "") -eq "waiting_for_session" -and
[int](Get-PropertyValue -Item $summary -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $summary -Name "terminal_session_count" -Default -1) -eq 0
)
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$observed = $null
$deadline = (Get-Date).AddSeconds(60)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-NoSessionSummaryFeatures -Sink $observed.workload_sink) -and
(Test-NoSessionSummaryFeatures -Sink $observed.telemetry_sink)
) {
break
}
}
if ($null -eq $observed) {
$observed = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$checks = [ordered]@{
workload_no_session_summary_features_visible = (Test-NoSessionSummaryFeatures -Sink $observed.workload_sink)
telemetry_no_session_summary_features_visible = (Test-NoSessionSummaryFeatures -Sink $observed.telemetry_sink)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z29.remote_workspace_no_session_summary_features_smoke.v1"
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
observed = $observed
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z29 remote workspace no-session summary features smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z29 remote workspace no-session summary features smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,244 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z3-remote-workspace-mailbox-stale-preflight-smoke-result.json",
[switch]$SkipClose
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$runId = "c19z3-" + (Get-Date -Format "yyyyMMdd-HHmmss")
$consumerID = "rdp-worker-probe"
$routeID = ""
$adapterSessionID = ""
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function ConvertTo-Base64UrlJson {
param([object]$Value)
if ($Value -is [string]) { $json = $Value } else { $json = $Value | ConvertTo-Json -Depth 80 -Compress }
$bytes = [System.Text.Encoding]::UTF8.GetBytes($json)
return [Convert]::ToBase64String($bytes).TrimEnd("=").Replace("+", "-").Replace("/", "_")
}
function Get-Events {
param([object]$Item)
$events = Get-PropertyValue -Item $Item -Name "events" -Default $null
if ($null -eq $events) { return @() }
return @($events)
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Disable-ExistingRemoteWorkspaceRoutes {
param([string]$SourceNodeID, [string]$DestinationNodeID)
$items = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/mesh/route-intents?actor_user_id=$ActorUserID").route_intents
foreach ($item in @($items)) {
if ([string](Get-PropertyValue -Item $item -Name "status" -Default "") -ne "active") { continue }
if ([string](Get-PropertyValue -Item $item -Name "service_class" -Default "") -ne "remote_workspace") { continue }
$sourceSelector = Get-PropertyValue -Item $item -Name "source_selector" -Default $null
$destinationSelector = Get-PropertyValue -Item $item -Name "destination_selector" -Default $null
if ([string](Get-PropertyValue -Item $sourceSelector -Name "node_id" -Default "") -ne $SourceNodeID) { continue }
if ([string](Get-PropertyValue -Item $destinationSelector -Name "node_id" -Default "") -ne $DestinationNodeID) { continue }
[void](Invoke-Api -Method POST -Path "/clusters/$ClusterID/mesh/route-intents/$($item.id)/disable" -Body @{
actor_user_id = $ActorUserID
reason = "c19z3 isolate stale mailbox preflight smoke"
})
}
}
function New-RemoteWorkspaceRouteIntent {
param([string]$SourceNodeID, [string]$DestinationNodeID)
$expiresAt = (Get-Date).ToUniversalTime().AddMinutes(5).ToString("o")
return Invoke-Api -Method POST -Path "/clusters/$ClusterID/mesh/route-intents" -Body @{
actor_user_id = $ActorUserID
source_selector = @{ node_id = $SourceNodeID }
destination_selector = @{ node_id = $DestinationNodeID }
service_class = "remote_workspace"
priority = 2100000000
policy = @{
synthetic_enabled = $true
route_version = "$runId-remote-workspace"
policy_version = "$runId-remote-workspace"
peer_directory_version = "$runId-remote-workspace"
hops = @($SourceNodeID, $DestinationNodeID)
allowed_channels = @("control", "interactive", "reliable", "bulk", "droppable")
max_ttl = 8
max_hops = 8
expires_at = $expiresAt
metadata = @{ smoke = "c19z3_remote_workspace_mailbox_stale_preflight"; run_id = $runId }
}
}
}
function New-FrameBatch {
param([int]$Index)
return [ordered]@{
schema_version = "rap.remote_workspace_frame_batch.v1"
probe_only = $true
service_class = "remote_workspace"
channel_class = "interactive"
adapter_contract_id = "rap.rdp_worker.remote_workspace_adapter_contract_probe.v1"
frames = @(@{ channel = "display"; direction = "adapter_to_client"; payload_encoding = "none"; payload_length = $Index; droppable = $true })
}
}
function Invoke-FrameBatch {
param([object]$FrameBatch, [hashtable]$Headers, [string]$Url)
$response = Invoke-WebRequest -Method POST -Uri $Url -Headers $Headers -Body ($FrameBatch | ConvertTo-Json -Depth 80 -Compress) -ContentType "application/vnd.rap.remote-workspace-frame-batch.v1+json" -TimeoutSec 30
return [ordered]@{ status_code = [int]$response.StatusCode; body = ($response.Content | ConvertFrom-Json) }
}
function Invoke-Mailbox {
param([string]$SessionID, [string]$Query = "")
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/mailbox$Query"
$response = Invoke-WebRequest -Method GET -Uri $url -TimeoutSec 35
$json = $null
if ($response.Content) { $json = $response.Content | ConvertFrom-Json }
return [ordered]@{ status_code = [int]$response.StatusCode; body = $response.Content; json = $json }
}
function Invoke-Preflight {
param([string]$SessionID, [string]$Query = "")
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/mailbox/preflight$Query"
$response = Invoke-WebRequest -Method GET -Uri $url -TimeoutSec 35
$json = $null
if ($response.Content) { $json = $response.Content | ConvertFrom-Json }
return [ordered]@{ status_code = [int]$response.StatusCode; body = $response.Content; json = $json }
}
function Invoke-Control {
param([string]$SessionID)
if ([string]::IsNullOrWhiteSpace($SessionID)) { return $null }
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/control"
$body = @{ action = "close"; reason = "c19z3 stale mailbox preflight close" } | ConvertTo-Json -Compress
return Invoke-RestMethod -Method POST -Uri $url -ContentType "application/json" -Body $body -TimeoutSec 30
}
try {
$entryNode = Get-NodeByName -Name $EntryNodeName
$exitNode = Get-NodeByName -Name $ExitNodeName
Disable-ExistingRemoteWorkspaceRoutes -SourceNodeID $entryNode.id -DestinationNodeID $exitNode.id
$route = (New-RemoteWorkspaceRouteIntent -SourceNodeID $entryNode.id -DestinationNodeID $exitNode.id).route_intent
$routeID = [string]$route.id
$leaseResponse = Invoke-Api -Method POST -Path "/clusters/$ClusterID/fabric/service-channels/leases" -Body @{
actor_user_id = $ActorUserID
organization_id = "org-home"
user_id = "user-x"
resource_id = "$runId-remote-workspace"
service_class = "remote_workspace"
entry_node_ids = @([string]$entryNode.id)
exit_node_ids = @([string]$exitNode.id)
preferred_entry_node_id = [string]$entryNode.id
preferred_exit_node_id = [string]$exitNode.id
ttl_seconds = 120
metadata = @{ smoke = "c19z3_remote_workspace_mailbox_stale_preflight"; run_id = $runId }
}
$lease = $leaseResponse.fabric_service_channel_lease
$authorityPayload = Get-PropertyValue -Item $lease -Name "authority_payload" -Default $null
if ($authorityPayload -is [string] -and $authorityPayload.Length -gt 0) { $decodedAuthority = $authorityPayload | ConvertFrom-Json } else { $decodedAuthority = $authorityPayload }
$ingressUrl = "$EntryBaseUrl/api/v1/clusters/$ClusterID/fabric/service-channels/$($lease.channel_id)/remote-workspaces/$($lease.resource_id)/streams/interactive"
$headers = @{
"X-RAP-Service-Channel-Token" = [string]$lease.token.token
"X-RAP-Fabric-Channel-ID" = [string]$lease.channel_id
"X-RAP-Service-Channel-Authority-Payload" = ConvertTo-Base64UrlJson -Value $decodedAuthority
"X-RAP-Service-Channel-Authority-Signature" = ConvertTo-Base64UrlJson -Value (Get-PropertyValue -Item $lease -Name "authority_signature" -Default $null)
"X-RAP-Service-Class" = "remote_workspace"
"X-RAP-Channel-Class" = "interactive"
}
$firstDelivery = Invoke-FrameBatch -FrameBatch (New-FrameBatch -Index 1) -Headers $headers -Url $ingressUrl
$adapterSessionID = [string](Get-PropertyValue -Item $firstDelivery.body -Name "adapter_session_id" -Default "")
$seed = Invoke-Mailbox -SessionID $adapterSessionID -Query "?consumer_id=$consumerID&ack_sequence=1&limit=1"
$overflowDeliveries = @()
for ($i = 2; $i -le 19; $i++) {
$overflowDeliveries += ,(Invoke-FrameBatch -FrameBatch (New-FrameBatch -Index $i) -Headers $headers -Url $ingressUrl)
}
$preflight = Invoke-Preflight -SessionID $adapterSessionID -Query "?consumer_id=$consumerID&resume_from=ack&limit=3"
$control = $null
if (-not $SkipClose) {
$control = Invoke-Control -SessionID $adapterSessionID
}
$checks = [ordered]@{
lease_ready = ([string]$lease.status -eq "ready")
initial_delivery_accepted = ([int]$firstDelivery.status_code -eq 202 -and $adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
seed_ack_visible = ([int]$seed.status_code -eq 200 -and [int64]$seed.json.consumer_ack_sequence -eq 1)
overflow_deliveries_accepted = (@($overflowDeliveries | Where-Object { [int]$_.status_code -eq 202 }).Count -eq 18)
stale_preflight_visible = ([int]$preflight.status_code -eq 200 -and [bool]$preflight.json.read_only -and [bool]$preflight.json.stale_cursor -and [string]$preflight.json.diagnostic_state -eq "stale_cursor_gap" -and [string]$preflight.json.recommended_action -eq "reset_consumer_and_resync" -and @($preflight.json.action_hints).Contains("reset_consumer_cursor") -and @($preflight.json.action_hints).Contains("request_full_adapter_resync") -and @($preflight.json.action_hints).Contains("resume_from_checkpoint_after_resync") -and [int64]$preflight.json.resume_sequence -eq 1 -and [int]$preflight.json.mailbox_depth -eq 16 -and [int64]$preflight.json.mailbox_dropped_total -ge 3 -and [int64]$preflight.json.first_retained_sequence -gt [int64]$preflight.json.resume_sequence -and [int]$preflight.json.missing_dropped_count -eq ([int64]$preflight.json.first_retained_sequence - [int64]$preflight.json.resume_sequence - 1) -and [int64]$preflight.json.last_retained_sequence -ge [int64]$preflight.json.first_retained_sequence -and [int]$preflight.json.expected_returned_count -eq 3)
close_accepted = ($SkipClose -or ([bool]$control.accepted -and [string]$control.session_state -eq "closed"))
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z3.remote_workspace_mailbox_stale_preflight_smoke.v1"
run_id = $runId
cluster_id = $ClusterID
entry_node = @{ id = $entryNode.id; name = $EntryNodeName }
exit_node = @{ id = $exitNode.id; name = $ExitNodeName }
channel_id = $lease.channel_id
route_id = $routeID
adapter_session_id = $adapterSessionID
first_delivery = $firstDelivery
seed = $seed
overflow_delivery_count = $overflowDeliveries.Count
preflight = $preflight
control = $control
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
} finally {
if ($adapterSessionID -and -not $SkipClose) {
try { [void](Invoke-Control -SessionID $adapterSessionID) } catch {}
}
if ($routeID) {
try {
[void](Invoke-Api -Method POST -Path "/clusters/$ClusterID/mesh/route-intents/$routeID/disable" -Body @{
actor_user_id = $ActorUserID
reason = "c19z3 stale mailbox preflight cleanup"
})
} catch {
Write-Warning "cleanup failed after c19z3 smoke: $($_.Exception.Message)"
}
}
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z3 remote workspace mailbox stale preflight smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z3 remote workspace mailbox stale preflight smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,96 @@
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]$ResultPath = "artifacts\c19z30-remote-workspace-no-session-summary-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z30-remote-workspace-no-session-summary-compatibility-source-result.json"
$requiredFeatures = @("status", "diagnostic_state", "active_session_count", "terminal_session_count")
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ContractItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-FeatureFlag {
param([object]$Features, [string]$Name)
return ([bool](Get-PropertyValue -Item $Features -Name $Name -Default $false))
}
function Test-NoSessionSummaryCompatibility {
param([object]$Sink)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
$summary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
if ($null -eq $summary) { return $false }
if ([string](Get-PropertyValue -Item $summary -Name "schema_version" -Default "") -ne "rap.remote_workspace_adapter_no_session_summary.v1") { return $false }
if ([string](Get-PropertyValue -Item $summary -Name "status" -Default "") -ne "idle") { return $false }
if ([string](Get-PropertyValue -Item $summary -Name "diagnostic_state" -Default "") -ne "waiting_for_session") { return $false }
if ([int](Get-PropertyValue -Item $summary -Name "active_session_count" -Default -1) -ne 0) { return $false }
if ([int](Get-PropertyValue -Item $summary -Name "terminal_session_count" -Default -1) -ne 0) { return $false }
$contract = Get-PropertyValue -Item $summary -Name "summary_contract" -Default @()
$features = Get-PropertyValue -Item $summary -Name "summary_features" -Default $null
foreach ($feature in $requiredFeatures) {
if (-not (Test-ContractItem -Items $contract -Want $feature)) { return $false }
if (-not (Test-FeatureFlag -Features $features -Name $feature)) { return $false }
}
return $true
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z29-remote-workspace-no-session-summary-features-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
workload_no_session_summary_compatibility = (Test-NoSessionSummaryCompatibility -Sink $observed.workload_sink)
telemetry_no_session_summary_compatibility = (Test-NoSessionSummaryCompatibility -Sink $observed.telemetry_sink)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z30.remote_workspace_no_session_summary_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_features = $requiredFeatures
source = $sourceResult
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z30 remote workspace no-session summary compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z30 remote workspace no-session summary compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,97 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z31-remote-workspace-terminal-history-no-session-summary-absence-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z31-remote-workspace-terminal-history-no-session-summary-absence-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-TerminalHistoryNoSessionSummaryAbsent {
param([object]$Sink, [string]$AdapterSessionID, [string]$TerminalState)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$terminalSummary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
$noSessionSummary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
if ($null -eq $terminalSummary) { return $false }
return (
[string](Get-PropertyValue -Item $readiness -Name "schema_version" -Default "") -eq "rap.remote_workspace_adapter_runtime_readiness.v1" -and
[string](Get-PropertyValue -Item $readiness -Name "status" -Default "") -eq "idle" -and
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "last_session_terminal_or_expired" -and
[string](Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $readiness -Name "last_session_state" -Default "") -eq $TerminalState -and
[string](Get-PropertyValue -Item $terminalSummary -Name "adapter_session_id" -Default "") -eq $AdapterSessionID -and
[string](Get-PropertyValue -Item $terminalSummary -Name "session_state" -Default "") -eq $TerminalState -and
$null -eq $noSessionSummary
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z23-remote-workspace-terminal-session-summary-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$sourceC19Z22 = Get-PropertyValue -Item $sourceResult -Name "source" -Default $null
$expireProbe = Get-PropertyValue -Item $sourceC19Z22 -Name "expire_probe" -Default $null
$resetProbe = Get-PropertyValue -Item $sourceC19Z22 -Name "reset_probe" -Default $null
$expireObserved = Get-PropertyValue -Item $expireProbe -Name "observed" -Default $null
$resetObserved = Get-PropertyValue -Item $resetProbe -Name "observed" -Default $null
$expireSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "expire_adapter_session_id" -Default "")
$resetSessionID = [string](Get-PropertyValue -Item $sourceResult -Name "reset_adapter_session_id" -Default "")
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
expire_adapter_session_id_present = ($expireSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
reset_adapter_session_id_present = ($resetSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
workload_expire_no_session_summary_absent = (Test-TerminalHistoryNoSessionSummaryAbsent -Sink $expireObserved.workload_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
telemetry_expire_no_session_summary_absent = (Test-TerminalHistoryNoSessionSummaryAbsent -Sink $expireObserved.telemetry_sink -AdapterSessionID $expireSessionID -TerminalState "expired")
workload_reset_no_session_summary_absent = (Test-TerminalHistoryNoSessionSummaryAbsent -Sink $resetObserved.workload_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
telemetry_reset_no_session_summary_absent = (Test-TerminalHistoryNoSessionSummaryAbsent -Sink $resetObserved.telemetry_sink -AdapterSessionID $resetSessionID -TerminalState "reset")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z31.remote_workspace_terminal_history_no_session_summary_absence_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
expire_adapter_session_id = $expireSessionID
reset_adapter_session_id = $resetSessionID
source = $sourceResult
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z31 remote workspace terminal-history no-session-summary absence smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z31 remote workspace terminal-history no-session-summary absence smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,231 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z32-remote-workspace-readiness-summary-exclusivity-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$freshSourceResultPath = "artifacts\c19z32-remote-workspace-readiness-summary-exclusivity-fresh-source-result.json"
$activeSourceResultPath = "artifacts\c19z32-remote-workspace-readiness-summary-exclusivity-active-source-result.json"
$adapterSessionID = ""
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RemoteWorkspaceSinkReports {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
$workloadStatus = @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
$workloadSink = $null
if ($null -ne $workloadStatus) {
$workloadSink = Get-PropertyValue -Item $workloadStatus.status_payload -Name "remote_workspace_adapter_sink" -Default $null
}
$telemetryItems = @((Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/telemetry?actor_user_id=$ActorUserID&limit=10").telemetry)
$telemetry = $telemetryItems | Select-Object -First 1
$telemetrySink = $null
if ($null -ne $telemetry) {
$telemetryPayload = Get-PropertyValue -Item $telemetry -Name "payload" -Default $null
$telemetrySink = Get-PropertyValue -Item $telemetryPayload -Name "remote_workspace_adapter_sink_report" -Default $null
}
return [ordered]@{
workload_status = $workloadStatus
workload_sink = $workloadSink
telemetry = $telemetry
telemetry_sink = $telemetrySink
}
}
function Invoke-Control {
param([string]$SessionID)
if ([string]::IsNullOrWhiteSpace($SessionID)) { return $null }
$url = "$EntryBaseUrl/mesh/v1/remote-workspace/adapter-sessions/$SessionID/control"
$body = @{ action = "close"; reason = "c19z32 readiness summary exclusivity close" } | ConvertTo-Json -Compress
return Invoke-RestMethod -Method POST -Uri $url -ContentType "application/json" -Body $body -TimeoutSec 30
}
function Test-FreshExclusivity {
param([object]$Sink)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$noSessionSummary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
$terminalSummary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "waiting_for_session" -and
[int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $readiness -Name "terminal_session_count" -Default -1) -eq 0 -and
$null -ne $noSessionSummary -and
$null -eq $terminalSummary
)
}
function Test-ActiveExclusivity {
param([object]$Sink, [string]$SessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$noSessionSummary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
$terminalSummary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default "") -eq $SessionID -and
[int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1) -eq 1 -and
$null -eq $noSessionSummary -and
$null -eq $terminalSummary
)
}
function Test-TerminalExclusivity {
param([object]$Sink, [string]$SessionID)
if ($null -eq $Sink) { return $false }
$readiness = Get-PropertyValue -Item $Sink -Name "adapter_runtime_readiness" -Default $null
if ($null -eq $readiness) { return $false }
$noSessionSummary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
$terminalSummary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
return (
[string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "") -eq "last_session_terminal_or_expired" -and
[string](Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default "") -eq $SessionID -and
[string](Get-PropertyValue -Item $readiness -Name "last_session_state" -Default "") -eq "closed" -and
$null -eq $noSessionSummary -and
$null -ne $terminalSummary -and
[string](Get-PropertyValue -Item $terminalSummary -Name "adapter_session_id" -Default "") -eq $SessionID
)
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$freshSource = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z29-remote-workspace-no-session-summary-features-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ResultPath $freshSourceResultPath
$freshSourceFile = Join-Path $repoRoot $freshSourceResultPath
$freshResult = Get-Content -Raw -Path $freshSourceFile | ConvertFrom-Json
$freshObserved = Get-PropertyValue -Item $freshResult -Name "observed" -Default $null
$activeSource = $null
$control = $null
$activeObserved = $null
$terminalObserved = $null
try {
$activeSource = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19x-remote-workspace-mailbox-consumer-resume-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $activeSourceResultPath `
-SkipClose
$activeSourceFile = Join-Path $repoRoot $activeSourceResultPath
$activeResult = Get-Content -Raw -Path $activeSourceFile | ConvertFrom-Json
$adapterSessionID = [string](Get-PropertyValue -Item $activeResult -Name "adapter_session_id" -Default "")
$deadline = (Get-Date).AddSeconds(60)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$activeObserved = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-ActiveExclusivity -Sink $activeObserved.workload_sink -SessionID $adapterSessionID) -and
(Test-ActiveExclusivity -Sink $activeObserved.telemetry_sink -SessionID $adapterSessionID)
) {
break
}
}
if ($null -eq $activeObserved) {
$activeObserved = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$control = Invoke-Control -SessionID $adapterSessionID
$deadline = (Get-Date).AddSeconds(90)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$terminalObserved = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
if (
(Test-TerminalExclusivity -Sink $terminalObserved.workload_sink -SessionID $adapterSessionID) -and
(Test-TerminalExclusivity -Sink $terminalObserved.telemetry_sink -SessionID $adapterSessionID)
) {
break
}
}
if ($null -eq $terminalObserved) {
$terminalObserved = Get-RemoteWorkspaceSinkReports -NodeID $entryNode.id
}
$checks = [ordered]@{
fresh_source_smoke_passed = ([bool]$freshResult.passed)
active_source_smoke_passed = ([bool]$activeResult.passed)
adapter_session_id_present = ($adapterSessionID -match "^rap-rw-adapter-session-[0-9a-f]{24}$")
close_accepted = ([bool]$control.accepted -and [string]$control.session_state -eq "closed")
workload_fresh_exclusive = (Test-FreshExclusivity -Sink $freshObserved.workload_sink)
telemetry_fresh_exclusive = (Test-FreshExclusivity -Sink $freshObserved.telemetry_sink)
workload_active_exclusive = (Test-ActiveExclusivity -Sink $activeObserved.workload_sink -SessionID $adapterSessionID)
telemetry_active_exclusive = (Test-ActiveExclusivity -Sink $activeObserved.telemetry_sink -SessionID $adapterSessionID)
workload_terminal_exclusive = (Test-TerminalExclusivity -Sink $terminalObserved.workload_sink -SessionID $adapterSessionID)
telemetry_terminal_exclusive = (Test-TerminalExclusivity -Sink $terminalObserved.telemetry_sink -SessionID $adapterSessionID)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z32.remote_workspace_readiness_summary_exclusivity_smoke.v1"
fresh_source_result_path = $freshSourceFile
active_source_result_path = $activeSourceFile
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
adapter_session_id = $adapterSessionID
fresh = $freshResult
active = $activeResult
control = $control
observed = [ordered]@{
fresh = $freshObserved
active = $activeObserved
terminal = $terminalObserved
}
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
} finally {
if ($adapterSessionID) {
try { [void](Invoke-Control -SessionID $adapterSessionID) } catch {}
}
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z32 remote workspace readiness summary exclusivity smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z32 remote workspace readiness summary exclusivity smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,164 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z33-remote-workspace-readiness-state-matrix-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z33-remote-workspace-readiness-state-matrix-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Select-ReadinessMatrixRow {
param([object]$Observed, [string]$State, [string]$Surface)
$sink = Get-PropertyValue -Item $Observed -Name "${Surface}_sink" -Default $null
$readiness = Get-PropertyValue -Item $sink -Name "adapter_runtime_readiness" -Default $null
$noSessionSummary = Get-PropertyValue -Item $readiness -Name "no_session_summary" -Default $null
$terminalSummary = Get-PropertyValue -Item $readiness -Name "terminal_session_summary" -Default $null
return [ordered]@{
state = $State
surface = $Surface
schema_version = [string](Get-PropertyValue -Item $readiness -Name "schema_version" -Default "")
probe_only = [bool](Get-PropertyValue -Item $readiness -Name "probe_only" -Default $false)
payload_traffic = [string](Get-PropertyValue -Item $readiness -Name "payload_traffic" -Default "")
status = [string](Get-PropertyValue -Item $readiness -Name "status" -Default "")
diagnostic_state = [string](Get-PropertyValue -Item $readiness -Name "diagnostic_state" -Default "")
ready = [bool](Get-PropertyValue -Item $readiness -Name "ready" -Default $false)
active_session_count = [int](Get-PropertyValue -Item $readiness -Name "active_session_count" -Default -1)
terminal_session_count = [int](Get-PropertyValue -Item $readiness -Name "terminal_session_count" -Default -1)
adapter_session_id = Get-PropertyValue -Item $readiness -Name "adapter_session_id" -Default $null
last_adapter_session_id = Get-PropertyValue -Item $readiness -Name "last_adapter_session_id" -Default $null
last_session_state = Get-PropertyValue -Item $readiness -Name "last_session_state" -Default $null
no_session_summary_present = ($null -ne $noSessionSummary)
terminal_session_summary_present = ($null -ne $terminalSummary)
no_session_summary_schema = Get-PropertyValue -Item $noSessionSummary -Name "schema_version" -Default $null
terminal_session_summary_schema = Get-PropertyValue -Item $terminalSummary -Name "schema_version" -Default $null
}
}
function Test-MatrixRow {
param([object]$Row)
$state = [string](Get-PropertyValue -Item $Row -Name "state" -Default "")
if ([string](Get-PropertyValue -Item $Row -Name "schema_version" -Default "") -ne "rap.remote_workspace_adapter_runtime_readiness.v1") { return $false }
if (-not [bool](Get-PropertyValue -Item $Row -Name "probe_only" -Default $false)) { return $false }
if ([string](Get-PropertyValue -Item $Row -Name "payload_traffic" -Default "") -ne "none") { return $false }
if ($state -eq "fresh") {
return (
[string](Get-PropertyValue -Item $Row -Name "diagnostic_state" -Default "") -eq "waiting_for_session" -and
[int](Get-PropertyValue -Item $Row -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $Row -Name "terminal_session_count" -Default -1) -eq 0 -and
[bool](Get-PropertyValue -Item $Row -Name "no_session_summary_present" -Default $false) -and
-not [bool](Get-PropertyValue -Item $Row -Name "terminal_session_summary_present" -Default $true)
)
}
if ($state -eq "active") {
return (
[int](Get-PropertyValue -Item $Row -Name "active_session_count" -Default -1) -eq 1 -and
-not [string]::IsNullOrWhiteSpace([string](Get-PropertyValue -Item $Row -Name "adapter_session_id" -Default "")) -and
-not [bool](Get-PropertyValue -Item $Row -Name "no_session_summary_present" -Default $true) -and
-not [bool](Get-PropertyValue -Item $Row -Name "terminal_session_summary_present" -Default $true)
)
}
if ($state -eq "terminal") {
return (
[string](Get-PropertyValue -Item $Row -Name "diagnostic_state" -Default "") -eq "last_session_terminal_or_expired" -and
[int](Get-PropertyValue -Item $Row -Name "active_session_count" -Default -1) -eq 0 -and
[int](Get-PropertyValue -Item $Row -Name "terminal_session_count" -Default -1) -ge 1 -and
-not [bool](Get-PropertyValue -Item $Row -Name "no_session_summary_present" -Default $true) -and
[bool](Get-PropertyValue -Item $Row -Name "terminal_session_summary_present" -Default $false)
)
}
return $false
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z32-remote-workspace-readiness-summary-exclusivity-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$observed = Get-PropertyValue -Item $sourceResult -Name "observed" -Default $null
$freshObserved = Get-PropertyValue -Item $observed -Name "fresh" -Default $null
$activeObserved = Get-PropertyValue -Item $observed -Name "active" -Default $null
$terminalObserved = Get-PropertyValue -Item $observed -Name "terminal" -Default $null
$matrix = @(
(Select-ReadinessMatrixRow -Observed $freshObserved -State "fresh" -Surface "workload"),
(Select-ReadinessMatrixRow -Observed $freshObserved -State "fresh" -Surface "telemetry"),
(Select-ReadinessMatrixRow -Observed $activeObserved -State "active" -Surface "workload"),
(Select-ReadinessMatrixRow -Observed $activeObserved -State "active" -Surface "telemetry"),
(Select-ReadinessMatrixRow -Observed $terminalObserved -State "terminal" -Surface "workload"),
(Select-ReadinessMatrixRow -Observed $terminalObserved -State "terminal" -Surface "telemetry")
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
matrix_row_count = ($matrix.Count -eq 6)
all_rows_valid = (@($matrix | Where-Object { -not (Test-MatrixRow -Row $_) }).Count -eq 0)
workload_rows_present = (@($matrix | Where-Object { $_.surface -eq "workload" }).Count -eq 3)
telemetry_rows_present = (@($matrix | Where-Object { $_.surface -eq "telemetry" }).Count -eq 3)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z33.remote_workspace_readiness_state_matrix_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
entry_node = Get-PropertyValue -Item $sourceResult -Name "entry_node" -Default $null
adapter_session_id = Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default $null
matrix_contract = @(
"state",
"surface",
"schema_version",
"probe_only",
"payload_traffic",
"status",
"diagnostic_state",
"ready",
"active_session_count",
"terminal_session_count",
"adapter_session_id",
"last_adapter_session_id",
"last_session_state",
"no_session_summary_present",
"terminal_session_summary_present"
)
matrix = $matrix
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 20 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z33 remote workspace readiness state matrix smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z33 remote workspace readiness state matrix smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,110 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z34-remote-workspace-probe-to-runtime-gate-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z34-remote-workspace-probe-to-runtime-gate-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
if ($Item -is [System.Collections.IDictionary]) {
if ($Item.Contains($Name)) { return $Item[$Name] }
return $Default
}
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z33-remote-workspace-readiness-state-matrix-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$matrix = @(Get-PropertyValue -Item $sourceResult -Name "matrix" -Default @())
$allProbeOnly = (@($matrix | Where-Object { -not [bool](Get-PropertyValue -Item $_ -Name "probe_only" -Default $false) }).Count -eq 0)
$allPayloadNone = (@($matrix | Where-Object { [string](Get-PropertyValue -Item $_ -Name "payload_traffic" -Default "") -ne "none" }).Count -eq 0)
$hasFresh = (@($matrix | Where-Object { [string](Get-PropertyValue -Item $_ -Name "state" -Default "") -eq "fresh" }).Count -eq 2)
$hasActive = (@($matrix | Where-Object { [string](Get-PropertyValue -Item $_ -Name "state" -Default "") -eq "active" }).Count -eq 2)
$hasTerminal = (@($matrix | Where-Object { [string](Get-PropertyValue -Item $_ -Name "state" -Default "") -eq "terminal" }).Count -eq 2)
$readyContracts = @(
"fabric_service_channel_remote_workspace_lease_probe",
"remote_workspace_entry_ingress_probe",
"remote_workspace_frame_batch_probe",
"remote_workspace_mailbox_cursor_resume",
"remote_workspace_mailbox_preflight_diagnostics",
"remote_workspace_runtime_readiness_state_matrix",
"remote_workspace_terminal_session_summary",
"remote_workspace_no_session_summary"
)
$remainingRuntimeGates = @(
"replace_contract_probe_with_real_adapter_process_supervision",
"carry_real_rdp_display_input_clipboard_file_audio_frames_over_fabric_service_channel",
"add_payload_sized_backpressure_and_drop_policy_for_real_display_audio_channels",
"bind_real_adapter_session_lifecycle_to_backend_resource_session_lifecycle",
"add_client_runtime_handshake_for_remote_workspace_transport_contract",
"prove_no_backend_relay_steady_state_for_remote_workspace_payloads",
"add_real_workload_soak_and_failure_tests_for_entry_exit_route_rebuild",
"add_operator_ui_for_runtime_state_matrix_and_payload_health"
)
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
matrix_present = ($matrix.Count -eq 6)
all_rows_probe_only = $allProbeOnly
all_rows_payload_traffic_none = $allPayloadNone
fresh_active_terminal_rows_present = ($hasFresh -and $hasActive -and $hasTerminal)
ready_contracts_present = ($readyContracts.Count -ge 8)
remaining_runtime_gates_present = ($remainingRuntimeGates.Count -ge 8)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z34.remote_workspace_probe_to_runtime_gate_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
entry_node = Get-PropertyValue -Item $sourceResult -Name "entry_node" -Default $null
current_runtime = [ordered]@{
execution_mode = "contract_probe"
probe_only = $allProbeOnly
payload_traffic = "none"
node_agent_image = "rap-node-agent:codex-service-supervisor-20260513z29"
}
ready_contracts = $readyContracts
remaining_runtime_gates = $remainingRuntimeGates
readiness_matrix = $matrix
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 30 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z34 remote workspace probe-to-runtime gate smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z34 remote workspace probe-to-runtime gate smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,117 @@
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]$ResultPath = "artifacts\c19z35-remote-workspace-real-adapter-supervision-scaffold-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$requiredEnv = @(
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_ENABLED",
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_COMMAND",
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_ARGS_JSON",
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_WORKDIR"
)
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
$uri = "$ApiBaseUrl$Path"
if ($null -eq $Body) { return Invoke-RestMethod -Method $Method -Uri $uri -TimeoutSec 30 }
return Invoke-RestMethod -Method $Method -Uri $uri -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ArrayItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RdpWorkerStatus {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
return @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
}
function Test-RealAdapterScaffold {
param([object]$Status)
if ($null -eq $Status) { return $false }
$payload = Get-PropertyValue -Item $Status -Name "status_payload" -Default $null
$contract = Get-PropertyValue -Item $payload -Name "real_adapter_supervision" -Default $null
if ($null -eq $contract) { return $false }
$env = Get-PropertyValue -Item $contract -Name "config_env" -Default @()
foreach ($item in $requiredEnv) {
if (-not (Test-ArrayItem -Items $env -Want $item)) { return $false }
}
return (
[string](Get-PropertyValue -Item $payload -Name "execution_mode" -Default "") -eq "contract_probe" -and
[string](Get-PropertyValue -Item $payload -Name "traffic" -Default "") -eq "none" -and
[string](Get-PropertyValue -Item $contract -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_supervision.v1" -and
-not [bool](Get-PropertyValue -Item $contract -Name "enabled" -Default $true) -and
[string](Get-PropertyValue -Item $contract -Name "activation_state" -Default "") -eq "disabled_until_real_runtime_stage" -and
[string](Get-PropertyValue -Item $contract -Name "payload_traffic" -Default "") -eq "none"
)
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$status = $null
$deadline = (Get-Date).AddSeconds(60)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$status = Get-RdpWorkerStatus -NodeID $entryNode.id
if (Test-RealAdapterScaffold -Status $status) { break }
}
if ($null -eq $status) {
$status = Get-RdpWorkerStatus -NodeID $entryNode.id
}
$checks = [ordered]@{
rdp_worker_status_present = ($null -ne $status)
contract_probe_remains_active = ([string](Get-PropertyValue -Item $status.status_payload -Name "execution_mode" -Default "") -eq "contract_probe")
real_adapter_scaffold_visible = (Test-RealAdapterScaffold -Status $status)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z35.remote_workspace_real_adapter_supervision_scaffold_smoke.v1"
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
required_env = $requiredEnv
workload_status = $status
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z35 remote workspace real-adapter supervision scaffold smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z35 remote workspace real-adapter supervision scaffold smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,121 @@
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]$ResultPath = "artifacts\c19z36-remote-workspace-real-adapter-supervision-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z36-remote-workspace-real-adapter-supervision-compatibility-source-result.json"
$requiredEnv = @(
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_ENABLED",
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_COMMAND",
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_ARGS_JSON",
"RAP_REMOTE_WORKSPACE_REAL_ADAPTER_WORKDIR"
)
$requiredStatusContract = @(
"schema_version",
"enabled",
"activation_state",
"execution_mode",
"payload_traffic",
"process_model",
"config_env",
"status_contract"
)
$requiredGuardrails = @(
"contract_probe_remains_default",
"no_payload_forwarding_until_real_runtime_stage",
"backend_relay_not_steady_state",
"fabric_service_channel_required"
)
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ArrayItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-RequiredItems {
param([object]$Items, [string[]]$Required)
foreach ($item in $Required) {
if (-not (Test-ArrayItem -Items $Items -Want $item)) { return $false }
}
return $true
}
function Test-RealAdapterCompatibility {
param([object]$Contract)
if ($null -eq $Contract) { return $false }
return (
[string](Get-PropertyValue -Item $Contract -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_supervision.v1" -and
-not [bool](Get-PropertyValue -Item $Contract -Name "enabled" -Default $true) -and
[string](Get-PropertyValue -Item $Contract -Name "activation_state" -Default "") -eq "disabled_until_real_runtime_stage" -and
[string](Get-PropertyValue -Item $Contract -Name "execution_mode" -Default "") -eq "real_adapter_supervision_disabled" -and
[string](Get-PropertyValue -Item $Contract -Name "payload_traffic" -Default "") -eq "none" -and
[string](Get-PropertyValue -Item $Contract -Name "process_model" -Default "") -eq "external_rdp_worker_process" -and
(Test-RequiredItems -Items (Get-PropertyValue -Item $Contract -Name "config_env" -Default @()) -Required $requiredEnv) -and
(Test-RequiredItems -Items (Get-PropertyValue -Item $Contract -Name "status_contract" -Default @()) -Required $requiredStatusContract) -and
(Test-RequiredItems -Items (Get-PropertyValue -Item $Contract -Name "guardrails" -Default @()) -Required $requiredGuardrails)
)
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z35-remote-workspace-real-adapter-supervision-scaffold-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$status = Get-PropertyValue -Item $sourceResult -Name "workload_status" -Default $null
$payload = Get-PropertyValue -Item $status -Name "status_payload" -Default $null
$contract = Get-PropertyValue -Item $payload -Name "real_adapter_supervision" -Default $null
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
contract_probe_remains_active = ([string](Get-PropertyValue -Item $payload -Name "execution_mode" -Default "") -eq "contract_probe")
payload_traffic_none = ([string](Get-PropertyValue -Item $payload -Name "traffic" -Default "") -eq "none")
real_adapter_contract_compatible = (Test-RealAdapterCompatibility -Contract $contract)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z36.remote_workspace_real_adapter_supervision_compatibility_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
required_env = $requiredEnv
required_status_contract = $requiredStatusContract
required_guardrails = $requiredGuardrails
real_adapter_supervision = $contract
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z36 remote workspace real-adapter supervision compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z36 remote workspace real-adapter supervision compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,131 @@
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]$ResultPath = "artifacts\c19z37-remote-workspace-real-adapter-config-projection-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$forbiddenProjectionFields = @("command", "args_json", "workdir", "command_path", "raw_command", "raw_args_json", "raw_workdir")
function Invoke-Api {
param([string]$Method, [string]$Path)
return Invoke-RestMethod -Method $Method -Uri "$ApiBaseUrl$Path" -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RdpWorkerStatus {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
return @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
}
function Test-NoRawProjectionFields {
param([object]$Projection)
if ($null -eq $Projection) { return $false }
foreach ($field in $forbiddenProjectionFields) {
if ($null -ne $Projection.PSObject.Properties[$field]) { return $false }
}
return $true
}
function Test-ConfigProjection {
param([object]$Status)
if ($null -eq $Status) { return $false }
$payload = Get-PropertyValue -Item $Status -Name "status_payload" -Default $null
$contract = Get-PropertyValue -Item $payload -Name "real_adapter_supervision" -Default $null
$projection = Get-PropertyValue -Item $contract -Name "config_projection" -Default $null
if ($null -eq $projection) { return $false }
return (
[string](Get-PropertyValue -Item $payload -Name "execution_mode" -Default "") -eq "contract_probe" -and
[string](Get-PropertyValue -Item $payload -Name "traffic" -Default "") -eq "none" -and
[string](Get-PropertyValue -Item $contract -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_supervision.v1" -and
-not [bool](Get-PropertyValue -Item $contract -Name "enabled" -Default $true) -and
[string](Get-PropertyValue -Item $contract -Name "activation_state" -Default "") -eq "disabled_until_real_runtime_stage" -and
[string](Get-PropertyValue -Item $contract -Name "payload_traffic" -Default "") -eq "none" -and
[string](Get-PropertyValue -Item $projection -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_config_projection.v1" -and
[bool](Get-PropertyValue -Item $projection -Name "enabled_requested" -Default $false) -and
-not [bool](Get-PropertyValue -Item $projection -Name "activation_allowed" -Default $true) -and
[bool](Get-PropertyValue -Item $projection -Name "command_present" -Default $false) -and
[bool](Get-PropertyValue -Item $projection -Name "args_json_present" -Default $false) -and
[string](Get-PropertyValue -Item $projection -Name "args_json_shape" -Default "") -eq "json_array" -and
[bool](Get-PropertyValue -Item $projection -Name "workdir_present" -Default $false) -and
[bool](Get-PropertyValue -Item $projection -Name "raw_values_redacted" -Default $false) -and
(Test-NoRawProjectionFields -Projection $projection)
)
}
$entryNode = Get-NodeByName -Name $EntryNodeName
$status = $null
$deadline = (Get-Date).AddSeconds(70)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$status = Get-RdpWorkerStatus -NodeID $entryNode.id
if (Test-ConfigProjection -Status $status) { break }
}
if ($null -eq $status) {
$status = Get-RdpWorkerStatus -NodeID $entryNode.id
}
$payload = Get-PropertyValue -Item $status -Name "status_payload" -Default $null
$contract = Get-PropertyValue -Item $payload -Name "real_adapter_supervision" -Default $null
$projection = Get-PropertyValue -Item $contract -Name "config_projection" -Default $null
$checks = [ordered]@{
rdp_worker_status_present = ($null -ne $status)
contract_probe_remains_active = ([string](Get-PropertyValue -Item $payload -Name "execution_mode" -Default "") -eq "contract_probe")
real_adapter_stays_disabled = (-not [bool](Get-PropertyValue -Item $contract -Name "enabled" -Default $true))
payload_traffic_none = ([string](Get-PropertyValue -Item $contract -Name "payload_traffic" -Default "") -eq "none")
config_projection_visible = ($null -ne $projection)
enabled_request_projected = ([bool](Get-PropertyValue -Item $projection -Name "enabled_requested" -Default $false))
activation_still_blocked = (-not [bool](Get-PropertyValue -Item $projection -Name "activation_allowed" -Default $true))
command_presence_projected = ([bool](Get-PropertyValue -Item $projection -Name "command_present" -Default $false))
args_presence_projected = ([bool](Get-PropertyValue -Item $projection -Name "args_json_present" -Default $false))
args_shape_projected = ([string](Get-PropertyValue -Item $projection -Name "args_json_shape" -Default "") -eq "json_array")
workdir_presence_projected = ([bool](Get-PropertyValue -Item $projection -Name "workdir_present" -Default $false))
raw_values_redacted = ([bool](Get-PropertyValue -Item $projection -Name "raw_values_redacted" -Default $false) -and (Test-NoRawProjectionFields -Projection $projection))
projection_contract_passed = (Test-ConfigProjection -Status $status)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z37.remote_workspace_real_adapter_config_projection_smoke.v1"
cluster_id = $ClusterID
entry_node = [ordered]@{ id = $entryNode.id; name = $entryNode.name }
forbidden_projection_fields = $forbiddenProjectionFields
real_adapter_supervision = $contract
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z37 remote workspace real-adapter config projection smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z37 remote workspace real-adapter config projection smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,160 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$ResultPath = "artifacts\c19z38-remote-workspace-real-adapter-config-projection-compatibility-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$runId = "c19z38-" + (Get-Date -Format "yyyyMMdd-HHmmss")
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
if ($null -eq $Body) {
return Invoke-RestMethod -Method $Method -Uri "$ApiBaseUrl$Path" -TimeoutSec 30
}
return Invoke-RestMethod -Method $Method -Uri "$ApiBaseUrl$Path" -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Get-RdpWorkerStatus {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
return @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
}
function Enable-RdpWorkerProbe {
param([object]$Node)
Invoke-Api -Method PUT -Path "/clusters/$ClusterID/nodes/$($Node.id)/workloads/rdp-worker/desired" -Body @{
actor_user_id = $ActorUserID
desired_state = "enabled"
version = "c19z38-real-adapter-config-projection-$runId"
runtime_mode = "native"
artifact_ref = "builtin:rdp-worker-adapter-contract-probe"
config = @{
adapter_contract_probe = $true
service_class = "remote_workspace"
run_id = $runId
}
environment = @{}
} | Out-Null
}
function Get-Projection {
param([object]$Status)
$payload = Get-PropertyValue -Item $Status -Name "status_payload" -Default $null
$contract = Get-PropertyValue -Item $payload -Name "real_adapter_supervision" -Default $null
return Get-PropertyValue -Item $contract -Name "config_projection" -Default $null
}
function Test-ProjectionCommonGuardrails {
param([object]$Status)
if ($null -eq $Status) { return $false }
$payload = Get-PropertyValue -Item $Status -Name "status_payload" -Default $null
$contract = Get-PropertyValue -Item $payload -Name "real_adapter_supervision" -Default $null
$projection = Get-PropertyValue -Item $contract -Name "config_projection" -Default $null
return (
[string](Get-PropertyValue -Item $payload -Name "execution_mode" -Default "") -eq "contract_probe" -and
[string](Get-PropertyValue -Item $payload -Name "traffic" -Default "") -eq "none" -and
[string](Get-PropertyValue -Item $contract -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_supervision.v1" -and
-not [bool](Get-PropertyValue -Item $contract -Name "enabled" -Default $true) -and
[string](Get-PropertyValue -Item $contract -Name "payload_traffic" -Default "") -eq "none" -and
[string](Get-PropertyValue -Item $projection -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_config_projection.v1" -and
-not [bool](Get-PropertyValue -Item $projection -Name "activation_allowed" -Default $true) -and
[bool](Get-PropertyValue -Item $projection -Name "raw_values_redacted" -Default $false)
)
}
function Test-ProjectionShape {
param(
[object]$Status,
[bool]$EnabledRequested,
[bool]$CommandPresent,
[bool]$ArgsPresent,
[string]$ArgsShape,
[bool]$WorkdirPresent
)
$projection = Get-Projection -Status $Status
if ($null -eq $projection) { return $false }
return (
(Test-ProjectionCommonGuardrails -Status $Status) -and
[bool](Get-PropertyValue -Item $projection -Name "enabled_requested" -Default (-not $EnabledRequested)) -eq $EnabledRequested -and
[bool](Get-PropertyValue -Item $projection -Name "command_present" -Default (-not $CommandPresent)) -eq $CommandPresent -and
[bool](Get-PropertyValue -Item $projection -Name "args_json_present" -Default (-not $ArgsPresent)) -eq $ArgsPresent -and
[string](Get-PropertyValue -Item $projection -Name "args_json_shape" -Default "") -eq $ArgsShape -and
[bool](Get-PropertyValue -Item $projection -Name "workdir_present" -Default (-not $WorkdirPresent)) -eq $WorkdirPresent
)
}
$requestedNode = Get-NodeByName -Name $RequestedNodeName
$defaultNode = Get-NodeByName -Name $DefaultNodeName
Enable-RdpWorkerProbe -Node $requestedNode
Enable-RdpWorkerProbe -Node $defaultNode
$requestedStatus = $null
$defaultStatus = $null
$deadline = (Get-Date).AddSeconds(80)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$requestedStatus = Get-RdpWorkerStatus -NodeID $requestedNode.id
$defaultStatus = Get-RdpWorkerStatus -NodeID $defaultNode.id
if (
(Test-ProjectionShape -Status $requestedStatus -EnabledRequested $true -CommandPresent $true -ArgsPresent $true -ArgsShape "json_array" -WorkdirPresent $true) -and
(Test-ProjectionShape -Status $defaultStatus -EnabledRequested $false -CommandPresent $false -ArgsPresent $false -ArgsShape "absent" -WorkdirPresent $false)
) { break }
}
$requestedProjection = Get-Projection -Status $requestedStatus
$defaultProjection = Get-Projection -Status $defaultStatus
$checks = [ordered]@{
requested_status_present = ($null -ne $requestedStatus)
default_status_present = ($null -ne $defaultStatus)
requested_common_guardrails = (Test-ProjectionCommonGuardrails -Status $requestedStatus)
default_common_guardrails = (Test-ProjectionCommonGuardrails -Status $defaultStatus)
requested_shape_projected = (Test-ProjectionShape -Status $requestedStatus -EnabledRequested $true -CommandPresent $true -ArgsPresent $true -ArgsShape "json_array" -WorkdirPresent $true)
default_shape_projected = (Test-ProjectionShape -Status $defaultStatus -EnabledRequested $false -CommandPresent $false -ArgsPresent $false -ArgsShape "absent" -WorkdirPresent $false)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z38.remote_workspace_real_adapter_config_projection_compatibility_smoke.v1"
cluster_id = $ClusterID
requested_node = [ordered]@{ id = $requestedNode.id; name = $requestedNode.name }
default_node = [ordered]@{ id = $defaultNode.id; name = $defaultNode.name }
requested_projection = $requestedProjection
default_projection = $defaultProjection
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z38 remote workspace real-adapter config projection compatibility smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z38 remote workspace real-adapter config projection compatibility smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,160 @@
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]$RequestedNodeName = "test-1",
[string]$DefaultNodeName = "test-2",
[string]$ResultPath = "artifacts\c19z39-remote-workspace-real-adapter-activation-decision-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$runId = "c19z39-" + (Get-Date -Format "yyyyMMdd-HHmmss")
$requiredGates = @(
"real_runtime_stage_enabled",
"fabric_service_channel_runtime_ready",
"adapter_process_supervisor_enabled",
"payload_forwarding_contract_enabled"
)
function Invoke-Api {
param([string]$Method, [string]$Path, [object]$Body = $null)
if ($null -eq $Body) {
return Invoke-RestMethod -Method $Method -Uri "$ApiBaseUrl$Path" -TimeoutSec 30
}
return Invoke-RestMethod -Method $Method -Uri "$ApiBaseUrl$Path" -ContentType "application/json" -Body ($Body | ConvertTo-Json -Depth 80) -TimeoutSec 30
}
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
function Test-ArrayItem {
param([object]$Items, [string]$Want)
foreach ($item in @($Items)) {
if ([string]$item -eq $Want) { return $true }
}
return $false
}
function Test-RequiredItems {
param([object]$Items, [string[]]$Required)
foreach ($item in $Required) {
if (-not (Test-ArrayItem -Items $Items -Want $item)) { return $false }
}
return $true
}
function Get-NodeByName {
param([string]$Name)
$nodes = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes?actor_user_id=$ActorUserID").nodes
$node = @($nodes | Where-Object { $_.name -eq $Name }) | Select-Object -First 1
if ($null -eq $node) { throw "Node '$Name' was not found in cluster $ClusterID" }
return $node
}
function Enable-RdpWorkerProbe {
param([object]$Node)
Invoke-Api -Method PUT -Path "/clusters/$ClusterID/nodes/$($Node.id)/workloads/rdp-worker/desired" -Body @{
actor_user_id = $ActorUserID
desired_state = "enabled"
version = "c19z39-real-adapter-activation-decision-$runId"
runtime_mode = "native"
artifact_ref = "builtin:rdp-worker-adapter-contract-probe"
config = @{ adapter_contract_probe = $true; service_class = "remote_workspace"; run_id = $runId }
environment = @{}
} | Out-Null
}
function Get-RdpWorkerStatus {
param([string]$NodeID)
$statuses = (Invoke-Api -Method GET -Path "/clusters/$ClusterID/nodes/$NodeID/workloads/status?actor_user_id=$ActorUserID").workload_statuses
return @($statuses | Where-Object { $_.service_type -eq "rdp-worker" } | Select-Object -First 1)
}
function Get-RealAdapterContract {
param([object]$Status)
$payload = Get-PropertyValue -Item $Status -Name "status_payload" -Default $null
return Get-PropertyValue -Item $payload -Name "real_adapter_supervision" -Default $null
}
function Test-ActivationDecision {
param([object]$Status, [bool]$EnabledRequested)
if ($null -eq $Status) { return $false }
$payload = Get-PropertyValue -Item $Status -Name "status_payload" -Default $null
$contract = Get-RealAdapterContract -Status $Status
$decision = Get-PropertyValue -Item $contract -Name "activation_decision" -Default $null
if ($null -eq $decision) { return $false }
return (
[string](Get-PropertyValue -Item $payload -Name "execution_mode" -Default "") -eq "contract_probe" -and
[string](Get-PropertyValue -Item $payload -Name "traffic" -Default "") -eq "none" -and
-not [bool](Get-PropertyValue -Item $contract -Name "enabled" -Default $true) -and
[string](Get-PropertyValue -Item $contract -Name "payload_traffic" -Default "") -eq "none" -and
[string](Get-PropertyValue -Item $decision -Name "schema_version" -Default "") -eq "rap.remote_workspace_real_adapter_activation_decision.v1" -and
[string](Get-PropertyValue -Item $decision -Name "decision" -Default "") -eq "blocked" -and
[string](Get-PropertyValue -Item $decision -Name "reason" -Default "") -eq "real_runtime_stage_not_enabled" -and
[bool](Get-PropertyValue -Item $decision -Name "enabled_requested" -Default (-not $EnabledRequested)) -eq $EnabledRequested -and
-not [bool](Get-PropertyValue -Item $decision -Name "activation_allowed" -Default $true) -and
[string](Get-PropertyValue -Item $decision -Name "payload_traffic" -Default "") -eq "none" -and
(Test-RequiredItems -Items (Get-PropertyValue -Item $decision -Name "required_gates" -Default @()) -Required $requiredGates) -and
(Test-RequiredItems -Items (Get-PropertyValue -Item $decision -Name "missing_gates" -Default @()) -Required $requiredGates)
)
}
$requestedNode = Get-NodeByName -Name $RequestedNodeName
$defaultNode = Get-NodeByName -Name $DefaultNodeName
Enable-RdpWorkerProbe -Node $requestedNode
Enable-RdpWorkerProbe -Node $defaultNode
$requestedStatus = $null
$defaultStatus = $null
$deadline = (Get-Date).AddSeconds(80)
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$requestedStatus = Get-RdpWorkerStatus -NodeID $requestedNode.id
$defaultStatus = Get-RdpWorkerStatus -NodeID $defaultNode.id
if ((Test-ActivationDecision -Status $requestedStatus -EnabledRequested $true) -and (Test-ActivationDecision -Status $defaultStatus -EnabledRequested $false)) {
break
}
}
$requestedContract = Get-RealAdapterContract -Status $requestedStatus
$defaultContract = Get-RealAdapterContract -Status $defaultStatus
$checks = [ordered]@{
requested_status_present = ($null -ne $requestedStatus)
default_status_present = ($null -ne $defaultStatus)
requested_activation_blocked = (Test-ActivationDecision -Status $requestedStatus -EnabledRequested $true)
default_activation_blocked = (Test-ActivationDecision -Status $defaultStatus -EnabledRequested $false)
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z39.remote_workspace_real_adapter_activation_decision_smoke.v1"
cluster_id = $ClusterID
requested_node = [ordered]@{ id = $requestedNode.id; name = $requestedNode.name }
default_node = [ordered]@{ id = $defaultNode.id; name = $defaultNode.name }
required_gates = $requiredGates
requested_activation_decision = Get-PropertyValue -Item $requestedContract -Name "activation_decision" -Default $null
default_activation_decision = Get-PropertyValue -Item $defaultContract -Name "activation_decision" -Default $null
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z39 remote workspace real-adapter activation decision smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z39 remote workspace real-adapter activation decision smoke passed. Result: $fullResultPath"
$result
@@ -0,0 +1,71 @@
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]$ExitNodeName = "test-2",
[string]$EntryBaseUrl = "http://192.168.200.61:19131",
[string]$ResultPath = "artifacts\c19z4-remote-workspace-mailbox-preflight-action-hints-smoke-result.json"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath
$sourceResultPath = "artifacts\c19z4-remote-workspace-mailbox-preflight-action-hints-source-result.json"
function Get-PropertyValue {
param([object]$Item, [string]$Name, [object]$Default = $null)
if ($null -eq $Item) { return $Default }
$property = $Item.PSObject.Properties[$Name]
if ($null -eq $property) { return $Default }
return $property.Value
}
$source = & powershell -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "c19z3-remote-workspace-mailbox-stale-preflight-smoke.ps1") `
-ApiBaseUrl $ApiBaseUrl `
-ClusterID $ClusterID `
-ActorUserID $ActorUserID `
-EntryNodeName $EntryNodeName `
-ExitNodeName $ExitNodeName `
-EntryBaseUrl $EntryBaseUrl `
-ResultPath $sourceResultPath
$sourceFile = Join-Path $repoRoot $sourceResultPath
$sourceResult = Get-Content -Raw -Path $sourceFile | ConvertFrom-Json
$preflight = Get-PropertyValue -Item $sourceResult -Name "preflight" -Default $null
$preflightJson = Get-PropertyValue -Item $preflight -Name "json" -Default $null
$hints = @((Get-PropertyValue -Item $preflightJson -Name "action_hints" -Default @()))
$checks = [ordered]@{
source_smoke_passed = ([bool]$sourceResult.passed)
stale_preflight_detected = ([bool](Get-PropertyValue -Item $preflightJson -Name "stale_cursor" -Default $false) -and [string](Get-PropertyValue -Item $preflightJson -Name "diagnostic_state" -Default "") -eq "stale_cursor_gap")
recommended_action_visible = ([string](Get-PropertyValue -Item $preflightJson -Name "recommended_action" -Default "") -eq "reset_consumer_and_resync")
reset_hint_visible = $hints.Contains("reset_consumer_cursor")
resync_hint_visible = $hints.Contains("request_full_adapter_resync")
checkpoint_hint_visible = $hints.Contains("resume_from_checkpoint_after_resync")
}
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value } | ForEach-Object { $_.Key })
$result = [ordered]@{
schema_version = "c19z4.remote_workspace_mailbox_preflight_action_hints_smoke.v1"
source_result_path = $sourceFile
cluster_id = $ClusterID
adapter_session_id = [string](Get-PropertyValue -Item $sourceResult -Name "adapter_session_id" -Default "")
preflight = $preflight
checks = $checks
failed_checks = $failed
passed = ($failed.Count -eq 0)
}
$fullResultPath = Join-Path $repoRoot $ResultPath
$resultDir = Split-Path -Parent $fullResultPath
if ($resultDir) { New-Item -ItemType Directory -Force -Path $resultDir | Out-Null }
$result | ConvertTo-Json -Depth 100 | Set-Content -Encoding UTF8 -Path $fullResultPath
if (-not $result.passed) {
throw "C19Z4 remote workspace mailbox preflight action hints smoke failed. Result: $fullResultPath Failed: $($failed -join ', ')"
}
Write-Host "C19Z4 remote workspace mailbox preflight action hints smoke passed. Result: $fullResultPath"
$result

Some files were not shown because too many files have changed in this diff Show More