<?php
$lane=getenv('PM_LANE');$runtime=$lane==='B'?'/tmp/cdx-store-category9-B.cVux2z':'/tmp/cdx-store-category9-C.Hr1w83';
require $runtime.'/source.php';
$before=$source();
require $runtime.'/statement.php';
define('APP_PATH',$runtime.'/source/application/');
define('ROOT_PATH',$root.'/');
define('RUNTIME_PATH','/tmp/cdx-schema-read-no-write/');
// No App::initCommon, HTTP bootstrap, Auth, cache, or active worker changes.
require $root.'/thinkphp/base.php';
class CDXMemoryLog { public function __construct($config=[]){} public function save($log=[],$append=false){return true;} }
\think\Log::init(['type'=>'\\CDXMemoryLog']);
require $root.'/thinkphp/helper.php';
\think\Loader::addNamespace('app',APP_PATH);
$tpDb=(static function($file){return require $file;})($root.'/application/database.php');$tpDb['debug']=false;$tpDb['params'][PDO::ATTR_STRINGIFY_FETCHES]=false;$tpDb['params'][PDO::ATTR_STATEMENT_CLASS]=['CDXStatement'];\think\Config::set($tpDb,'database');
$logicPath=APP_PATH.'p/logic/MaterialCategory.php';
$check(hash_file('sha256',$logicPath)==='29ccbcfad2e1cfcb77a0bdbb339d40bec8b30889a4c5b5aad00babbe7671d139','Current main Logic SHA');
$own=array_values(array_filter($before['material_category'],static function($r){return $r['name']==='CDXC9733C88C1-P';}));$check(count($own)===1,'Own read9 parent unique');
$logic=new \app\p\logic\MaterialCategory();$actual=$logic->read($own[0]['id']);
$check(is_array($actual)&&$actual['name']===$own[0]['name'],'Real Logic::read own parent');
$after=$source();$check($after===$before,'All business source exact');
$types=[];foreach($actual as $key=>$value)$types[$key]=['type'=>gettype($value),'bytes'=>is_string($value)?strlen($value):null];
echo json_encode(['lane'=>$lane,'layer'=>'actual CLI Logic::read; no HTTP/Auth assertion','DML'=>0,'DDL'=>0,'logic_sha256'=>hash_file('sha256',$logicPath),'result'=>$actual,'types'=>$types,'prepared'=>$GLOBALS['CDX_PREPARED']??[],'business_source_exact'=>true,'CREATE_TIME_all_zero_fraction'=>count(array_filter($before['material_category'],static function($r){return preg_match('/^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d(?:\.0{1,6})?$/D',$r['create_time'])!==1;}))===0],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_PRESERVE_ZERO_FRACTION),"\n";
