<?php
$lane=$argv[1]??'';$roots=['B'=>'/tmp/cdx-meal-user-B.IRi11Q','C'=>'/tmp/cdx-meal-user-C.mCl26G'];if(!isset($roots[$lane])||__DIR__!==$roots[$lane]||is_link(__DIR__))throw new RuntimeException('Exact owned source root');$count=0;$remove=static function($path)use(&$remove,&$count):void{if(is_link($path))throw new RuntimeException('Unexpected symlink');if(is_dir($path)){foreach(scandir($path)as $name)if($name!=='.'&&$name!=='..')$remove($path.'/'.$name);rmdir($path);}else{unlink($path);$count++;}};$remove(__DIR__);echo json_encode(['lane'=>$lane,'source_only_runtime_removed'=>!file_exists(__DIR__),'files_removed'=>$count,'HTTP_worker_started'=>false,'parent_services_not_modified'=>true]),"\n";
