main
John Lauer Preserve board29, component assets and scaffold-fit correction candidate with reviewed footage c54169e
"""Record the actual native landing; preserve every tool receipt."""
import json,subprocess,os
from pathlib import Path
p=Path(__file__).resolve().parents[1];os.chdir(p)
def ab(v,a):
 r=subprocess.run(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load',v,json.dumps(a)],capture_output=True,text=True)
 d=json.loads(r.stdout)
 return d
start=ab('desktop_record_window_start',{'hwnd':597540,'fps':30,'audio':False,'maxDurationMs':1200000,'reason':'Record actual electronic-load route landing after zero-open native DRC gate'})
Path('videos/route-landing-start.json').write_text(json.dumps(start,indent=2));rid=start.get('recordingId')
if not rid:raise RuntimeError(str(start))
try:
 env=os.environ.copy();env.update(ADOM_AIFLOW_KICAD_CLI='adom-aiflow-kicad-cli-remote',KICAD_REMOTE_TARGET='AdomLapper')
 with open('design/route-landing.log','w')as f:
  r=subprocess.run(['adom-aiflow','--ai-thread','adom-custom-load','--run','aiflow/run','land','route','--plan','design/route-plan-ground-final-v5.json','--pause-ms','100'],env=env,stdout=f,stderr=subprocess.STDOUT)
 print('landing exit',r.returncode,flush=True)
finally:
 stop=ab('desktop_record_stop',{'recordingId':rid});Path('videos/route-landing-stop.json').write_text(json.dumps(stop,indent=2));print(json.dumps(stop),flush=True)