3 lines
1.2 KiB
PHP
3 lines
1.2 KiB
PHP
<?php
|
|
$book='8085';require __DIR__.'/sgf-single-bootstrap.php';$old=json_decode(file_get_contents($s['root'].'/single-integration/20261111-081436-73034977/hr-installation.json'),true);$file='docs/integration/sgf-human-resources-access-proposal.json';$pin=App\Shared\Installation\HumanResourcesProfiles::fingerprint(json_decode(file_get_contents($s['app'].'/'.$file),true));$next=App\Shared\Installation\HumanResourcesProfiles::fingerprint(json_decode(file_get_contents($repo.'/'.$file),true));if($pin!==$next)throw new LogicException('Do not change approved identity pin');copy($s['app'].'/'.$file,$work.'/policy-before-private.json');copy($repo.'/'.$file,$s['app'].'/'.$file);$checks=[];foreach($old['hashes']as$path=>$hash){if($path===$file)$hash=hash_file('sha256',$repo.'/'.$file);if(hash_file('sha256',$s['app'].'/'.$path)!==$hash)throw new LogicException('Installed files changed '.$path);$checks[]=$path;}$out=['passed'=>true,'installed_files_verified'=>count($checks),'hr_profile_pin_unchanged'=>true,'metadata_applied_status_updated'=>true,'business_commands'=>0,'new_grants'=>0,'cache_cleared'=>false];file_put_contents($work.'/hr-finalization.json',json_encode($out,JSON_PRETTY_PRINT));echo json_encode($out+['proof'=>$work.'/hr-finalization.json']).PHP_EOL;
|