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

Temporary Windows-only verify private V6 builder without publishing artifacts

davoodmehraban89 committed Oct 18, 2026 at 23:06 UTC e2edb417b378746e1d153ec10e4b0cb675bd532e
1 file changed +62
.github/workflows/private-v6-builder-ephemeral-20261018.yml new
+62
@@ -0,0 +1,62 @@
1 +name: Ephemeral private V6 builder verification (no uploads)
2 +on:
3 + push:
4 + paths:
5 + - .github/workflows/private-v6-builder-ephemeral-20261018.yml
6 + workflow_dispatch:
7 +permissions:
8 + contents: read
9 +jobs:
10 + private-builder:
11 + runs-on: windows-2022
12 + timeout-minutes: 70
13 + steps:
14 + - name: Install Node 22
15 + uses: actions/setup-node@v4
16 + with:
17 + node-version: '22'
18 + - name: Verify private builder with pinned staging, without publishing files
19 + shell: pwsh
20 + env:
21 + TF_VALIDATION_READ_TOKEN: ${{ secrets.TF_VALIDATION_READ_TOKEN }}
22 + run: |
23 + $ErrorActionPreference='Stop'
24 + if([string]::IsNullOrWhiteSpace($env:TF_VALIDATION_READ_TOKEN)){throw 'PRIVATE_READ_TOKEN_NOT_AVAILABLE'}
25 + $env:GH_TOKEN=$env:TF_VALIDATION_READ_TOKEN
26 + $private='davoodmehraban89/TreasuryFlow-Validation-Private'
27 + $branch='dev/v6-sql-editor-assertion-repair-20261017'
28 + $work=Join-Path $env:RUNNER_TEMP 'v6-protected-builder'
29 + New-Item -ItemType Directory -Path $work -Force | Out-Null
30 + $paths=@('qa/scripts/rebuild-v6-private-nonfinal-qa.ps1',
31 + 'qa/patches/v6-sql-assertion-fix.mjs',
32 + 'qa/patches/v6-add-readonly-sqlserver-adapter.mjs')
33 + foreach($path in $paths){
34 + $url="https://api.github.com/repos/$private/contents/${path}?ref=$branch"
35 + $api=Invoke-RestMethod -Uri $url -Headers @{ Authorization="Bearer $env:TF_VALIDATION_READ_TOKEN"; Accept='application/vnd.github+json'; 'User-Agent'='TreasuryFlow-private-qa' }
36 + if(!$api.content -or $api.encoding -ne 'base64'){throw 'PRIVATE_TEXT_FETCH_FAILED'}
37 + $dest=Join-Path $work $path
38 + New-Item -ItemType Directory -Path (Split-Path $dest -Parent) -Force | Out-Null
39 + [IO.File]::WriteAllBytes($dest,[Convert]::FromBase64String(($api.content -replace '\s','')))
40 + }
41 + $archive=Join-Path $work 'TreasuryFlow_Validation_Staging_20261017.zip'
42 + & gh release download validation-inputs-20261017 --repo $private --pattern TreasuryFlow_Validation_Staging_20261017.zip --dir $work *> (Join-Path $work 'release-fetch.log')
43 + if($LASTEXITCODE -ne 0){throw 'PRIVATE_RELEASE_DOWNLOAD_FAILED'}
44 + $destination=Join-Path $work 'run-once-candidate'
45 + $privateLog=Join-Path $work 'full-builder-log-private.txt'
46 + & pwsh -NoProfile -File (Join-Path $work $paths[0]) -SourceArchive $archive -OutputRoot $destination *> $privateLog
47 + if($LASTEXITCODE -ne 0) {
48 + $known='ORIGINAL_PRIVATE_SOURCE_HASH_MISMATCH|UNSAFE_ZIP_ENTRY_PATH|ARCHIVE_ENTRY_COUNT_LIMIT|ZIP_UNCOMPRESSED_SIZE_LIMIT|ZIP_SYMLINK_DISALLOWED|DUPLICATE_ZIP_ENTRY|EXTRACTED_REPARSE_POINT_DISALLOWED|OFFICIAL_XLSX_PACKAGE_LOCK_INTEGRITY_NOT_PINNED_TO_VERIFIED_ARCHIVE|SHEETJS_OFFICIAL_VENDOR_SHA256_MISMATCH|KNOWN_PRODUCTION_DEPENDENCY_ADVISORIES_REMAIN|V6_UNIT_REGRESSION_FAILED|V6_GATE_FAILED_[A-Z]+|V6_NSIS_BUILDER_FAILED|READ_ONLY_SQL_ADAPTER_PATCH_FAILED|SQL_EDITOR_TEST_PATCH_FAILED'
49 + $match=[regex]::Match((Get-Content $privateLog -Raw),$known)
50 + $code=if($match.Success){$match.Value}else{'PRIVATE_BUILD_FAILED_DETAILS_RETAINED_ONLY_ON_EPHEMERAL_WINDOWS_RUNNER'}
51 + throw $code
52 + }
53 + $deliverables=Join-Path $destination 'PRIVATE_QA_DELIVERABLES'
54 + $proof=Get-Content (Join-Path $deliverables 'NONFINAL_QA_SHA256_MANIFEST.json') -Raw | ConvertFrom-Json
55 + $source=Join-Path $deliverables 'TreasuryFlow_V6_1.0.1_Patched_NONFINAL_QA_Source.zip'
56 + $exe=Join-Path $deliverables 'TreasuryFlow_V6_1.0.1_Patched_NONFINAL_QA_Setup.exe'
57 + if(!(Test-Path $source) -or !(Test-Path $exe) -or $proof.finalRelease -ne $false -or $proof.v7FinalAccepted -ne $false -or $proof.productionNpmVulnerabilities -ne 0){throw 'NONFINAL_MANIFEST_POLICY_FAILED'}
58 + if((Get-FileHash $source -Algorithm SHA256).Hash -ne $proof.patchedSourceSha256 -or
59 + (Get-FileHash $exe -Algorithm SHA256).Hash -ne $proof.patchedInstallerSha256){throw 'NONFINAL_MANIFEST_DIGEST_MISMATCH'}
60 + Write-Host 'PRIVATE_V6_PATCHED_SOURCE_AND_WINDOWS_SETUP_BUILD_PASS'
61 + Write-Host 'PRIVATE_V6_NPM_SECURITY_TEST_TYPECHECK_LINT_BUILD_SMOKE_PASS'
62 + Write-Host 'NO_SOURCE_OR_BINARY_UPLOADED_TO_PUBLIC_ARTIFACTS'