Files

47 lines
9.4 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# coding: utf-8
from pathlib import Path
import json,hashlib,gzip,copy
R=Path('/Users/korizatou114/Projects/とりにく工房ゲーム制作部');A=R/'artifacts/original-completion-2026-10-02';D=R/'docs/plans/original-completion-2026-10-02';O=A/'p23-02-native-input-copy-integration-r337';O.mkdir();B=O/'before';B.mkdir()
names=['IMPLEMENTATION_PLAN.md','PROGRESS_INTEGRATION.md','work_packages.json','progress_snapshot.json']
for n in names:(B/n).write_bytes((D/n).read_bytes())
def pin(p):
b=p.read_bytes();return dict(path=str(p),bytes=len(b),sha256=hashlib.sha256(b).hexdigest())
old=json.loads((A/'p23-02-current-progress-disposition-r320.json').read_text())
v={k:copy.deepcopy(old[k]) for k in ['plan_id','production','selected_working_candidate','conditions','Windows_only_blocked_ids','manual_deferred_not_waived']}
v.update(source_matrix=pin(A/'p23-02-current-progress-disposition-r320.json'),scope='Current r333/library334 finite evidence; 17 original conditions remain unaccepted',latest_implementation_candidate=pin(A/'p23-02-native-input-copy-candidate-r333/input.json'),latest_library=pin(A/'p23-02-native-input-copy-build-r334/libtree_numeric_core.macos.template_debug.dylib'),latest_local_review=pin(A/'p23-02-native-input-copy-local-actual-independent-review-r335.json'),latest_whole_review=pin(A/'p23-02-native-input-copy-whole-actual-independent-review-r336.json'),accepted_condition_count=0,remaining_condition_count=17,unit_accepted=False,formal_completion_allowed=False,packages=30,delivery_units=88,partial_credit=False,test_counts_used_as_completion=False,candidate_selected=False,candidate_adopted=False,next_action='Review remaining dominant synchronous Runtime/Guest operations and consolidate required changes; do not replay rejected r204 reconstruction or repeat full regression on this unselected finite trial')
assert len(v['conditions'])==17 and all(not q['accepted'] for q in v['conditions'])
for q in v['conditions']:
q['current_missing']='同一最終対象版で原条件全体を確認し受入統合。r333/library334局所・S6・全保存状態の有限証拠を条件全体へ拡張しない。' if q['id'] not in ['C08','X8'] else '同一最終Windows配布版の実機・表示倍率・viewport・操作・必要性能証拠'
matrix=A/'p23-02-current-progress-disposition-r337.json';matrix.write_text(json.dumps(v,ensure_ascii=False,indent=2)+'\n')
summary='P23-02着手中。制作r32と選定済み実装親r274/library275は保持。最新未選定・未採用候補r333/library334は、親r326の在庫入力キー整列と経路コピーだけをnative化。未捕捉std確保例外をビルド前に修復。bridge1/link1、SDKcompile0、既存stage再利用。局所4工程404/0、Runtime150候補105808bytes・評価後11411840bytes原golden全文一致。S6 24/0、両whole15/0、after647全11487732bytes原oracle全文一致を独立有限受理。単一隣接観測1037100→1010883us(約2.5279%短縮)だが約1.01秒停止が残り安定性能・50ms/P95/D10は未受入。r204再構築は既非採用のため再実装なし。原9横断8はすべて未受入、Windows C08/X8のみblock、手動Ctrl保持wheel/左ボタン保持dragは延期・未達・非免除。正式9/着手19/予定60、30パッケージ/88成果、部分点なし、今回正式完了追加0。'
wp=json.loads((D/'work_packages.json').read_text());p=next(q for q in wp if q['id']=='P23');u=next(q for q in p['remaining_deliverables'] if q['id']=='P23-02')
p['current_summary']=summary;p['updated_at_jst']='2026-10-12';u['progress_summary']=summary;u['updated_at_jst']='2026-10-12';u['acceptance_matrix_reference']=str(matrix)
u['remaining_gaps']=['原9条件C01-C09と横断8条件X1-X8は全未受入。版付き全文条件はcurrent r337 matrixを参照。','性能:候補約1.01秒同期停止。安定利益・50ms・P95・D10・実時間x3・通常OS操作追随は未達。','原全操作・小画面・保存再起動・境界中断・同版関連/最終必須全回帰と独立受入を統合する。','Windows C08/X8:同一最終配布版の実機倍率/viewport/操作/性能証拠。未確定値は設定しない。','手動Ctrl保持wheelと左ボタン保持dragは延期、免除しない。','未選定/未採用候補の有限成功を成果単位完了へ拡張しない。']
assert u['state']=='in_progress'
for e in [str(matrix),str(D/'execution/CURRENT_NATIVE_INPUT_COPY_R332_R337.md')]:
if e not in u['evidence']:u['evidence'].append(e)
(D/'work_packages.json').write_text(json.dumps(wp,ensure_ascii=False,indent=2)+'\n')
ps=json.loads((D/'progress_snapshot.json').read_text());ps['integrated_at_jst']='2026-10-12';ps['current_native_input_copy_r337']=dict(plan_id='P23-02',summary=summary,matrix=pin(matrix),official_completed_added=0,unit_accepted=False,candidate_selected=False,candidate_adopted=False)
assert ps['current_delivery_state_counts']==dict(completed=9,in_progress=19,planned=60)
(D/'progress_snapshot.json').write_text(json.dumps(ps,ensure_ascii=False,indent=2)+'\n')
text='\n## P23-02 現着手・次に閉じる1件(r337、2026-10-12)\n\n'+summary+'\n\n全17条件・対象版・不足条件の現在authorityは `artifacts/original-completion-2026-10-02/p23-02-current-progress-disposition-r337.json`。詳細と保存証拠は `execution/CURRENT_NATIVE_INPUT_COPY_R332_R337.md`。依存P08/P22。過去の候補版に関する後続記載は履歴であり、最新対象版の受入証拠へ無条件転用しない。\n\n'
for n in ['IMPLEMENTATION_PLAN.md','PROGRESS_INTEGRATION.md']:
s=(D/n).read_text();i=s.index('\n');(D/n).write_text(s[:i+1]+text+s[i+1:])
note='# P23-02 native入力整列・経路コピー r332–r337\n\n'+summary+'\n\n対象候補r333/library334、原制作r32、選定済み実装親r274/library275を区別する。最終受入対象版とWindows配布版は未確定。依存P08/P22。下表は原条件を変更せず、各条件は部分点なしで未受入を維持する。\n\n| ID | 全受入条件 | 状態 |\n|---|---|---|\n'
for q in v['conditions']:note+='| '+q['id']+' | '+q['condition'].replace('|',' / ')+' | '+('Windows実機block' if q['id'] in ['C08','X8'] else '着手中・未受入')+' |\n'
note+='\n条件ごとの全文説明・必要対象版・歴史証拠・不足条件はcurrent r337 matrixに保持。現在候補の有限証拠はbuild334、local335、whole336の入力・実行記録・独立レビュー・root。キー内部順/native分岐の直接観測やOOM実fault injectionは未実施で、静的catch支持に限定する。新sortのstd例外とconfig誤記は実行前に修復しbeforeソース/入力を保持した。経路再構築の既不採用r204を再実装していない。\n\n静的24、build前68、build実85、局所前39、局所実93、whole前43、whole実82の各root pinsをfresh再照合。制作ソース・既定保存先・stage・Budget/project・SDK・検証supportを保持/復元した。最終全172の追加実行0、SDKcompile0、stageclone0。必須最終回帰を免除せず、関連修正が安定した正確な最終版で実行する。\n\n次に閉じる1件はP23-02。約1秒残る同期処理について主要なRuntime/Guest処理を直接検討し、必要な関連変更をまとめる。性能不足を満たす修正がないまま微小変更の単一pairや全回帰を繰り返さない。完成、採用、安定性能の判定は行わない。\n\n保存コピーはcheckpoints/native-input-copy-r332-r337/manifest.json。全コピーは復元byte一致を確認し、原本を保持する。r337で変更前D4を保存し、旧レビューの文書contextを歴史証拠として保存した。\n'
(D/'execution/CURRENT_NATIVE_INPUT_COPY_R332_R337.md').write_text(note)
files=[]
for n in ['p23-02-native-input-copy-candidate-r333','p23-02-native-input-copy-build-r334','p23-02-native-input-copy-local-r335','p23-02-native-input-copy-whole-r336','p23-02-native-input-copy-integration-r337']:
files.extend(q for q in (A/n).rglob('*') if q.is_file())
files.extend(q for q in A.glob('p23-02-native-input-copy-*') if q.is_file())
files.append(matrix)
files.extend(Path('/private/tmp')/n for n in ['thetree-prepare-input-copy-r333.py','thetree-plan-input-copy-local-r335.py','thetree-plan-input-copy-whole-r336.py','thetree-integrate-input-copy-r337.py'])
dest=D/'checkpoints/native-input-copy-r332-r337';dest.mkdir();rows=[]
for i,q in enumerate(sorted(set(files))):
raw=q.read_bytes();compressed=len(raw)>10000 and q.suffix not in ['.cpp','.hpp','.inc','.zst'];stored=gzip.compress(raw,mtime=0) if compressed else raw;out=dest/(f'{i:03d}-'+q.name+('.gz' if compressed else ''));out.write_bytes(stored)
assert (gzip.decompress(out.read_bytes()) if compressed else out.read_bytes())==raw
rows.append(dict(original=pin(q),stored=pin(out),gzip=compressed))
(dest/'manifest.json').write_text(json.dumps(dict(plan_id='P23-02',candidate='r333/library334',copies=rows,unit_accepted=False,performance_accepted=False),ensure_ascii=False,indent=2)+'\n');(dest/'.gdignore').write_text('');(dest/'README.md').write_text('# Native input-copy finite evidence r332–r337\n\nSources, input/build/local/whole evidence, independent receipts, root verifications and original document context are retained. All stored copies roundtrip to every original byte. No production adoption, performance or unit acceptance.\n')
print(dict(copies=len(rows),raw_bytes=sum(q['original']['bytes'] for q in rows),stored_bytes=sum(q['stored']['bytes'] for q in rows),official_completed_added=0))