27 lines
3.3 KiB
Python
27 lines
3.3 KiB
Python
# coding: utf-8
|
|
from pathlib import Path
|
|
import json
|
|
R=Path('/Users/korizatou114/Projects/とりにく工房ゲーム制作部');A=R/'artifacts/original-completion-2026-10-02';O=A/'p23-02-native-hot-loop-whole-r330';assert not O.exists();O.mkdir()
|
|
def write(p,s):
|
|
with p.open('x') as f:f.write(s)
|
|
qa=(A/'p23-02-native-guest-bulk-impact-whole-r317/whole.gd').read_text().replace('r274/library275 versus Guest bulk r313-r02/library314-r02','Guest bulk r313-r02/library314-r02 versus hot-loop r326/library327').replace('baseline r274/library275 versus Guest bulk r313-r02/library314-r02','baseline Guest bulk r313-r02/library314-r02 versus hot-loop r326/library327')
|
|
write(O/'whole.gd',qa)
|
|
for mode in ['baseline','candidate']:
|
|
s=(A/'p23-02-native-guest-bulk-impact-whole-r317/candidate-guarded.gd').read_text().replace('p23-02-native-guest-bulk-impact-whole-r317/whole.gd','p23-02-native-hot-loop-whole-r330/whole.gd')
|
|
if mode=='candidate':s=s.replace('p23-02-native-guest-bulk-local-r315/candidate.gdextension','p23-02-native-hot-loop-local-r329/candidate.gdextension')
|
|
write(O/(mode+'-guarded.gd'),s)
|
|
s=(A/'p23-02-native-guest-bulk-impact-whole-r317/s6-guarded.gd').read_text().replace('p23-02-native-guest-bulk-local-r315/candidate.gdextension','p23-02-native-hot-loop-local-r329/candidate.gdextension');write(O/'s6-guarded.gd',s)
|
|
s=(A/'p23-02-native-guest-bulk-impact-whole-r317-r03.py').read_text().replace('p23-02-native-guest-bulk-impact-whole-r317-r03','p23-02-native-hot-loop-whole-r330').replace('p23-02-native-guest-bulk-impact-whole-preexecution-independent-review-r317-r03','p23-02-native-hot-loop-whole-preexecution-independent-review-r330')
|
|
s=s.replace("assert r.read(fixed['local_review']['path'])['finite_local_equivalence_accepted']","assert r.read(fixed['local_review']['path'])['finite_local_equivalence_accepted']")
|
|
s=s.replace("for mode in ['candidate']:","for mode in ['s6','baseline','candidate']:",1)
|
|
s=s.replace("pairs=[]\n passed=error is None and not guard_errors and not cleanup_errors and len(phases)==1 and len(samples)==1", """pairs=[]
|
|
if len(samples)==3 and all(q.get('passed') for q in samples):
|
|
old_sample,new_sample=samples[1],samples[2]
|
|
assert old_sample['candidate']=='baseline' and new_sample['candidate']=='candidate'
|
|
pairs=[dict(baseline_us=old_sample['manual_tick_us'],candidate_us=new_sample['manual_tick_us'],ratio=new_sample['manual_tick_us']/old_sample['manual_tick_us'],scope='One adjacent uninstrumented fixed cold646 observation; no stable/P95/budget acceptance')]
|
|
passed=error is None and not guard_errors and not cleanup_errors and len(phases)==3 and len(samples)==3 and len(pairs)==1""")
|
|
s=s.replace('One candidate whole647 continuation only. Prior S6 and baseline evidence reused after partial review; no adjacent pair claim. Original driver assertion cause remains unproven.','One current hot-loop S6 and adjacent whole647 baseline313/library314 versus candidate326/library327 pair only. Each whole state equals original oracle; three fresh owned engines sequential on same unchanged315 Guest/Runtime stage. Historical317 assertion remains a separate retained failed execution.')
|
|
write(A/'p23-02-native-hot-loop-whole-r330.py',s)
|
|
compile(s,str(A/'p23-02-native-hot-loop-whole-r330.py'),'exec')
|
|
print('Prepared original S6 + single adjacent uninstrumented whole pair; no execution.')
|