Record original-alignment implementation and traceability checkpoint
Capture current source, content data, tests, asset licenses, and original-specification traceability. Original implementation remains incomplete. The accepted matching UI generation passed 154 suites and 12,253 checks, with eight rendered staff-contract screens reviewed. Latest native Windows and full-original acceptance remain outstanding.
This commit is contained in:
@@ -30,6 +30,7 @@ func _run() -> void:
|
||||
_test_catalog_bootstrap_and_queries()
|
||||
_test_progression_resource_and_guest_facts()
|
||||
_test_catalog_staff_hire_transaction()
|
||||
_test_unique_runtime_protection()
|
||||
_test_rank_two_three_and_atomic_failure()
|
||||
_test_v3_migration_and_v4_tamper_guards()
|
||||
_test_twenty_four_hour_replay()
|
||||
@@ -71,7 +72,7 @@ func _test_catalog_bootstrap_and_queries() -> void:
|
||||
_expect(bool(report[&"valid"]), "MVP catalog report is valid")
|
||||
_expect(int(report[&"counts"]["guest_classes"]) == 8, "catalog exposes eight Guest classes")
|
||||
_expect(int(report[&"counts"]["species"]) == 4, "catalog exposes four independent species")
|
||||
_expect(int(report[&"counts"]["staff_candidates"]) == 20, "catalog exposes twenty fixed Staff candidates")
|
||||
_expect(int(report[&"counts"]["staff_candidates"]) == 21, "catalog exposes twenty-one fixed Staff candidates")
|
||||
_expect(int(report[&"counts"]["unique_characters"]) == 2, "catalog exposes both unique characters")
|
||||
var catalog_ids: Array[StringName] = _runtime.get_mvp_guest_definition_ids()
|
||||
_expect(catalog_ids.size() == 32, "Runtime registers every class/species Guest definition")
|
||||
@@ -382,6 +383,7 @@ func _test_v3_migration_and_v4_tamper_guards() -> void:
|
||||
v3_runtime.erase(&"kitchen_production")
|
||||
v3_runtime.erase(&"elevators")
|
||||
v3_runtime.erase(&"legacy_stairs")
|
||||
preload("res://tests/fixtures/pre_upkeep_runtime.gd").strip_empty_upkeep(v3_runtime)
|
||||
v3_runtime[&"path"][&"schema_version"] = 3
|
||||
v3_runtime[&"path"].erase(&"vertical_walk_blockers")
|
||||
v3_runtime[&"path"].erase(&"vertical_walk_requires_connector")
|
||||
@@ -402,7 +404,7 @@ func _test_v3_migration_and_v4_tamper_guards() -> void:
|
||||
_expect(int(_runtime.progression_service.metrics[&"guest_lifetime"]) == 2, "v3 migration derives lifetime Guests from active plus persistent records")
|
||||
_expect(_runtime.get_mvp_guest_definition_ids().size() == 32, "v3 migration registers the current 32 catalog definitions")
|
||||
var migrated: Dictionary = _runtime.create_snapshot()
|
||||
_expect(int(migrated[&"systems"][&"runtime"][&"runtime_schema_version"]) == 9, "v3 migration emits canonical Runtime schema v9")
|
||||
_expect(int(migrated[&"systems"][&"runtime"][&"runtime_schema_version"]) == 13, "v3 migration emits canonical Runtime schema v13")
|
||||
var digest := SimulationDigest.compute(migrated)
|
||||
_expect(_runtime.restore_snapshot(migrated), "canonical v9 snapshot restores")
|
||||
_expect(SimulationDigest.compute(_runtime.create_snapshot()) == digest, "canonical v9 restore is exact")
|
||||
@@ -505,3 +507,24 @@ func _expect(condition: bool, label: String) -> void:
|
||||
return
|
||||
_failures += 1
|
||||
push_error(" ✗ %s" % label)
|
||||
|
||||
|
||||
func _test_unique_runtime_protection() -> void:
|
||||
_reset_runtime(82_017)
|
||||
var staff_before: Dictionary = _runtime.staff_service.create_snapshot()
|
||||
var economy_before: Dictionary = _runtime.economy_service.create_snapshot()
|
||||
for id: StringName in _runtime.mvp_content_catalog.get_unique_character_ids():
|
||||
var forged: CommandResult = _runtime.submit_command(&"register_staff", {
|
||||
&"staff_id": id, &"role_id": &"receptionist", &"options": {&"employment_kind": &"FREE_HIRE"}})
|
||||
_expect(not forged.is_success() and _runtime.staff_service.create_snapshot() == staff_before and _runtime.economy_service.create_snapshot() == economy_before, "reserved unique identity cannot bypass its protected recruitment contract")
|
||||
# Generic legacy fixture checks UNIQUE behavior without inventing Anri's joining conditions.
|
||||
var created: CommandResult = _runtime.submit_command(&"register_staff", {
|
||||
&"staff_id": &"unique_runtime_fixture", &"role_id": &"receptionist",
|
||||
&"options": {&"employment_kind": &"UNIQUE", &"daily_wage": 75, &"current_cell": Vector3i.ZERO}})
|
||||
_expect(created.is_success() and _runtime.economy_service.create_snapshot() == economy_before, "unique runtime fixture registers without signing payment")
|
||||
var report: Dictionary = _runtime.get_staff_management_report()
|
||||
_expect(report[&"staff"].size() == 1 and report[&"staff"][0][&"daily_wage"] == 0, "normal staff panel report shows effective zero unique wage")
|
||||
var before: Dictionary = _runtime.create_snapshot()
|
||||
_expect(not _runtime.staff_service.retire_staff(&"unique_runtime_fixture").is_success() and _runtime.create_snapshot() == before, "unique retirement rejection preserves complete runtime including paths and ledger")
|
||||
_expect(_runtime.restore_snapshot(before) and _runtime.create_snapshot() == before, "runtime unique snapshot restores exactly")
|
||||
_expect(_runtime.get_staff_management_report()[&"staff"][0][&"daily_wage"] == 0 and _runtime.staff_service.get_daily_payroll_total() == 0, "restored runtime and UI both retain zero unique upkeep")
|
||||
|
||||
Reference in New Issue
Block a user