babylon.engine.systems.collapse_transition
Spec-070 CollapseTransitionSystem (T067 + T084-T087, FR-023, FR-024, FR-027, FR-028).
Handles two distinct collapse / fracture paths:
Collapse-driven (FR-023, FR-024): Sovereign legitimacy ≤ 0.0 or external trigger via
context.persistent_data["balkanization. collapse_triggers"]. EmitsSOVEREIGN_COLLAPSE, partitions claimed Territories among winning Factions (creates new Sovereigns atcontrol_level = initial_post_collapse_control_level), emitsTERRITORY_TRANSITIONper claimed Territory, deletes the collapsed Sovereign node + outbound edges.Active-secession (FR-027, FR-028, FR-029a): Reads
persistent_data["balkanization.secession_eligible"](populated by FactionInfluenceSystem when the hysteresis window elapses), emitsCIVIL_WAR_DECLARED, rewires the contiguous sub-region’s CLAIMS from the parent Sovereign to a new secessionist Sovereign via thebulk_partition_claimsO(K) protocol method (FR-018 / SC-004).
Pipeline position: 20.5 (between FieldDerivativeSystem at 20 and
EdgeTransitionSystem at 21). Belongs to CONSEQUENCE_SYSTEMS.
Determinism notes:
Collapse predicate evaluation in lex-sorted Sovereign ID order.
TERRITORY_TRANSITION emission per claimed Territory in sorted-ID order.
New Sovereign IDs follow
SOV_AUTO_T{tick}_F{faction_id}_{counter}.Orphaned Sovereign nodes (zero CLAIMS) are deleted at the END of every tick.
Classes
Detects collapsing Sovereigns + emits transition events. |
- class babylon.engine.systems.collapse_transition.CollapseTransitionSystem[source]
Bases:
SystemBaseDetects collapsing Sovereigns + emits transition events.
- step(graph, services, context)[source]
Apply system logic to the world graph (in-place mutation).
The signature matches
babylon.kernel.system_protocol.Systemexactly. The engine (and all test fixtures) pass aBabylonGraph, which satisfiesGraphProtocol.- Return type:
None
- Parameters:
graph (GraphProtocol)
services (ServicesProtocol)
context (ContextType)