make(Kernel::class)->bootstrap(); $identity = portalQaAssertTarget($target); $proof = DB::transaction(function () use ($identity) { DB::statement('SET TRANSACTION READ ONLY'); $actor = DB::table('users')->where('email', 'geo-manager-qa@example.invalid')->firstOrFail(); throw_unless($actor->two_factor_confirmed_at !== null && $actor->two_factor_secret !== null, RuntimeException::class, 'Existing QA geomanager requires confirmed MFA.'); return ['target' => $identity, 'actor_id' => $actor->id, 'mfa_configured' => true, 'active_writes' => 0]; }); file_put_contents($root.'/storage/app/private/investmoz-v2/portal-audit/revision-geo-actor-qa.json', json_encode($proof, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR)); echo json_encode($proof, JSON_THROW_ON_ERROR).PHP_EOL;