babylon.engine.systems.contradiction
Contradiction system — Lawverian opposition registry (Phase C1.3).
Position 18 in the pipeline. This is the rewrite that retires the saturating,
add-only edge-tension accumulator (the “Formula” + “Consumption” inertness
bugs of project/06-lawverian-dialectics.md §2). Each tick the system:
writes per-edge
tensionas the fresh wealth-asymmetry gap of that edge (EXPLOITATION / WAGES / TENANCY) — scale-free, recomputed from current wealth, never accumulated;steps the
OppositionRegistry(wired byServicesProtocol.create()) over aGraphInputssnapshot built from the live graph, deriving each opposition’s gap, rate, and the Maoist principal contradiction;derives
contradiction_framesfrom the registry states (intensity ← gap, aspect_balance ← rate, principal_aspect ← leading_pole; frame principal/secondary = registry principal + runner-up);fires RUPTURE on the principal opposition’s gap exceeding the defines threshold AND rising (rate > 0) — Mao’s “condition AND level”, never on hitting a ceiling.
- Cross-tick + handoff channel.
The registry snapshot is stashed on the graph attribute
opposition_states(notcontext.persistent_data). The bridged headless runner recreates a freshTickContextevery tick (engine/headless_runner/runner.py_advance_tick), sopersistent_datais not a cross-tick channel there; the graph, by contrast, persists in-place across ticks in both the bridged runner and the in-memorySimulationfacade. The graph attribute is therefore the reliable place to (a) recover the previous tick’s gaps for rate/inertia, (b) hand the capital_labor gap to the pre-position-18 consumers (ImperialRent @9, Struggle @16, Consciousness @17 read last tick’s snapshot), and (c) let the bridge’spersist_tickread the snapshot. This is the same channelcontradiction_framesalready uses.
Module Attributes
Graph attribute holding |
|
Graph attribute holding this tick's fixed-point regime (Phase E2): |
|
Graph attribute holding a list of |
Classes
Phase 18: fresh-gap tension + opposition-registry contradiction frames. |
- babylon.engine.systems.contradiction.OPPOSITION_STATES_ATTR = 'opposition_states'
Graph attribute holding
{key: OppositionState.model_dump()}for the tick.
- babylon.engine.systems.contradiction.DIALECTICAL_REGIME_ATTR = 'dialectical_regime'
Graph attribute holding this tick’s fixed-point regime (Phase E2):
{"regime": <reproduction|crisis|sublation>, "principal": key, "rate": float}.
- babylon.engine.systems.contradiction.OPPOSITION_INTERVENTIONS_ATTR = 'opposition_interventions'
Graph attribute holding a list of
StanceInterventiondumps to apply this tick. Written by verb/OODA systems (spec-071), read + CLEARED here (consumed-once). No producer writes it yet; unit tests set it directly.
- class babylon.engine.systems.contradiction.ContradictionSystem[source]
Bases:
SystemBasePhase 18: fresh-gap tension + opposition-registry contradiction frames.
- step(graph, services, context)[source]
Write fresh per-edge tension, then step the opposition registry.
- Return type:
None
- Parameters:
graph (GraphProtocol)
services (ServicesProtocol)
context (ContextType)