main
John Lauer
Add JST GH libraries, native schematic parity and revised sensor harness study with reviewed clips
1ac01c3
"""Publish explicitly reviewed new component records; no board adoption."""
from pathlib import Path
import subprocess,json,os
R=Path(__file__).resolve().parents[1]
for slug in ['bm03b-ghs-tbt','ghr-03v-s','sshl-002t-p0-2']:
p=R/'components'/slug;meta=json.loads((p/'page.json').read_text());rev=p/'review'
def run(args,label,env=None):
x=subprocess.run(args,cwd=p,capture_output=True,text=True,env=env);(rev/(label+'.json')).write_text(x.stdout);(rev/(label+'.stderr')).write_text(x.stderr);assert x.returncode==0,x.stdout+x.stderr;j=json.loads(x.stdout);assert j['status']=='ok',j;return j
env=os.environ.copy()
if slug!='bm03b-ghs-tbt':env['ADOM_WIKI_COMPONENT_HERO']='0'
receipt=rev/'publish-first.json'
if not receipt.exists() or json.loads(receipt.read_text()).get('status')!='ok':run(['adom-wiki','pkg','publish','--org','adom','--public','--json'],'publish-first',env)
files=[str(f.relative_to(p))for f in p.rglob('*')if f.is_file() and ('review' not in f.relative_to(p).parts or f.name=='model-review.json') and f.name not in ['.adom-wiki.json']]
run(['adom-wiki','repo','push','adom/'+slug,'--files',*files,'-m','Add exact GH component with native assets, explicit provenance and provisional geometry','--json'],'source-push')
run(['adom-wiki','repo','show','adom/'+slug,'page.json','--json'],'page-readback')
print(slug,'source and registry published; live visual review pending',flush=True)