Reference for all six Ring 0 veto conditions, their trigger values, error codes, and the decision tree that governs trade_allowed in the step() result.
Use this file to discover all available pages before exploring further.
Ring 0 is the final execution gate of the Sovereign Market Kernel. It sits between the Lambda Fusion Engine and the AEGIS bridge and holds absolute veto authority over every trade. If any Ring 0 condition is met, r['veto']['trade_allowed'] is set to False and no order action occurs, regardless of the fused signal strength or AMD phase. Veto decisions are written to logs/veto.log on every bar.The six veto conditions are evaluated sequentially on each call to SMKPipeline.step(). The first condition that triggers short-circuits the remaining checks and sets the appropriate error code.
MANDRA:ΔE<0 — Negative information energy gainSource:risk/mandra_kernels.py via MandraGateThe Mandra Gate computes the information entropy differential ΔE between the proposed trade and current market state. ΔE represents how much new, non-redundant information the trade decision adds to the system. A negative or insufficient ΔE means the market is too chaotic or too repetitive to act on — the signal carries no predictive edge.Trigger:ΔE < ΔE_min
Parameter
Default
Adaptive range
ΔE_min
0.02
0.005 – 0.08
Error code:ERR_MANDRA_ENTROPYResolution: Stop execution. The market is in a chaos regime. Wait for regime stabilization before resuming. Do not adjust the threshold to force through a trade — the Mandra Gate is the last line of defense against catastrophic drawdowns.
# Breakage-prevention rule from CLAUDE.md# NEVER execute without Mandra Gate ΔE > 0.02 confirmation
TOPO:H1_FRACTURE — Persistent homology loop sum exceeds thresholdSource:detectors/topological_fracture_detector.py via TopologicalFractureDetectorThe topological detector maps price, volume, and order flow imbalance into a point cloud and runs persistent homology (via ripser) to measure the H₁ (one-dimensional) topological structure. H₁ loops that persist across scale represent structural fractures in the price manifold — geometrically, price is trapped in a distorted topology that makes directional delivery unreliable.Trigger:sum(H₁ lifetimes) > fracture_limit
Parameter
Default
fracture_limit
0.5
persistence_threshold
0.6
# topological_fracture_detector.py — distortion scorelifetimes = [death - birth for birth, death in h1_intervals if not np.isinf(death)]distortion_score = np.sum(lifetimes)is_fractured = distortion_score > self.fracture_limit
Error code:HALT_H1_LOOPResolution: Wait for manifold compaction — H₁ persistence score must drop below fracture_limit before re-enabling execution. This typically resolves after the manipulation phase completes and price establishes a new directional leg.
FUSION:LAMBDA_VETO — One or more λ sensors issued a hard vetoSource:core/kernel/lambda_fusion_engine.pyThe Lambda Fusion Engine inspects each sensor’s telemetry for hard-veto flags before computing p_fused. If any sensor’s veto flag is True, the fusion engine sets trade_allowed = False immediately and records FUSION:LAMBDA_VETO.Triggered by:
λ₃: is_inverted = True (Liar State)
λ₅: is_vetoed = True (displacement direction conflict)
Resolution: Identify which sensor fired the veto from logs/veto.log, then follow the sensor-specific resolution steps in the lambda sensors reference.
L3:LIAR_STATE — FFT phase inversion exceeds π/2Source:lambda_sensors/harmonic_trap_detector.py via HarmonicTrapDetectorA Liar State is the λ₃ specific sub-condition within FUSION:LAMBDA_VETO. It is listed separately in Ring 0 because it has its own error code and resolution path. The FFT-based phase comparator detects that predicted and actual dominant frequencies are inverted beyond the 90-degree threshold — the market’s harmonic structure is running in reverse relative to model expectation.Trigger:abs(φ_predicted − φ_actual) > π/2
Error code:VETO_LIAR_STATEResolution: Wait for φ_diff < π/2. Do not attempt manual override. The λ₃ Harmonic Trap Paradox may generate false Liar States during ultra-high-frequency volatility; if the veto persists for more than 3 bars alongside strong AMD structural confirmation, flag for sensor recalibration review.
KL:REGIME_FRACTURE — KL divergence exceeds 1.3× thresholdSource:detectors/kl_divergence_detector.py via KLDivergenceDetectorThe KL Divergence Detector measures the Kullback-Leibler distance between the current price-volume distribution and the calibrated reference distribution (the “stable manifold”). A high KL score means the current regime has drifted so far from the historical baseline that pattern memory and structural assumptions are no longer valid.Trigger:KL(P_current ‖ Q_reference) > threshold × 1.3
Error code:ERR_REGIME_FRACTUREResolution: Manual manifold recalibration via KLDivergenceDetector.calibrate_manifold() with updated historical data. The reference distribution must be re-anchored to the current regime before execution resumes.
CONF:INSUFFICIENT — Fusion confidence below minimum thresholdSource:core/kernel/lambda_fusion_engine.pyAfter aggregating all sensor scores, the fusion engine computes an overall confidence value p_fused. If the weighted fusion result falls below 0.2, no individual sensor fired a hard veto but the collective evidence is too weak to justify a trade. This veto prevents execution on ambiguous setups where sensors are split or weakly aligned.Trigger:p_fused < 0.2Resolution: Wait for sensor alignment to strengthen. Common causes:
Multiple sensors in neutral state (no fire, no veto)
AMD phase is Consolidation and no killzone is active
The veto result is written to the step() result dict under the veto key:
result = pipeline.step(bar)# Primary trade permissiontrade_allowed = result['veto']['trade_allowed'] # bool# Full veto contextveto_active = result['veto_active'] # boolgate_status = result['gate_status'] # "OPEN" or "VETOED"
The AEGIS bridge (backend/aegis_bridge.py) reads r['veto']['trade_allowed'] before issuing any order. This check is unconditional — the bridge has no bypass mechanism.
Manual manifold recalibration via calibrate_manifold()
VETO_LIAR_STATE
λ₃ phase inversion detected
Wait for φ_diff < π/2
HALT_H1_LOOP
Topological fracture (H₁ loops)
Wait for manifold compaction (H₁ reset)
ERR_MANDRA_ENTROPY
ΔE is negative
Stop execution — market is too chaotic
All error codes appear in logs/veto.log. Each log entry includes the bar timestamp, the triggering condition, and the current threshold values. Use GET /api/logs/veto.log?lines=200 to inspect recent decisions.
Lambda sensors
The eight sensors that feed into the Ring 0 fusion check
SMART-EXE intelligence
FAISS memory and GRU predictor in the execution layer