Add overlay runtime import for packed events
This commit is contained in:
parent
8ca65cbbfb
commit
fa63cefb70
13 changed files with 1248 additions and 153 deletions
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"format_version": 1,
|
||||
"snapshot_id": "packed-event-selective-import-overlay-base-snapshot",
|
||||
"source": {
|
||||
"description": "Base runtime snapshot supplying company context for selective packed-event overlay import."
|
||||
},
|
||||
"state": {
|
||||
"calendar": {
|
||||
"year": 1835,
|
||||
"month_slot": 1,
|
||||
"phase_slot": 2,
|
||||
"tick_slot": 4
|
||||
},
|
||||
"world_flags": {
|
||||
"base.only": true
|
||||
},
|
||||
"metadata": {
|
||||
"base.note": "preserve base runtime context"
|
||||
},
|
||||
"companies": [
|
||||
{
|
||||
"company_id": 42,
|
||||
"current_cash": 100,
|
||||
"debt": 10
|
||||
}
|
||||
],
|
||||
"event_runtime_records": [],
|
||||
"candidate_availability": {},
|
||||
"special_conditions": {},
|
||||
"service_state": {
|
||||
"periodic_boundary_calls": 0,
|
||||
"trigger_dispatch_counts": {},
|
||||
"total_event_record_services": 0,
|
||||
"dirty_rerun_count": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"format_version": 1,
|
||||
"fixture_id": "packed-event-selective-import-overlay-fixture",
|
||||
"source": {
|
||||
"kind": "captured-runtime",
|
||||
"description": "Fixture backed by an overlay import document so save-derived packed events execute against captured company context."
|
||||
},
|
||||
"state_import_path": "packed-event-selective-import-overlay.json",
|
||||
"commands": [
|
||||
{
|
||||
"kind": "service_trigger_kind",
|
||||
"trigger_kind": 7
|
||||
}
|
||||
],
|
||||
"expected_summary": {
|
||||
"calendar": {
|
||||
"year": 1835,
|
||||
"month_slot": 1,
|
||||
"phase_slot": 2,
|
||||
"tick_slot": 4
|
||||
},
|
||||
"calendar_projection_source": "base-snapshot-preserved",
|
||||
"calendar_projection_is_placeholder": false,
|
||||
"world_flag_count": 7,
|
||||
"company_count": 1,
|
||||
"packed_event_collection_present": true,
|
||||
"packed_event_record_count": 2,
|
||||
"packed_event_decoded_record_count": 2,
|
||||
"packed_event_imported_runtime_record_count": 2,
|
||||
"packed_event_parity_only_record_count": 1,
|
||||
"packed_event_unsupported_record_count": 0,
|
||||
"packed_event_blocked_missing_company_context_count": 0,
|
||||
"event_runtime_record_count": 3,
|
||||
"special_condition_count": 1,
|
||||
"enabled_special_condition_count": 1,
|
||||
"total_event_record_service_count": 3,
|
||||
"total_trigger_dispatch_count": 2,
|
||||
"dirty_rerun_count": 1,
|
||||
"total_company_cash": 150
|
||||
},
|
||||
"expected_state_fragment": {
|
||||
"world_flags": {
|
||||
"base.only": true,
|
||||
"from_packed_root": true
|
||||
},
|
||||
"metadata": {
|
||||
"base.note": "preserve base runtime context",
|
||||
"save_slice.import_projection": "overlay-runtime-restore-v1"
|
||||
},
|
||||
"companies": [
|
||||
{
|
||||
"company_id": 42,
|
||||
"current_cash": 150,
|
||||
"debt": 10
|
||||
}
|
||||
],
|
||||
"special_conditions": {
|
||||
"Imported Follow-On": 1
|
||||
},
|
||||
"packed_event_collection": {
|
||||
"live_entry_ids": [7, 9],
|
||||
"records": [
|
||||
{
|
||||
"decode_status": "executable",
|
||||
"import_outcome": "imported"
|
||||
},
|
||||
{
|
||||
"decode_status": "parity_only",
|
||||
"import_outcome": "imported"
|
||||
}
|
||||
]
|
||||
},
|
||||
"event_runtime_records": [
|
||||
{
|
||||
"record_id": 7,
|
||||
"service_count": 1
|
||||
},
|
||||
{
|
||||
"record_id": 9,
|
||||
"service_count": 1
|
||||
},
|
||||
{
|
||||
"record_id": 99,
|
||||
"service_count": 1
|
||||
}
|
||||
],
|
||||
"service_state": {
|
||||
"dirty_rerun_count": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
12
fixtures/runtime/packed-event-selective-import-overlay.json
Normal file
12
fixtures/runtime/packed-event-selective-import-overlay.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"format_version": 1,
|
||||
"import_id": "packed-event-selective-import-overlay",
|
||||
"source": {
|
||||
"description": "Overlay import that combines a captured base snapshot with the selective packed-event save slice.",
|
||||
"notes": [
|
||||
"used to upgrade explicit company-targeted packed rows from blocked parity-only state into executable runtime records"
|
||||
]
|
||||
},
|
||||
"base_snapshot_path": "packed-event-selective-import-overlay-base-snapshot.json",
|
||||
"save_slice_path": "packed-event-selective-import-save-slice.json"
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
"packed_event_imported_runtime_record_count": 1,
|
||||
"packed_event_parity_only_record_count": 1,
|
||||
"packed_event_unsupported_record_count": 0,
|
||||
"packed_event_blocked_missing_company_context_count": 1,
|
||||
"event_runtime_record_count": 2,
|
||||
"special_condition_count": 1,
|
||||
"enabled_special_condition_count": 1,
|
||||
|
|
@ -40,11 +41,13 @@
|
|||
"records": [
|
||||
{
|
||||
"decode_status": "executable",
|
||||
"executable_import_ready": true
|
||||
"executable_import_ready": true,
|
||||
"import_outcome": "imported"
|
||||
},
|
||||
{
|
||||
"decode_status": "parity_only",
|
||||
"executable_import_ready": false
|
||||
"executable_import_ready": false,
|
||||
"import_outcome": "blocked_missing_company_context"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue