Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
Remove one-shot original V6 private portability CDP baseline after stable-navigation diagnosis
davoodmehraban89 committed
Oct 18, 2026 at 06:49 UTC
5f606837b6eefe0f7bfcefe33b460f2c47641a57
1 file changed
-97
.github/workflows/windows-v6-original-gui-route-probe-once.yml
deleted
-97
@@ -1,97 +0,0 @@
1
-name: V6 pinned original portable Electron routing probe (NOT V7)
2
-on:
3
- push:
4
- branches: ['ci/public-windows-bridge-probe-20261017']
5
- paths: ['.github/workflows/windows-v6-original-gui-route-probe-once.yml']
6
-permissions:
7
- contents: read
8
-jobs:
9
- baseline:
10
- runs-on: windows-2022
11
- timeout-minutes: 18
12
- defaults:
13
- run:
14
- shell: pwsh
15
- env:
16
- BANK_ADAPTER_MODE: disabled
17
- TREASURYFLOW_ENABLE_MAYAN_EXTERNAL_READ: '0'
18
- TREASURYFLOW_MAYAN_ENABLE_EXTERNAL_READ: '0'
19
- TREASURYFLOW_ENABLE_SQL_LAB: '0'
20
- TREASURYFLOW_DESKTOP_LOCAL: '1'
21
- steps:
22
- - name: Read-only private download and original V6 binary SHA pin
23
- env:
24
- GH_TOKEN: ${{ secrets.TF_VALIDATION_READ_TOKEN }}
25
- run: |
26
- $ErrorActionPreference='Stop'
27
- if([string]::IsNullOrWhiteSpace($env:GH_TOKEN)){throw 'READ_ONLY_TOKEN_MISSING'}
28
- $root=Join-Path $env:RUNNER_TEMP 'private-old-v6'
29
- New-Item -Force -ItemType Directory -Path $root | Out-Null
30
- gh release download validation-inputs-20261017 --repo davoodmehraban89/TreasuryFlow-Validation-Private --pattern release-native-v6-final.rar --dir $root 1>$null 2>$null
31
- if($LASTEXITCODE -ne 0){throw 'RAR_FETCH_FAILED'}
32
- $rar=Join-Path $root 'release-native-v6-final.rar'
33
- if((Get-FileHash $rar -Algorithm SHA256).Hash -ine 'b8629defc172cef972ad12bb3a2e45a55abed3a5e3a5d991ab2567b877e0c915'){throw 'RAR_SHA_FAIL'}
34
- & 7z.exe x -y "-o$root" $rar *> (Join-Path $env:RUNNER_TEMP 'private-extract.log')
35
- if($LASTEXITCODE -ne 0){throw 'RAR_EXTRACT_FAILED'}
36
- $x=@(Get-ChildItem $root -Recurse -File -Filter TreasuryFlow-1.0.1-Windows-x64.exe)
37
- if($x.Count -ne 1){throw 'PINNED_EXE_NOT_UNIQUE'}
38
- if((Get-FileHash $x[0].FullName -Algorithm SHA256).Hash -ine '99976331f606d8c8ffcf8e9f4895848ff736870790e14b4c7f08a0abdbb7a50a'){throw 'EXE_SHA_FAIL'}
39
- "TF_ORIGINAL_EXE=$($x[0].FullName)" >> $env:GITHUB_ENV
40
- Write-Host 'GATE_PASS_ORIGINAL_V6_BINARY_SHA256'
41
- - name: Setup Node 22
42
- uses: actions/setup-node@v4
43
- with:
44
- node-version: '22'
45
- - name: Probe actual Electron CDP route groups without page content
46
- run: |
47
- $ErrorActionPreference='Continue'
48
- $PSNativeCommandUseErrorActionPreference=$false
49
- $probe=Join-Path $env:RUNNER_TEMP 'portable-v6-route-only.mjs'
50
- @'
51
- import {spawn,execFileSync} from 'node:child_process';
52
- const exe=process.argv[2],base='http://127.0.0.1:3210',port=9571;
53
- const flags={ready:false,bankDisabled:false,cdpTarget:false,navigationCommandSuccess:false,httpIntegrationsStatus:0,windowsProcessAlive:false,postNavTargetCount:0,postNavLocalTargetCount:0,initialGroup:'NONE',postGroups:[]};
54
- const wait=ms=>new Promise(r=>setTimeout(r,ms));
55
- function group(uri){try{const u=new URL(uri);if(u.origin!==base)return 'NON_LOCAL';if(u.pathname==='/')return 'ROOT';if(u.pathname.startsWith('/login'))return 'LOGIN';if(u.pathname.startsWith('/dashboard'))return 'DASHBOARD';if(u.pathname.startsWith('/integrations'))return 'INTEGRATIONS';return 'OTHER'}catch{return 'BAD_URL'}}
56
- async function targets(){try{const r=await fetch('http://127.0.0.1:'+port+'/json/list',{signal:AbortSignal.timeout(1800)});return r.ok?r.json():[]}catch{return []}}
57
- async function ready(){try{const r=await fetch(base+'/api/ready',{signal:AbortSignal.timeout(1600)});return r.ok?r.json():null}catch{return null}}
58
- let app,ws;
59
- try{
60
- app=spawn(exe,['--remote-debugging-port='+port,'--remote-allow-origins=*'],{stdio:'ignore',windowsHide:false,env:{...process.env,BANK_ADAPTER_MODE:'disabled',TREASURYFLOW_DESKTOP_LOCAL:'1',TREASURYFLOW_ENABLE_MAYAN_EXTERNAL_READ:'0',TREASURYFLOW_ENABLE_SQL_LAB:'0'}});
61
- let y;for(let i=0;i<75;i++){y=await ready();if(y?.status==='ready')break;await wait(600)}
62
- flags.ready=y?.status==='ready';flags.bankDisabled=y?.bankAdapter==='disabled';
63
- let list=[];for(let i=0;i<60;i++){list=await targets();if(list.some(x=>x.type==='page'&&x.webSocketDebuggerUrl))break;await wait(500)}
64
- const target=list.find(x=>x.type==='page'&&x.webSocketDebuggerUrl);
65
- flags.cdpTarget=!!target;flags.initialGroup=group(target?.url);
66
- await wait(12000);
67
- flags.idleProcessAlive=app.exitCode===null;
68
- const idleState=await ready();
69
- flags.idleBackendReady=idleState?.status==='ready'&&idleState?.bankAdapter==='disabled';
70
- if(target&&flags.idleProcessAlive&&flags.idleBackendReady){
71
- ws=new WebSocket(target.webSocketDebuggerUrl);
72
- await new Promise((resolve,reject)=>{const timeout=setTimeout(()=>reject(Error('WS_CONNECT_TIMEOUT')),8000);ws.addEventListener('open',()=>{clearTimeout(timeout);resolve()},{once:true});ws.addEventListener('error',()=>{clearTimeout(timeout);reject(Error('WS_CONNECT_FAILED'))},{once:true})});
73
- const response=new Promise(resolve=>{const timeout=setTimeout(()=>resolve(null),12000);ws.addEventListener('message',evt=>{try{const x=JSON.parse(evt.data);if(x.id===42){clearTimeout(timeout);resolve(x)}}catch{}})});
74
- ws.send(JSON.stringify({id:42,method:'Page.navigate',params:{url:base+'/integrations'}}));
75
- const result=await response;flags.navigationCommandSuccess=!!result&&!result.error&&!result.result?.errorText;
76
- await wait(4000);
77
- }
78
- const http=await fetch(base+'/integrations',{signal:AbortSignal.timeout(6000)}).catch(()=>null);
79
- flags.httpIntegrationsStatus=http?.status||0;
80
- const post=await targets();
81
- flags.postNavTargetCount=post.length;
82
- flags.postNavLocalTargetCount=post.filter(x=>group(x.url)!=='NON_LOCAL'&&group(x.url)!=='BAD_URL').length;
83
- flags.postGroups=[...new Set(post.filter(x=>x.type==='page').map(x=>group(x.url)))].sort();
84
- flags.windowsProcessAlive=app.exitCode===null;flags.processExitCode=app.exitCode;
85
- }catch(e){flags.errorClass=String(e.message||e).replace(/[^A-Za-z0-9_]/g,'_').slice(0,60)}
86
- finally{try{ws?.close()}catch{}if(app?.pid){try{execFileSync('taskkill.exe',['/PID',String(app.pid),'/T','/F'],{stdio:'ignore',timeout:15000})}catch{}}}
87
- for(const [k,v] of Object.entries(flags))console.log('ROUTE_'+k+'='+JSON.stringify(v));
88
- if(!(flags.ready&&flags.bankDisabled&&flags.cdpTarget))process.exitCode=1;
89
- '@ | Set-Content -LiteralPath $probe -Encoding utf8
90
- node $probe $env:TF_ORIGINAL_EXE
91
- if($LASTEXITCODE -ne 0){throw 'ORIGINAL_V6_NATIVE_ROUTE_PROBE_FAILED'}
92
- Write-Host 'GATE_PASS_ORIGINAL_V6_CDP_LAUNCH_AND_BANK_DISABLED'
93
- - name: Scope and data protection
94
- if: always()
95
- run: |
96
- Write-Host 'ORIGINAL_V6_PROBE=ROUTE_CLASSIFICATION_ONLY; REAL_SQL=NOT_TESTED; GUI_ACCEPTANCE=NOT_TESTED; V7=NOT_TESTED'
97
- Write-Host 'PRIVATE_BINARY_AND_SOURCE_NOT_UPLOADED'