diff --git a/.github/workflows/runbook-validation.yml b/.github/workflows/runbook-validation.yml index f5dd9b057..832a92973 100644 --- a/.github/workflows/runbook-validation.yml +++ b/.github/workflows/runbook-validation.yml @@ -31,8 +31,18 @@ jobs: $json = Get-Content runbook-ci.json -Raw | ConvertFrom-Json $json | Add-Member -NotePropertyName hostElapsedSeconds -NotePropertyValue $elapsedSeconds -Force $json | ConvertTo-Json -Depth 20 | Set-Content -LiteralPath runbook-ci.json -Encoding utf8 + $loopPhase = @($json.phases) | Where-Object { $_.name -eq 'Loop' } | Select-Object -First 1 + $executionTopology = if ($loopPhase -and $loopPhase.details -and $loopPhase.details.PSObject.Properties.Name -contains 'executionTopology') { $loopPhase.details.executionTopology } else { $null } if ($env:GITHUB_OUTPUT) { Add-Content -Path $env:GITHUB_OUTPUT -Value ("host_elapsed_seconds=$elapsedSeconds") -Encoding utf8 + Add-Content -Path $env:GITHUB_OUTPUT -Value ("loop_execution_topology_present=" + [bool]$executionTopology) -Encoding utf8 + } + if ($env:GITHUB_STEP_SUMMARY -and $executionTopology) { + Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "### Loop Execution Topology" -Encoding utf8 + if ($executionTopology.runtimeSurface) { Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ("- Runtime surface: `{0}`" -f $executionTopology.runtimeSurface) -Encoding utf8 } + if ($executionTopology.processModelClass) { Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ("- Process model: `{0}`" -f $executionTopology.processModelClass) -Encoding utf8 } + if ($executionTopology.executionCellLeaseId) { Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ("- Execution cell lease: `{0}`" -f $executionTopology.executionCellLeaseId) -Encoding utf8 } + if ($executionTopology.harnessInstanceLeaseId) { Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ("- Harness lease: `{0}`" -f $executionTopology.harnessInstanceLeaseId) -Encoding utf8 } } Get-Content runbook-ci.json @@ -48,4 +58,9 @@ jobs: $json = Get-Content runbook-ci.json -Raw | ConvertFrom-Json if ($json.schema -ne 'integration-runbook-v1') { throw 'Schema mismatch' } if (-not $json.phases) { throw 'No phases in runbook output' } - + $loopPhase = @($json.phases) | Where-Object { $_.name -eq 'Loop' } | Select-Object -First 1 + if ($loopPhase -and $loopPhase.details -and $loopPhase.details.PSObject.Properties.Name -contains 'executionTopology') { + $executionTopology = $loopPhase.details.executionTopology + if (-not $executionTopology.runtimeSurface) { throw 'Loop executionTopology.runtimeSurface missing' } + if (-not $executionTopology.processModelClass) { throw 'Loop executionTopology.processModelClass missing' } + } diff --git a/docs/INTEGRATION_RUNBOOK.md b/docs/INTEGRATION_RUNBOOK.md index 0740d5f2f..299b71aef 100644 --- a/docs/INTEGRATION_RUNBOOK.md +++ b/docs/INTEGRATION_RUNBOOK.md @@ -18,6 +18,10 @@ CLI and the repository scripts. `Invoke-IntegrationRunbook.ps1` orchestrates all phases with logging and artefact capture. +When the `Loop` phase runs with the TestStand-backed host-fabric surfaces, the runbook JSON now carries +`Loop.details.executionTopology`, including the runtime surface, process-model class, execution-cell lease, +and harness lease identity. That gives downstream consumers a stable ownership chain instead of opaque loop output. + ## Canonical LVCompare path The action only accepts the default location: @@ -56,6 +60,10 @@ pwsh -File scripts/Run-AutonomousIntegrationLoop.ps1 -MaxIterations 25 Artifacts land under `tests/results/` (compare evidence, loop JSON, Pester results). +For local runs, `tools/Local-Runbook.ps1` now auto-stages a runbook JSON report whenever the `Loop` phase is included +and prints a focused Loop execution topology summary after the child runbook finishes. That keeps the human-facing path +aligned with the machine-readable `integration-runbook-v1` contract. + ## Helpful scripts - `tools/Close-LVCompare.ps1` – closes LVCompare gracefully or kills after timeout. @@ -76,4 +84,3 @@ Artifacts land under `tests/results/` (compare evidence, loop JSON, Pester resul - [`docs/TROUBLESHOOTING.md`](./TROUBLESHOOTING.md) - [`docs/COMPARE_LOOP_MODULE.md`](./COMPARE_LOOP_MODULE.md) - [`docs/FIXTURE_DRIFT.md`](./FIXTURE_DRIFT.md) -