main
John Lauer Review cumulative land candidates and correct complete STEP assembly clearance checks ca3da55
"""Publish explicit candidate and corrected geometry evidence; retain acceptance gates."""
from pathlib import Path
import json,hashlib,subprocess
R=Path(__file__).resolve().parents[1];O=R/'mechanical/complete-step-review';repo='adom/adom-custom-electronic-load';base='7fa0c9cb74b197d14dce02c38c837005ef3f0024';files=set()
for name in ['docs/completion-plan.md','aiflow/run/components.json','aiflow/run/run.json','aiflow/run/run.jsonl','aiflow/run/timeline/presentation.json','aiflow/run/timeline/timeline.json','aiflow/run/timeline/fuse-escape-comparison.png']:
 if (R/name).is_file():files.add(name)
for pattern in ['tools/*step*.py','tools/*fuse*.py','tools/*precision*py','tools/*capacitor*py','tools/review_resistor_family.py','tools/cooling_body_audit.py','tools/check_q1_formed_model.py','tools/build_sensor_gh_study.py','tools/prepare_sensor_gh_study.py','tools/installed_fan_study.py','tools/cooling_carrier_study.py','tools/peek_fastener_study.py','tools/inspect_gh_solids.py','tools/aln_stack_study.py','tools/sensor_mount_study.py','tools/scaffold_stack/*.py','tools/formed_stack/*.py']:
 files.update(str(p.relative_to(R))for p in R.glob(pattern))
for folder in ['checkpoints/precision-land-review-v2','checkpoints/capacitor-library-review','checkpoints/fuse-diode-land-review','checkpoints/fuse-diode-land-review-v2','mechanical/complete-step-review']:
 for p in (R/folder).rglob('*'):
  if p.is_file() and not any(x in p.parts for x in ['source','__pycache__']) and p.suffix.lower()in ['.json','.md','.txt','.log','.png','.kicad_pcb','.kicad_sch','.kicad_pro','.kicad_dru','.kicad_mod','.step','.glb','.xml'] or (p.is_file()and p.name=='fp-lib-table'):files.add(str(p.relative_to(R)))
for name in ['project-push.json','publication-manifest.json']:files.discard(str((O/name).relative_to(R)))
assert not any('/source/'in f or f.endswith('.pdf')for f in files)
manifest={'base':base,'files':sorted(files),'sha256':{f:hashlib.sha256((R/f).read_bytes()).hexdigest()for f in sorted(files)},'scope':'Unadopted cumulative land candidates, retained failed clearance, corrected multi-root STEP evidence. Board30 remains adopted; no gate or physical qualification.'};(O/'publication-manifest.json').write_text(json.dumps(manifest,indent=2)+'\n')
head=json.loads(subprocess.check_output(['adom-wiki','repo','log',repo,'--limit','1','--json']));assert head['data']['log'][0]['hash']==base,'Concurrent source update; review before retry'
x=subprocess.run(['adom-wiki','repo','push',repo,'--files',*sorted(files),'-m','Review cumulative land candidates and correct complete STEP assembly clearance checks','--json'],cwd=R,text=True,capture_output=True);(O/'project-push.json').write_text(x.stdout);assert x.returncode==0,x.stderr;r=json.loads(x.stdout);assert r['status']=='ok',r;print(json.dumps({'files':len(files),'result':r['data']}))