Add named locomotive availability runtime surface

This commit is contained in:
Jan Petykiewicz 2026-04-16 10:23:29 -07:00
commit 8c7ff335cb
16 changed files with 542 additions and 13 deletions

View file

@ -0,0 +1,60 @@
{
"format_version": 1,
"fixture_id": "packed-event-named-locomotive-availability-save-slice-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture backed by a tracked save-slice document that imports the named locomotive availability table and mutates it through an imported packed-event record."
},
"state_save_slice_path": "packed-event-named-locomotive-availability-save-slice.json",
"commands": [
{
"kind": "service_trigger_kind",
"trigger_kind": 7
}
],
"expected_summary": {
"calendar_projection_is_placeholder": true,
"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": 1,
"named_locomotive_availability_count": 3,
"zero_named_locomotive_availability_count": 2,
"total_event_record_service_count": 1,
"total_trigger_dispatch_count": 1,
"dirty_rerun_count": 0
},
"expected_state_fragment": {
"world_flags": {
"save_slice.named_locomotive_availability_present": true
},
"metadata": {
"save_slice.named_locomotive_availability_source_kind": "runtime-save-direct-serializer",
"save_slice.named_locomotive_availability_entry_count": "2",
"save_slice.named_locomotive_availability_zero_count": "1"
},
"named_locomotive_availability": {
"Big Boy": 0,
"GP7": 0,
"Mikado": 1
},
"packed_event_collection": {
"live_entry_ids": [
17
],
"records": [
{
"decode_status": "executable",
"import_outcome": "imported"
}
]
},
"event_runtime_records": [
{
"record_id": 17,
"service_count": 1
}
]
}
}

View file

@ -0,0 +1,117 @@
{
"format_version": 1,
"save_slice_id": "packed-event-named-locomotive-availability-save-slice",
"source": {
"description": "Tracked save-slice document proving named locomotive availability survives save import and can be mutated by imported packed events.",
"original_save_filename": "captured-named-locomotive-availability.gms",
"original_save_sha256": "named-locomotive-availability-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"locks the named locomotive availability import surface without guessing per-descriptor locomotive names"
]
},
"save_slice": {
"file_extension_hint": "gms",
"container_profile_family": "rt3-classic-save-container-v1",
"mechanism_family": "classic-save-rehydrate-v1",
"mechanism_confidence": "grounded",
"trailer_family": null,
"bridge_family": null,
"profile": null,
"candidate_availability_table": null,
"named_locomotive_availability_table": {
"source_kind": "runtime-save-direct-serializer",
"semantic_family": "scenario-named-locomotive-availability-table",
"header_offset": null,
"entries_offset": null,
"entries_end_offset": null,
"observed_entry_count": 2,
"zero_availability_count": 1,
"zero_availability_names": [
"GP7"
],
"entries": [
{
"index": 0,
"offset": 0,
"text": "Big Boy",
"availability_dword": 1,
"availability_dword_hex": "0x00000001",
"trailer_word": 1,
"trailer_word_hex": "0x00000001"
},
{
"index": 1,
"offset": 65,
"text": "GP7",
"availability_dword": 0,
"availability_dword_hex": "0x00000000",
"trailer_word": 0,
"trailer_word_hex": "0x00000000"
}
]
},
"special_conditions_table": null,
"event_runtime_collection": {
"source_kind": "packed-event-runtime-collection",
"mechanism_family": "classic-save-rehydrate-v1",
"mechanism_confidence": "grounded",
"container_profile_family": "rt3-classic-save-container-v1",
"metadata_tag_offset": 28928,
"records_tag_offset": 29184,
"close_tag_offset": 29440,
"packed_state_version": 1001,
"packed_state_version_hex": "0x000003e9",
"live_id_bound": 17,
"live_record_count": 1,
"live_entry_ids": [
17
],
"decoded_record_count": 1,
"imported_runtime_record_count": 1,
"records": [
{
"record_index": 0,
"live_entry_id": 17,
"payload_offset": 29186,
"payload_len": 64,
"decode_status": "executable",
"payload_family": "synthetic_harness",
"trigger_kind": 7,
"active": true,
"marks_collection_dirty": false,
"one_shot": false,
"text_bands": [],
"standalone_condition_row_count": 0,
"standalone_condition_rows": [],
"grouped_effect_row_counts": [
0,
0,
0,
0
],
"grouped_effect_rows": [],
"decoded_actions": [
{
"kind": "set_named_locomotive_availability",
"name": "Big Boy",
"value": false
},
{
"kind": "set_named_locomotive_availability",
"name": "Mikado",
"value": true
}
],
"executable_import_ready": true,
"notes": [
"fixture packed-event record"
]
}
]
},
"notes": [
"named locomotive availability import surface"
]
}
}

View file

@ -21,7 +21,7 @@
},
"calendar_projection_source": "base-snapshot-preserved",
"calendar_projection_is_placeholder": false,
"world_flag_count": 7,
"world_flag_count": 8,
"company_count": 1,
"packed_event_collection_present": true,
"packed_event_record_count": 2,