Files
Takeshi b84bade045 Save The Tree implementation and acceptance work in progress
Preserve production code, regression fixtures, audio assets and provenance, test infrastructure, and the original-completion plan and progress ledger. Final game and Windows acceptance remain pending; excluded local artifacts and native experiments are not part of this snapshot.
2026-10-11 15:58:00 +09:00

105 lines
9.9 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.
"""Integrate the preservation-fixed full regression without promoting game acceptance."""
from collections import Counter
from datetime import datetime
import hashlib
import json
from pathlib import Path
from zoneinfo import ZoneInfo
ROOT = Path(__file__).resolve().parents[4]
PLAN = ROOT / "docs/plans/original-completion-2026-10-02"
PREFIX = "artifacts/original-completion-2026-10-02/"
NOW = datetime.now(ZoneInfo("Asia/Tokyo")).isoformat()
def read(path):
return json.loads((ROOT / path).read_text())
def sha(path):
return hashlib.sha256((ROOT / path).read_bytes()).hexdigest()
def write(path, value):
(ROOT / path).write_text(json.dumps(value, ensure_ascii=False, indent=2) + "\n")
def evidence(path, scope):
return {"path": path, "sha256_at_integration": sha(path), "scope": scope,
"linked_at_jst": NOW, "current_game_acceptance_inferred": False}
def main():
regression_path = PREFIX + "full-regression-r02/verification.json"
regression = read(regression_path)
assert regression["passed"] and regression["suites"] == 158 and regression["checks"] == 12707 and not regression["changed_paths"]
opening = PREFIX + "p02-opening-restart-r02/"
assert all(r["passed"] for r in read(opening + "result.json")) and read(opening + "source-change.json") == []
full_map = read(PREFIX + "full-regression-r02/source-end.json")
opening_map = read(opening + "source-start.json")
assert all(full_map.get(p) == digest for p, digest in opening_map.items())
assert all(sha(p) == digest for p, digest in full_map.items())
acceptance_path = PREFIX + "p03-save-preservation-r02/adoption-acceptance.json"
assert not (ROOT / acceptance_path).exists(), "Keep prior checkpoint generations"
write(acceptance_path, {"scope": "limited SaveService preservation fix adoption, not full P03/game acceptance", "source_map": PREFIX + "full-regression-r02/source-end.json", "source_map_sha256": sha(PREFIX + "full-regression-r02/source-end.json"), "current_source_matches": True,
"merged_regression": evidence(regression_path, "158 suites/12707 checks/0 failures/source changes0"),
"opening_restart": evidence(opening + "result.json", "rendered normal UI signals; 83 writer+20 reader checks"),
"merge_receipt": evidence(PREFIX + "p03-save-preservation-r02/merge.json", "immutable focused acceptance/merge receipt"),
"standard_full_regression_after_merge_completed": True, "normal_pointer_human_play": False, "windows_acceptance": False, "original_full_acceptance": False, "accepted_at_jst": NOW})
plan_rel = "docs/plans/original-completion-2026-10-02/"
snapshot = read(plan_rel + "progress_snapshot.json")
snapshot.setdefault("regression_history", []).append(snapshot["latest_regression_at_evidence_time"])
snapshot["latest_regression_at_evidence_time"] = {"path": regression_path, "sha256": sha(regression_path),
"started_at_jst": regression["started_at_jst"], "finished_at_jst": regression["finished_at_jst"],
"suites": 158, "checks": 12707, "failures": 0, "source_changes_during_run": [],
"source_map_path": PREFIX + "full-regression-r02/source-end.json", "source_map_sha256": sha(PREFIX + "full-regression-r02/source-end.json"), "source_map_entries": len(full_map),
"current_source_delta_observed_after_run": [], "future_source_changes_auto_accepted": False,
"original_full_acceptance": False, "windows_acceptance": False,
"current_applicability": "current production source matches all 1208 input paths at checkpoint; P05 unadopted candidate excluded"}
snapshot["save_preservation_adoption"].update(state="merged_full_regression_and_limited_restart_verified", standard_full_regression_after_merge_completed=True, acceptance_path=acceptance_path, acceptance_sha256=sha(acceptance_path))
snapshot["opening_restart_current"] = evidence(opening + "result.json", "103 checks/source change0; current mapped game source319 matches full input1208")
snapshot["remaining_acceptance"] = [s for s in snapshot["remaining_acceptance"] if not s.startswith("未知版/明示候補読取の本体採用後")]
snapshot["integrated_at_jst"] = NOW
packages = read(plan_rel + "work_packages.json")
by_id = {p["id"]: p for p in packages}
by_id["P02"]["current_summary"] = "保存修正後の現版158 suites/12707 checks/失敗0/source差分0、限定通常UI103再開checks。全代表保存・同一Windows実機・全通常操作は未受入。"
by_id["P03"]["current_summary"] = "保存preflight/原状保持/Path guardを本体採用し、現版158回帰12707 checksと通常宿屋103再開checksを確認。全機能保存/移行/再開は未完。"
for pid, did in [("P02", "P02-01"), ("P03", "P03-01"), ("P03", "P03-02")]:
row = next(d for d in by_id[pid]["remaining_deliverables"] if d["id"] == did)
row["evidence"].append(evidence(regression_path, "現保存修正版の標準158回帰、12707 checks/source差分0"))
row["updated_at_jst"] = NOW
row = next(d for d in by_id["P03"]["remaining_deliverables"] if d["id"] == "P03-01")
row["evidence"].append(evidence(acceptance_path, "保存原状保持限定修正の統合受入"))
row["progress_summary"] = "保存preflight、未知/未来formal保護、明示backup純読取を本体採用し現版158回帰12707 checksが合格。限定宿屋の同版保存再開103 checksも確認。全機能保存契約は未完。"
row["remaining_gaps"] = [g for g in row["remaining_gaps"] if not g.startswith("採用SaveService SHA")]
for pid, did in [("P02", "P02-02"), ("P03", "P03-03")]:
row = next(d for d in by_id[pid]["remaining_deliverables"] if d["id"] == did)
row["evidence"].append(evidence(opening + "result.json", "保存修正後の描画付き通常UI/宿屋営業の83+20再開checks、human pointer受入ではない"))
row["evidence"].append(evidence(opening + "source-change.json", "再開実行中のソース差分0"))
row["progress_summary"] = "保存修正後の同版で通常UIから宿屋開業/3日決算/保存/別process再開を103 checks確認。全機能途中再開は未完。"
row["remaining_gaps"] = [g for g in row.get("remaining_gaps", []) if "今後のSAVE採用後" not in g]
row["updated_at_jst"] = NOW
p05 = next(d for d in by_id["P05"]["remaining_deliverables"] if d["id"] == "P05-01")
p05.update(state="in_progress", progress_summary="現版158からcanonical20overlayの候補161を構築。partial受入のr01環境guard誤判定/r02旧manual helper契約誤期待を保持、QA修正/追加境界/最終全回帰は未完。", updated_at_jst=NOW,
remaining_gaps=["旧QA helperの重複キー契約を正しい現本体の拒否契約へ補正し再検証。", "enabled-auto5境界、標準新testのfixture整合、PNG目視、最終同一source全回帰、本体採用が未完。"])
p05.setdefault("evidence", []).extend([evidence(PREFIX + "p05-current-stage-input-r01/preparation.json", "current base158/candidate161 isolated inputs, engine0"), evidence(PREFIX + "p05-acceptance-partial-r01/result.json", "失敗履歴:engine objectdb_snapshotsを既存セーブと誤判定"), evidence(PREFIX + "p05-acceptance-partial-r02/result.json", "失敗履歴:旧manual driverはduplicate成功を誤要求;本体未採用")])
snapshot["current_delivery_state_counts"] = dict(Counter(d["state"] for p in packages for d in p["remaining_deliverables"]))
snapshot["p05_partial_rejected"] = evidence(PREFIX + "p05-acceptance-partial-r02/result.json", "QA contract correction pending; does not prove candidate regression failure")
write(plan_rel + "work_packages.json", packages)
write(plan_rel + "progress_snapshot.json", snapshot)
main_plan = PLAN / "IMPLEMENTATION_PLAN.md"
body = main_plan.read_text()
body = body.replace("今回157回帰の実行版は別の1206対象ソース地図で固定", "今回158回帰の実行版は別の1208対象ソース地図で固定")
body = body.replace("SAVE追加採用前の01:14:41〜01:26:28 JST、157スイート、12,473チェック、失敗0、実行中ソース差分0", "保存追加採用後の01:41:43〜01:53:50 JST、158スイート、12,707チェック、失敗0、実行中ソース差分0")
body = body.replace("SAVE追加採用後全回帰、原本全実装、全資産、操作感、Windows", "原本全実装、全資産、全通常操作、Windows")
body = body.replace("SAVE追加修正前の157 suites/12473 checks/失敗0/source差分0を保持。採用後全回帰、代表保存、通常操作、同一Windows配布実機は未受入。", by_id["P02"]["current_summary"])
body = body.replace("preflightとPath guardの限定修正後157回帰あり。追加の未知版原状保持修正を741 focused checksで本体採用、採用後全回帰pending。全機能保存/移行/再開は未完。", by_id["P03"]["current_summary"])
body = body.replace("修正後の全回帰は未完。", "現版158回帰12707 checks/source差分0を確認。")
body += "\n### 実行追記 01:53以降\n\n保存修正後の[158回帰](../../../artifacts/original-completion-2026-10-02/full-regression-r02/verification.json)は12,707 checks、失敗0、source差分0。同版の[通常UI開業/再開](../../../artifacts/original-completion-2026-10-02/p02-opening-restart-r02/result.json)は83+20 checks。以前の157回帰は履歴として保持する。\n\nP05はbase158/candidate161を隔離構築し部分検証に着手したが、runner環境判定と旧QA helperの重複キー契約不一致で停止した。失敗履歴を保持して検証を補正中。候補を本体採用済みとは数えない。全施設/人物/ルート/エンド/図鑑/完成資産/長期プレイ/最大Runtime性能/同一Windows実機は未達を保持する。\n"
main_plan.write_text(body)
print("Checkpoint linked: current158/12707, limited103 restart, P05 partial rejected; game incomplete.")
if __name__ == "__main__":
main()