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:
Takeshi
2026-09-30 23:52:24 +09:00
parent 6077e02ebe
commit 5dde0c5ec2
490 changed files with 54051 additions and 809 deletions
+24 -2
View File
@@ -29,6 +29,7 @@ func _run() -> void:
_test_automatic_task_progression_once_per_tick()
_test_employment_and_daily_payroll_contract()
_test_retirement_preserves_unpaid_wages()
_test_unique_employment_protection()
_test_daily_payroll_settlement_lifecycle()
_test_payroll_validation_and_idempotency()
_test_payroll_snapshot_migration_and_tamper()
@@ -384,11 +385,11 @@ func _test_employment_and_daily_payroll_contract() -> void:
)
var expected_rows: Array[Dictionary] = [
{&"staff_id": &"staff_a", &"employment_kind": &"ADULT_CONTRACT", &"daily_wage": 240},
{&"staff_id": &"staff_m", &"employment_kind": &"UNIQUE", &"daily_wage": 75},
{&"staff_id": &"staff_m", &"employment_kind": &"UNIQUE", &"daily_wage": 0},
{&"staff_id": &"staff_z", &"employment_kind": &"FREE_HIRE", &"daily_wage": 0},
]
_expect(service.get_daily_payroll_rows() == expected_rows, "daily payroll rows have an exact shape and lexical Staff order")
_expect(service.get_daily_payroll_total() == 315, "daily payroll total is the exact sum of active Staff wages")
_expect(service.get_daily_payroll_total() == 240, "daily payroll total is the exact sum of active Staff wages")
var invalid_service := StaffServiceType.new()
_expect(
@@ -828,3 +829,24 @@ func _expect(condition: bool, label: String) -> void:
return
_failures += 1
push_error(" ✗ %s" % label)
func _test_unique_employment_protection() -> void:
var service := StaffServiceType.new()
var unique := _staff(&"original_unique", 10, {&"employment_kind": &"UNIQUE", &"daily_wage": 75, &"unpaid_wages": 25})
_expect(service.register_staff(unique).is_success(), "legacy unique with stored wage remains loadable")
var before := service.create_snapshot()
for reason: StringName in [&"DISMISSED", &"SOLD", &"REMOVED"]:
_expect(not service.remove_staff(unique.staff_id, reason).is_success() and service.create_snapshot() == before, "unique removal is rejected atomically for %s" % reason)
_expect(not service.retire_staff(unique.staff_id).is_success() and not unique.is_retiring and service.create_snapshot() == before, "unique retirement rejects before setting retirement flag")
var preview := service.preview_daily_payroll(1)
_expect(preview[&"ok"] and preview[&"new_wages_total"] == 0 and preview[&"prior_arrears_total"] == 25 and preview[&"total_due"] == 25, "unique accrues zero wages without silently deleting historical liabilities")
_expect(service.get_daily_payroll_total() == 0 and service.get_payroll_obligations()[0][&"daily_wage"] == 0, "all payroll views use unique zero upkeep")
var restored := StaffServiceType.new()
_expect(restored.restore_snapshot(before) and restored.create_snapshot() == before and restored.get_daily_payroll_total() == 0, "unique zero-upkeep rule survives exact save round trip")
_expect(not restored.retire_staff(unique.staff_id).is_success() and restored.create_snapshot() == before, "restored unique remains protected against removal")
_expect(restored.apply_daily_payroll_settlement(&"unique_day1", 1, {unique.staff_id: 25}).is_success(), "unique settlement pays only preserved historical arrears")
_expect(restored.get_staff(unique.staff_id).unpaid_wages == 0 and restored.get_payroll_settlement(&"unique_day1")[&"new_wages_total"] == 0, "unique settlement adds no new upkeep")
var settled := restored.create_snapshot()
_expect(restored.apply_daily_payroll_settlement(&"unique_day1", 1, {unique.staff_id: 25}).is_success() and restored.create_snapshot() == settled, "unique settlement retry is idempotent")
_expect(restored.preview_daily_payroll(2)[&"total_due"] == 0, "following day keeps unique upkeep free")