from preflight import R,g,HEAD
from pathlib import Path
source=Path('/tmp/codex/ltb1021/2026-09-12_contextra-rtp-anchor_r01/build.py').read_text()
source=source.replace("v=json.loads((R/'verify.json').read_text());assert v['errors']==v['failures']==v['sdk']==0", "v=json.loads((R/'source-verify.json').read_text());assert v['errors']==v['failures']==0")
source=source.replace('rtp-anchor-7913605-','fire-api-7a51cb9-')
source=source.replace("digest=g.hashlib.sha256(json.dumps(hashes,sort_keys=True).encode()).hexdigest()", "digest=g.hashlib.sha256((HEAD+json.dumps(hashes,sort_keys=True)).encode()).hexdigest()")
ns=dict(__name__='builder');exec(compile(source,'bounded_builder','exec'),ns);ns['EDITED']=[]
if __name__=='__main__':
    assert not (R/'build-started.json').exists();(R/'build-started.json').write_text(g.json.dumps(dict(head=HEAD,build_count=1)))
    ns['main']()
