from pathlib import Path import json import subprocess root = Path(__file__).resolve().parent target = Path('E:/pipe-ner-server').resolve() manifest = json.loads((root/'manifest.json').read_text(encoding='utf-8')) paths = [row['path'] for row in manifest] for rel in paths: actual = (target/rel).read_bytes().replace(b'\r\n',b'\n') expected = (root/rel).read_bytes().replace(b'\r\n',b'\n') if actual != expected: raise SystemExit('Concurrent changes: do not stage or commit ' + rel) subprocess.run(['git','diff','--check'],cwd=target,check=True) subprocess.run(['git','diff','--cached','--quiet'],cwd=target,check=True) subprocess.run(['git','add','--']+paths,cwd=target,check=True) # Only this ticket's 18 selected files; shared distribution prerequisite is included and documented. subprocess.run(['git','diff','--cached','--stat'],cwd=target,check=True) subprocess.run(['git','commit','-m','fix(cockpit): align map and monitoring pointStatus eight-bucket contract', '-m','Support CSV/repeated status filters, stable global counts and explicit device status publication. Preserve empty-point distribution prerequisites. Add cross-endpoint, cancelled-order and Redis compatibility coverage. Verified 75 focused tests, 429 cockpit tests, 45 real GET assertions and browser filtering 13 -> 1 -> 2.'],cwd=target,check=True) subprocess.run(['git','log','-1','--format=%H %s'],cwd=target,check=True)