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.
This commit is contained in:
Takeshi
2026-10-11 15:58:00 +09:00
parent 39f6068461
commit b84bade045
235 changed files with 495831 additions and 312 deletions
+7 -5
View File
@@ -1,5 +1,7 @@
extends SceneTree
const AudioTeardown := preload("res://tests/helpers/ui_audio_teardown.gd")
## Normal build/purchase commands: UI drafts, money/stock reconciliation, queued
## purchases and an isolated save slot. No free inventory is inserted.
var _checks := 0
@@ -52,7 +54,7 @@ func _run() -> void:
_panel = _main.find_child("SupplyManagementPanel", true, false) as SupplyManagementPanel
_expect(_panel != null, "normal scene includes supply management")
if _panel == null:
_finish()
await _finish()
return
(_main.get("navigation_buttons")[&"product"] as Button).pressed.emit()
_expect(_panel.visible and _panel.purchase_button.disabled, "product opens a safe empty state before any warehouse exists")
@@ -75,7 +77,7 @@ func _run() -> void:
_kitchens.append(facility.instance_id)
_expect(not _warehouse.is_empty() and _kitchens.size() == 2, "paid construction produces a warehouse and two kitchens")
if _warehouse.is_empty() or _kitchens.size() != 2:
_finish()
await _finish()
return
_main.call("_activate_management_mode", &"product")
_panel.refresh()
@@ -85,7 +87,7 @@ func _run() -> void:
_test_kitchen_drafts()
_test_saved_pending_purchase()
await _test_navigation_and_layout()
_finish()
await _finish()
func _test_purchase_and_failure() -> void:
@@ -259,7 +261,7 @@ func _expect(condition: bool, message: String) -> void:
func _finish() -> void:
SaveService.delete_save(_save_path)
if is_instance_valid(_main):
_main.queue_free()
var teardown: Dictionary = await AudioTeardown.free_owner_and_wait(self, _main)
_expect(bool(teardown.get(&"passed", false)) and not bool(teardown.get(&"deadline_reached", true)), "owned audio references release before bounded teardown deadline with whole Runtime unchanged")
print("Supply management UI: %d checks, %d failures" % [_checks, _failures])
quit(1 if _failures > 0 else 0)