Decode packed event records for runtime import
This commit is contained in:
parent
83f55fa26e
commit
09b6514dbf
13 changed files with 1801 additions and 50 deletions
|
|
@ -23,6 +23,8 @@
|
|||
"company_count": 0,
|
||||
"packed_event_collection_present": true,
|
||||
"packed_event_record_count": 3,
|
||||
"packed_event_decoded_record_count": 0,
|
||||
"packed_event_imported_runtime_record_count": 0,
|
||||
"event_runtime_record_count": 0,
|
||||
"total_event_record_service_count": 0,
|
||||
"periodic_boundary_call_count": 0,
|
||||
|
|
@ -37,10 +39,11 @@
|
|||
"packed_event_collection": {
|
||||
"mechanism_family": "classic-save-rehydrate-v1",
|
||||
"live_record_count": 3,
|
||||
"live_entry_ids": [
|
||||
1,
|
||||
3,
|
||||
5
|
||||
"live_entry_ids": [1, 3, 5],
|
||||
"records": [
|
||||
{
|
||||
"decode_status": "unsupported_framing"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,37 @@
|
|||
"packed_state_version_hex": "0x000003e9",
|
||||
"live_id_bound": 5,
|
||||
"live_record_count": 3,
|
||||
"live_entry_ids": [
|
||||
1,
|
||||
3,
|
||||
5
|
||||
"live_entry_ids": [1, 3, 5],
|
||||
"decoded_record_count": 0,
|
||||
"imported_runtime_record_count": 0,
|
||||
"records": [
|
||||
{
|
||||
"record_index": 0,
|
||||
"live_entry_id": 1,
|
||||
"decode_status": "unsupported_framing",
|
||||
"grouped_effect_row_counts": [0, 0, 0, 0],
|
||||
"decoded_actions": [],
|
||||
"executable_import_ready": false,
|
||||
"notes": ["snapshot fixture placeholder"]
|
||||
},
|
||||
{
|
||||
"record_index": 1,
|
||||
"live_entry_id": 3,
|
||||
"decode_status": "unsupported_framing",
|
||||
"grouped_effect_row_counts": [0, 0, 0, 0],
|
||||
"decoded_actions": [],
|
||||
"executable_import_ready": false,
|
||||
"notes": ["snapshot fixture placeholder"]
|
||||
},
|
||||
{
|
||||
"record_index": 2,
|
||||
"live_entry_id": 5,
|
||||
"decode_status": "unsupported_framing",
|
||||
"grouped_effect_row_counts": [0, 0, 0, 0],
|
||||
"decoded_actions": [],
|
||||
"executable_import_ready": false,
|
||||
"notes": ["snapshot fixture placeholder"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"event_runtime_records": [],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"format_version": 1,
|
||||
"fixture_id": "packed-event-record-import-from-snapshot",
|
||||
"source": {
|
||||
"kind": "captured-runtime",
|
||||
"description": "Fixture backed by a runtime snapshot that carries one decoded packed-event record and its imported executable runtime record."
|
||||
},
|
||||
"state_snapshot_path": "packed-event-record-import-snapshot.json",
|
||||
"commands": [
|
||||
{
|
||||
"kind": "service_trigger_kind",
|
||||
"trigger_kind": 7
|
||||
}
|
||||
],
|
||||
"expected_summary": {
|
||||
"calendar": {
|
||||
"year": 1830,
|
||||
"month_slot": 0,
|
||||
"phase_slot": 0,
|
||||
"tick_slot": 0
|
||||
},
|
||||
"world_flag_count": 1,
|
||||
"company_count": 0,
|
||||
"packed_event_collection_present": true,
|
||||
"packed_event_record_count": 1,
|
||||
"packed_event_decoded_record_count": 1,
|
||||
"packed_event_imported_runtime_record_count": 1,
|
||||
"event_runtime_record_count": 2,
|
||||
"special_condition_count": 1,
|
||||
"enabled_special_condition_count": 1,
|
||||
"total_event_record_service_count": 2,
|
||||
"periodic_boundary_call_count": 0,
|
||||
"total_trigger_dispatch_count": 2,
|
||||
"dirty_rerun_count": 1,
|
||||
"total_company_cash": 0
|
||||
},
|
||||
"expected_state_fragment": {
|
||||
"world_flags": {
|
||||
"from_packed_root": true
|
||||
},
|
||||
"special_conditions": {
|
||||
"Imported Follow-On": 1
|
||||
},
|
||||
"packed_event_collection": {
|
||||
"records": [
|
||||
{
|
||||
"decode_status": "executable",
|
||||
"executable_import_ready": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"event_runtime_records": [
|
||||
{
|
||||
"record_id": 7,
|
||||
"service_count": 1
|
||||
},
|
||||
{
|
||||
"record_id": 99,
|
||||
"trigger_kind": 10,
|
||||
"service_count": 1
|
||||
}
|
||||
],
|
||||
"service_state": {
|
||||
"dirty_rerun_count": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
152
fixtures/runtime/packed-event-record-import-snapshot.json
Normal file
152
fixtures/runtime/packed-event-record-import-snapshot.json
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
"format_version": 1,
|
||||
"snapshot_id": "packed-event-record-import-snapshot",
|
||||
"source": {
|
||||
"description": "Snapshot fixture carrying one decoded packed-event record plus its imported executable runtime record."
|
||||
},
|
||||
"state": {
|
||||
"calendar": {
|
||||
"year": 1830,
|
||||
"month_slot": 0,
|
||||
"phase_slot": 0,
|
||||
"tick_slot": 0
|
||||
},
|
||||
"world_flags": {},
|
||||
"companies": [],
|
||||
"packed_event_collection": {
|
||||
"source_kind": "packed-event-runtime-collection",
|
||||
"mechanism_family": "classic-save-rehydrate-v1",
|
||||
"mechanism_confidence": "grounded",
|
||||
"container_profile_family": "rt3-classic-save-container-v1",
|
||||
"packed_state_version": 1001,
|
||||
"packed_state_version_hex": "0x000003e9",
|
||||
"live_id_bound": 7,
|
||||
"live_record_count": 1,
|
||||
"live_entry_ids": [7],
|
||||
"decoded_record_count": 1,
|
||||
"imported_runtime_record_count": 1,
|
||||
"records": [
|
||||
{
|
||||
"record_index": 0,
|
||||
"live_entry_id": 7,
|
||||
"payload_offset": 29186,
|
||||
"payload_len": 64,
|
||||
"decode_status": "executable",
|
||||
"trigger_kind": 7,
|
||||
"active": true,
|
||||
"marks_collection_dirty": true,
|
||||
"one_shot": false,
|
||||
"text_bands": [
|
||||
{
|
||||
"label": "primary_text_band",
|
||||
"packed_len": 5,
|
||||
"present": true,
|
||||
"preview": "Alpha"
|
||||
},
|
||||
{
|
||||
"label": "secondary_text_band_0",
|
||||
"packed_len": 0,
|
||||
"present": false,
|
||||
"preview": ""
|
||||
},
|
||||
{
|
||||
"label": "secondary_text_band_1",
|
||||
"packed_len": 0,
|
||||
"present": false,
|
||||
"preview": ""
|
||||
},
|
||||
{
|
||||
"label": "secondary_text_band_2",
|
||||
"packed_len": 0,
|
||||
"present": false,
|
||||
"preview": ""
|
||||
},
|
||||
{
|
||||
"label": "secondary_text_band_3",
|
||||
"packed_len": 0,
|
||||
"present": false,
|
||||
"preview": ""
|
||||
},
|
||||
{
|
||||
"label": "secondary_text_band_4",
|
||||
"packed_len": 0,
|
||||
"present": false,
|
||||
"preview": ""
|
||||
}
|
||||
],
|
||||
"standalone_condition_row_count": 1,
|
||||
"grouped_effect_row_counts": [0, 1, 0, 0],
|
||||
"decoded_actions": [
|
||||
{
|
||||
"kind": "set_world_flag",
|
||||
"key": "from_packed_root",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"kind": "append_event_record",
|
||||
"record": {
|
||||
"record_id": 99,
|
||||
"trigger_kind": 10,
|
||||
"active": true,
|
||||
"marks_collection_dirty": false,
|
||||
"one_shot": false,
|
||||
"effects": [
|
||||
{
|
||||
"kind": "set_special_condition",
|
||||
"label": "Imported Follow-On",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"executable_import_ready": true,
|
||||
"notes": ["fixture packed-event record"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"event_runtime_records": [
|
||||
{
|
||||
"record_id": 7,
|
||||
"trigger_kind": 7,
|
||||
"active": true,
|
||||
"service_count": 0,
|
||||
"marks_collection_dirty": true,
|
||||
"one_shot": false,
|
||||
"has_fired": false,
|
||||
"effects": [
|
||||
{
|
||||
"kind": "set_world_flag",
|
||||
"key": "from_packed_root",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"kind": "append_event_record",
|
||||
"record": {
|
||||
"record_id": 99,
|
||||
"trigger_kind": 10,
|
||||
"active": true,
|
||||
"marks_collection_dirty": false,
|
||||
"one_shot": false,
|
||||
"effects": [
|
||||
{
|
||||
"kind": "set_special_condition",
|
||||
"label": "Imported Follow-On",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"candidate_availability": {},
|
||||
"special_conditions": {},
|
||||
"service_state": {
|
||||
"periodic_boundary_calls": 0,
|
||||
"trigger_dispatch_counts": {},
|
||||
"total_event_record_services": 0,
|
||||
"dirty_rerun_count": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue