Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
Remove one-shot V6 zero production vulnerabilities real Windows acceptance workflow after all gates passed
davoodmehraban89 committed
Oct 18, 2026 at 14:42 UTC
476de26e295dc24adba61ae5f7869e88c2492ad4
1 file changed
-285
.github/workflows/v6-zero-vulns-windows-acceptance-once.yml
deleted
-285
@@ -1,285 +0,0 @@
1
-name: V6 zero known npm production vulnerabilities and real Windows installed GUI (NOT V7)
2
-on:
3
- push:
4
- branches: ['ci/public-windows-bridge-probe-20261017']
5
- paths: ['.github/workflows/v6-zero-vulns-windows-acceptance-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 audit fix --omit=dev --no-fund *> (Join-Path $env:RUNNER_TEMP 'private-safe-audit-fix.log')
74
- if($LASTEXITCODE -ne 0){Write-Host 'NOTE_NPM_AUDIT_FIX_EXIT_NONZERO_WILL_VERIFY_FINAL_AUDIT'}
75
- npm ci --no-audit --no-fund *> (Join-Path $env:RUNNER_TEMP 'private-post-patch-ci.log')
76
- if($LASTEXITCODE -ne 0){throw 'REPRODUCIBLE_PATCHED_CI_FAILED'}
77
- $audit=Join-Path $env:RUNNER_TEMP 'private-audit-patched.json'
78
- npm audit --omit=dev --json 1> $audit 2> (Join-Path $env:RUNNER_TEMP 'private-audit-errors.log')
79
- $vulns=(Get-Content -LiteralPath $audit -Raw | ConvertFrom-Json).metadata.vulnerabilities
80
- Write-Host ("PATCHED_XLSX_PRODUCTION_AUDIT_HIGH="+[int]$vulns.high)
81
- Write-Host ("PATCHED_XLSX_PRODUCTION_AUDIT_CRITICAL="+[int]$vulns.critical)
82
- Write-Host ("PATCHED_XLSX_PRODUCTION_AUDIT_MODERATE="+[int]$vulns.moderate)
83
- Write-Host ("PATCHED_XLSX_PRODUCTION_AUDIT_TOTAL="+[int]$vulns.total)
84
- if([int]$vulns.total -gt 0){throw 'PRODUCTION_AUDIT_STILL_HAS_KNOWN_VULNERABILITIES'}
85
- Write-Host 'GATE_PASS_ZERO_KNOWN_PRODUCTION_NPM_ADVISORIES'
86
- Write-Host 'GATE_PASS_SHEETJS_0_20_3_SHA_PINNED_WINDOWS_SECURITY_GATE'
87
- $gates=@(
88
- @{label='UNIT_TESTS';argv=@('test','--','--reporter=dot')},
89
- @{label='TYPECHECK';argv=@('run','typecheck')},
90
- @{label='LINT';argv=@('run','lint')},
91
- @{label='NEXT_BUILD';argv=@('run','build')}
92
- )
93
- foreach($g in $gates){
94
- & npm @($g.argv) *> (Join-Path $env:RUNNER_TEMP ("private-gate-"+$g.label+".log"))
95
- if($LASTEXITCODE -ne 0){throw ("GATE_FAIL_"+$g.label+"_PRIVATE_OUTPUT_WITHHELD")}
96
- Write-Host ("GATE_PASS_"+$g.label)
97
- }
98
- node scripts/prepare-standalone.mjs *> (Join-Path $env:RUNNER_TEMP 'private-standalone.log')
99
- if($LASTEXITCODE -ne 0){throw 'GATE_FAIL_STANDALONE'}
100
- Write-Host 'GATE_PASS_STANDALONE'
101
- npm run smoke *> (Join-Path $env:RUNNER_TEMP 'private-standalone-smoke.log')
102
- if($LASTEXITCODE -ne 0){throw 'GATE_FAIL_STANDALONE_SMOKE'}
103
- Write-Host 'GATE_PASS_STANDALONE_SMOKE'
104
- - name: Build an actual ephemeral NSIS Setup from patched private V6 staging
105
- run: |
106
- $ErrorActionPreference='Continue'
107
- $PSNativeCommandUseErrorActionPreference=$false
108
- Set-Location -LiteralPath $env:TF_PRIVATE_STAGE
109
- $log=Join-Path $env:RUNNER_TEMP 'private-installer-build.log'
110
- & npx --no-install electron-builder --win nsis --x64 --publish never *> $log
111
- $builderExit=$LASTEXITCODE
112
- $txt=if(Test-Path -LiteralPath $log){Get-Content -LiteralPath $log -Raw}else{''}
113
- $classes=[ordered]@{
114
- SIGNING='code.sign|signature|signing|certificate|CSC_'
115
- NSIS_TOOL='makensis|nsis|appBuilder'
116
- DOWNLOAD='download|fetch|network|ECONNRESET|ETIMEDOUT|ENOTFOUND'
117
- FILE_MISSING='ENOENT|no.such.file|not.found|file.does.not.exist|missing'
118
- MODULE_MISSING='cannot.find.module|module.not.found|require.stack'
119
- FILE_LOCK='EPERM|EACCES|access.is.denied'
120
- CONFIG='configuration|invalid.config|schema|unsupported.target'
121
- ASAR='asar|cannot.pack|archive'
122
- PATH='path.too.long|filename.too.long'
123
- DEPENDENCIES='dependencies|node_modules|npmRebuild|rebuild'
124
- ELECTRON='electron|win-unpacked'
125
- GENERIC_ERROR='Error:|⨯|error'
126
- }
127
- foreach($k in $classes.Keys){Write-Host ("BUILDER_LOG_HAS_"+$k+"="+[bool]($txt -match $classes[$k]))}
128
- $outDir=Join-Path $env:TF_PRIVATE_STAGE 'release'
129
- $topLevelExe=@(Get-ChildItem -LiteralPath $outDir -File -Filter '*.exe' -ErrorAction SilentlyContinue)
130
- $nestedExe=@(Get-ChildItem -LiteralPath $outDir -Recurse -File -Filter '*.exe' -ErrorAction SilentlyContinue)
131
- $targetConfirmed=[bool]($txt -match 'target=nsis')
132
- Write-Host ("BUILDER_TOP_LEVEL_EXE_COUNT="+$topLevelExe.Count)
133
- Write-Host ("BUILDER_NESTED_EXE_COUNT="+$nestedExe.Count)
134
- Write-Host ("BUILDER_LOG_NSIS_TARGET_CONFIRMED="+$targetConfirmed)
135
- Write-Host ("BUILDER_PROCESS_EXIT_NONZERO="+[bool]($builderExit -ne 0))
136
- if($builderExit -ne 0){throw 'PRIVATE_V6_NSIS_BUILD_FAILED_SANITIZED_DIAGNOSTIC_ABOVE'}
137
- if(!$targetConfirmed){throw 'NSIS_TARGET_NOT_CONFIRMED_IN_BUILDER_LOG'}
138
- $setup=@($topLevelExe | Where-Object { $_.Name -match '^TreasuryFlow[-_ ].*[.]exe$' -and $_.Length -gt 1000000 })
139
- if($setup.Count -ne 1){throw 'PRIVATE_NSIS_TOP_LEVEL_INSTALLER_NOT_UNIQUE'}
140
- "TF_EPHEMERAL_NSIS_SETUP=$($setup[0].FullName)" >> $env:GITHUB_ENV
141
- Write-Host 'GATE_PASS_PRIVATE_V6_NSIS_INSTALLER_BUILD'
142
- Write-Host ('INSTALLER_SHA256='+((Get-FileHash $setup[0].FullName -Algorithm SHA256).Hash))
143
- - name: Install actual private V6 NSIS Setup into isolated Windows VM
144
- id: install
145
- run: |
146
- $ErrorActionPreference='Stop'
147
- $dest=Join-Path $env:RUNNER_TEMP 'TreasuryFlow-V6-Isolated-Installed'
148
- $process=Start-Process -FilePath $env:TF_EPHEMERAL_NSIS_SETUP -ArgumentList @('/S',('/D='+$dest)) -PassThru
149
- if(!$process.WaitForExit(240000)){try{$process.Kill()}catch{};throw 'V6_NSIS_INSTALL_TIMEOUT'}
150
- if($process.ExitCode -ne 0){throw 'V6_NSIS_NONZERO_EXIT'}
151
- $installed=@(Get-ChildItem -LiteralPath $dest -Recurse -Filter 'TreasuryFlow.exe' -File -ErrorAction SilentlyContinue)
152
- if($installed.Count -ne 1){throw 'INSTALLED_V6_EXE_NOT_UNIQUE'}
153
- "TF_INSTALLED_V6_EXE=$($installed[0].FullName)" >> $env:GITHUB_ENV
154
- "TF_V6_INSTALL_DIR=$dest" >> $env:GITHUB_ENV
155
- Write-Host 'GATE_PASS_ACTUAL_V6_NSIS_INSTALL'
156
- - name: Real Electron GUI and OS clipboard acceptance using synthetic SQL only
157
- timeout-minutes: 18
158
- run: |
159
- $ErrorActionPreference='Continue'
160
- $PSNativeCommandUseErrorActionPreference=$false
161
- $probe=Join-Path $env:RUNNER_TEMP 'tf-native-gui-os-copy.mjs'
162
- @'
163
- import assert from 'node:assert/strict';
164
- import {spawn,execFileSync} from 'node:child_process';
165
- import {writeFileSync} from 'node:fs';
166
- import {join} from 'node:path';
167
- const exe=process.argv[2];const out=process.argv[3];
168
- const report={integrations:false,writable:false,select:false,copyButton:false,osClipboard:false,bankDisabled:false,stage:'START',status:'NOT_RUN'};
169
- const sleep=ms=>new Promise(ok=>setTimeout(ok,ms));
170
- 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)}
171
- const port=9568,base='http://127.0.0.1:3210';
172
- async function wsConnect(url){
173
- 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})});
174
- let id=0;const pending=new Map();
175
- 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)});
176
- 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}))});
177
- 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};
178
- await call('Runtime.enable');await call('Page.enable');return {ws,call,evalJs};
179
- }
180
- let electronProcess,conn;
181
- try{
182
- report.stage='LAUNCH';
183
- const prev=await fetch(base+'/api/ready',{signal:AbortSignal.timeout(1600)}).then(()=>true,()=>false);
184
- assert(!prev,'STALE_SERVER');
185
- 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')}});
186
- report.stage='BACKEND';
187
- const ready=await wait(async()=>{const x=await fetch(base+'/api/ready',{signal:AbortSignal.timeout(1500)});return x.ok?x.json():null});
188
- assert(ready.status==='ready'&&ready.bankAdapter==='disabled','READINESS_CONTRACT_INVALID');
189
- report.bankDisabled=true;
190
- report.stage='CDP';
191
- const pages=async()=>{const r=await fetch('http://127.0.0.1:'+port+'/json/list',{signal:AbortSignal.timeout(1500)});return r.ok?r.json():[]};
192
- const first=await wait(async()=>{const x=await pages();return x.find(y=>y.type==='page'&&y.url?.startsWith(base)&&y.webSocketDebuggerUrl)});
193
- conn=await wsConnect(first.webSocketDebuggerUrl);
194
- report.stage='GUI_STARTUP_SETTLING';
195
- await sleep(12000);
196
- const idleReady=await fetch(base+'/api/ready',{signal:AbortSignal.timeout(1800)}).then(x=>x.json()).catch(()=>null);
197
- assert(electronProcess.exitCode===null&&idleReady?.status==='ready'&&idleReady?.bankAdapter==='disabled','ELECTRON_NOT_STABLE_AFTER_12_SECONDS');
198
- report.idleStable=true;
199
- report.stage='LOCAL_ENTRY';
200
- const initial=await conn.evalJs("({path:location.pathname,entry:[...document.querySelectorAll('a[href]')].some(a=>a.getAttribute('href')==='/dashboard')})").catch(()=>null);
201
- report.entryInitialLogin=initial?.path==='/login';
202
- report.entryLinkPresent=!!initial?.entry;
203
- if(initial?.path==='/login'&&initial.entry){
204
- 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);
205
- await sleep(1500);
206
- }
207
- report.stage='SQL_PAGE';
208
- const http=await fetch(base+'/integrations',{signal:AbortSignal.timeout(10000)}).catch(()=>null);
209
- report.sqlHttpStatus=http?.status||0;
210
- const navResult=await conn.call('Page.navigate',{url:base+'/integrations'}).catch(()=>null);
211
- report.cdpNavigateAccepted=!!navResult&&!navResult.errorText;
212
- await sleep(1200);
213
- let last='';
214
- await wait(async()=>{
215
- const x=await pages();
216
- const local=x.filter(z=>z.type==='page'&&z.url?.startsWith(base));
217
- if(local.some(z=>z.url===base+'/'||z.url===base))report.rootTargetSeen=true;
218
- if(local.some(z=>z.url?.startsWith(base+'/login')))report.loginTargetSeen=true;
219
- if(local.some(z=>z.url?.startsWith(base+'/dashboard')))report.dashboardTargetSeen=true;
220
- const p=local.find(z=>z.url?.startsWith(base+'/integrations')&&z.webSocketDebuggerUrl);
221
- if(p)report.integrationsTargetSeen=true;
222
- if(!p)return false;
223
- if(p.webSocketDebuggerUrl!==last){try{conn.ws.close()}catch{}conn=await wsConnect(p.webSocketDebuggerUrl);last=p.webSocketDebuggerUrl}
224
- const state=await conn.evalJs("({path:location.pathname,hasTextarea:!!document.querySelector('textarea')})");
225
- if(state?.path==='/integrations')report.integrationsDomSeen=true;
226
- return state?.path==='/integrations'&&state?.hasTextarea;
227
- });
228
- report.integrations=true;
229
- report.stage='EDITOR';
230
- 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())}})()");
231
- assert(!state.ro&&!state.disabled,'SQL_EDITOR_NOT_EDITABLE');
232
- assert(state.buttons.some(x=>x?.includes('انتخاب متن')),'SELECT_BUTTON_MISSING');
233
- assert(state.buttons.some(x=>x?.includes('کپی کوئری')),'COPY_BUTTON_MISSING');
234
- report.copyButton=true;
235
- const sql='SELECT TOP (7) 7 AS ClipboardAcceptanceProbe';
236
- await conn.call('Input.insertText',{text:sql});
237
- await wait(()=>conn.evalJs('document.querySelector("textarea")?.value==='+JSON.stringify(sql)),10000);
238
- report.writable=true;
239
- report.stage='SELECTION';
240
- await conn.evalJs("(()=>{[...document.querySelectorAll('button')].find(b=>b.textContent?.includes('انتخاب متن')).click();return true})()");
241
- assert(await conn.evalJs("(()=>{const f=document.querySelector('textarea');return f.selectionStart===0&&f.selectionEnd===f.value.length})()"),'REAL_SELECT_TEXT_ACTION_FAILED');
242
- report.select=true;
243
- report.stage='WINDOWS_OS_CLIPBOARD';
244
- await conn.evalJs("(()=>{[...document.querySelectorAll('button')].find(b=>b.textContent?.includes('کپی کوئری')).click();return true})()");
245
- await wait(()=>execFileSync('powershell.exe',['-NoProfile','-NonInteractive','-Command','Get-Clipboard -Raw'],{encoding:'utf8',timeout:4500}).trim()===sql,15000);
246
- report.osClipboard=true;
247
- report.status='PASS';
248
- console.log('GATE_PASS_REAL_WINDOWS_INSTALLED_ELECTRON_SQL_COPY_AND_SELECT');
249
- }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}
250
- 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))}
251
- '@ | Set-Content -LiteralPath $probe -Encoding utf8
252
- $reportDir=Join-Path $env:RUNNER_TEMP 'private-tf-gui'
253
- New-Item -ItemType Directory -Force -Path $reportDir | Out-Null
254
- node $probe $env:TF_INSTALLED_V6_EXE $reportDir *> (Join-Path $env:RUNNER_TEMP 'private-gui-output.log')
255
- $result=Get-Content (Join-Path $reportDir 'private-gui-report.json') -Raw | ConvertFrom-Json
256
- foreach($key in @('integrations','writable','select','copyButton','osClipboard','bankDisabled','entryInitialLogin','entryLinkPresent','rootTargetSeen','loginTargetSeen','dashboardTargetSeen','integrationsTargetSeen','integrationsDomSeen','cdpNavigateAccepted','idleStable')){
257
- Write-Host ("GUI_"+$key+"="+[bool]$result.$key)
258
- }
259
- Write-Host ("GUI_SQL_HTTP_STATUS="+[int]$result.sqlHttpStatus)
260
- if($LASTEXITCODE -ne 0 -or $result.status -ne 'PASS'){throw ('INSTALLED_GUI_'+[string]$result.stage+'_FAILED')}
261
- Write-Host 'GATE_PASS_ACTUAL_WINDOWS_OS_CLIPBOARD'
262
- - name: Silent uninstall of actual private V6 Setup
263
- if: ${{ always() && steps.install.outcome == 'success' }}
264
- run: |
265
- $ErrorActionPreference='Stop'
266
- $uninstaller=@(Get-ChildItem $env:TF_V6_INSTALL_DIR -Recurse -File -ErrorAction SilentlyContinue | Where-Object {$_.Name -match '^uninstall.*\.exe$'})
267
- if($uninstaller.Count -ne 1){throw 'V6_NSIS_UNINSTALLER_NOT_FOUND'}
268
- @(Get-Process -Name 'TreasuryFlow' -ErrorAction SilentlyContinue) | ForEach-Object { try{Stop-Process -Id $_.Id -Force -ErrorAction Stop}catch{} }
269
- $proc=Start-Process -FilePath $uninstaller[0].FullName -ArgumentList '/S' -PassThru
270
- if(!$proc.WaitForExit(90000)){try{$proc.Kill()}catch{};throw 'V6_UNINSTALL_TIMEOUT'}
271
- if($proc.ExitCode -ne 0){throw 'V6_UNINSTALL_NONZERO'}
272
- $removed=$false
273
- for($i=0;$i -lt 90;$i++){
274
- $remaining=@(Get-ChildItem $env:TF_V6_INSTALL_DIR -Recurse -File -Filter 'TreasuryFlow.exe' -ErrorAction SilentlyContinue)
275
- if($remaining.Count -eq 0){$removed=$true;break}
276
- Start-Sleep -Seconds 1
277
- }
278
- if(!$removed){throw 'V6_UNINSTALL_LEFT_EXECUTABLE_AFTER_90_SECONDS'}
279
- Write-Host 'GATE_PASS_REAL_V6_NSIS_UNINSTALL'
280
- - name: Strictly bound scope of this validation
281
- if: always()
282
- run: |
283
- Write-Host 'PRIVATE_SOURCE_BINARY_AND_RAW_TEST_LOGS=NOT_UPLOADED'
284
- Write-Host 'PRODUCTION_BANK_DISABLED=true; MAYAN_EXTERNAL_READ_DISABLED=true'
285
- Write-Host 'V7_FINAL_ACCEPTANCE=NOT_TESTED; SQL_SERVER_APP_ADAPTER=NOT_TESTED; UPGRADE_ROLLBACK=NOT_TESTED'