Add chairman packed event runtime support

This commit is contained in:
Jan Petykiewicz 2026-04-16 16:07:10 -07:00
commit 86cf89b26c
23 changed files with 1431 additions and 41 deletions

View file

@ -0,0 +1,63 @@
{
"format_version": 1,
"fixture_id": "packed-event-chairman-cash-overlay-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture proving descriptor 1 imports and executes on selected-chairman scope."
},
"state_import_path": "packed-event-chairman-cash-overlay.json",
"commands": [
{
"kind": "service_trigger_kind",
"trigger_kind": 6
}
],
"expected_summary": {
"calendar_projection_source": "base-snapshot-preserved",
"calendar_projection_is_placeholder": false,
"company_count": 2,
"chairman_profile_count": 2,
"active_chairman_profile_count": 2,
"selected_chairman_profile_id": 1,
"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,
"total_event_record_service_count": 1,
"total_trigger_dispatch_count": 1
},
"expected_state_fragment": {
"chairman_profiles": [
{
"profile_id": 1,
"current_cash": 999
},
{
"profile_id": 2,
"current_cash": 250
}
],
"packed_event_collection": {
"records": [
{
"import_outcome": "imported",
"decoded_actions": [
{
"kind": "set_chairman_cash",
"target": {
"kind": "selected_chairman"
},
"value": 999
}
],
"grouped_effect_rows": [
{
"grouped_target_subject": "chairman"
}
]
}
]
}
}
}

View file

@ -0,0 +1,9 @@
{
"format_version": 1,
"import_id": "packed-event-chairman-cash-overlay",
"source": {
"description": "Overlay import combining chairman runtime context with the real chairman-targeted cash descriptor sample."
},
"base_snapshot_path": "packed-event-chairman-overlay-base-snapshot.json",
"save_slice_path": "packed-event-chairman-cash-save-slice.json"
}

View file

@ -0,0 +1,110 @@
{
"format_version": 1,
"save_slice_id": "packed-event-chairman-cash-save-slice",
"source": {
"description": "Tracked save-slice document with a chairman-targeted Player Cash row using the hidden grouped target-subject lane.",
"original_save_filename": "captured-chairman-cash.gms",
"original_save_sha256": "chairman-cash-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"proves selected-chairman descriptor import through the normal runtime path"
]
},
"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,
"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": 61,
"live_record_count": 1,
"live_entry_ids": [61],
"decoded_record_count": 1,
"imported_runtime_record_count": 1,
"records": [
{
"record_index": 0,
"live_entry_id": 61,
"payload_offset": 29296,
"payload_len": 140,
"decode_status": "parity_only",
"payload_family": "real_packed_v1",
"trigger_kind": 6,
"one_shot": false,
"compact_control": {
"mode_byte_0x7ef": 6,
"primary_selector_0x7f0": 12,
"grouped_mode_0x7f4": 2,
"one_shot_header_0x7f5": 0,
"modifier_flag_0x7f9": 0,
"modifier_flag_0x7fa": 0,
"grouped_target_scope_ordinals_0x7fb": [1, 1, 1, 1],
"grouped_scope_checkboxes_0x7ff": [2, 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": 1,
"descriptor_label": "Player Cash",
"target_mask_bits": 2,
"parameter_family": "player_cash_scalar",
"grouped_target_subject": "chairman",
"opcode": 8,
"raw_scalar_value": 999,
"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": "multivalue_scalar",
"semantic_family": "multivalue_scalar",
"semantic_preview": "Set Player Cash to 999 with aux [0, 0, 0, 0]",
"locomotive_name": null,
"notes": []
}
],
"decoded_conditions": [],
"decoded_actions": [
{
"kind": "set_chairman_cash",
"target": {
"kind": "selected_chairman"
},
"value": 999
}
],
"executable_import_ready": true,
"notes": [
"decoded from grounded real 0x4e9a row framing",
"hidden grouped target-subject lane resolves descriptor 1 to selected chairman scope"
]
}
]
},
"notes": [
"real chairman-targeted cash descriptor sample"
]
}
}

View file

@ -0,0 +1,40 @@
{
"format_version": 1,
"fixture_id": "packed-event-chairman-missing-context-save-slice-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture proving chairman-targeted rows stay parity-only without runtime chairman context."
},
"state_import_path": "packed-event-chairman-cash-save-slice.json",
"commands": [
{
"kind": "service_trigger_kind",
"trigger_kind": 6
}
],
"expected_summary": {
"calendar_projection_source": "default-1830-placeholder",
"calendar_projection_is_placeholder": true,
"chairman_profile_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_blocked_missing_chairman_context_count": 1,
"event_runtime_record_count": 0
},
"expected_state_fragment": {
"packed_event_collection": {
"records": [
{
"import_outcome": "blocked_missing_chairman_context",
"grouped_effect_rows": [
{
"grouped_target_subject": "chairman"
}
]
}
]
}
}
}

View file

@ -0,0 +1,96 @@
{
"format_version": 1,
"snapshot_id": "packed-event-chairman-overlay-base-snapshot",
"source": {
"description": "Base runtime snapshot supplying selected-chairman context for chairman-targeted packed-event overlays."
},
"state": {
"calendar": {
"year": 1840,
"month_slot": 1,
"phase_slot": 2,
"tick_slot": 3
},
"world_flags": {
"base.only": true
},
"metadata": {
"base.note": "chairman overlay context"
},
"companies": [
{
"company_id": 1,
"current_cash": 150,
"debt": 80,
"credit_rating_score": 650,
"prime_rate": 5,
"controller_kind": "human",
"track_piece_counts": {
"total": 20,
"single": 5,
"double": 8,
"transition": 1,
"electric": 3,
"non_electric": 17
}
},
{
"company_id": 2,
"current_cash": 90,
"debt": 40,
"credit_rating_score": 480,
"prime_rate": 6,
"controller_kind": "ai",
"track_piece_counts": {
"total": 8,
"single": 2,
"double": 2,
"transition": 0,
"electric": 1,
"non_electric": 7
}
}
],
"selected_company_id": 1,
"players": [],
"selected_player_id": null,
"chairman_profiles": [
{
"profile_id": 1,
"name": "Chairman One",
"active": true,
"current_cash": 500,
"linked_company_id": 1,
"company_holdings": {
"1": 1000
},
"holdings_value_total": 700,
"net_worth_total": 1200,
"purchasing_power_total": 1500
},
{
"profile_id": 2,
"name": "Chairman Two",
"active": true,
"current_cash": 250,
"linked_company_id": 2,
"company_holdings": {
"2": 900
},
"holdings_value_total": 600,
"net_worth_total": 900,
"purchasing_power_total": 1100
}
],
"selected_chairman_profile_id": 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,39 @@
{
"format_version": 1,
"fixture_id": "packed-event-chairman-scope-parity-save-slice-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture proving unsupported chairman scopes stay parity-only under an explicit blocker."
},
"state_import_path": "packed-event-chairman-scope-parity-save-slice.json",
"commands": [
{
"kind": "service_trigger_kind",
"trigger_kind": 6
}
],
"expected_summary": {
"calendar_projection_source": "default-1830-placeholder",
"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": 0,
"packed_event_blocked_chairman_target_scope_count": 1,
"event_runtime_record_count": 0
},
"expected_state_fragment": {
"packed_event_collection": {
"records": [
{
"import_outcome": "blocked_chairman_target_scope",
"grouped_effect_rows": [
{
"grouped_target_subject": "chairman"
}
]
}
]
}
}
}

View file

@ -0,0 +1,104 @@
{
"format_version": 1,
"save_slice_id": "packed-event-chairman-scope-parity-save-slice",
"source": {
"description": "Tracked save-slice document with a chairman-targeted row on an unsupported non-selected scope.",
"original_save_filename": "captured-chairman-scope-parity.gms",
"original_save_sha256": "chairman-scope-parity-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"pins the selected-chairman-only execution boundary"
]
},
"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,
"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": 63,
"live_record_count": 1,
"live_entry_ids": [63],
"decoded_record_count": 1,
"imported_runtime_record_count": 0,
"records": [
{
"record_index": 0,
"live_entry_id": 63,
"payload_offset": 29296,
"payload_len": 140,
"decode_status": "parity_only",
"payload_family": "real_packed_v1",
"trigger_kind": 6,
"one_shot": false,
"compact_control": {
"mode_byte_0x7ef": 6,
"primary_selector_0x7f0": 12,
"grouped_mode_0x7f4": 2,
"one_shot_header_0x7f5": 0,
"modifier_flag_0x7f9": 0,
"modifier_flag_0x7fa": 0,
"grouped_target_scope_ordinals_0x7fb": [0, 1, 1, 1],
"grouped_scope_checkboxes_0x7ff": [2, 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": 1,
"descriptor_label": "Player Cash",
"target_mask_bits": 2,
"parameter_family": "player_cash_scalar",
"grouped_target_subject": "chairman",
"opcode": 8,
"raw_scalar_value": 700,
"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": "multivalue_scalar",
"semantic_family": "multivalue_scalar",
"semantic_preview": "Set Player Cash to 700 with aux [0, 0, 0, 0]",
"locomotive_name": null,
"notes": [
"chairman row requires selected-chairman scope"
]
}
],
"decoded_conditions": [],
"decoded_actions": [],
"executable_import_ready": false,
"notes": [
"decoded from grounded real 0x4e9a row framing",
"selected-chairman scope is the only grounded chairman-target subset in this slice"
]
}
]
},
"notes": [
"real chairman-targeted scope parity sample"
]
}
}

View file

@ -0,0 +1,64 @@
{
"format_version": 1,
"fixture_id": "packed-event-deactivate-chairman-overlay-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture proving descriptor 14 imports and executes on selected-chairman scope."
},
"state_import_path": "packed-event-deactivate-chairman-overlay.json",
"commands": [
{
"kind": "service_trigger_kind",
"trigger_kind": 6
}
],
"expected_summary": {
"calendar_projection_source": "base-snapshot-preserved",
"calendar_projection_is_placeholder": false,
"company_count": 2,
"chairman_profile_count": 2,
"active_chairman_profile_count": 1,
"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,
"total_event_record_service_count": 1,
"total_trigger_dispatch_count": 1
},
"expected_state_fragment": {
"selected_chairman_profile_id": null,
"chairman_profiles": [
{
"profile_id": 1,
"active": false,
"linked_company_id": null
},
{
"profile_id": 2,
"active": true,
"linked_company_id": 2
}
],
"packed_event_collection": {
"records": [
{
"import_outcome": "imported",
"decoded_actions": [
{
"kind": "deactivate_chairman",
"target": {
"kind": "selected_chairman"
}
}
],
"grouped_effect_rows": [
{
"grouped_target_subject": "chairman"
}
]
}
]
}
}
}

View file

@ -0,0 +1,9 @@
{
"format_version": 1,
"import_id": "packed-event-deactivate-chairman-overlay",
"source": {
"description": "Overlay import combining chairman runtime context with the real chairman-targeted deactivation descriptor sample."
},
"base_snapshot_path": "packed-event-chairman-overlay-base-snapshot.json",
"save_slice_path": "packed-event-deactivate-chairman-save-slice.json"
}

View file

@ -0,0 +1,109 @@
{
"format_version": 1,
"save_slice_id": "packed-event-deactivate-chairman-save-slice",
"source": {
"description": "Tracked save-slice document with a chairman-targeted Deactivate Player row using the hidden grouped target-subject lane.",
"original_save_filename": "captured-deactivate-chairman.gms",
"original_save_sha256": "deactivate-chairman-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"proves selected-chairman lifecycle import through the normal runtime path"
]
},
"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,
"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": 62,
"live_record_count": 1,
"live_entry_ids": [62],
"decoded_record_count": 1,
"imported_runtime_record_count": 1,
"records": [
{
"record_index": 0,
"live_entry_id": 62,
"payload_offset": 29296,
"payload_len": 140,
"decode_status": "parity_only",
"payload_family": "real_packed_v1",
"trigger_kind": 6,
"one_shot": false,
"compact_control": {
"mode_byte_0x7ef": 6,
"primary_selector_0x7f0": 12,
"grouped_mode_0x7f4": 2,
"one_shot_header_0x7f5": 0,
"modifier_flag_0x7f9": 0,
"modifier_flag_0x7fa": 0,
"grouped_target_scope_ordinals_0x7fb": [1, 1, 1, 1],
"grouped_scope_checkboxes_0x7ff": [2, 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": 14,
"descriptor_label": "Deactivate Player",
"target_mask_bits": 2,
"parameter_family": "player_lifecycle_toggle",
"grouped_target_subject": "chairman",
"opcode": 1,
"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": "bool_toggle",
"semantic_family": "bool_toggle",
"semantic_preview": "Set Deactivate Player to TRUE",
"locomotive_name": null,
"notes": []
}
],
"decoded_conditions": [],
"decoded_actions": [
{
"kind": "deactivate_chairman",
"target": {
"kind": "selected_chairman"
}
}
],
"executable_import_ready": true,
"notes": [
"decoded from grounded real 0x4e9a row framing",
"hidden grouped target-subject lane resolves descriptor 14 to selected chairman scope"
]
}
]
},
"notes": [
"real chairman-targeted lifecycle descriptor sample"
]
}
}