Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/tools/adapters/lower # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tools / adapters / lower` 17 lines ยท 1129 bytes Raw Blame History 1 #!/usr/bin/env python3 2 """Transparent host dispatch; validation, hashing and lowering run in seeded native Omega.""" 3 from pathlib import Path 4 import hashlib,json,os,sys 5 root=Path(__file__).resolve().parents[2] 6 closure={'src/source-aware/vendor/sha256.om','src/source-aware/core.om','src/adapters/upper-lower.om'} 7 try: 8 build=root/'build/L831';m=json.loads((build/'build.json').read_text());exe=build/'lower' 9 if m['compiler_sha256']!='`734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`':raise ValueError('compiler identity') 10 if set(m['inputs'])!=closure:raise ValueError('source closure') 11 for rel,digest in m['inputs'].items(): 12 if hashlib.sha256((root/rel).read_bytes()).hexdigest()!=digest:raise ValueError('changed source') 13 if hashlib.sha256(exe.read_bytes()).hexdigest()!=m['binary_sha256']:raise ValueError('changed artifact') 14 except (OSError,ValueError,KeyError) as exc: 15 print('LOWER_STALE_OR_MISSING_BUILD: '+str(exc),file=sys.stderr);raise SystemExit(78) 16 # The optional NAME is passed through; the native tool validates it (64 on refusal). 17 os.execv(exe,[str(exe)]+sys.argv[1:])