selectOne('SELECT current_database() AS database,inet_server_port() AS port'); if($target!==['database'=>'stability_consumers_20261011_084534_test','port'=>55441])throw new RuntimeException('QA isolation'); $db->beginTransaction();$db->statement('SET TRANSACTION READ ONLY'); try{ $o=App\Models\Opportunity::findOrFail(30);$id='826fa774-2aab-40d7-ab57-80eefc87c748';$c=$o->workflow_context['conditions'][$id]; $p=['target'=>$target,'SQL_read_only'=>true,'state'=>$o->workflow_context['working_state'],'condition_id'=>$id, 'condition'=>array_intersect_key($c,array_flip(['description','gate','status','responsible_user_id','blocking_action','scope','resolution','resolution_history'])), 'active_writes'=>0];$dest=__DIR__.'/option-B4-condition-read.json';if(is_file($dest))throw new RuntimeException('Preserve read');file_put_contents($dest,json_encode($p,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR));echo json_encode($p,JSON_UNESCAPED_UNICODE).PHP_EOL; }finally{$db->rollBack();}