فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

ci(a02): gate Windows installer on SQL offline-media preflight selftest

davoodmehraban89 committed Oct 30, 2026 at 19:29 UTC c6b1adbcef7a235f65d866a5812c290b468dc941
1 file changed +14
.github/workflows/pr-quality-gates.yml
+14
@@ -61,6 +61,20 @@ jobs:
61 run: npm ci
62 - name: Windows integration regression
63 run: npm test
64 + - name: Verify SQL media preflight refuses unsafe input (synthetic; no engine setup)
65 + shell: pwsh
66 + run: |
67 + $output = & powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File './scripts/a02-offline-sql-setup-preflight.ps1' -Mode Test
68 + if ($LASTEXITCODE -ne 0) { throw 'A02 offline SQL preflight synthetic selftest failed' }
69 + $result = ($output | Out-String | ConvertFrom-Json)
70 + if ($result.status -ne 'synthetic-offline-sql-setup-preflight-passed' -or
71 + $result.installerStarted -ne $false -or
72 + $result.registryRead -ne $false -or
73 + $result.backupOpened -ne $false -or
74 + $result.databaseModified -ne $false -or
75 + $result.canImport -ne $false) {
76 + throw 'A02 SQL offline preflight selftest breached no-write contract'
77 + }
78 - name: Build Tauri installer
79 run: npm exec tauri build
80 - name: Inspect produced Windows x64 installer and checksum