1919 description : Version expected from the candidate tarball.
2020 required : true
2121 type : string
22- windows_node_release_tag :
23- description : Immutable Windows-node GitHub Release tag whose app artifact will be tested.
22+ windows_node_source :
23+ description : " Windows-node app source to test: release or main. "
2424 required : true
2525 type : string
26- windows_node_release_sha :
27- description : Immutable commit selected by the declared Windows-node release tag .
26+ windows_node_source_sha :
27+ description : Immutable Windows-node commit that supplies the app under test .
2828 required : true
2929 type : string
30- windows_node_release_asset_name :
31- description : Exact Windows-node release asset selected by the caller .
30+ windows_node_workflow_sha :
31+ description : Immutable revision of this reusable workflow, bound through GitHub OIDC .
3232 required : true
3333 type : string
34+ windows_node_release_tag :
35+ description : Immutable Windows-node GitHub Release tag whose app artifact will be tested in release mode.
36+ required : false
37+ default : ' '
38+ type : string
39+ windows_node_release_asset_name :
40+ description : Exact Windows-node release asset selected by the caller in release mode.
41+ required : false
42+ default : ' '
43+ type : string
3444 windows_node_release_asset_sha256 :
35- description : SHA-256 of the exact Windows-node release asset selected by the caller.
36- required : true
45+ description : SHA-256 of the exact Windows-node release asset selected by the caller in release mode.
46+ required : false
47+ default : ' '
3748 type : string
3849 allow_protocol_mismatch :
39- description : Accept only an explicit PROTOCOL_MISMATCH result from this released app .
50+ description : Accept only an explicit PROTOCOL_MISMATCH result from the declared Windows-node source .
4051 required : false
4152 default : false
4253 type : boolean
43- windows_node_sha :
44- description : Immutable Windows node test-harness revision. Pass the same SHA used to call this workflow.
45- required : true
46- type : string
4754 outputs :
4855 outcome :
4956 description : " Candidate E2E outcome: passed or protocol_mismatch."
@@ -69,12 +76,13 @@ jobs:
6976 INPUT_CANDIDATE_ARTIFACT_RUN_ID : ${{ inputs.candidate_artifact_run_id }}
7077 INPUT_CANDIDATE_SHA256 : ${{ inputs.candidate_sha256 }}
7178 INPUT_CANDIDATE_VERSION : ${{ inputs.candidate_version }}
79+ INPUT_WINDOWS_NODE_SOURCE : ${{ inputs.windows_node_source }}
80+ INPUT_WINDOWS_NODE_SOURCE_SHA : ${{ inputs.windows_node_source_sha }}
81+ INPUT_WINDOWS_NODE_WORKFLOW_SHA : ${{ inputs.windows_node_workflow_sha }}
7282 INPUT_WINDOWS_NODE_RELEASE_TAG : ${{ inputs.windows_node_release_tag }}
73- INPUT_WINDOWS_NODE_RELEASE_SHA : ${{ inputs.windows_node_release_sha }}
7483 INPUT_WINDOWS_NODE_RELEASE_ASSET_NAME : ${{ inputs.windows_node_release_asset_name }}
7584 INPUT_WINDOWS_NODE_RELEASE_ASSET_SHA256 : ${{ inputs.windows_node_release_asset_sha256 }}
7685 INPUT_ALLOW_PROTOCOL_MISMATCH : ${{ inputs.allow_protocol_mismatch }}
77- INPUT_WINDOWS_NODE_SHA : ${{ inputs.windows_node_sha }}
7886 run : |
7987 $semVerCore = '[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?'
8088 $semVerPattern = '^' + $semVerCore + '$'
@@ -99,30 +107,39 @@ jobs:
99107 if ($env:INPUT_CANDIDATE_VERSION -notmatch $semVerPattern) {
100108 throw "candidate_version must be a semantic version."
101109 }
102- if ($env:INPUT_WINDOWS_NODE_RELEASE_TAG -notmatch $releaseTagPattern) {
103- throw "windows_node_release_tag must be an immutable semantic version tag."
104- }
105- if ($env:INPUT_WINDOWS_NODE_RELEASE_SHA -notmatch '^[0-9a-f]{40}$') {
106- throw "windows_node_release_sha must be a full lowercase Git SHA."
110+ if ($env:INPUT_ALLOW_PROTOCOL_MISMATCH -cnotin 'true', 'false') {
111+ throw "allow_protocol_mismatch must be a boolean."
107112 }
108- if ($env:INPUT_WINDOWS_NODE_RELEASE_ASSET_NAME -notmatch '^[0-9A-Za-z][0-9A-Za-z._-]{0,127}$' -or
109- $env:INPUT_WINDOWS_NODE_RELEASE_ASSET_NAME -in '.', '..') {
110- throw "windows_node_release_asset_name must be a simple artifact name of at most 128 characters."
113+ if ($env:INPUT_WINDOWS_NODE_SOURCE -cnotin 'release', 'main') {
114+ throw "windows_node_source must be release or main."
111115 }
112- if ($env:INPUT_WINDOWS_NODE_RELEASE_ASSET_SHA256 -notmatch '^[0-9a-f]{64 }$') {
113- throw "windows_node_release_asset_sha256 must be a lowercase SHA-256 ."
116+ if ($env:INPUT_WINDOWS_NODE_SOURCE_SHA -notmatch '^[0-9a-f]{40 }$') {
117+ throw "windows_node_source_sha must be a full lowercase Git SHA."
114118 }
115- if ($env:INPUT_ALLOW_PROTOCOL_MISMATCH -cnotin 'true', 'false ') {
116- throw "allow_protocol_mismatch must be a boolean ."
119+ if ($env:INPUT_WINDOWS_NODE_WORKFLOW_SHA -notmatch '^[0-9a-f]{40}$ ') {
120+ throw "windows_node_workflow_sha must be a full lowercase Git SHA ."
117121 }
118- if ($env:INPUT_WINDOWS_NODE_SHA -notmatch '^[0-9a-f]{40}$') {
119- throw "windows_node_sha must be a full lowercase Git SHA."
122+ if ($env:INPUT_WINDOWS_NODE_SOURCE -ceq 'release') {
123+ if ($env:INPUT_WINDOWS_NODE_RELEASE_TAG -notmatch $releaseTagPattern) {
124+ throw "windows_node_release_tag must be an immutable semantic version tag in release mode."
125+ }
126+ if ($env:INPUT_WINDOWS_NODE_RELEASE_ASSET_NAME -notmatch '^[0-9A-Za-z][0-9A-Za-z._-]{0,127}$' -or
127+ $env:INPUT_WINDOWS_NODE_RELEASE_ASSET_NAME -in '.', '..') {
128+ throw "windows_node_release_asset_name must be a simple artifact name of at most 128 characters in release mode."
129+ }
130+ if ($env:INPUT_WINDOWS_NODE_RELEASE_ASSET_SHA256 -notmatch '^[0-9a-f]{64}$') {
131+ throw "windows_node_release_asset_sha256 must be a lowercase SHA-256 in release mode."
132+ }
133+ } elseif ($env:INPUT_WINDOWS_NODE_RELEASE_TAG -or
134+ $env:INPUT_WINDOWS_NODE_RELEASE_ASSET_NAME -or
135+ $env:INPUT_WINDOWS_NODE_RELEASE_ASSET_SHA256) {
136+ throw "main mode must not receive Windows-node release artifact inputs."
120137 }
121138
122139 - name : Bind test harness to called workflow revision
123140 shell : pwsh
124141 env :
125- EXPECTED_WINDOWS_NODE_SHA : ${{ inputs.windows_node_sha }}
142+ EXPECTED_WINDOWS_NODE_WORKFLOW_SHA : ${{ inputs.windows_node_workflow_sha }}
126143 run : |
127144 if ([string]::IsNullOrWhiteSpace($env:ACTIONS_ID_TOKEN_REQUEST_URL) -or
128145 [string]::IsNullOrWhiteSpace($env:ACTIONS_ID_TOKEN_REQUEST_TOKEN)) {
@@ -156,22 +173,32 @@ jobs:
156173 throw "GitHub OIDC identity payload was not valid JSON."
157174 }
158175
159- $expectedWorkflowRef = "openclaw/openclaw-windows-node/.github/workflows/release-candidate-e2e.yml@$($env:EXPECTED_WINDOWS_NODE_SHA )"
176+ $expectedWorkflowRef = "openclaw/openclaw-windows-node/.github/workflows/release-candidate-e2e.yml@$($env:EXPECTED_WINDOWS_NODE_WORKFLOW_SHA )"
160177 if ($claims.job_workflow_sha -isnot [string] -or
161- $claims.job_workflow_sha -cne $env:EXPECTED_WINDOWS_NODE_SHA -or
178+ $claims.job_workflow_sha -cne $env:EXPECTED_WINDOWS_NODE_WORKFLOW_SHA -or
162179 $claims.job_workflow_ref -isnot [string] -or
163180 $claims.job_workflow_ref -cne $expectedWorkflowRef) {
164- throw "windows_node_sha must equal the immutable revision used to call this reusable workflow."
181+ throw "windows_node_workflow_sha must equal the immutable revision used to call this reusable workflow."
165182 }
166183
167184 - name : Check out Windows node
168185 uses : actions/checkout@v7
169186 with :
170187 repository : openclaw/openclaw-windows-node
171- ref : ${{ inputs.windows_node_sha }}
188+ ref : ${{ inputs.windows_node_source_sha }}
172189 fetch-depth : 0
173190 persist-credentials : false
174191
192+ - name : Bind checkout to declared Windows-node source revision
193+ shell : pwsh
194+ env :
195+ EXPECTED_WINDOWS_NODE_SOURCE_SHA : ${{ inputs.windows_node_source_sha }}
196+ run : |
197+ $actual = (git rev-parse HEAD).Trim()
198+ if ($actual -cne $env:EXPECTED_WINDOWS_NODE_SOURCE_SHA) {
199+ throw "Windows-node checkout revision mismatch: expected $($env:EXPECTED_WINDOWS_NODE_SOURCE_SHA), got $actual."
200+ }
201+
175202 - name : Download exact OpenClaw candidate
176203 uses : actions/download-artifact@v8
177204 with :
@@ -210,12 +237,13 @@ jobs:
210237 "tarball=$tarball" >> $env:GITHUB_OUTPUT
211238
212239 - name : Download and verify official Windows-node release artifact
213- id : windows_node_artifact
240+ if : inputs.windows_node_source == 'release'
241+ id : windows_node_release_artifact
214242 shell : pwsh
215243 env :
216244 GH_TOKEN : ${{ github.token }}
217245 EXPECTED_WINDOWS_NODE_RELEASE_TAG : ${{ inputs.windows_node_release_tag }}
218- EXPECTED_WINDOWS_NODE_RELEASE_SHA : ${{ inputs.windows_node_release_sha }}
246+ EXPECTED_WINDOWS_NODE_SOURCE_SHA : ${{ inputs.windows_node_source_sha }}
219247 EXPECTED_WINDOWS_NODE_RELEASE_ASSET_NAME : ${{ inputs.windows_node_release_asset_name }}
220248 EXPECTED_WINDOWS_NODE_RELEASE_ASSET_SHA256 : ${{ inputs.windows_node_release_asset_sha256 }}
221249 run : |
@@ -249,8 +277,8 @@ jobs:
249277 throw "Windows-node release tag must resolve to a commit."
250278 }
251279 $releaseSha = $tagObject.sha
252- if ($releaseSha -cne $env:EXPECTED_WINDOWS_NODE_RELEASE_SHA ) {
253- throw "Windows-node release tag revision mismatch: expected $($env:EXPECTED_WINDOWS_NODE_RELEASE_SHA ), got $releaseSha."
280+ if ($releaseSha -cne $env:EXPECTED_WINDOWS_NODE_SOURCE_SHA ) {
281+ throw "Windows-node release tag revision mismatch: expected $($env:EXPECTED_WINDOWS_NODE_SOURCE_SHA ), got $releaseSha."
254282 }
255283
256284 $x64Assets = @($release.assets | Where-Object {
@@ -329,14 +357,30 @@ jobs:
329357 dotnet build src/OpenClaw.Tray.WinUI -c Debug -r win-x64 --no-restore
330358 dotnet build tests/OpenClaw.E2ETests -c Debug -r win-x64 --no-restore
331359
360+ - name : Resolve built Windows-node main Tray
361+ if : inputs.windows_node_source == 'main'
362+ id : windows_node_main_source
363+ shell : pwsh
364+ run : |
365+ $trayExecutables = @(Get-ChildItem -LiteralPath "src/OpenClaw.Tray.WinUI/bin/Debug" -Recurse -File -Filter "OpenClaw.Tray.WinUI.exe" |
366+ Where-Object { $_.FullName -match '[\\/]win-x64[\\/]' })
367+ if ($trayExecutables.Count -ne 1) {
368+ throw "Expected exactly one win-x64 OpenClaw.Tray.WinUI.exe from Windows-node main; found $($trayExecutables.Count)."
369+ }
370+
371+ "tray_exe=$($trayExecutables[0].FullName)" >> $env:GITHUB_OUTPUT
372+ "### Windows-node source under test" >> $env:GITHUB_STEP_SUMMARY
373+ ('- Source: `main` at `{0}`' -f (git rev-parse HEAD).Trim()) >> $env:GITHUB_STEP_SUMMARY
374+ ('- Built tray: `{0}`' -f $trayExecutables[0].FullName) >> $env:GITHUB_STEP_SUMMARY
375+
332376 - name : Run hosted candidate setup and node E2E
333377 id : e2e
334378 shell : pwsh
335379 env :
336380 OPENCLAW_RUN_E2E : 1
337381 OPENCLAW_E2E_GATEWAY_PACKAGE_TGZ : ${{ steps.candidate.outputs.tarball }}
338382 OPENCLAW_E2E_GATEWAY_VERSION : ${{ inputs.candidate_version }}
339- OPENCLAW_E2E_TRAY_EXE : ${{ steps.windows_node_artifact .outputs.tray_exe }}
383+ OPENCLAW_E2E_TRAY_EXE : ${{ inputs.windows_node_source == 'release' && steps.windows_node_release_artifact.outputs.tray_exe || steps.windows_node_main_source .outputs.tray_exe }}
340384 OPENCLAW_E2E_PROTOCOL_MISMATCH_RESULT : ${{ runner.temp }}\\openclaw-e2e-protocol-mismatch.json
341385 INPUT_ALLOW_PROTOCOL_MISMATCH : ${{ inputs.allow_protocol_mismatch }}
342386 run : |
0 commit comments