require $file)($plan['source'].'/tools/portal-stability-runtime.php'); $proof=DB::transaction(function()use($root):array { DB::statement('SET TRANSACTION READ ONLY');$service=app(App\Services\OrganizationCountryInstallation::class); $old=hash('sha256',json_encode(array_map(fn($f)=>[$f,hash_file('sha256',$root.'/'.$f)],$service->files()),JSON_THROW_ON_ERROR));$new=$service->fingerprint(); throw_unless($old==='162daff6ce08117582dd7d796639d02b156d1b940cd85ef3587ff88a65747edd',RuntimeException::class,'Active COUNTRY02 fingerprint changed.'); throw_unless($old!==$new&&config('portal.organization_country_enabled')&&app(App\Services\OrganizationCountry::class)->available()&&DB::table('migrations')->where('migration',App\Services\OrganizationCountryInstallation::MIGRATION)->exists(),RuntimeException::class,'Expected installed QA country compatibility.'); return ['result'=>'passed','at'=>gmdate('c'),'active_current_COUNTRY02_fingerprint'=>$old,'candidate_COUNTRY02_fingerprint'=>$new,'installed_QA'=>true,'country_flag_QA'=>true,'historical_readiness_reuse_permitted'=>false,'effect'=>'Shared PortalProfileAccess fingerprint changes; COUNTRY02 remains installed/enabled, no 050000 reapplication or country schema/data/cipher changes. New installation previews/operation scopes must be refreshed.','new_active_writes'=>0,'full_country_regression_not_repeated'=>true]; });$receipt=in_array('--scope',$argv,true)?'functional-scope-country-compatibility-qa-20261011.json':(in_array('--consolidated',$argv,true)?'functional-consolidated-country-compatibility-qa-20261011.json':'functional-country-compatibility-qa-20261011.json');file_put_contents($dir.'/'.$receipt,json_encode($proof,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo json_encode($proof,JSON_THROW_ON_ERROR).PHP_EOL;