<?php
declare(strict_types=1);require __DIR__.'/bootstrap.php';$old=json_decode(file_get_contents('/tmp/cdx-ai-goods-printer-read8-20261011/private/evidence/final-original.json'),true);$current=$own();$check($old['original']===$current,'Full sealed twenty-table original baseline exact');$meta=json_decode(file_get_contents(__DIR__.'/structure-'.$lane.'.json'),true);foreach($meta['tables'] as $t=>$m)$check($m['foreign_keys']===0&&$m['triggers']===0,'No FK/trigger '.$t);$collision=$read('SELECT COUNT(*) n FROM yoshop_goods WHERE goods_no=?',[$marker]);$check((int)$collision[0]['n']===0,'Fresh global exact marker no collision');$file=$lane==='B'?24452:9715;$r=$read('SELECT * FROM yoshop_upload_file WHERE file_id=? AND store_id=2147001112 AND file_name=?',[$file,'CDXCM11F782_terminal']);$check(count($r)===1&&$r[0]['storage']==='local','Exact retained own local File');$persist('preflight.json',['lane'=>$lane,'identity_verified'=>true,'baseline'=>$current,'protect'=>$protect(),'file'=>$r[0],'meta_sha256'=>hash_file('sha256',__DIR__.'/structure-'.$lane.'.json'),'business_dml'=>0]);echo json_encode(['lane'=>$lane,'baseline_20_tables_exact'=>true,'file_id'=>$file,'marker_collision'=>0,'all_9_metadata_tables_fk0_trigger0'=>true,'business_dml'=>0]),"\n";
