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

ci(a02): require synthetic on-engine SQL backup verify isolated restore DBCC and totals

davoodmehraban89 committed Oct 30, 2026 at 19:33 UTC ee9c0ad7637d53ea1a9ba9f5b6d623f3310fc480
1 file changed +15
.github/workflows/pr-quality-gates.yml
+15
@@ -75,6 +75,21 @@ jobs:
75 $result.canImport -ne $false) {
76 throw 'A02 SQL offline preflight selftest breached no-write contract'
77 }
78 + - name: Actual synthetic SQL LocalDB backup and isolated restore
79 + shell: pwsh
80 + run: |
81 + $output = & powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File './scripts/a02-synthetic-sql-localdb-restore-smoke.ps1' -Mode Run
82 + if ($LASTEXITCODE -ne 0) { throw 'A02 synthetic SQL LocalDB live restore failed' }
83 + $report = ($output | Out-String | ConvertFrom-Json)
84 + if ($report.status -ne 'synthetic-localdb-restore-verified' -or
85 + $report.ownerBackupUsed -ne $false -or
86 + $report.restoreExecuted -ne $true -or
87 + $report.dbccPassed -ne $true -or
88 + $report.syntheticRecords -ne 2 -or
89 + $report.syntheticTotal -ne 80235 -or
90 + $report.canImport -ne $false) {
91 + throw 'A02 synthetic LocalDB restore did not satisfy safety/reconciliation contract'
92 + }
93 - name: Build Tauri installer
94 run: npm exec tauri build
95 - name: Inspect produced Windows x64 installer and checksum