<?php
$phase=$argv[1]??'';$expected=['creator'=>['Treatise'=>'e2dd9dfa4913d7372971a87a4e1ffe84afb262653c4e547304fb5f633e933a8e','MatchRecord'=>'0eeb5999b1d0748eb4b4eaf0d0293e98a5f22309d83d71b3d8a3e3b1d4590967'],'final'=>['Treatise'=>'8f2441c32545a194f724baa6a3ec7a6276c1f2a32f8a2731c4f8b0a1e88b7142','MatchRecord'=>'a2e7eca1f5ed758066cc646850b9b3b89ddf3de4f24b59dd7fb0161ec6945b25']][$phase]??null;if(!$expected)exit(78);
$lock=json_decode(file_get_contents(__DIR__.'/private-source-lock.json'),true);foreach($expected as $class=>$sha){$file='p/logic/'.$class.'.php';if(hash_file('sha256',__DIR__.'/source/application/'.$file)!==$sha)throw new RuntimeException('Candidate SHA drift');$lock[$file]=$sha;}file_put_contents(__DIR__.'/private-source-lock.json',json_encode($lock));chmod(__DIR__.'/private-source-lock.json',0600);echo "candidate SHA verified\n";
