oportunidades 8
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-14 08:25:30 +02:00
parent 287e991486
commit ba1c0340ea
9112 changed files with 2199795 additions and 856 deletions
@@ -9,8 +9,8 @@ try{
if(config('portal.notifications_enabled')||config('suitecrm.enabled')||config('investmoz_ai.enabled'))throw new RuntimeException('External integrations must remain off');
$actor=App\Models\User::findOrFail(22);$access=app(App\Services\PortalProfileAccess::class);
$candidates=[];foreach([30,31,32,33,34,35,54,56]as$id){$candidate=App\Models\Opportunity::findOrFail($id);$candidates[]=['id'=>$id,'category'=>$candidate->opportunity_category,'state'=>$candidate->workflow_context['working_state']??null,'owner'=>$candidate->owner_user_id,'coeditor_scoped'=>$access->promoterRecordScope($actor,$candidate)];}
$o=App\Models\Opportunity::findOrFail(31);
if($o->owner_user_id!==21||$o->opportunity_category!=='real_estate'||$o->workflow_context['working_state']!=='published'||!$access->promoterRecordScope($actor,$o)){
$o=App\Models\Opportunity::findOrFail(30);
if($o->owner_user_id!==21||$o->opportunity_category!=='investment_project'||$o->workflow_context['working_state']!=='published'||!$access->promoterRecordScope($actor,$o)){
echo json_encode(['result'=>'fixture_scope_requires_selection','candidates'=>$candidates,'active_writes'=>0]).PHP_EOL;throw new RuntimeException('Select an existing authorized coedition case');
}
$v=app(App\Services\OpportunityManagement::class)->values($o)['canonical'];$tables=[];
@@ -18,8 +18,8 @@ try{
$rows=$db->table($name)->get();$bytes=$rows->map(fn($r)=>json_encode($r,JSON_THROW_ON_ERROR))->all();sort($bytes,SORT_STRING);
$tables[$name]=['count'=>$rows->count(),'sha256'=>hash('sha256',implode("\n",$bytes))];
}
$proof=['at'=>gmdate('c'),'target'=>$target,'SQL_read_only'=>true,'active_writes'=>0,'opportunity_id'=>31,'owner'=>21,'coeditor'=>22,
'coeditor_same_organization_authorized'=>true,'state'=>'published','baseline_property'=>$v['real_estate'],'existing_coeditor_scope'=>$candidates,
$proof=['at'=>gmdate('c'),'target'=>$target,'SQL_read_only'=>true,'active_writes'=>0,'opportunity_id'=>30,'owner'=>21,'coeditor'=>22,
'coeditor_same_organization_authorized'=>true,'state'=>'published','baseline_risks'=>$v['risks'],'existing_coeditor_scope'=>$candidates,
'scope_sha256'=>hash_file('sha256',$b4Root.'/docs/investmoz/v2/auditoria-portal/ambito-B-aceitacao-QA.md'),
'protected_tables'=>$tables];
$dest=__DIR__.'/option-B4-preflight.json';if(is_file($dest))throw new RuntimeException('Preserve previous preflight');