"""Run only the affected guarded dossier/Balcao regression; write sanitized test-reporter output.""" import json import subprocess import sys from pathlib import Path root = Path(__file__).resolve().parent.parent out = root / 'storage/app/private/investmoz-v2/portal-audit' result = subprocess.run(['C:/Users/macbook/.config/investmoz/php-8.5.11/php.exe', 'vendor/bin/phpunit', 'tests/Feature/InvestorPathTest.php', '--no-progress'], cwd=root, capture_output=True) receipt = json.loads(result.stdout.decode('utf-8-sig')) (out / 'balcao-prefill-after-fix-qa.json').write_text(json.dumps(receipt, ensure_ascii=False, indent=2), encoding='utf-8') print(json.dumps({'exit': result.returncode, 'tests': receipt['tests'], 'assertions': receipt['assertions'], 'failures': receipt.get('failures', [])}, ensure_ascii=True)) sys.exit(result.returncode)