migration artifacts
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
import subprocess
|
||||
import json
|
||||
import sys
|
||||
import json
|
||||
audit_path = sys.argv[1] if len(sys.argv) > 1 else 'C:/tmp/audit_after_l7208.json'
|
||||
with open(audit_path, 'rb') as f:
|
||||
raw = f.read()
|
||||
if raw.startswith(b'\xff\xfe'):
|
||||
raw = raw.decode('utf-16-le')[1:]
|
||||
else:
|
||||
raw = raw.decode('utf-8')
|
||||
data = json.loads(raw)
|
||||
from collections import Counter
|
||||
|
||||
r = subprocess.run(['uv', 'run', 'python', 'scripts/audit_exception_handling.py', '--src', 'src', '--json'], capture_output=True, text=True)
|
||||
data = json.loads(r.stdout)
|
||||
gui = [f for f in data['files'] if 'gui_2' in f['filename']][0]
|
||||
v_count = sum(1 for f in gui['findings'] if f['category'] == 'INTERNAL_BROAD_CATCH')
|
||||
print(f'V count: {v_count}')
|
||||
print('Remaining V sites:')
|
||||
for f in gui['findings']:
|
||||
if f['category'] == 'INTERNAL_BROAD_CATCH':
|
||||
ctx = f.get('context', '')[:80]
|
||||
line = f['line']
|
||||
print(f' L{line}: [{f["category"]}] {ctx}')
|
||||
print('gui_2.py findings:')
|
||||
cats = Counter(f['category'] for f in gui['findings'])
|
||||
for c, n in sorted(cats.items()):
|
||||
print(f' {c}: {n}')
|
||||
print(f'Total: {len(gui["findings"])}')
|
||||
mig_cats = {'INTERNAL_BROAD_CATCH', 'INTERNAL_SILENT_SWALLOW', 'INTERNAL_OPTIONAL_RETURN', 'UNCLEAR', 'INTERNAL_RETHROW'}
|
||||
mig = [f for f in gui['findings'] if f['category'] in mig_cats]
|
||||
print(f'Migration-target violations: {len(mig)}')
|
||||
if mig:
|
||||
for f in mig:
|
||||
print(f' L{f["line"]}: [{f["category"]}] {f.get("context", "")}')
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
p = Path("conductor/tracks.md")
|
||||
content = p.read_text(encoding="utf-8")
|
||||
lines = content.splitlines(keepends=True)
|
||||
|
||||
# Line 31 (1-indexed = index 30)
|
||||
old_line = lines[30]
|
||||
print("OLD LINE LEN:", len(old_line))
|
||||
print("OLD LINE START:", old_line[:80])
|
||||
print("OLD LINE END:", old_line[-80:])
|
||||
|
||||
new_line = old_line.replace(
|
||||
"spec ✓, plan ✓, metadata ✓, state ✓, **active 2026-06-19**",
|
||||
"spec ✓, plan ✓, metadata ✓, state ✓, **shipped 2026-06-20**"
|
||||
).replace(
|
||||
"migrates 42 sites in `src/gui_2.py` (38 INTERNAL_BROAD_CATCH + 13 INTERNAL_SILENT_SWALLOW + 2 INTERNAL_RETHROW + 2 UNCLEAR)",
|
||||
"migrated 42 sites in `src/gui_2.py` (25 INTERNAL_BROAD_CATCH + 13 INTERNAL_SILENT_SWALLOW + 2 INTERNAL_RETHROW + 2 UNCLEAR) to `Result[T]`"
|
||||
).replace(
|
||||
"adds 3 new drain-plane render functions + 1 new test file. **Anti-sliming protocol: 13 phases cap each phase at <=10 sites with per-phase styleguide re-read + per-site audit pre/post check + per-phase invariant test.**",
|
||||
"added 3 new drain-plane render functions + 1 new test file + 2 new audit heuristics (Phase 11 dunder raise + Phase 12 lazy-loading fallback). **Audit: V=0, S=0, ?=0 for gui_2.py.** 81 atomic commits across 13 phases; 114 tests pass; Tier 1+2 batched: 10/10 PASS; Tier 3: 1 known issue (FPS 28.46 vs 30 threshold; documented in TRACK_COMPLETION). **Anti-sliming protocol: 13 phases cap each phase at <=10 sites with per-phase styleguide re-read + per-site audit pre/post check + per-phase invariant test.**"
|
||||
).replace(
|
||||
"1 new test file (tests/test_gui_2_result.py) with 55+ tests; 4 metadata/plan/state/spec files; 1 end-of-track report; 60+ atomic commits",
|
||||
"1 new test file (tests/test_gui_2_result.py) with 114 tests; 1 modified test file (tests/test_audit_heuristics.py) with 8 regression tests; 4 metadata/plan/state/spec files; 1 end-of-track report; 81 atomic commits"
|
||||
)
|
||||
|
||||
assert new_line != old_line, "No changes made to line"
|
||||
lines[30] = new_line
|
||||
p.write_text("".join(lines), encoding="utf-8")
|
||||
print("OK")
|
||||
Reference in New Issue
Block a user