Repository navigation
M2.17-M P0: reconcile #618/#620; canonical Data Model focused hydration + Explorer read SSOT #1294
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Smart Discovery Mainline Readiness | |
| on: | |
| pull_request: | |
| paths: | |
| - "*.cs" | |
| - "**/*.cs" | |
| - "*.csproj" | |
| - "**/*.csproj" | |
| - "*.sln" | |
| - "**/*.sln" | |
| - "*.props" | |
| - "**/*.props" | |
| - "*.targets" | |
| - "**/*.targets" | |
| - "global.json" | |
| - "*.xaml" | |
| - "**/*.xaml" | |
| - "app.manifest" | |
| - "VERSION" | |
| - ".release/**" | |
| - ".github/workflows/**" | |
| - "Assets/**" | |
| - "Resources/**" | |
| - "installer/**" | |
| - "engine-patches/**" | |
| - "landing/release-notes*.json" | |
| - "landing/latest.json" | |
| - "engines/**" | |
| - "scripts/**" | |
| - "tests/**" | |
| - "evidence/**" | |
| - "docs/INTEROPERABILITY_REFERENCE_CONTRACT.md" | |
| - ".github/workflows/smart-discovery-*.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| mainline-readiness: | |
| name: Require R10 physical authority before mainline review | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout ARSAS candidate | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| - name: Verify R10 physical convergence authority | |
| shell: powershell | |
| env: | |
| PR_BASE_REF: ${{ github.base_ref }} | |
| SOURCE_REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| $target = Get-Content .\evidence\interoperability-reference-target.json -Raw | ConvertFrom-Json | |
| $lock = Get-Content .\engines\ARIEC61850.lock.json -Raw | ConvertFrom-Json | |
| if ($target.status -ne 'physical-retest-passed-merge-ready' -or | |
| -not [bool]$target.promotion.physicalRetestPassed -or | |
| [bool]$target.promotion.physicalRetestRequired -or | |
| -not [bool]$target.promotion.mergeAllowedAfterPhysicalRetest) { | |
| throw 'R10 physical convergence authority is not in the accepted state.' | |
| } | |
| $r10 = $target.physicalEvidence.arsasR10 | |
| foreach ($edition in @($r10.reuseEdition2, $r10.reuseEdition1)) { | |
| if ([int]$edition.failedReads -ne 0 -or | |
| [int]$edition.projectionErrors -ne 0 -or | |
| [int]$edition.cacheLoss -ne 0 -or | |
| [int]$edition.reportBackedRuntimePoints -ne 58 -or | |
| [int]$edition.unresolvedRuntimePoints -ne 0 -or | |
| -not [bool]$edition.actualInformationReportObserved) { | |
| throw 'R10 trusted-SCL reuse proof regressed.' | |
| } | |
| } | |
| if ($lock.mergedMainCommit -ne $target.activeStack.engineModelAndScl.mainMerge -or | |
| $lock.mergedMainCommit -ne $r10.testedArtifact.engineMergedMain -or | |
| $lock.physicalTestedCommit -ne $r10.testedArtifact.engineTestedHead -or | |
| $lock.mergedMainTree -ne $r10.testedArtifact.engineTree -or | |
| $lock.previousStablePin.commit -ne $lock.mergedMainCommit -or | |
| [int]$lock.previousStablePin.sourcePullRequest -ne 135) { | |
| throw 'Historical ARSAS engine baseline no longer matches the R10 physical authority.' | |
| } | |
| $association = $target.postBaselineAcceptance.sclAssociationInteroperability | |
| if ($association.contractId -ne 'SCL-ASSOC-PARTIAL-ADDR-PHYSICAL' -or | |
| $association.status -ne 'physically-accepted-engine-merged-consumer-pending-merge' -or | |
| -not [bool]$association.preservesR10Baseline -or | |
| $association.engine.testedHead -ne $lock.sclAssociationInteroperability.testedEngineCommit -or | |
| [int]$association.engine.pullRequest -ne [int]$lock.sclAssociationInteroperability.sourcePullRequest -or | |
| [int]$lock.sclAssociationInteroperability.sourcePullRequest -ne 143 -or | |
| $association.engine.mergedMain -ne $lock.sclAssociationInteroperability.mergedEngineCommit -or | |
| $association.engine.tree -ne $lock.sclAssociationInteroperability.engineTree -or | |
| -not [bool]$association.physicalAcceptance.fullDiscoverySkipped -or | |
| [int]$association.physicalAcceptance.failedReads -ne 0 -or | |
| [int]$association.physicalAcceptance.projectionErrors -ne 0 -or | |
| [int]$association.physicalAcceptance.cacheLoss -ne 0 -or | |
| [int]$association.physicalAcceptance.unresolvedRuntimePoints -ne 0 -or | |
| -not [bool]$association.physicalAcceptance.actualInformationReportObserved) { | |
| throw 'Post-baseline SCL association acceptance is missing or inconsistent.' | |
| } | |
| # P10.1: exact, bounded and ancestry-checked code-trial allowlist. | |
| # This never grants field acceptance or mainline promotion. | |
| . .\scripts\test-p10-9f-core-routing-trial.ps1 | |
| . .\scripts\test-m217k-typed-status-trial.ps1 | |
| $coreRoutingTrialValid = Test-P109FCoreRoutingTrial -Lock $lock | |
| $m217KTrialValid = Test-M217KTypedStatusTrial -Lock $lock | |
| $trial = $lock.smartInteroperabilityCodeTrial | |
| $serverAt = $lock.sclServerAtTrial | |
| $closure = $lock.datasetFirstDiscoveryTrial | |
| $p10 = $lock.p10IdentityTrial | |
| $historicalTrialValid = $null -ne $trial -and | |
| $trial.status -eq 'code-verified-not-physical' -and | |
| [int]$trial.issue -eq 144 -and | |
| [int]$trial.integrationPullRequest -eq 148 -and | |
| [bool]$trial.physicalPromotionRequired -and | |
| [bool]$trial.fullDiscoveryFallbackForbidden -and | |
| [bool]$trial.vendorBranchingForbidden | |
| $serverAtValid = $null -ne $serverAt -and | |
| $serverAt.exactCommit -eq '352c81e6a798635c6addcee0683235ca87ad416d' -and | |
| [int]$serverAt.sourcePullRequest -eq 153 -and | |
| $serverAt.baseEngineCommit -eq $trial.exactCommit -and | |
| $serverAt.status -eq 'code-verified-candidate-not-physical' -and | |
| [bool]$serverAt.physicalQualificationRequired -and | |
| [bool]$serverAt.noAutomaticMmsFailover | |
| $closureValid = $null -ne $closure -and | |
| $closure.status -eq 'code-trial-not-physical' -and | |
| [int]$closure.issue -eq 495 -and | |
| [int]$closure.enginePullRequest -eq 157 -and | |
| [int]$closure.consumerPullRequest -eq 497 -and | |
| $closure.exactCommit -eq '8b0c0f7e695b016834e40a6f068994dcc945cb1a' -and | |
| $closure.baseEngineCommit -eq $serverAt.exactCommit -and | |
| [bool]$closure.fullNameListFallbackForbidden -and | |
| [bool]$closure.cyclicMmsProcessPollingForbidden -and | |
| [bool]$closure.physicalQualificationRequired | |
| $p10Valid = $null -ne $p10 -and | |
| $p10.status -eq 'code-trial-not-physical' -and | |
| [int]$p10.enginePullRequest -eq 161 -and | |
| $p10.exactCommit -eq '00ad2819b99ffe6b3f885e59aa24a6afb2b4d8e1' -and | |
| $p10.baseEngineCommit -eq $closure.exactCommit -and | |
| $p10.identitySource -eq 'TrustedSclExactDomainMatch' -and | |
| [bool]$p10.physicalQualificationRequired -and | |
| [bool]$p10.fullNameListFallbackForbidden -and | |
| [bool]$p10.cyclicMmsProcessPollingForbidden | |
| $originalTrial = $lock.commit -eq $trial.exactCommit -and | |
| [int]$lock.sourcePullRequest -eq 148 | |
| $serverAtTrial = $serverAtValid -and | |
| $lock.commit -eq $serverAt.exactCommit -and | |
| [int]$lock.sourcePullRequest -eq 153 | |
| $datasetTrial = $serverAtValid -and $closureValid -and | |
| $lock.commit -eq $closure.exactCommit -and | |
| [int]$lock.sourcePullRequest -eq 157 | |
| $p10Trial = $serverAtValid -and $closureValid -and $p10Valid -and | |
| $lock.commit -eq $p10.exactCommit -and | |
| [int]$lock.sourcePullRequest -eq 161 | |
| if ($originalTrial -or $serverAtTrial -or $datasetTrial -or $p10Trial -or $coreRoutingTrialValid -or $m217KTrialValid) { | |
| if (-not $historicalTrialValid -or | |
| $lock.ref -ne 'main') { | |
| throw 'Stacked trial identity or ancestor authority is inconsistent.' | |
| } | |
| if ($env:PR_BASE_REF -eq 'main' -or $env:SOURCE_REF_NAME -eq 'main') { | |
| throw 'Unqualified P6.1/P6.2 trial cannot pass mainline readiness before fresh physical qualification.' | |
| } | |
| Write-Host "Stacked consumer trial accepted for CI against $($lock.commit); no mainline physical promotion." | |
| } | |
| elseif ($lock.commit -ne $association.engine.testedHead -or | |
| [int]$lock.sourcePullRequest -ne 143) { | |
| throw 'Runtime engine pin is neither the physically accepted authority nor an exact ancestry-bound stacked CodeVerified trial.' | |
| } | |
| "ENGINE_REPOSITORY=$($lock.repository)" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| "ENGINE_COMMIT=$($lock.commit)" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Checkout exact accepted ARIEC61850 integration authority | |
| shell: powershell | |
| run: | | |
| git clone --quiet --filter=blob:none --no-checkout "https://github.com/$env:ENGINE_REPOSITORY.git" ..\ARIEC61850 | |
| git -C ..\ARIEC61850 fetch --quiet --depth 1 origin $env:ENGINE_COMMIT | |
| git -C ..\ARIEC61850 checkout --quiet --detach $env:ENGINE_COMMIT | |
| $actual = (git -C ..\ARIEC61850 rev-parse HEAD).Trim().ToLowerInvariant() | |
| if ($actual -ne $env:ENGINE_COMMIT) { | |
| throw "R10 engine authority mismatch. Expected $env:ENGINE_COMMIT, got $actual." | |
| } | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Validate and test accepted engine authority | |
| shell: powershell | |
| run: | | |
| dotnet restore ..\ARIEC61850\ARIEC61850.sln | |
| dotnet build ..\ARIEC61850\ARIEC61850.sln -c Release --no-restore | |
| dotnet test ..\ARIEC61850\tests\AR.Iec61850.Tests\AR.Iec61850.Tests.csproj -c Release --no-build --no-restore | |
| - name: Set up Python for canonical regression evidence verification | |
| if: github.event_name == 'pull_request' | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Require successful canonical Build ARSAS for same PR merge and engine | |
| if: github.event_name == 'pull_request' | |
| shell: powershell | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| PR_HEAD_BRANCH: ${{ github.event.pull_request.head.ref }} | |
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| PR_MERGE_SHA: ${{ github.sha }} | |
| run: | | |
| python .\scripts\verify-ci-canonical-reuse.py ` | |
| --repository $env:GITHUB_REPOSITORY ` | |
| --head-branch $env:PR_HEAD_BRANCH ` | |
| --head-sha $env:PR_HEAD_SHA ` | |
| --merge-sha $env:PR_MERGE_SHA ` | |
| --engine-sha $env:ENGINE_COMMIT ` | |
| --wait-seconds 960 ` | |
| --allow-in-progress-artifact ` | |
| --output (Join-Path $env:RUNNER_TEMP 'ci-r10-canonical-reuse.json') | |
| if ($LASTEXITCODE -ne 0) { | |
| throw 'R10 Mainline Readiness cannot reuse canonical ARSAS regression evidence.' | |
| } | |
| - name: Report independent engine test plus exact ARSAS regression reuse | |
| if: github.event_name == 'pull_request' | |
| shell: powershell | |
| run: | | |
| $proof = Get-Content (Join-Path $env:RUNNER_TEMP 'ci-r10-canonical-reuse.json') -Raw | ConvertFrom-Json | |
| if ([int]$proof.failed -ne 0 -or [int]$proof.notExecuted -ne 0 -or | |
| [int]$proof.passed -lt 1 -or $proof.engineSha -ne $env:ENGINE_COMMIT) { | |
| throw 'R10 accepted engine/regression evidence is incomplete.' | |
| } | |
| @( | |
| '## R10 Mainline Readiness — independent engine + canonical ARSAS tests', | |
| '', | |
| "- R10 engine integration SHA: $env:ENGINE_COMMIT", | |
| "- canonical Build ARSAS run: $($proof.canonicalRunId)", | |
| "- exact ARSAS PR merge SHA: $($proof.mergeSha)", | |
| "- full ARSAS regression: $($proof.passed) passed, $($proof.failed) failed", | |
| "- canonical proof stage: $($proof.proofStage)", | |
| "- canonical workflow completed: $($proof.workflowCompleted)", | |
| "- packaging/smoke proven here: $($proof.packagingSmokeProven)", | |
| '- Build ARSAS remains the independent packaging/smoke check', | |
| '- Historical physical authority validated independently before this reuse' | |
| ) | Out-File $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| manual-regression: | |
| name: Manual exact-SHA ARSAS regression for R10 readiness | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: ./.github/workflows/_ci-p1-windows-build-test.yml | |
| with: | |
| source_sha: ${{ github.sha }} | |
| shadow_mode: true | |
| secrets: {} |