<?php
$before=json_decode(file_get_contents(__DIR__.'/private-source-lock.json'),true);$expected='17bb64836458919e9188586dbb57753fe1e34e8615f0c9404b222c7e709a5e84';if($before['p/logic/SyllabusEvaluate.php']!=='3ef5ae48a4a2bb8d5857466cf60ac476576d160a44c40361c11a5fef7a261b96')throw new RuntimeException('Original source lock drift');foreach($before as $file=>$sha)if(hash_file('sha256',__DIR__.'/source/application/'.$file)!==($file==='p/logic/SyllabusEvaluate.php'?$expected:$sha))throw new RuntimeException('Only root-approved Logic changed');file_put_contents(__DIR__.'/private-source-lock-original.json',json_encode($before));$before['p/logic/SyllabusEvaluate.php']=$expected;file_put_contents(__DIR__.'/private-source-lock.json',json_encode($before));chmod(__DIR__.'/private-source-lock-original.json',0600);chmod(__DIR__.'/private-source-lock.json',0600);echo json_encode(['passed'=>true,'root_approved_logic_sha256'=>$expected,'other_sources_unchanged'=>true]),"\n";
