Import locomotive availability descriptors with overlay context

This commit is contained in:
Jan Petykiewicz 2026-04-16 10:50:13 -07:00
commit 87108f357b
21 changed files with 1154 additions and 27 deletions

View file

@ -0,0 +1,52 @@
{
"format_version": 1,
"fixture_id": "packed-event-locomotive-availability-missing-catalog-save-slice-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture backed by a tracked save-slice document that leaves a boolean locomotive availability row blocked until overlay-backed catalog context is supplied."
},
"state_save_slice_path": "packed-event-locomotive-availability-missing-catalog-save-slice.json",
"commands": [
{
"kind": "step_count",
"steps": 1
}
],
"expected_summary": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 1
},
"calendar_projection_is_placeholder": true,
"locomotive_catalog_count": 0,
"packed_event_collection_present": true,
"packed_event_record_count": 1,
"packed_event_decoded_record_count": 1,
"packed_event_imported_runtime_record_count": 0,
"packed_event_parity_only_record_count": 1,
"packed_event_blocked_missing_locomotive_catalog_context_count": 1,
"event_runtime_record_count": 0,
"named_locomotive_availability_count": 0
},
"expected_state_fragment": {
"packed_event_collection": {
"live_entry_ids": [32],
"records": [
{
"decode_status": "parity_only",
"payload_family": "real_packed_v1",
"import_outcome": "blocked_missing_locomotive_catalog_context",
"grouped_effect_rows": [
{
"descriptor_id": 250,
"recovered_locomotive_id": 10,
"semantic_preview": "Set Unknown Loco Available to 1"
}
]
}
]
}
}
}

View file

@ -0,0 +1,101 @@
{
"format_version": 1,
"save_slice_id": "packed-event-locomotive-availability-missing-catalog-save-slice",
"source": {
"description": "Tracked save-slice document proving boolean locomotive availability rows stay parity-only without overlay-backed locomotive catalog context.",
"original_save_filename": "captured-locomotive-availability-missing-catalog.gms",
"original_save_sha256": "locomotive-availability-missing-catalog-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"locks the explicit missing locomotive catalog frontier for boolean availability rows"
]
},
"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": null,
"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": 29696,
"packed_state_version": 1001,
"packed_state_version_hex": "0x000003e9",
"live_id_bound": 32,
"live_record_count": 1,
"live_entry_ids": [32],
"decoded_record_count": 1,
"imported_runtime_record_count": 0,
"records": [
{
"record_index": 0,
"live_entry_id": 32,
"payload_offset": 29186,
"payload_len": 96,
"decode_status": "parity_only",
"payload_family": "real_packed_v1",
"trigger_kind": 7,
"one_shot": false,
"compact_control": {
"mode_byte_0x7ef": 7,
"primary_selector_0x7f0": 0,
"grouped_mode_0x7f4": 2,
"one_shot_header_0x7f5": 0,
"modifier_flag_0x7f9": 0,
"modifier_flag_0x7fa": 0,
"grouped_target_scope_ordinals_0x7fb": [0, 0, 0, 0],
"grouped_scope_checkboxes_0x7ff": [1, 0, 0, 0],
"summary_toggle_0x800": 1,
"grouped_territory_selectors_0x80f": [-1, -1, -1, -1]
},
"text_bands": [],
"standalone_condition_row_count": 0,
"standalone_condition_rows": [],
"grouped_effect_row_counts": [1, 0, 0, 0],
"grouped_effect_rows": [
{
"group_index": 0,
"row_index": 0,
"descriptor_id": 250,
"descriptor_label": "Unknown Loco Available",
"target_mask_bits": 8,
"parameter_family": "locomotive_availability_scalar",
"opcode": 3,
"raw_scalar_value": 1,
"value_byte_0x09": 0,
"value_dword_0x0d": 0,
"value_byte_0x11": 0,
"value_byte_0x12": 0,
"value_word_0x14": 0,
"value_word_0x16": 0,
"row_shape": "scalar_assignment",
"semantic_family": "scalar_assignment",
"semantic_preview": "Set Unknown Loco Available to 1",
"recovered_locomotive_id": 10,
"locomotive_name": null,
"notes": []
}
],
"decoded_actions": [],
"executable_import_ready": false,
"notes": [
"boolean locomotive availability row still requires overlay-backed locomotive catalog context"
]
}
]
},
"notes": [
"locomotive availability catalog blocker sample"
]
}
}

View file

@ -0,0 +1,44 @@
{
"format_version": 1,
"snapshot_id": "packed-event-locomotive-availability-overlay-base-snapshot",
"source": {
"description": "Base runtime snapshot supplying locomotive catalog context for descriptor-driven named locomotive availability import."
},
"state": {
"calendar": {
"year": 1835,
"month_slot": 1,
"phase_slot": 2,
"tick_slot": 4
},
"world_flags": {
"base.only": true
},
"metadata": {
"base.note": "preserve locomotive catalog context"
},
"locomotive_catalog": [
{
"locomotive_id": 10,
"name": "Locomotive 10"
},
{
"locomotive_id": 112,
"name": "Locomotive 112"
}
],
"named_locomotive_availability": {
"Locomotive 10": 0,
"Locomotive 112": 1
},
"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
}
}
}

View file

@ -0,0 +1,83 @@
{
"format_version": 1,
"fixture_id": "packed-event-locomotive-availability-overlay-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture backed by an overlay import document so boolean locomotive availability descriptors execute against captured catalog context."
},
"state_import_path": "packed-event-locomotive-availability-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_is_placeholder": false,
"locomotive_catalog_count": 2,
"packed_event_collection_present": true,
"packed_event_record_count": 1,
"packed_event_decoded_record_count": 1,
"packed_event_imported_runtime_record_count": 1,
"packed_event_parity_only_record_count": 1,
"event_runtime_record_count": 1,
"named_locomotive_availability_count": 2,
"zero_named_locomotive_availability_count": 1,
"total_event_record_service_count": 1,
"total_trigger_dispatch_count": 1
},
"expected_state_fragment": {
"metadata": {
"base.note": "preserve locomotive catalog context",
"save_slice.import_projection": "overlay-runtime-restore-v1"
},
"named_locomotive_availability": {
"Locomotive 10": 1,
"Locomotive 112": 0
},
"packed_event_collection": {
"live_entry_ids": [33],
"records": [
{
"decode_status": "parity_only",
"payload_family": "real_packed_v1",
"import_outcome": "imported",
"grouped_effect_rows": [
{
"descriptor_id": 250,
"recovered_locomotive_id": 10
},
{
"descriptor_id": 457,
"recovered_locomotive_id": 112
}
]
}
]
},
"event_runtime_records": [
{
"record_id": 33,
"service_count": 1,
"effects": [
{
"kind": "set_named_locomotive_availability",
"name": "Locomotive 10",
"value": true
},
{
"kind": "set_named_locomotive_availability",
"name": "Locomotive 112",
"value": false
}
]
}
]
}
}

View file

@ -0,0 +1,123 @@
{
"format_version": 1,
"save_slice_id": "packed-event-locomotive-availability-overlay-save-slice",
"source": {
"description": "Tracked save-slice document proving boolean locomotive availability descriptors can import through overlay-backed catalog context.",
"original_save_filename": "captured-locomotive-availability-overlay.gms",
"original_save_sha256": "locomotive-availability-overlay-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"uses synthetic catalog names to prove descriptor-to-id lowering plus overlay-backed resolution"
]
},
"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": null,
"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": 29696,
"packed_state_version": 1001,
"packed_state_version_hex": "0x000003e9",
"live_id_bound": 33,
"live_record_count": 1,
"live_entry_ids": [33],
"decoded_record_count": 1,
"imported_runtime_record_count": 0,
"records": [
{
"record_index": 0,
"live_entry_id": 33,
"payload_offset": 29186,
"payload_len": 120,
"decode_status": "parity_only",
"payload_family": "real_packed_v1",
"trigger_kind": 7,
"one_shot": false,
"compact_control": {
"mode_byte_0x7ef": 7,
"primary_selector_0x7f0": 0,
"grouped_mode_0x7f4": 2,
"one_shot_header_0x7f5": 0,
"modifier_flag_0x7f9": 0,
"modifier_flag_0x7fa": 0,
"grouped_target_scope_ordinals_0x7fb": [0, 0, 0, 0],
"grouped_scope_checkboxes_0x7ff": [1, 0, 0, 0],
"summary_toggle_0x800": 1,
"grouped_territory_selectors_0x80f": [-1, -1, -1, -1]
},
"text_bands": [],
"standalone_condition_row_count": 0,
"standalone_condition_rows": [],
"grouped_effect_row_counts": [2, 0, 0, 0],
"grouped_effect_rows": [
{
"group_index": 0,
"row_index": 0,
"descriptor_id": 250,
"descriptor_label": "Unknown Loco Available",
"target_mask_bits": 8,
"parameter_family": "locomotive_availability_scalar",
"opcode": 3,
"raw_scalar_value": 1,
"value_byte_0x09": 0,
"value_dword_0x0d": 0,
"value_byte_0x11": 0,
"value_byte_0x12": 0,
"value_word_0x14": 0,
"value_word_0x16": 0,
"row_shape": "scalar_assignment",
"semantic_family": "scalar_assignment",
"semantic_preview": "Set Unknown Loco Available to 1",
"recovered_locomotive_id": 10,
"locomotive_name": null,
"notes": []
},
{
"group_index": 0,
"row_index": 1,
"descriptor_id": 457,
"descriptor_label": "Unknown Loco Available",
"target_mask_bits": 8,
"parameter_family": "locomotive_availability_scalar",
"opcode": 3,
"raw_scalar_value": 0,
"value_byte_0x09": 0,
"value_dword_0x0d": 0,
"value_byte_0x11": 0,
"value_byte_0x12": 0,
"value_word_0x14": 0,
"value_word_0x16": 0,
"row_shape": "scalar_assignment",
"semantic_family": "scalar_assignment",
"semantic_preview": "Set Unknown Loco Available to 0",
"recovered_locomotive_id": 112,
"locomotive_name": null,
"notes": []
}
],
"decoded_actions": [],
"executable_import_ready": false,
"notes": [
"boolean locomotive availability rows use overlay-backed catalog context"
]
}
]
},
"notes": [
"overlay-backed descriptor-driven named locomotive availability sample"
]
}
}

View file

@ -0,0 +1,12 @@
{
"format_version": 1,
"import_id": "packed-event-locomotive-availability-overlay",
"source": {
"description": "Overlay import that combines a captured base snapshot with boolean locomotive availability descriptors.",
"notes": [
"used to upgrade descriptor-driven named locomotive availability rows through overlay-backed catalog context"
]
},
"base_snapshot_path": "packed-event-locomotive-availability-overlay-base-snapshot.json",
"save_slice_path": "packed-event-locomotive-availability-overlay-save-slice.json"
}

View file

@ -57,6 +57,7 @@
"parameter_family": "locomotive_availability_scalar",
"semantic_family": "scalar_assignment",
"semantic_preview": "Set Unknown Loco Available to 42",
"recovered_locomotive_id": 10,
"row_shape": "scalar_assignment"
}
]

View file

@ -5,10 +5,10 @@
"description": "Tracked save-slice document representing a parity-heavy captured packed-event collection.",
"original_save_filename": "captured-parity.gms",
"original_save_sha256": "parity-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"preserves one recovered-but-unmapped locomotive policy row and one semantically decoded-but-parity-only row"
]
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"preserves one recovered-but-unmapped locomotive availability row and one semantically decoded-but-parity-only row"
]
},
"save_slice": {
"file_extension_hint": "gms",
@ -80,9 +80,10 @@
"row_shape": "scalar_assignment",
"semantic_family": "scalar_assignment",
"semantic_preview": "Set Unknown Loco Available to 42",
"recovered_locomotive_id": 10,
"locomotive_name": null,
"notes": [
"recovered locomotive availability descriptor family remains parity-only until per-locomotive identity is grounded"
"recovered locomotive availability descriptor family remains parity-only until the scalar payload is in the grounded boolean subset"
]
}
],
@ -90,7 +91,7 @@
"executable_import_ready": false,
"notes": [
"decoded from grounded real 0x4e9a row framing",
"recovered locomotives-page descriptor band is now checked in, but this scalar family still has no executable runtime landing surface"
"recovered locomotives-page descriptor band is now checked in, but this scalar family still needs overlay-backed locomotive catalog context and a grounded boolean scalar payload"
]
},
{