Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
Validate pinned vendor SheetJS 0.20.3 remediation on real installed private V6 Windows GUI and OS clipboard
davoodmehraban89 committed
Oct 18, 2026 at 14:30 UTC
2716048cb355f4a4c27fc68a3083cc518c06e241
1 file changed
+280
.github/workflows/v6-secure-sheetjs-full-windows-once.yml
new
+280
@@ -0,0 +1,280 @@
1
+name: V6 patched SheetJS 0.20.3 security plus real Windows OS clipboard acceptance (NOT V7)
2
+on:
3
+ push:
4
+ branches: ['ci/public-windows-bridge-probe-20261017']
5
+ paths: ['.github/workflows/v6-secure-sheetjs-full-windows-once.yml']
6
+permissions:
7
+ contents: read
8
+concurrency:
9
+ group: tf-v6-rebuilt-gui-one-shot
10
+ cancel-in-progress: false
11
+jobs:
12
+ windows-acceptance:
13
+ runs-on: windows-2022
14
+ timeout-minutes: 85
15
+ defaults:
16
+ run:
17
+ shell: pwsh
18
+ env:
19
+ BANK_ADAPTER_MODE: disabled
20
+ TREASURYFLOW_ENABLE_MAYAN_EXTERNAL_READ: '0'
21
+ TREASURYFLOW_MAYAN_ENABLE_EXTERNAL_READ: '0'
22
+ TREASURYFLOW_ENABLE_SQL_LAB: '0'
23
+ TREASURYFLOW_DESKTOP_LOCAL: '1'
24
+ NEXT_TELEMETRY_DISABLED: '1'
25
+ ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: 'false'
26
+ steps:
27
+ - name: Download exact V6 archive and private guarded repair with read-only step token
28
+ env:
29
+ GH_TOKEN: ${{ secrets.TF_VALIDATION_READ_TOKEN }}
30
+ run: |
31
+ $ErrorActionPreference='Stop'
32
+ if([string]::IsNullOrWhiteSpace($env:GH_TOKEN)){throw 'PRIVATE_TOKEN_MISSING'}
33
+ $input=Join-Path $env:RUNNER_TEMP 'private-input'
34
+ $stage=Join-Path $env:RUNNER_TEMP 'private-stage'
35
+ New-Item -ItemType Directory -Force -Path $input,$stage | Out-Null
36
+ gh release download validation-inputs-20261017 --repo davoodmehraban89/TreasuryFlow-Validation-Private --pattern TreasuryFlow_Validation_Staging_20261017.zip --dir $input 1>$null 2>$null
37
+ if($LASTEXITCODE -ne 0){throw 'PRIVATE_ZIP_DOWNLOAD_FAILED'}
38
+ $zip=Join-Path $input 'TreasuryFlow_Validation_Staging_20261017.zip'
39
+ if((Get-FileHash $zip -Algorithm SHA256).Hash -ine '9ce46ce2d2a437e08cbf28146b2cf2ac0ed078c71f1aeb537764390cdd3c552f'){throw 'STAGING_SHA256_FAILED'}
40
+ Expand-Archive -LiteralPath $zip -DestinationPath $stage -Force
41
+ if(!(Test-Path -LiteralPath (Join-Path $stage 'package.json'))){throw 'STAGING_ROOT_MISSING'}
42
+ $raw=gh api 'repos/davoodmehraban89/TreasuryFlow-Validation-Private/contents/qa/patches/v6-sql-assertion-fix.mjs?ref=2265e7e370d254eaa09988164559b2cd0c10c0d7' 2>$null | ConvertFrom-Json
43
+ if($LASTEXITCODE -ne 0 -or !$raw.content){throw 'PRIVATE_PATCH_FETCH_FAILED'}
44
+ $patch=Join-Path $env:RUNNER_TEMP 'v6-private-test-assertion-fix.mjs'
45
+ [IO.File]::WriteAllBytes($patch,[Convert]::FromBase64String(($raw.content -replace '\s','')))
46
+ "TF_PRIVATE_STAGE=$stage" >> $env:GITHUB_ENV
47
+ "TF_PRIVATE_PATCH=$patch" >> $env:GITHUB_ENV
48
+ Write-Host 'GATE_PASS_STAGING_PRIVATE_PROVENANCE'
49
+ - name: Setup Node 22 with private token absent
50
+ uses: actions/setup-node@v4
51
+ with:
52
+ node-version: '22'
53
+ - name: Patch exact test assertion and run all source gates without raw private logs
54
+ run: |
55
+ $ErrorActionPreference='Continue'
56
+ $PSNativeCommandUseErrorActionPreference=$false
57
+ Set-Location -LiteralPath $env:TF_PRIVATE_STAGE
58
+ node $env:TF_PRIVATE_PATCH $env:TF_PRIVATE_STAGE *> (Join-Path $env:RUNNER_TEMP 'private-patch.log')
59
+ if($LASTEXITCODE -ne 0){throw 'GUARDED_SQL_ASSERTION_PATCH_FAILED'}
60
+ Write-Host 'GATE_PASS_GUARDED_ASSERTION_PATCH'
61
+ npm ci --no-audit --no-fund *> (Join-Path $env:RUNNER_TEMP 'private-install-before-sheetjs.log')
62
+ if($LASTEXITCODE -ne 0){throw 'INITIAL_NPM_CI_FAILED'}
63
+ $vendor=Join-Path $env:RUNNER_TEMP 'sheetjs-official-0.20.3.tgz'
64
+ Invoke-WebRequest -Uri 'https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz' -OutFile $vendor -TimeoutSec 120
65
+ $hash=(Get-FileHash -LiteralPath $vendor -Algorithm SHA256).Hash
66
+ if($hash -ine '8dc73fc3b00203e72d176e85b50938627c7b086e607c682e8d3c22c02bb99fe8'){throw 'VENDOR_OFFICIAL_SHEETJS_TARBALL_SHA_MISMATCH'}
67
+ npm uninstall xlsx --save --no-audit --no-fund *> (Join-Path $env:RUNNER_TEMP 'private-uninstall-old-xlsx.log')
68
+ if($LASTEXITCODE -ne 0){throw 'REMOVE_VULNERABLE_XLSX_FAILED'}
69
+ npm install --save --ignore-scripts --no-audit --no-fund 'https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz' *> (Join-Path $env:RUNNER_TEMP 'private-install-official-xlsx.log')
70
+ if($LASTEXITCODE -ne 0){throw 'INSTALL_OFFICIAL_SHEETJS_FAILED'}
71
+ node -e "if(require('xlsx').version!=='0.20.3')process.exit(1)" *> (Join-Path $env:RUNNER_TEMP 'private-sheetjs-version.log')
72
+ if($LASTEXITCODE -ne 0){throw 'INVALID_SHEETJS_PATCHED_VERSION'}
73
+ npm ci --no-audit --no-fund *> (Join-Path $env:RUNNER_TEMP 'private-post-patch-ci.log')
74
+ if($LASTEXITCODE -ne 0){throw 'REPRODUCIBLE_PATCHED_CI_FAILED'}
75
+ $audit=Join-Path $env:RUNNER_TEMP 'private-audit-patched.json'
76
+ npm audit --omit=dev --json 1> $audit 2> (Join-Path $env:RUNNER_TEMP 'private-audit-errors.log')
77
+ $vulns=(Get-Content -LiteralPath $audit -Raw | ConvertFrom-Json).metadata.vulnerabilities
78
+ Write-Host ("PATCHED_XLSX_PRODUCTION_AUDIT_HIGH="+[int]$vulns.high)
79
+ Write-Host ("PATCHED_XLSX_PRODUCTION_AUDIT_CRITICAL="+[int]$vulns.critical)
80
+ if([int]$vulns.high -gt 0 -or [int]$vulns.critical -gt 0){throw 'PATCHED_XLSX_PRODUCTION_AUDIT_BLOCKED'}
81
+ Write-Host 'GATE_PASS_SHEETJS_0_20_3_SHA_PINNED_WINDOWS_SECURITY_GATE'
82
+ $gates=@(
83
+ @{label='UNIT_TESTS';argv=@('test','--','--reporter=dot')},
84
+ @{label='TYPECHECK';argv=@('run','typecheck')},
85
+ @{label='LINT';argv=@('run','lint')},
86
+ @{label='NEXT_BUILD';argv=@('run','build')}
87
+ )
88
+ foreach($g in $gates){
89
+ & npm @($g.argv) *> (Join-Path $env:RUNNER_TEMP ("private-gate-"+$g.label+".log"))
90
+ if($LASTEXITCODE -ne 0){throw ("GATE_FAIL_"+$g.label+"_PRIVATE_OUTPUT_WITHHELD")}
91
+ Write-Host ("GATE_PASS_"+$g.label)
92
+ }
93
+ node scripts/prepare-standalone.mjs *> (Join-Path $env:RUNNER_TEMP 'private-standalone.log')
94
+ if($LASTEXITCODE -ne 0){throw 'GATE_FAIL_STANDALONE'}
95
+ Write-Host 'GATE_PASS_STANDALONE'
96
+ npm run smoke *> (Join-Path $env:RUNNER_TEMP 'private-standalone-smoke.log')
97
+ if($LASTEXITCODE -ne 0){throw 'GATE_FAIL_STANDALONE_SMOKE'}
98
+ Write-Host 'GATE_PASS_STANDALONE_SMOKE'
99
+ - name: Build an actual ephemeral NSIS Setup from patched private V6 staging
100
+ run: |
101
+ $ErrorActionPreference='Continue'
102
+ $PSNativeCommandUseErrorActionPreference=$false
103
+ Set-Location -LiteralPath $env:TF_PRIVATE_STAGE
104
+ $log=Join-Path $env:RUNNER_TEMP 'private-installer-build.log'
105
+ & npx --no-install electron-builder --win nsis --x64 --publish never *> $log
106
+ $builderExit=$LASTEXITCODE
107
+ $txt=if(Test-Path -LiteralPath $log){Get-Content -LiteralPath $log -Raw}else{''}
108
+ $classes=[ordered]@{
109
+ SIGNING='code.sign|signature|signing|certificate|CSC_'
110
+ NSIS_TOOL='makensis|nsis|appBuilder'
111
+ DOWNLOAD='download|fetch|network|ECONNRESET|ETIMEDOUT|ENOTFOUND'
112
+ FILE_MISSING='ENOENT|no.such.file|not.found|file.does.not.exist|missing'
113
+ MODULE_MISSING='cannot.find.module|module.not.found|require.stack'
114
+ FILE_LOCK='EPERM|EACCES|access.is.denied'
115
+ CONFIG='configuration|invalid.config|schema|unsupported.target'
116
+ ASAR='asar|cannot.pack|archive'
117
+ PATH='path.too.long|filename.too.long'
118
+ DEPENDENCIES='dependencies|node_modules|npmRebuild|rebuild'
119
+ ELECTRON='electron|win-unpacked'
120
+ GENERIC_ERROR='Error:|⨯|error'
121
+ }
122
+ foreach($k in $classes.Keys){Write-Host ("BUILDER_LOG_HAS_"+$k+"="+[bool]($txt -match $classes[$k]))}
123
+ $outDir=Join-Path $env:TF_PRIVATE_STAGE 'release'
124
+ $topLevelExe=@(Get-ChildItem -LiteralPath $outDir -File -Filter '*.exe' -ErrorAction SilentlyContinue)
125
+ $nestedExe=@(Get-ChildItem -LiteralPath $outDir -Recurse -File -Filter '*.exe' -ErrorAction SilentlyContinue)
126
+ $targetConfirmed=[bool]($txt -match 'target=nsis')
127
+ Write-Host ("BUILDER_TOP_LEVEL_EXE_COUNT="+$topLevelExe.Count)
128
+ Write-Host ("BUILDER_NESTED_EXE_COUNT="+$nestedExe.Count)
129
+ Write-Host ("BUILDER_LOG_NSIS_TARGET_CONFIRMED="+$targetConfirmed)
130
+ Write-Host ("BUILDER_PROCESS_EXIT_NONZERO="+[bool]($builderExit -ne 0))
131
+ if($builderExit -ne 0){throw 'PRIVATE_V6_NSIS_BUILD_FAILED_SANITIZED_DIAGNOSTIC_ABOVE'}
132
+ if(!$targetConfirmed){throw 'NSIS_TARGET_NOT_CONFIRMED_IN_BUILDER_LOG'}
133
+ $setup=@($topLevelExe | Where-Object { $_.Name -match '^TreasuryFlow[-_ ].*[.]exe$' -and $_.Length -gt 1000000 })
134
+ if($setup.Count -ne 1){throw 'PRIVATE_NSIS_TOP_LEVEL_INSTALLER_NOT_UNIQUE'}
135
+ "TF_EPHEMERAL_NSIS_SETUP=$($setup[0].FullName)" >> $env:GITHUB_ENV
136
+ Write-Host 'GATE_PASS_PRIVATE_V6_NSIS_INSTALLER_BUILD'
137
+ Write-Host ('INSTALLER_SHA256='+((Get-FileHash $setup[0].FullName -Algorithm SHA256).Hash))
138
+ - name: Install actual private V6 NSIS Setup into isolated Windows VM
139
+ id: install
140
+ run: |
141
+ $ErrorActionPreference='Stop'
142
+ $dest=Join-Path $env:RUNNER_TEMP 'TreasuryFlow-V6-Isolated-Installed'
143
+ $process=Start-Process -FilePath $env:TF_EPHEMERAL_NSIS_SETUP -ArgumentList @('/S',('/D='+$dest)) -PassThru
144
+ if(!$process.WaitForExit(240000)){try{$process.Kill()}catch{};throw 'V6_NSIS_INSTALL_TIMEOUT'}
145
+ if($process.ExitCode -ne 0){throw 'V6_NSIS_NONZERO_EXIT'}
146
+ $installed=@(Get-ChildItem -LiteralPath $dest -Recurse -Filter 'TreasuryFlow.exe' -File -ErrorAction SilentlyContinue)
147
+ if($installed.Count -ne 1){throw 'INSTALLED_V6_EXE_NOT_UNIQUE'}
148
+ "TF_INSTALLED_V6_EXE=$($installed[0].FullName)" >> $env:GITHUB_ENV
149
+ "TF_V6_INSTALL_DIR=$dest" >> $env:GITHUB_ENV
150
+ Write-Host 'GATE_PASS_ACTUAL_V6_NSIS_INSTALL'
151
+ - name: Real Electron GUI and OS clipboard acceptance using synthetic SQL only
152
+ timeout-minutes: 18
153
+ run: |
154
+ $ErrorActionPreference='Continue'
155
+ $PSNativeCommandUseErrorActionPreference=$false
156
+ $probe=Join-Path $env:RUNNER_TEMP 'tf-native-gui-os-copy.mjs'
157
+ @'
158
+ import assert from 'node:assert/strict';
159
+ import {spawn,execFileSync} from 'node:child_process';
160
+ import {writeFileSync} from 'node:fs';
161
+ import {join} from 'node:path';
162
+ const exe=process.argv[2];const out=process.argv[3];
163
+ const report={integrations:false,writable:false,select:false,copyButton:false,osClipboard:false,bankDisabled:false,stage:'START',status:'NOT_RUN'};
164
+ const sleep=ms=>new Promise(ok=>setTimeout(ok,ms));
165
+ async function wait(fn,ms=75000){const end=Date.now()+ms;while(Date.now()<end){try{let v=await fn();if(v)return v}catch{}await sleep(600)}throw Error('TIMEOUT_'+report.stage)}
166
+ const port=9568,base='http://127.0.0.1:3210';
167
+ async function wsConnect(url){
168
+ const ws=new WebSocket(url);await new Promise((ok,no)=>{const t=setTimeout(()=>no(Error('WS_TIMEOUT')),10000);ws.addEventListener('open',()=>{clearTimeout(t);ok()},{once:true});ws.addEventListener('error',()=>{clearTimeout(t);no(Error('WS_ERROR'))},{once:true})});
169
+ let id=0;const pending=new Map();
170
+ ws.addEventListener('message',ev=>{let msg;try{msg=JSON.parse(ev.data)}catch{return}const p=pending.get(msg.id);if(!p)return;pending.delete(msg.id);clearTimeout(p.t);msg.error?p.no(Error('CDP_ERROR')):p.ok(msg.result)});
171
+ const call=(method,params={})=>new Promise((ok,no)=>{const i=++id,t=setTimeout(()=>{pending.delete(i);no(Error('CDP_TIMEOUT'))},16000);pending.set(i,{ok,no,t});ws.send(JSON.stringify({id:i,method,params}))});
172
+ const evalJs=async code=>{const r=await call('Runtime.evaluate',{expression:code,returnByValue:true,awaitPromise:true});if(r.exceptionDetails)throw Error('GUI_EVALUATION_ERROR');return r.result?.value};
173
+ await call('Runtime.enable');await call('Page.enable');return {ws,call,evalJs};
174
+ }
175
+ let electronProcess,conn;
176
+ try{
177
+ report.stage='LAUNCH';
178
+ const prev=await fetch(base+'/api/ready',{signal:AbortSignal.timeout(1600)}).then(()=>true,()=>false);
179
+ assert(!prev,'STALE_SERVER');
180
+ electronProcess=spawn(exe,['--remote-debugging-port='+port,'--remote-allow-origins=*'],{stdio:'ignore',windowsHide:false,env:{...globalThis.process.env,BANK_ADAPTER_MODE:'disabled',TREASURYFLOW_DESKTOP_LOCAL:'1',TREASURYFLOW_ENABLE_MAYAN_EXTERNAL_READ:'0',TREASURYFLOW_ENABLE_SQL_LAB:'0',TREASURYFLOW_DATA_FILE:join(out,'isolated-synthetic.sqlite')}});
181
+ report.stage='BACKEND';
182
+ const ready=await wait(async()=>{const x=await fetch(base+'/api/ready',{signal:AbortSignal.timeout(1500)});return x.ok?x.json():null});
183
+ assert(ready.status==='ready'&&ready.bankAdapter==='disabled','READINESS_CONTRACT_INVALID');
184
+ report.bankDisabled=true;
185
+ report.stage='CDP';
186
+ const pages=async()=>{const r=await fetch('http://127.0.0.1:'+port+'/json/list',{signal:AbortSignal.timeout(1500)});return r.ok?r.json():[]};
187
+ const first=await wait(async()=>{const x=await pages();return x.find(y=>y.type==='page'&&y.url?.startsWith(base)&&y.webSocketDebuggerUrl)});
188
+ conn=await wsConnect(first.webSocketDebuggerUrl);
189
+ report.stage='GUI_STARTUP_SETTLING';
190
+ await sleep(12000);
191
+ const idleReady=await fetch(base+'/api/ready',{signal:AbortSignal.timeout(1800)}).then(x=>x.json()).catch(()=>null);
192
+ assert(electronProcess.exitCode===null&&idleReady?.status==='ready'&&idleReady?.bankAdapter==='disabled','ELECTRON_NOT_STABLE_AFTER_12_SECONDS');
193
+ report.idleStable=true;
194
+ report.stage='LOCAL_ENTRY';
195
+ const initial=await conn.evalJs("({path:location.pathname,entry:[...document.querySelectorAll('a[href]')].some(a=>a.getAttribute('href')==='/dashboard')})").catch(()=>null);
196
+ report.entryInitialLogin=initial?.path==='/login';
197
+ report.entryLinkPresent=!!initial?.entry;
198
+ if(initial?.path==='/login'&&initial.entry){
199
+ await conn.evalJs("(()=>{const a=[...document.querySelectorAll('a[href]')].find(a=>a.getAttribute('href')==='/dashboard');if(a){a.click();return true}return false})()").catch(()=>null);
200
+ await sleep(1500);
201
+ }
202
+ report.stage='SQL_PAGE';
203
+ const http=await fetch(base+'/integrations',{signal:AbortSignal.timeout(10000)}).catch(()=>null);
204
+ report.sqlHttpStatus=http?.status||0;
205
+ const navResult=await conn.call('Page.navigate',{url:base+'/integrations'}).catch(()=>null);
206
+ report.cdpNavigateAccepted=!!navResult&&!navResult.errorText;
207
+ await sleep(1200);
208
+ let last='';
209
+ await wait(async()=>{
210
+ const x=await pages();
211
+ const local=x.filter(z=>z.type==='page'&&z.url?.startsWith(base));
212
+ if(local.some(z=>z.url===base+'/'||z.url===base))report.rootTargetSeen=true;
213
+ if(local.some(z=>z.url?.startsWith(base+'/login')))report.loginTargetSeen=true;
214
+ if(local.some(z=>z.url?.startsWith(base+'/dashboard')))report.dashboardTargetSeen=true;
215
+ const p=local.find(z=>z.url?.startsWith(base+'/integrations')&&z.webSocketDebuggerUrl);
216
+ if(p)report.integrationsTargetSeen=true;
217
+ if(!p)return false;
218
+ if(p.webSocketDebuggerUrl!==last){try{conn.ws.close()}catch{}conn=await wsConnect(p.webSocketDebuggerUrl);last=p.webSocketDebuggerUrl}
219
+ const state=await conn.evalJs("({path:location.pathname,hasTextarea:!!document.querySelector('textarea')})");
220
+ if(state?.path==='/integrations')report.integrationsDomSeen=true;
221
+ return state?.path==='/integrations'&&state?.hasTextarea;
222
+ });
223
+ report.integrations=true;
224
+ report.stage='EDITOR';
225
+ const state=await conn.evalJs("(()=>{const f=document.querySelector('textarea');f.focus();f.select();return {ro:f.readOnly,disabled:f.disabled,buttons:[...document.querySelectorAll('button')].map(b=>b.textContent?.trim())}})()");
226
+ assert(!state.ro&&!state.disabled,'SQL_EDITOR_NOT_EDITABLE');
227
+ assert(state.buttons.some(x=>x?.includes('انتخاب متن')),'SELECT_BUTTON_MISSING');
228
+ assert(state.buttons.some(x=>x?.includes('کپی کوئری')),'COPY_BUTTON_MISSING');
229
+ report.copyButton=true;
230
+ const sql='SELECT TOP (7) 7 AS ClipboardAcceptanceProbe';
231
+ await conn.call('Input.insertText',{text:sql});
232
+ await wait(()=>conn.evalJs('document.querySelector("textarea")?.value==='+JSON.stringify(sql)),10000);
233
+ report.writable=true;
234
+ report.stage='SELECTION';
235
+ await conn.evalJs("(()=>{[...document.querySelectorAll('button')].find(b=>b.textContent?.includes('انتخاب متن')).click();return true})()");
236
+ assert(await conn.evalJs("(()=>{const f=document.querySelector('textarea');return f.selectionStart===0&&f.selectionEnd===f.value.length})()"),'REAL_SELECT_TEXT_ACTION_FAILED');
237
+ report.select=true;
238
+ report.stage='WINDOWS_OS_CLIPBOARD';
239
+ await conn.evalJs("(()=>{[...document.querySelectorAll('button')].find(b=>b.textContent?.includes('کپی کوئری')).click();return true})()");
240
+ await wait(()=>execFileSync('powershell.exe',['-NoProfile','-NonInteractive','-Command','Get-Clipboard -Raw'],{encoding:'utf8',timeout:4500}).trim()===sql,15000);
241
+ report.osClipboard=true;
242
+ report.status='PASS';
243
+ console.log('GATE_PASS_REAL_WINDOWS_INSTALLED_ELECTRON_SQL_COPY_AND_SELECT');
244
+ }catch(e){report.status='FAIL';report.failure=String(e.message||e).slice(0,90).replace(/[^A-Za-z0-9_ ]/g,'_');console.error('GUI_GATE_FAIL_'+report.failure);globalThis.process.exitCode=1}
245
+ finally{try{conn?.ws.close()}catch{}if(electronProcess?.pid){try{execFileSync('taskkill.exe',['/PID',String(electronProcess.pid),'/T','/F'],{stdio:'ignore',timeout:10000})}catch{}}writeFileSync(join(out,'private-gui-report.json'),JSON.stringify(report))}
246
+ '@ | Set-Content -LiteralPath $probe -Encoding utf8
247
+ $reportDir=Join-Path $env:RUNNER_TEMP 'private-tf-gui'
248
+ New-Item -ItemType Directory -Force -Path $reportDir | Out-Null
249
+ node $probe $env:TF_INSTALLED_V6_EXE $reportDir *> (Join-Path $env:RUNNER_TEMP 'private-gui-output.log')
250
+ $result=Get-Content (Join-Path $reportDir 'private-gui-report.json') -Raw | ConvertFrom-Json
251
+ foreach($key in @('integrations','writable','select','copyButton','osClipboard','bankDisabled','entryInitialLogin','entryLinkPresent','rootTargetSeen','loginTargetSeen','dashboardTargetSeen','integrationsTargetSeen','integrationsDomSeen','cdpNavigateAccepted','idleStable')){
252
+ Write-Host ("GUI_"+$key+"="+[bool]$result.$key)
253
+ }
254
+ Write-Host ("GUI_SQL_HTTP_STATUS="+[int]$result.sqlHttpStatus)
255
+ if($LASTEXITCODE -ne 0 -or $result.status -ne 'PASS'){throw ('INSTALLED_GUI_'+[string]$result.stage+'_FAILED')}
256
+ Write-Host 'GATE_PASS_ACTUAL_WINDOWS_OS_CLIPBOARD'
257
+ - name: Silent uninstall of actual private V6 Setup
258
+ if: ${{ always() && steps.install.outcome == 'success' }}
259
+ run: |
260
+ $ErrorActionPreference='Stop'
261
+ $uninstaller=@(Get-ChildItem $env:TF_V6_INSTALL_DIR -Recurse -File -ErrorAction SilentlyContinue | Where-Object {$_.Name -match '^uninstall.*\.exe$'})
262
+ if($uninstaller.Count -ne 1){throw 'V6_NSIS_UNINSTALLER_NOT_FOUND'}
263
+ @(Get-Process -Name 'TreasuryFlow' -ErrorAction SilentlyContinue) | ForEach-Object { try{Stop-Process -Id $_.Id -Force -ErrorAction Stop}catch{} }
264
+ $proc=Start-Process -FilePath $uninstaller[0].FullName -ArgumentList '/S' -PassThru
265
+ if(!$proc.WaitForExit(90000)){try{$proc.Kill()}catch{};throw 'V6_UNINSTALL_TIMEOUT'}
266
+ if($proc.ExitCode -ne 0){throw 'V6_UNINSTALL_NONZERO'}
267
+ $removed=$false
268
+ for($i=0;$i -lt 90;$i++){
269
+ $remaining=@(Get-ChildItem $env:TF_V6_INSTALL_DIR -Recurse -File -Filter 'TreasuryFlow.exe' -ErrorAction SilentlyContinue)
270
+ if($remaining.Count -eq 0){$removed=$true;break}
271
+ Start-Sleep -Seconds 1
272
+ }
273
+ if(!$removed){throw 'V6_UNINSTALL_LEFT_EXECUTABLE_AFTER_90_SECONDS'}
274
+ Write-Host 'GATE_PASS_REAL_V6_NSIS_UNINSTALL'
275
+ - name: Strictly bound scope of this validation
276
+ if: always()
277
+ run: |
278
+ Write-Host 'PRIVATE_SOURCE_BINARY_AND_RAW_TEST_LOGS=NOT_UPLOADED'
279
+ Write-Host 'PRODUCTION_BANK_DISABLED=true; MAYAN_EXTERNAL_READ_DISABLED=true'
280
+ Write-Host 'V7_FINAL_ACCEPTANCE=NOT_TESTED; SQL_SERVER_APP_ADAPTER=NOT_TESTED; UPGRADE_ROLLBACK=NOT_TESTED'