main
John Lauer Corrected Astra ESC routing: native zero-open result, full accounting and voiceover handoff a80479d 23d ago
from pathlib import Path
import subprocess,json,hashlib
D=Path(__file__).parent
cmd=['adom-wiki','repo','push','adom/codex','--files','docs/videos/astra-routing-esc-g431.mp4','docs/videos/astra-routing-esc-g431-poster.jpg','-m','Corrected Astra ESC routing video: zero unconnected through kicad_route_net']
p=subprocess.run(cmd,capture_output=True,text=True);(D/'evidence/corrected-video-push.txt').write_text(p.stdout+'\n'+p.stderr);assert p.returncode==0,p.stderr;print(p.stdout,flush=True)
url='https://wiki.adom.inc/api/pages/adom/codex/files/docs/videos/astra-routing-esc-g431.mp4'
code=subprocess.check_output(['curl','-s','-o','/dev/null','-w','%{http_code}',url],text=True);assert code=='200',code
readback=D/'evidence/published-readback.mp4';subprocess.run(['curl','-fsSL',url,'-o',str(readback)],check=True)
h=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
local=D/'docs/videos/astra-routing-esc-g431.mp4';assert h(local)==h(readback)
subprocess.run(['ffmpeg','-v','error','-i',str(readback),'-f','null','-'],check=True)
r=dict(url=url,httpStatus=code,bytes=local.stat().st_size,sha256=h(local),readbackSha256=h(readback),fullDecodePassed=True)
(D/'evidence/published-verification.json').write_text(json.dumps(r,indent=2));print(json.dumps(r),flush=True)