Add headless runtime tooling and Campaign.win analysis

This commit is contained in:
Jan Petykiewicz 2026-04-10 01:22:47 -07:00
commit 27172e3786
37 changed files with 11867 additions and 302 deletions

View file

@ -0,0 +1,32 @@
{
"format_version": 1,
"dump_id": "minimal-world-raw-state",
"source": {
"description": "Raw runtime state dump equivalent to the minimal world smoke setup."
},
"state": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 0
},
"world_flags": {
"sandbox": false
},
"companies": [
{
"company_id": 1,
"current_cash": 250000,
"debt": 0
}
],
"event_runtime_records": [],
"service_state": {
"periodic_boundary_calls": 0,
"trigger_dispatch_counts": {},
"total_event_record_services": 0,
"dirty_rerun_count": 0
}
}
}

View file

@ -0,0 +1,31 @@
{
"format_version": 1,
"fixture_id": "minimal-world-step-from-snapshot",
"source": {
"kind": "captured-runtime",
"description": "Fixture backed by a normalized runtime snapshot rather than inline state."
},
"state_snapshot_path": "minimal-world-step-smoke-final-state.json",
"commands": [
{
"kind": "step_count",
"steps": 1
}
],
"expected_summary": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 6
},
"world_flag_count": 1,
"company_count": 1,
"event_runtime_record_count": 0,
"total_event_record_service_count": 0,
"periodic_boundary_call_count": 0,
"total_trigger_dispatch_count": 0,
"dirty_rerun_count": 0,
"total_company_cash": 250000
}
}

View file

@ -0,0 +1,33 @@
{
"format_version": 1,
"snapshot_id": "minimal-world-step-smoke-final-state",
"source": {
"source_fixture_id": "minimal-world-step-smoke",
"description": "Normalized final runtime state exported from the minimal-world-step-smoke fixture."
},
"state": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 5
},
"world_flags": {
"sandbox": false
},
"companies": [
{
"company_id": 1,
"current_cash": 250000,
"debt": 0
}
],
"event_runtime_records": [],
"service_state": {
"periodic_boundary_calls": 0,
"trigger_dispatch_counts": {},
"total_event_record_services": 0,
"dirty_rerun_count": 0
}
}
}

View file

@ -0,0 +1,54 @@
{
"format_version": 1,
"fixture_id": "minimal-world-step-smoke",
"source": {
"kind": "synthetic",
"description": "Synthetic milestone 0/1 smoke fixture for headless runtime parsing and stepping."
},
"state": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 0
},
"world_flags": {
"sandbox": false
},
"companies": [
{
"company_id": 1,
"current_cash": 250000,
"debt": 0
}
],
"event_runtime_records": []
},
"commands": [
{
"kind": "advance_to",
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 2
}
},
{
"kind": "step_count",
"steps": 3
}
],
"expected_summary": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 5
},
"world_flag_count": 1,
"company_count": 1,
"event_runtime_record_count": 0,
"total_company_cash": 250000
}
}

View file

@ -0,0 +1,59 @@
{
"format_version": 1,
"fixture_id": "periodic-boundary-service-smoke",
"source": {
"kind": "synthetic",
"description": "Synthetic milestone 2 fixture covering periodic trigger order and dirty rerun dispatch."
},
"state": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 0
},
"world_flags": {
"sandbox": false
},
"companies": [],
"event_runtime_records": [
{
"record_id": 1,
"trigger_kind": 1,
"active": true,
"marks_collection_dirty": true
},
{
"record_id": 2,
"trigger_kind": 4,
"active": true
},
{
"record_id": 3,
"trigger_kind": 10,
"active": true
}
]
},
"commands": [
{
"kind": "service_periodic_boundary"
}
],
"expected_summary": {
"calendar": {
"year": 1830,
"month_slot": 0,
"phase_slot": 0,
"tick_slot": 0
},
"world_flag_count": 1,
"company_count": 0,
"event_runtime_record_count": 3,
"total_event_record_service_count": 3,
"periodic_boundary_call_count": 1,
"total_trigger_dispatch_count": 7,
"dirty_rerun_count": 1,
"total_company_cash": 0
}
}