Files

14 lines
3.3 KiB
Python

# coding: utf-8
from pathlib import Path
import importlib.util,json,shutil
R=Path('/Users/korizatou114/Projects/とりにく工房ゲーム制作部');A=R/'artifacts/original-completion-2026-10-02';O=A/'p23-02-native-hot-loop-whole-r330';C=A/'p23-02-native-hot-loop-candidate-r326';L=A/'p23-02-native-hot-loop-local-r329'
s=importlib.util.spec_from_file_location('prepare330',R/'tools/run_all_tests.py');r=importlib.util.module_from_spec(s);s.loader.exec_module(r)
def pin(p):return dict(path=str(p),bytes=p.stat().st_size,sha256=r.sha(p))
review=A/'p23-02-native-hot-loop-local-actual-independent-review-r329.json';assert r.read(review)['finite_local_equivalence_accepted'];assert r.read(L/'execution.json')['passed'] and shutil.disk_usage(A).free>=528*1048576
v=r.read(A/'p23-02-native-guest-bulk-impact-whole-r317-r03/input.json');stage=A/'p23-02-native-guest-bulk-local-r315/stage';assert r.inventory(stage,stage=True)==v['expected_stage']
fixed={k:q for k,q in v['pins'].items() if k in ['engine','helper','run_all','profile_guard','modified_budget','original_budget','original_path','fixture','oracle','original_s6','original_clock','QA_base','provider_review','provider_root']}
for k,p in dict(config_baseline=A/'p23-02-native-guest-bulk-local-r315/candidate.gdextension',library_baseline=A/'p23-02-native-guest-bulk-build-r314-r02/libtree_numeric_core.macos.template_debug.dylib',config_candidate=L/'candidate.gdextension',new_library=A/'p23-02-native-hot-loop-build-r327/libtree_numeric_core.macos.template_debug.dylib',library_candidate=Path(r.read(L/'input.json')['pins']['private_library']['path']),prepare=Path(__file__),runner=A/'p23-02-native-hot-loop-whole-r330.py',QA=O/'whole.gd',QA_original=A/'p23-02-native-guest-bulk-impact-whole-r317/whole.gd',local_input=L/'input.json',local_review=review,local_root=L/'actual-root-verification.json',candidate_input=C/'input.json',candidate_guest=C/'scripts/guest_service.gd',candidate_runtime=C/'scripts/simulation_runtime.gd',host_review=A/'p23-02-native-hot-loop-build-actual-independent-review-r327.json',host_root=A/'p23-02-native-hot-loop-build-root-verification-r327.json',starter_s6=O/'s6-guarded.gd',starter_baseline=O/'baseline-guarded.gd',starter_candidate=O/'candidate-guarded.gd',diagnostic_reference=A/'p23-02-current-native-diagnostic-actual-independent-review-r323.json').items():fixed[k]=pin(p)
expected=v['expected_stage'];patched=v['patched_stage'];v.update(pins=fixed,stage=str(stage),parent=str(stage),expected_baseline_stage=expected,patched_baseline_stage=patched,source_before=r.source_refs(R),default_before=r.default_player(R),doc4_before={n:r.sha(R/'docs/plans/original-completion-2026-10-02'/n) for n in v['doc4_before']},support_inventory=r.inventory(r.SUPPORT),engine_processes=3,compiler_processes=0,stage_clones=0,full_regression_runs=0,expected_s6_checks=24,expected_whole_checks=15,scope='Same unchanged315 Guest/Runtime stage; original S6 plus uninstrumented adjacent313/library314 vs326/library327 pair; original whole bytes each; no stable gain/budget/adoption acceptance.',reused_prior_s6_checks=0,reused_prior_baseline_checks=0,expected_total_seconds=[5,45],library_copies=0)
with (O/'input.json').open('x') as f:json.dump(v,f,ensure_ascii=False,indent=2);f.write('\n')
print(json.dumps(dict(plan=str(O/'input.json'),pins=len(fixed),engines=3,clone_count=0,free=shutil.disk_usage(A).free)))