Enable first operating day with staff assignments, opening guide, and ledger

This commit is contained in:
Codex
2026-09-09 08:26:20 +09:00
parent 423fd6dd2e
commit 29a660aed0
28 changed files with 2451 additions and 156 deletions
+3 -1
View File
@@ -208,6 +208,7 @@ func _test_snapshot_contract() -> void:
var pre_effective_v2 := snapshot.duplicate(true)
pre_effective_v2[&"version"] = 2
pre_effective_v2.erase(&"work_assignments")
for staff_snapshot: Dictionary in pre_effective_v2[&"staff"]:
staff_snapshot.erase(&"snapshot_version")
staff_snapshot.erase(&"employment_effective_minute")
@@ -215,13 +216,14 @@ func _test_snapshot_contract() -> void:
_expect(migrated_v2.restore_snapshot(pre_effective_v2), "pre-effective-minute v2 Staff snapshot migrates")
_expect(migrated_v2.get_staff(&"a").employment_effective_minute == 0, "v2 legacy Staff employment starts at minute zero")
_expect(
migrated_v2.create_snapshot()[&"version"] == 3
migrated_v2.create_snapshot()[&"version"] == StaffServiceType.SNAPSHOT_VERSION
and migrated_v2.create_snapshot()[&"staff"][0][&"snapshot_version"] == 1,
"v2 legacy Staff row is re-emitted in the current service and row schemas"
)
var legacy := snapshot.duplicate(true)
legacy[&"version"] = 1
legacy.erase(&"work_assignments")
legacy.erase(&"last_advanced_minute")
legacy.erase(&"payroll_settlements")
for staff_snapshot: Dictionary in legacy[&"staff"]: