"""Bind native launch to closed same-source Windows gates and the current CLI oracle.""" from pathlib import Path import hashlib, json base = Path(__file__).resolve().parent gates = base.parent / 'text-diagnostic-gates' def identity(path): raw = path.read_bytes() return {'path':str(path), 'bytes':len(raw), 'sha256':hashlib.sha256(raw).hexdigest()} def read(path): return json.loads(path.read_text(encoding='utf-8')) preserved = base / 'windows-build-final-1-binaries/preserved.json' binary_record = read(preserved) evidence = [identity(preserved), identity(Path(__file__)), identity(base / 'launch.py'), identity(base / 'native-recorder.js')] source_inputs = None for label in ['strict-clippy-3','desktop-cli-final-1','format-final-1','windows-build-final-1']: root = gates / label result = read(root / 'result.json') assert result['exitCode'] == 0 and result['inputsUnchanged'] and result['inputCount'] == 604 assert result['environment']['RUSTUP_TOOLCHAIN'] == 'stable-x86_64-pc-windows-gnullvm' if source_inputs is None: source_inputs = result['inputs'] assert source_inputs == result['inputs'] evidence.append(identity(root / 'result.json')) for name, key in [('inputs.json','inputs'),('inputs.zip','archive'),('stdout.log','stdout'),('stderr.log','stderr')]: item = identity(root / name) assert {k:item[k] for k in ['bytes','sha256']} == result[key] evidence.append(item) oracle_path = base / 'current-oracle-1/result.json' oracle = read(oracle_path) assert oracle['passed'] and oracle['sourceInputs'] == source_inputs evidence.append(identity(oracle_path)) for name in ['missing.stdout.json','missing.stderr.log','complete.stdout.json','complete.stderr.log']: evidence.append(identity(oracle_path.parent / name)) for name in ['fixtures/missing-include/project.arcadia','fixtures/functions-to-discover.arcadia']: evidence.append(identity(base / name)) binary = next(b for b in binary_record['binaries'] if b['name'] == 'arcadia-studio') actual = identity(Path(binary['path'])) assert all(actual[key] == binary[key] for key in ['bytes','sha256']) manifest = {'nativeReady':True, 'target':'x86_64-pc-windows-gnullvm', 'scope':'Development diagnostic GUI trial only; no integrated package or release acceptance.', 'sourceInputs':source_inputs, 'binary':actual, 'evidence':evidence} path = base / 'launch-manifest-final-1.json' with path.open('x', encoding='utf-8', newline='\n') as output: json.dump(manifest, output, indent=2) output.write('\n') print(json.dumps(identity(path)))