getSchemaBuilder()->hasTable('mi_drafts'))throw new LogicException('Explicit schema setup required'); $files=['app/Modules/Services/MultiLineInvoiceCalculation.php','app/Modules/Services/MultiLineInvoiceIssuance.php','app/Modules/Services/MultiLineInvoicePdf.php','app/Modules/Services/MultiLineDrafts.php','app/Modules/Services/QualifiedInvoiceSource.php','app/Modules/Services/Http/MultiLineInvoiceController.php','app/Modules/Services/FiscalRules.php','app/Modules/Services/InvoicePdf.php','app/Modules/Services/ServiceInvoicing.php','app/Modules/Services/ServiceReceivables.php','app/Modules/Accounting/SalesLedgerSource.php','app/Modules/Accounting/ComposedLedgerCandidates.php','app/Modules/Accounting/ComposedLedgerController.php','app/Modules/Accounting/LedgerComposition.php','app/Modules/Identity/Services/IdentityWorkflow.php','app/Shared/Context/ModuleNavigation.php','routes/web.php','database/sql/multiline_invoices.sql','database/sql/multiline_invoice_drafts.sql','resources/js/MultiLineInvoiceWorkspace.jsx','resources/css/multiline-invoice.css','resources/js/WorkspaceNavigation.jsx','resources/js/app.jsx'];foreach($files as$f)if(str_ends_with($f,'.php'))(new Symfony\Component\Process\Process([PHP_BINARY,'-l',$repo.'/'.$f]))->mustRun();$hashes=[];$copy=function($src,$f)use($s,$work,&$hashes){$d=$s['app'].'/'.$f;if(is_file($d)){$b=$work.'/before/'.$f;if(!is_dir(dirname($b)))mkdir(dirname($b),0700,true);copy($d,$b);}if(!is_dir(dirname($d)))mkdir(dirname($d),0700,true);if(!copy($src,$d))throw new LogicException('Copy failed');$hashes[$f]=hash_file('sha256',$d);};foreach($files as$f)$copy($repo.'/'.$f,$f); $build=$run['root'].'/private/single-multiline-final-build-20261111';$manifest=json_decode(file_get_contents($build.'/manifest.json'),true);$assets=[];foreach($manifest as$e){$assets[]=$e['file'];foreach($e['css']??[]as$f)$assets[]=$f;}foreach(array_unique($assets)as$f){if(!preg_match('~^assets/[a-zA-Z0-9_.-]+$~D',$f))throw new LogicException('Asset path invalid');$copy($build.'/'.$f,'public/build/'.$f);}$copy($build.'/manifest.json','public/build/manifest.json');$cfg=['enabled'=>true,'schema_sha256'=>hash_file('sha256',$repo.'/database/sql/multiline_invoices.sql'),'draft_schema_sha256'=>hash_file('sha256',$repo.'/database/sql/multiline_invoice_drafts.sql')];file_put_contents($work.'/multiline_invoices.php',"true,'hashes'=>$hashes,'new_business_commands'=>0,'new_grants'=>0,'new_accounts'=>0,'cache_cleared'=>false,'new_demo'=>false],JSON_PRETTY_PRINT));file_put_contents($s['root'].'/multiline-invoice-installation-pointer.json',json_encode(['root'=>$work]));echo json_encode(['passed'=>true,'proof'=>$work.'/multiline-invoice-installation.json']).PHP_EOL;