Add save-slice-backed runtime fixtures

This commit is contained in:
Jan Petykiewicz 2026-04-14 20:51:27 -07:00
commit 8ca65cbbfb
12 changed files with 974 additions and 47 deletions

View file

@ -0,0 +1,51 @@
{
"format_version": 1,
"fixture_id": "packed-event-parity-save-slice-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture backed by a tracked save-slice document with parity-heavy packed-event records."
},
"state_save_slice_path": "packed-event-parity-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,
"packed_event_collection_present": true,
"packed_event_record_count": 2,
"packed_event_decoded_record_count": 1,
"packed_event_imported_runtime_record_count": 0,
"packed_event_parity_only_record_count": 1,
"packed_event_unsupported_record_count": 1,
"event_runtime_record_count": 0,
"total_company_cash": 0
},
"expected_state_fragment": {
"calendar": {
"tick_slot": 1
},
"metadata": {
"save_slice.import_projection": "partial-runtime-restore-v1"
},
"packed_event_collection": {
"live_entry_ids": [3, 5],
"records": [
{
"decode_status": "unsupported_framing"
},
{
"decode_status": "parity_only"
}
]
}
}
}

View file

@ -0,0 +1,123 @@
{
"format_version": 1,
"save_slice_id": "packed-event-parity-save-slice",
"source": {
"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 unsupported row and one decoded-but-parity-only row"
]
},
"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": 5,
"live_record_count": 2,
"live_entry_ids": [3, 5],
"decoded_record_count": 1,
"imported_runtime_record_count": 0,
"records": [
{
"record_index": 0,
"live_entry_id": 3,
"payload_offset": 29186,
"payload_len": 96,
"decode_status": "unsupported_framing",
"grouped_effect_row_counts": [0, 0, 0, 0],
"decoded_actions": [],
"executable_import_ready": false,
"notes": [
"real payload framing not yet decoded"
]
},
{
"record_index": 1,
"live_entry_id": 5,
"payload_offset": 29290,
"payload_len": 72,
"decode_status": "parity_only",
"trigger_kind": 7,
"active": true,
"marks_collection_dirty": false,
"one_shot": false,
"text_bands": [
{
"label": "primary_text_band",
"packed_len": 7,
"present": true,
"preview": "Parity!"
},
{
"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": 0,
"grouped_effect_row_counts": [0, 0, 0, 0],
"decoded_actions": [
{
"kind": "adjust_company_cash",
"target": {
"kind": "ids",
"ids": [42]
},
"delta": 75
}
],
"executable_import_ready": false,
"notes": [
"decoded action requires explicit imported company ids before execution"
]
}
]
},
"notes": [
"parity-heavy packed-event sample"
]
}
}

View file

@ -0,0 +1,65 @@
{
"format_version": 1,
"fixture_id": "packed-event-selective-import-save-slice-fixture",
"source": {
"kind": "captured-runtime",
"description": "Fixture backed by a tracked save-slice document with one imported packed-event record and one parity-only record."
},
"state_save_slice_path": "packed-event-selective-import-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": 2,
"packed_event_decoded_record_count": 2,
"packed_event_imported_runtime_record_count": 1,
"packed_event_parity_only_record_count": 1,
"packed_event_unsupported_record_count": 0,
"event_runtime_record_count": 2,
"special_condition_count": 1,
"enabled_special_condition_count": 1,
"total_event_record_service_count": 2,
"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": {
"live_entry_ids": [7, 9],
"records": [
{
"decode_status": "executable",
"executable_import_ready": true
},
{
"decode_status": "parity_only",
"executable_import_ready": false
}
]
},
"event_runtime_records": [
{
"record_id": 7,
"service_count": 1
},
{
"record_id": 99,
"service_count": 1
}
],
"service_state": {
"dirty_rerun_count": 1
}
}
}

View file

@ -0,0 +1,189 @@
{
"format_version": 1,
"save_slice_id": "packed-event-selective-import-save-slice",
"source": {
"description": "Tracked save-slice document representing one executable packed-event record plus one parity-only record.",
"original_save_filename": "captured-selective-import.gms",
"original_save_sha256": "selective-import-sample-sha256",
"notes": [
"tracked as JSON save-slice document rather than raw .smp",
"locks the current selective import 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": 29952,
"packed_state_version": 1001,
"packed_state_version_hex": "0x000003e9",
"live_id_bound": 9,
"live_record_count": 2,
"live_entry_ids": [7, 9],
"decoded_record_count": 2,
"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"
]
},
{
"record_index": 1,
"live_entry_id": 9,
"payload_offset": 29260,
"payload_len": 72,
"decode_status": "parity_only",
"trigger_kind": 7,
"active": true,
"marks_collection_dirty": false,
"one_shot": false,
"text_bands": [
{
"label": "primary_text_band",
"packed_len": 4,
"present": true,
"preview": "Beta"
},
{
"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": 0,
"grouped_effect_row_counts": [0, 0, 0, 0],
"decoded_actions": [
{
"kind": "adjust_company_cash",
"target": {
"kind": "ids",
"ids": [42]
},
"delta": 50
}
],
"executable_import_ready": false,
"notes": [
"decoded action still requires company import depth"
]
}
]
},
"notes": [
"mixed packed-event sample"
]
}
}