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:
@@ -8,6 +8,8 @@ const MAX_BATCH_SIZE := 4_096
|
||||
|
||||
var _subscribers: Dictionary = {}
|
||||
var _published_ids: Dictionary = {}
|
||||
var _snapshot_ids: Array[String] = []
|
||||
var _snapshot_ids_dirty := true
|
||||
var _recent_events: Array[SimulationDomainEvent] = []
|
||||
var _pending_deliveries: Array[SimulationDomainEvent] = []
|
||||
var _delivery_active := false
|
||||
@@ -49,6 +51,8 @@ func publish_batch(events: Array) -> bool:
|
||||
return false
|
||||
batch_ids[event.event_id] = true
|
||||
committed.append(event.copy())
|
||||
if not committed.is_empty():
|
||||
_snapshot_ids_dirty = true
|
||||
for event: SimulationDomainEvent in committed:
|
||||
_published_ids[event.event_id] = true
|
||||
_recent_events.append(event.copy())
|
||||
@@ -90,13 +94,13 @@ func recent_events() -> Array[SimulationDomainEvent]:
|
||||
return result
|
||||
|
||||
func create_snapshot() -> Dictionary:
|
||||
var published_ids: Array = _published_ids.keys()
|
||||
published_ids.sort_custom(func(left: Variant, right: Variant) -> bool:
|
||||
return String(left) < String(right)
|
||||
)
|
||||
var saved_ids: Array[String] = []
|
||||
for event_id: Variant in published_ids:
|
||||
saved_ids.append(String(event_id))
|
||||
if _snapshot_ids_dirty:
|
||||
_snapshot_ids.clear()
|
||||
for event_id: Variant in _published_ids:
|
||||
_snapshot_ids.append(String(event_id))
|
||||
_snapshot_ids.sort()
|
||||
_snapshot_ids_dirty = false
|
||||
var saved_ids: Array[String] = _snapshot_ids.duplicate()
|
||||
var saved_recent: Array[Dictionary] = []
|
||||
for event in _recent_events:
|
||||
saved_recent.append(event.to_dictionary())
|
||||
@@ -131,6 +135,7 @@ func restore_snapshot(snapshot: Dictionary) -> bool:
|
||||
if restored_recent.size() > RECENT_EVENT_LIMIT:
|
||||
return false
|
||||
_published_ids = restored_ids
|
||||
_snapshot_ids_dirty = true
|
||||
_recent_events = restored_recent
|
||||
_pending_deliveries.clear()
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user