Private
Public Access
chore(env): pre-existing tier2 setup files (opencode config, mcp paths, project history)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import json
|
||||
import subprocess
|
||||
r = subprocess.run(['uv', 'run', 'python', 'scripts/audit_exception_handling.py', '--json'], capture_output=True, text=True)
|
||||
data = json.loads(r.stdout)
|
||||
app = [f for f in data['files'] if 'app_controller' in f.get('filename', '')][0]
|
||||
print(f"V={app['violation_count']} C={app['compliant_count']} S={app['suspicious_count']} ?={app['unclear_count']}")
|
||||
print()
|
||||
for cat in ['INTERNAL_BROAD_CATCH', 'INTERNAL_SILENT_SWALLOW', 'INTERNAL_RETHROW', 'INTERNAL_OPTIONAL_RETURN']:
|
||||
sites = [f for f in app['findings'] if f.get('category') == cat]
|
||||
print(f'{cat}: {len(sites)} remaining')
|
||||
@@ -0,0 +1,12 @@
|
||||
import json
|
||||
import subprocess
|
||||
r = subprocess.run(['uv', 'run', 'python', 'scripts/audit_exception_handling.py', '--json'], capture_output=True, text=True)
|
||||
data = json.loads(r.stdout)
|
||||
app = [f for f in data['files'] if 'app_controller' in f.get('filename', '')][0]
|
||||
print(f"app_controller: V={app['violation_count']} C={app['compliant_count']} S={app['suspicious_count']} ?={app['unclear_count']}")
|
||||
print()
|
||||
findings = app['findings']
|
||||
broad = [f for f in findings if f.get('category') == 'INTERNAL_BROAD_CATCH']
|
||||
print(f"INTERNAL_BROAD_CATCH: {len(broad)} remaining")
|
||||
for f in broad:
|
||||
print(f" L{f.get('line', 0)}: {f.get('context', '')}")
|
||||
@@ -0,0 +1,26 @@
|
||||
import json
|
||||
import subprocess
|
||||
r = subprocess.run(['uv', 'run', 'python', 'scripts/audit_exception_handling.py', '--json'], capture_output=True, text=True)
|
||||
data = json.loads(r.stdout)
|
||||
app = [f for f in data['files'] if 'app_controller' in f.get('filename', '')][0]
|
||||
findings = app['findings']
|
||||
silent = [f for f in findings if f.get('category') == 'INTERNAL_SILENT_SWALLOW']
|
||||
print(f'INTERNAL_SILENT_SWALLOW: {len(silent)} sites')
|
||||
for f in silent:
|
||||
line = f.get('line', 0)
|
||||
ctx = f.get('context', '')
|
||||
print(f' L{line}: {ctx[:60]}')
|
||||
print()
|
||||
rethrow = [f for f in findings if f.get('category') == 'INTERNAL_RETHROW']
|
||||
print(f'INTERNAL_RETHROW: {len(rethrow)} sites')
|
||||
for f in rethrow:
|
||||
line = f.get('line', 0)
|
||||
ctx = f.get('context', '')
|
||||
print(f' L{line}: {ctx[:60]}')
|
||||
print()
|
||||
optional = [f for f in findings if f.get('category') == 'INTERNAL_OPTIONAL_RETURN']
|
||||
print(f'INTERNAL_OPTIONAL_RETURN: {len(optional)} sites')
|
||||
for f in optional:
|
||||
line = f.get('line', 0)
|
||||
ctx = f.get('context', '')
|
||||
print(f' L{line}: {ctx[:60]}')
|
||||
@@ -0,0 +1,13 @@
|
||||
import os
|
||||
files = ['tests/test_app_controller_offloading.py', 'tests/test_gui_paths.py', 'tests/test_gui_phase3.py', 'tests/test_paths.py', 'tests/test_project_paths.py']
|
||||
for f in files:
|
||||
with open(f, 'r', encoding='utf-8') as fh:
|
||||
content = fh.read()
|
||||
new_content = content.replace('paths.reset_resolved()', 'paths.reset_paths()')
|
||||
new_content = new_content.replace("'src.paths.reset_resolved'", "'src.paths.reset_paths'")
|
||||
if new_content != content:
|
||||
with open(f, 'w', encoding='utf-8', newline='') as fh:
|
||||
fh.write(new_content)
|
||||
print(f'updated: {f}')
|
||||
else:
|
||||
print(f'no changes: {f}')
|
||||
Reference in New Issue
Block a user