Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

Check privacy-safe exact payments page anchor before enabling nonposting Excel UI link

davoodmehraban89 committed Oct 20, 2026 at 09:02 UTC 1be19e6f99b3a7ccc6aeea00e1871fcf1cba855a
1 file changed +50
.github/workflows/v6-payments-navigation-anchor-linux-once.yml new
+50
@@ -0,0 +1,50 @@
1 +name: V6 private payments page Excel link anchor check
2 +on:
3 + push:
4 + paths:
5 + - .github/workflows/v6-payments-navigation-anchor-linux-once.yml
6 +permissions:
7 + contents: read
8 +jobs:
9 + inspect:
10 + runs-on: ubuntu-22.04
11 + timeout-minutes: 12
12 + steps:
13 + - name: Verify private source and inspect only interface metadata
14 + shell: bash
15 + env:
16 + TF_VALIDATION_READ_TOKEN: ${{ secrets.TF_VALIDATION_READ_TOKEN }}
17 + run: |
18 + set -euo pipefail
19 + test -n "$TF_VALIDATION_READ_TOKEN"
20 + export GH_TOKEN="$TF_VALIDATION_READ_TOKEN"
21 + mkdir -p /tmp/tf-v6-excel-inspection
22 + gh release download validation-inputs-20261017 --repo davoodmehraban89/TreasuryFlow-Validation-Private --pattern TreasuryFlow_Validation_Staging_20261017.zip --dir /tmp/tf-v6-excel-inspection >/dev/null 2>&1
23 + printf '%s %s\n' '9ce46ce2d2a437e08cbf28146b2cf2ac0ed078c71f1aeb537764390cdd3c552f' '/tmp/tf-v6-excel-inspection/TreasuryFlow_Validation_Staging_20261017.zip' | sha256sum -c --status
24 + unset GH_TOKEN TF_VALIDATION_READ_TOKEN
25 + mkdir /tmp/tf-v6-excel-inspection/staging
26 + unzip -qq /tmp/tf-v6-excel-inspection/TreasuryFlow_Validation_Staging_20261017.zip -d /tmp/tf-v6-excel-inspection/staging
27 + cd /tmp/tf-v6-excel-inspection/staging
28 + node <<'NODE'
29 + const fs=require('node:fs'),path=require('node:path');
30 + if(JSON.parse(fs.readFileSync('package.json','utf8')).version!=='1.0.1')throw Error('STAGE_VERSION_CHANGED');
31 + const files=[];const walk=(dir)=>{for(const x of fs.readdirSync(dir,{withFileTypes:true})){const full=path.join(dir,x.name);if(x.isDirectory())walk(full);else if(x.isFile()&&/[.]tsx?$/.test(x.name))files.push(full)}};
32 + walk('src');
33 + const pages=files.filter(x=>/[/\\]app[/\\].*[/\\]page[.]tsx$/.test(x));
34 + const excelModules=files.filter(x=>/excel|xlsx|workbook|spreadsheet|import|export/i.test(path.basename(x)));
35 + const excelTests=files.filter(x=>/[.]test[.]/i.test(path.basename(x))&&/excel|xlsx|workbook|spreadsheet/i.test(x));
36 + const scan=(re)=>pages.filter(x=>re.test(fs.readFileSync(x,'utf8'))).length;
37 + const fileInputCount=scan(/type\\s*=\\s*['"]file['"]|<input[^>]+type\\s*=\\s*['"]file['"]/i);
38 + const excelRouteCount=scan(/\\.xlsx|\\.xls|Excel|import.*workbook|ورود فایل|بارگذاری فایل|خروجی اکسل/i);
39 + console.log('GATE_PASS_V6_PRIVATE_ARCHIVE_SHA256');
40 + console.log('QA_ROUTE_COUNT='+pages.length);
41 + console.log('QA_EXCEL_MODULE_FILE_COUNT='+excelModules.length);
42 + console.log('QA_EXCEL_TEST_FILE_COUNT='+excelTests.length);
43 + console.log('QA_UPLOAD_INPUT_PAGE_COUNT='+fileInputCount);
44 + console.log('QA_EXCEL_MENTION_PAGE_COUNT='+excelRouteCount);
45 + const pay=fs.readFileSync('src/app/payments/page.tsx','utf8');
46 + const anchor='<Link className="btn btn-primary" href="/payments/new">+ ثبت حواله</Link>';
47 + console.log('QA_EXCEL_NAVIGATION_ANCHOR_PRESENT='+pay.includes(anchor));
48 + if(!pay.includes(anchor))throw Error('PAYMENTS_EXCEL_NAVIGATION_ANCHOR_ABSENT');
49 + console.log('GATE_PASS_ONLY_AGGREGATED_STATIC_METADATA_EMITTED');
50 + NODE