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:
@@ -20,6 +20,7 @@ func _run() -> void:
|
||||
_test_after_mutation_notifications_are_atomic()
|
||||
_test_deferred_failure_backlog_and_exact_retry()
|
||||
_test_daily_payroll_financials_and_crosslink_tamper()
|
||||
_test_legacy_financial_calendar()
|
||||
_cleanup()
|
||||
if _failures == 0:
|
||||
print("PASS: %d checks" % _checks)
|
||||
@@ -57,7 +58,7 @@ func _test_disabled_compatibility_and_enable() -> void:
|
||||
_expect(not disabled[&"enabled"], "Operations remain disabled for existing Runtime tests")
|
||||
var disabled_snapshot: Dictionary = _runtime.create_snapshot()
|
||||
var disabled_runtime: Dictionary = disabled_snapshot[&"systems"][&"runtime"]
|
||||
_expect(int(disabled_runtime[&"runtime_schema_version"]) == 9, "Runtime snapshot advances to schema v9")
|
||||
_expect(int(disabled_runtime[&"runtime_schema_version"]) == 13, "Runtime snapshot advances to schema v13")
|
||||
_expect(
|
||||
disabled_runtime[&"operations"] == {
|
||||
&"wrapper_version": 1,
|
||||
@@ -226,7 +227,7 @@ func _test_deferred_failure_backlog_and_exact_retry() -> void:
|
||||
&"phase": phase,
|
||||
}
|
||||
)
|
||||
_clock.set_speed(4)
|
||||
_clock.set_speed(3)
|
||||
var processed: int = _clock.process_real_delta(5.0)
|
||||
var failed_report: Dictionary = _runtime.get_operations_report()
|
||||
_expect(
|
||||
@@ -297,9 +298,9 @@ func _test_daily_payroll_financials_and_crosslink_tamper() -> void:
|
||||
var settlement: Dictionary = summary.get(&"settlement", {})
|
||||
_expect(
|
||||
_clock.absolute_minute == 1_800 \
|
||||
and int(summary.get(&"closed_at", -1)) == 1_800 \
|
||||
and int(summary.get(&"closed_at", -1)) == 1_440 \
|
||||
and int(summary[&"category_totals"][&"wages"]) == 120,
|
||||
"06:00 closes Day 1 once and accrues only the new daily wage"
|
||||
"00:00 closes Day 1 once and accrues only the new daily wage"
|
||||
)
|
||||
_expect(
|
||||
int(settlement.get(&"paid_total", -1)) == 120 \
|
||||
@@ -314,7 +315,7 @@ func _test_daily_payroll_financials_and_crosslink_tamper() -> void:
|
||||
_expect(
|
||||
wage_entries.size() == 1 \
|
||||
and wage_entries[0].category == &"WAGE" \
|
||||
and wage_entries[0].absolute_minute == 1_800 \
|
||||
and wage_entries[0].absolute_minute == 1_440 \
|
||||
and wage_entries[0].amount == 120,
|
||||
"paid payroll posts one canonical WAGE ledger line at the closing boundary"
|
||||
)
|
||||
@@ -363,6 +364,7 @@ func _test_daily_payroll_financials_and_crosslink_tamper() -> void:
|
||||
downgraded[&"systems"][&"runtime"].erase(&"kitchen_production")
|
||||
downgraded[&"systems"][&"runtime"].erase(&"elevators")
|
||||
downgraded[&"systems"][&"runtime"].erase(&"legacy_stairs")
|
||||
preload("res://tests/fixtures/pre_upkeep_runtime.gd").strip_empty_upkeep(downgraded[&"systems"][&"runtime"])
|
||||
for infrastructure_key: StringName in [&"excavation", &"spatial_subslots", &"route_projection", &"facility_infrastructure"]:
|
||||
downgraded[&"systems"][&"runtime"].erase(infrastructure_key)
|
||||
downgraded[&"systems"][&"runtime"][&"path"][&"schema_version"] = 3
|
||||
@@ -376,6 +378,35 @@ func _test_daily_payroll_financials_and_crosslink_tamper() -> void:
|
||||
)
|
||||
|
||||
|
||||
func _test_legacy_financial_calendar() -> void:
|
||||
_reset_runtime(811_005)
|
||||
_expect(_runtime.submit_command(&"hire_staff_candidate", {&"candidate_id": &"staff_akane", &"current_cell": Vector3i.ZERO}).is_success(), "legacy Runtime fixture hires a real wage-bearing employee")
|
||||
_expect(bool(_runtime.enable_production_operations().get(&"ok", false)), "legacy Runtime fixture enables operations")
|
||||
# Reproduce the old calendar and its zero-arrears counter. Payroll and ledger
|
||||
# entries stay untouched; only the new loss metadata is converted to v3 semantics.
|
||||
_runtime.operations_coordinator._legacy_calendar_last_day = 1
|
||||
_clock.advance_minutes(1440)
|
||||
var snapshot: Dictionary = _runtime.create_snapshot()
|
||||
var old: Dictionary = snapshot[&"systems"][&"runtime"][&"operations"][&"coordinator"]
|
||||
old[&"schema_version"] = 3
|
||||
old.erase(&"legacy_calendar_last_day")
|
||||
old.erase(&"legacy_history_last_day")
|
||||
old[&"consecutive_insolvency_count"] = 0
|
||||
for row: Dictionary in old[&"day_summaries"]:
|
||||
row[&"consecutive_insolvency_count"] = 0
|
||||
old[&"alerts"] = (old[&"alerts"] as Array).filter(func(row: Dictionary) -> bool: return String(row.get(&"code", "")) != "LOSS_STREAK")
|
||||
_expect(int(old[&"day_summaries"][0][&"settlement"][&"paid_total"]) == 120, "legacy fixture contains an actual paid payroll at 06:00")
|
||||
_expect(_runtime.restore_snapshot(snapshot), "Runtime restores v3 06:00 payroll and ledger crosslinks")
|
||||
_clock.advance_minutes(1440)
|
||||
_expect(_runtime.operations_coordinator.get_day_summary(2)[&"closed_at"] == 3240, "legacy open day completes at 06:00 once")
|
||||
var transition: Dictionary = _runtime.create_snapshot()
|
||||
_expect(_runtime.restore_snapshot(transition), "Runtime restores the transition checkpoint")
|
||||
_clock.advance_minutes(1080)
|
||||
var summary: Dictionary = _runtime.operations_coordinator.get_day_summary(3)
|
||||
_expect(summary[&"closed_at"] == 4320 and summary[&"period_start_minute"] == 3240, "Runtime transitions to midnight with a continuous 18-hour financial period")
|
||||
_expect(_runtime.restore_snapshot(_runtime.create_snapshot()), "midnight transition preserves payroll and ledger crosslinks on load")
|
||||
|
||||
|
||||
func _rejects_atomically(candidate: Dictionary) -> bool:
|
||||
var before: Dictionary = _runtime.create_snapshot()
|
||||
return not _runtime.restore_snapshot(candidate) \
|
||||
|
||||
Reference in New Issue
Block a user