@@ -1,9 +1,12 @@
|
||||
<?php
|
||||
|
||||
use App\Services\PartnershipInstallation;
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
|
||||
// Read-only against the active database. Evidence is written only to private files.
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
$directory = storage_path('app/private/partnership-exchange');
|
||||
$tests = json_decode(ltrim(file_get_contents($directory.'/qa-tests.json'), "\xEF\xBB\xBF"), true, 512, JSON_THROW_ON_ERROR);
|
||||
$checks = json_decode(ltrim(file_get_contents($directory.'/qa-checks.json'), "\xEF\xBB\xBF"), true, 512, JSON_THROW_ON_ERROR);
|
||||
@@ -12,7 +15,7 @@ if (($tests['result'] ?? '') !== 'passed' || ($tests['passed'] ?? 0) < 46 || ! (
|
||||
|| ($browser['target'] ?? '') !== 'anchor_restore_20261007_test:55441' || ! ($checks['typescript'] ?? false) || ! ($checks['build'] ?? false)) {
|
||||
throw new RuntimeException('QA evidence is incomplete.');
|
||||
}
|
||||
$installer = app(App\Services\PartnershipInstallation::class);
|
||||
$installer = app(PartnershipInstallation::class);
|
||||
$proof = json_decode(file_get_contents($directory.'/backup-proof.json'), true, 512, JSON_THROW_ON_ERROR);
|
||||
if (! ($proof['restore_verified'] ?? false) || hash_file('sha256', $proof['dump_path']) !== $proof['sha256']) {
|
||||
throw new RuntimeException('Verified restore proof or dump unavailable.');
|
||||
|
||||
Reference in New Issue
Block a user