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
+8 -1
View File
@@ -1,4 +1,5 @@
extends SceneTree
const FixtureCleanup := preload("res://tests/helpers/ui_audio_fixture_cleanup.gd")
## Normal UI commands, default funds, and natural arrivals only. No demo fixture.
## Optional THE_TREE_OPENING_CAPTURE=1 renders the new-game and close screens.
@@ -169,7 +170,8 @@ func _run() -> void:
await _capture("second-morning")
var evidence := {"lodging_sales": lodging_sales, "report": _ledger.get_report(), "staff_count": _runtime.staff_service.get_staff_members().size()}
print("FIRST_OPERATING_DAY_REPORT ", JSON.stringify(evidence))
var evidence_path := ProjectSettings.globalize_path("res://artifacts/first-operating-day/operating-report.json")
var evidence_dir := OS.get_environment("THE_TREE_FIRST_OPERATING_EVIDENCE_DIR")
var evidence_path := ProjectSettings.globalize_path("res://artifacts/first-operating-day/operating-report.json" if evidence_dir.is_empty() else evidence_dir.path_join("operating-report.json"))
DirAccess.make_dir_recursive_absolute(evidence_path.get_base_dir())
var evidence_file := FileAccess.open(evidence_path, FileAccess.WRITE)
if evidence_file != null:
@@ -241,5 +243,10 @@ func _expect(condition: bool, message: String) -> void:
func _finish() -> void:
var _audio_cleanup_final: Dictionary = await FixtureCleanup.free_owner_and_wait(self, _main)
if not bool(_audio_cleanup_final.get(&"passed", false)):
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_final))
quit(96)
return
print("First operating day: %d checks, %d failures" % [_checks, _failures])
quit(1 if _failures > 0 else 0)