<?php
$lock=json_decode(file_get_contents(__DIR__.'/private-source-lock.json'),true);$old='a4dbaa1c19a15fb6e25811111cf11e4b29cd2068ee55c0ddb5c2be5474bb00e0';$new='a35eb95fca42c71aa5f8f9506357432e92fc18baf3d956c5e2adb3b66f816803';if($lock['p/logic/Weight.php']!==$old)throw new RuntimeException('Original lock drift');foreach($lock as $f=>$sha)if(hash_file('sha256',__DIR__.'/source/application/'.$f)!==($f==='p/logic/Weight.php'?$new:$sha))throw new RuntimeException('Only root-approved Weight changed');file_put_contents(__DIR__.'/private-source-lock-original.json',json_encode($lock));$lock['p/logic/Weight.php']=$new;file_put_contents(__DIR__.'/private-source-lock.json',json_encode($lock));chmod(__DIR__.'/private-source-lock-original.json',0600);chmod(__DIR__.'/private-source-lock.json',0600);echo json_encode(['passed'=>true,'final_Logic_SHA'=>$new,'other_locked_sources_unchanged'=>true]),"\n";
