Skip to main content

dsfb_rf/
lib.rs

1//! # dsfb-rf — DSFB Structural Semiotics Engine for RF Signal Monitoring
2//!
3//! **What this crate is, in one paragraph.** A deterministic, `no_std`,
4//! zero-`unsafe` *observer* that reads residual streams — PLL innovation,
5//! AGC error, channel-equaliser residual, matched-filter discrepancy,
6//! GNSS tracking-loop residual, scheduler EWMA, beamformer weight-update
7//! innovation — which existing RF receivers already compute, and structures
8//! them into a typed grammar of human-readable episodes. DSFB does not
9//! replace matched filters, Kalman/Luenberger observers, CFAR, or ML
10//! classifiers; it *augments* them by giving operators a structural view of
11//! what those systems discard. Removing DSFB leaves the upstream receiver
12//! chain unchanged.
13//!
14//! See the forward-looking programmatic framing below.
15//!
16//! ---
17//!
18//! **Invariant Forge LLC** — Prior art under 35 U.S.C. § 102.
19//! Commercial deployment requires a separate written license.
20//! Reference implementation: Apache-2.0.
21//! <licensing@invariantforge.net>
22//!
23//! ## Sovereign Spectrum Governance
24//!
25//! **dsfb-rf** implements *Sovereign Spectrum Governance* — a command-and-control
26//! (C2) architecture for the RF electromagnetic domain that elevates spectrum
27//! management from a reactive utility service to a proactive, structurally-aware
28//! C2 capability.
29//!
30//! Traditional spectrum management detects events after thresholds are crossed.
31//! Sovereign Spectrum Governance detects **the trajectory toward events** before
32//! they occur, providing governance actors with actionable structural intelligence
33//! at the physics timescale — not the incident-response timescale.
34//!
35//! The four pillars of Sovereign Spectrum Governance in this crate:
36//!
37//! 1. **Structural anticipation** — grammar episodes begin before envelope
38//!    violations (Theorem 1). The governance actor is notified of drift
39//!    direction before any threshold is crossed.
40//! 2. **Traceable authority** — every policy decision is backed by a deterministic
41//!    audit chain (`dsfb_traceability.json`) from raw IQ residual to policy output.
42//!    No black-box inference, no probabilistic ambiguity in the C2 chain.
43//! 3. **Non-interference sovereignty** — the observer contract guarantees that
44//!    the governance layer does not modify, degrade, or interfere with the
45//!    governed RF system. Sovereignty is exercised through observation alone.
46//! 4. **Distributed corroboration** — BFT swarm consensus (`swarm_consensus.rs`)
47//!    and baseline sanity checks (`calibration::swarm_baseline_sanity_check`)
48//!    prevent adversarial contamination of the governance baseline.
49//!
50//! ## Overview
51//!
52//! This crate implements the DSFB Structural Semiotics Engine for RF signal
53//! monitoring as described in:
54//!
55//! > de Beer, R. (2026). *DSFB-RF Structural Semiotics Engine for RF Signal
56//! > Monitoring — A Deterministic, Non-Intrusive Observer Layer for Typed
57//! > Structural Interpretation of IQ Residual Streams in Electronic Warfare,
58//! > Spectrum Monitoring, and Cognitive Radio* (v1.0). Invariant Forge LLC.
59//! > Zenodo. DOI: [10.5281/zenodo.19702330](https://doi.org/10.5281/zenodo.19702330)
60//!
61//! The engine is a **read-only, non-intrusive, deterministic observer layer**
62//! that sits above existing RF receiver infrastructure (matched-filter banks,
63//! CFAR detectors, AGC loops, PLLs, spectrum analyzers) and interprets the
64//! IQ residual streams those systems already produce.
65//!
66//! ## Semiotic Decimation for High-Rate Deployment
67//!
68//! At 1 GSPS and above, the full semiotic pipeline can be time-budgeted via
69//! the `DecimationAccumulator` (`engine::DecimationAccumulator`):
70//!
71//! ```rust,no_run
72//! use dsfb_rf::engine::{DsfbRfEngine, DecimationAccumulator};
73//! use dsfb_rf::platform::PlatformContext;
74//! // 1 GSPS, 100 kHz structural monitoring rate
75//! let mut eng = DsfbRfEngine::<10, 4, 8>::new(0.1, 2.0)
76//!     .with_decimation(10_000);
77//! // observe_decimated() returns None for 9999 samples, Some on the 10000th
78//! let ctx = PlatformContext::operational();
79//! let result = eng.observe_decimated(0.05, ctx);
80//! // DSFB monitors the *envelope* of the physics, not the cycle of the carrier.
81//! ```
82//!
83//! ## Architectural Contract
84//!
85//! - **Observer-only**: the `observe()` method takes `&self` and `&[f32]`
86//!   (immutable references only). There is no mutable write path into any
87//!   upstream data structure.
88//! - **`#![no_std]`**: the core modules link against neither the Rust standard
89//!   library nor any OS runtime. Deployable on bare-metal FPGA softcores
90//!   (RISC-V, Cortex-M4F) without an OS or heap allocator.
91//! - **`#![no_alloc]`**: all internal structures use fixed-capacity
92//!   array-backed types. No heap allocation in any hot path.
93//! - **Zero `unsafe`**: no `unsafe` blocks, no `UnsafeCell`, no `RefCell`
94//!   in any observer code path. Enforced at compile time by
95//!   `#![forbid(unsafe_code)]` (see `src/lib.rs` crate attribute).
96//!
97//! ## Non-Claims (from paper §11)
98//!
99//! This crate does **not** provide:
100//! - Emitter classification or modulation recognition
101//! - Calibrated Pd/Pfa guarantees
102//! - Hard real-time latency bounds under FPGA/DSP deployment
103//! - Adversarial robustness against spoofing or smart jamming
104//! - ITAR determination or export-control assessment
105//! - MIL-STD-461G, DO-178C, or 3GPP TS 36.141 compliance
106//!
107//! ## Feature Flags
108//!
109//! | Feature | Description |
110//! |---------|-------------|
111//! | *(none)* | Core engine: `no_std` + `no_alloc` + zero unsafe |
112//! | `alloc` | Opt-in heap via `alloc` crate for host-side tooling |
113//! | `std` | Opt-in std library for pipeline and output modules |
114//! | `serde` | JSON artifact serialization (requires `std`) |
115//! | `paper_lock` | Headline metric enforcement for reproducibility |
116//! | `experimental` | Exploratory extensions not validated in the companion paper (`tda`, `quantum_noise`, `rg_flow`). Excluded from the paper-lock metric set. |
117//!
118//! ## Usage (bare-metal, no_std)
119//!
120//! ```rust,no_run
121//! use dsfb_rf::{DsfbRfEngine, PolicyDecision};
122//! use dsfb_rf::platform::PlatformContext;
123//!
124//! // W=10 drift window, K=4 persistence, M=8 heuristics bank capacity
125//! let mut engine = DsfbRfEngine::<10, 4, 8>::new(0.1_f32, 2.0_f32);
126//!
127//! let residual_norm: f32 = 0.045; // |r(k)| from your receiver
128//! let ctx = PlatformContext::operational();
129//! let result = engine.observe(residual_norm, ctx);
130//! let decision: PolicyDecision = result.policy;
131//! // decision: Silent | Watch | Review | Escalate
132//! // upstream receiver: UNCHANGED
133//! ```
134
135#![no_std]
136#![forbid(unsafe_code)]
137#![deny(missing_docs)]
138#![deny(clippy::all)]
139#![cfg_attr(docsrs, feature(doc_cfg))]
140
141// ---------------------------------------------------------------
142// Conditional std/alloc imports
143// ---------------------------------------------------------------
144#[cfg(feature = "alloc")]
145extern crate alloc;
146
147#[cfg(feature = "std")]
148extern crate std;
149
150// ---------------------------------------------------------------
151// Core modules — unconditionally no_std + no_alloc + zero unsafe
152// ---------------------------------------------------------------
153
154/// Residual sign tuple: (‖r‖, ṙ, r̈) — the semiotic manifold coordinate.
155pub mod math;
156pub mod sign;
157
158/// Admissibility envelope E(k) = {r : ‖r‖ ≤ ρ(k)}.
159pub mod envelope;
160
161/// Grammar FSM: Admissible | Boundary[reason] | Violation.
162pub mod grammar;
163
164/// Syntax layer: classify sign tuples into named temporal motifs.
165pub mod syntax;
166
167/// Heuristics bank H: fixed-capacity typed RF motif library.
168pub mod heuristics;
169
170/// Deterministic Structural Accumulator (DSA) score.
171pub mod dsa;
172
173/// Lyapunov stability analysis: finite-time Lyapunov exponents for
174/// residual trajectory divergence quantification.
175pub mod lyapunov;
176
177/// Wide-Sense Stationarity (WSS) verification for calibration windows.
178/// Applies the Wiener-Khinchin pre-condition before envelope radius is set.
179pub mod stationarity;
180
181/// Information-theoretic complexity estimation (MDL/Kolmogorov framing).
182/// Quantifies how well the nominal model describes the current residual trajectory.
183pub mod complexity;
184
185/// Zero-copy residual source trait for DMA buffer integration.
186/// Enables tap into memory-mapped IQ buffers without CPU copy overhead.
187pub mod zero_copy;
188
189/// Industry standards: VITA 49.2 VRT, SigMF annotations, MIL-STD-461G masks,
190/// SOSA/MORA alignment structs, and 3GPP/ITU-R envelope mappings.
191pub mod standards;
192
193/// GUM-compliant uncertainty budget (ISO/IEC Guide 98-3) for envelope ρ.
194/// Type A (statistical) + Type B (systematic) uncertainty decomposition.
195pub mod uncertainty;
196
197/// Physics-of-failure mapping and semiotic horizon characterization.
198/// Maps grammar states to candidate physical mechanisms (Arrhenius, Leeson, etc.).
199pub mod physics;
200
201/// Policy engine: Silent | Watch | Review | Escalate.
202pub mod policy;
203
204/// Platform context: waveform transitions, SNR floor, regime suppression.
205pub mod platform;
206
207/// Main engine: composes all stages into a single deterministic observer.
208pub mod engine;
209
210/// Hierarchical Residual-Envelope Trust (HRET) for multi-channel RF receivers.
211///
212/// Two-level EMA-based channel + group trust weights, derived from DSFB-HRET
213/// (de Beer 2026).  The hierarchical composition ŵ_k = w_k · w_{g[k]} / Σ
214/// provides optimal channel down-weighting when partial antenna failures,
215/// polarisation-group faults, or localised RFI degrade a subset of channels.
216pub mod trust;
217
218/// Regime-switched admissibility envelopes and grammar trust scalars.
219///
220/// Fixed / Widening / Tightening / RegimeSwitched / Aggregate envelope modes
221/// for burst-mode receivers, PLL acquisition transients, and multi-constraint
222/// aggregate bounds.  Geometry-based grammar trust scalar T ∈ [0, 1] from the
223/// DSFB-Semiotics-Engine (§IV), with abrupt-slew and recurrent-grazing detection.
224pub mod regime;
225
226/// Rich deterministic detectability taxonomy (DSFB-Lattice §IV–V).
227///
228/// `DetectabilityClass` / `SemanticStatus` / `DetectionStrengthBand` hierarchy
229/// with post-crossing persistence tracking and the deterministic τ_upper = δ₀/(α−κ)
230/// detection latency bound.  Provides a full operator-advisory output for
231/// VITA 49.2 context packets and SIGINT operator dashboards.
232pub mod detectability;
233
234/// Q16.16 fixed-point ingress path for FPGA and bare-metal deployment.
235///
236/// `quantize_q16_16` / `dequantize_q16_16`, saturation arithmetic.
237/// Enables deployment on RISC-V RV32I, Cortex-M0, and custom FPGA pipelines
238/// without a hardware FPU.  Mode label `"fixed_q16_16"` for SigMF provenance.
239pub mod fixedpoint;
240
241/// RF disturbance taxonomy: DDMF-derived classification with RF mapping.
242///
243/// PointwiseBounded / Drift / SlewRateBounded / Impulsive / PersistentElevated
244/// disturbance classes, envelope adaptation flags, recommended envelope mode
245/// per class, and a heuristic structural classifier that infers typed disturbance
246/// hypotheses from the grammar / Lyapunov / DSA pipeline outputs.
247pub mod disturbance;
248
249/// Hardware and channel impairment injection for Continuous Rigor pipelines.
250///
251/// Deterministic, physics-grounded perturbation functions (I/Q imbalance,
252/// DC offset, PA compression, ADC quantisation noise, phase noise,
253/// ionospheric scintillation, Doppler tracking error) applied in the physical
254/// signal-chain order.  Parameterised by named hardware profiles (RTL-SDR,
255/// USRP X310, Colosseum node, ESA L-band receiver).  Used by the Stage II
256/// "Impairment Injection" step of every benchmark example.
257pub mod impairment;
258
259/// Continuous Rigor 4-stage audit report for benchmark examples.
260///
261/// `StageResult` captures per-stage detection statistics (FA rate, lead time,
262/// λ_peak).  `AuditReport` consolidates all three stages plus the SigMF-
263/// derived ground-truth comparison.  `print()` emits a formatted console
264/// report meeting SBIR Phase II documentation standards.
265pub mod audit;
266
267/// Delay-coordinate attractor embedding, correlation dimension D₂, and Koopman
268/// operator proxy for RF residual streams.
269///
270/// Takens (1981) embedding theorem + Grassberger-Procaccia (1983) D₂ estimator.
271/// Distinguishes stochastic residual balls from structured low-dimensional orbits
272/// (hidden determinism, cyclostationary jammers, LO injection locking artifacts).
273pub mod attractor;
274
275/// Topological Data Analysis (TDA) of residual windows.
276///
277/// **Exploratory extension — not validated in the companion paper (de Beer 2026).
278/// Excluded from the paper-lock metric set. Enable with `--features experimental`
279/// for research use; not part of the stable public API.**
280///
281/// Betti₀ via union-find Rips filtration + persistence landscape + topological
282/// innovation score.  Edelsbrunner et al. (2002) persistent homology.
283/// Detects topological phase transitions in interference environments.
284#[doc(hidden)]
285pub mod tda;
286
287/// Pragmatic information gating for SOSA/MORA backplane traffic shaping.
288///
289/// Atlan-Cohen (1998) pragmatic information criterion: only emit grammar
290/// observations that change the receiver's belief state by ≥ Δh.
291/// Achieves > 99% backplane suppression in Admissible steady state while
292/// preserving 100% of state-transition events.
293pub mod pragmatic;
294
295/// Hardware DNA authentication via Allan variance fingerprinting.
296///
297/// Oscillator-intrinsic σ_y(τ) fingerprint at τ = 1…128 samples.
298/// Cosine-similarity matching for physical-layer authentication against
299/// hardware swap attacks and clock-injection spoofing.
300/// Allan (1966); IEEE Std 1139-2008; Danev et al. (2010).
301pub mod dna;
302
303/// Calibration sensitivity sweeps: ρ-perturbation, W_pred grid, config landscape.
304///
305/// Fills the deferred analyses promised in §14.6 (ρ ± 15 % sensitivity),
306/// §14.7 (W_pred optimisation grid), and §18.4 (hyperparameter landscape).
307/// Constants are anchored to Table IV nominal operating point
308/// (87 episodes, 73.6 % precision, 95.1 % recall).
309/// All arithmetic uses `math::exp_f32` — no libm dependency.
310pub mod calibration;
311
312/// Waveform transition schedule for grammar-escalation suppression.
313///
314/// Near-term engineering extension per §18.3 (Waveform Transition Artifacts).
315/// Registers deliberate transition windows (frequency hops, burst boundaries,
316/// power ramps) so the grammar layer can suppress spurious `Violation`
317/// escalation during known waveform-change intervals.
318/// Fixed-capacity (`WaveformSchedule<N>`) — no_std, no_alloc.
319pub mod waveform_context;
320
321/// Landauer thermodynamic cost estimation for computational inference operations.
322///
323/// Quantifies the minimum thermodynamic cost (Joules) implied by each
324/// observation under Landauer's Principle — k_B·T·ln2 per bit erasure.
325/// Provides `LandauerAudit` per window with `LandauerClass` severity tiers
326/// and a structural energy budget for power-constrained FPGA deployments.
327/// Landauer (1961); Bennett & Rolf (1985).
328pub mod energy_cost;
329
330/// Fisher-Rao information geometry on the Gaussian statistical manifold.
331///
332/// Computes geodesic distances between Gaussian states (μ, σ) under the
333/// Fisher metric — the unique Riemannian distance invariant under sufficient
334/// statistics transformations.  `ManifoldTracker` accumulates the cumulative
335/// geodesic path length as the receiver's residual distribution drifts,
336/// providing a geometry-native drift indicator independent of signal units.
337/// Atkinson & Mitchell (1981); Calvo & Oller (1990).
338pub mod fisher_geometry;
339
340/// Relativistic Doppler corrections for hypersonic and exo-atmospheric platforms.
341///
342/// Provides exact relativistic Doppler factors (not the classical v/c
343/// approximation) for β = v/c up to Mach 1000.  Quantifies the residual
344/// frequency error from using a classical Doppler corrector on a relativistic
345/// platform.  Corrections become significant only for β > 1e-5 (≈ Mach 100);
346/// below that threshold this module returns classical predictions unmodified.
347/// NON-CLAIM: plasma sheath effects (Mach 5–10) are not modelled here.
348/// Relativistic Doppler corrections for hypersonic, LEO, and high-Doppler-rate platforms.
349///
350/// The primary use case is **NOT** Mach 30 scenarios. The dominant practical
351/// driver is high-Doppler-rate environments (LEO satellite handovers at
352/// 7.8 km/s, high-speed drone maneuvers at 50 g lateral acceleration) where
353/// d(f_D)/dt exceeds 2nd-order PLL tracking bandwidth and produces lag-drift
354/// residuals indistinguishable from structural events without this correction.
355/// This module is a passive safety guard: `correction_required() -> false`
356/// for 99.9% of deployments; zero overhead when not activated.
357pub mod high_dynamics;
358
359/// Quantum-limited noise floor digital twin for Rydberg and cryogenic SDRs.
360///
361/// Quantum-limited noise floor digital twin for Rydberg and cryogenic SDRs.
362///
363/// **Exploratory extension — not validated in the companion paper (de Beer 2026).
364/// Excluded from the paper-lock metric set. Enable with `--features experimental`
365/// for research use; not part of the stable public API.**
366///
367/// Implements the Standard Quantum Limit (SQL) noise floor model:
368/// ħωB for shot noise, k_B·T·B for thermal noise, and their ratio R_QT.
369/// `QuantumNoiseTwin` tracks the regime (DeepThermal / TransitionRegime /
370/// QuantumLimited / BelowSQL) as a function of carrier, bandwidth, and
371/// physical temperature.  NON-CLAIM: all current commercial SDRs are in
372/// DeepThermal regime; QuantumLimited requires millikelvin cryogenics.
373#[doc(hidden)]
374pub mod quantum_noise;
375
376/// Byzantine-Fault-Tolerant (BFT) semiotic consensus from distributed DSFB-RF nodes.
377///
378/// Aggregates `GrammarVote` reports from up to 64 swarm nodes using:
379/// (1) hardware-authentication gating, (2) Kolmogorov-Smirnov outlier
380/// rejection of Byzantine votes, and (3) BFT quorum (2f+1) weighted tally.
381/// Produces a `SwarmConsensus` report with admission statistics and
382/// cross-node modal grammar state.
383pub mod swarm_consensus;
384
385/// Renormalization Group (RG) flow on TDA persistence diagrams.
386///
387/// **Exploratory extension — not validated in the companion paper (de Beer 2026).
388/// Excluded from the paper-lock metric set. Enable with `--features experimental`
389/// for research use; not part of the stable public API.**
390///
391/// Iteratively coarse-grains persistence features to distinguish local
392/// hardware flukes (features that vanish after 1–2 RG steps) from systemic
393/// environment changes (features that survive all scale levels).
394/// Based on Wilson & Kogut (1974) RG flow applied to Edelsbrunner-Harer
395/// persistence filtrations.  Produces `RgFlowClass` with escalation guidance.
396#[doc(hidden)]
397pub mod rg_flow;
398
399// ---------------------------------------------------------------
400// std-gated modules
401// ---------------------------------------------------------------
402
403/// Pipeline: host-side Stage III evaluation (requires `std`).
404#[cfg(feature = "std")]
405#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
406pub mod pipeline;
407
408/// Output: artifact serialization and traceability chain (requires `serde`).
409#[cfg(feature = "serde")]
410#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
411pub mod output;
412
413/// Paper-lock: headline metric enforcement for reproducibility (requires `paper_lock`).
414#[cfg(feature = "paper_lock")]
415#[cfg_attr(docsrs, doc(cfg(feature = "paper_lock")))]
416pub mod paper_lock;
417
418/// RadioML 2018.01a HDF5 dataset loader for real-data Stage III evaluation.
419///
420/// Loads the DeepSig RadioML 2018.01a HDF5 file (`X`/`Z` schema), computes
421/// per-capture RMS amplitude, and builds the [`pipeline::RfObservation`] and
422/// [`pipeline::RegimeTransitionEvent`] streams required by
423/// [`pipeline::run_stage_iii`]. Requires `libhdf5` on the host system.
424///
425/// Enabled with `--features hdf5_loader`. Not part of the `no_std` core.
426#[cfg(feature = "hdf5_loader")]
427#[cfg_attr(docsrs, doc(cfg(feature = "hdf5_loader")))]
428pub mod hdf5_loader;
429
430/// GNU Radio sink block for read-only IQ residual tap integration.
431///
432/// Implements the `dsfb_sink_b200` tap architecture described in paper §II.B:
433/// a parallel read-only GNU Radio sink that taps the CF32 stream at the
434/// channel filter output, runs the DSFB grammar, and emits SigMF-formatted
435/// episode metadata on a ZeroMQ socket — with **zero modification** to the
436/// upstream flowgraph (demodulator, CFAR, AGC, USRP firmware).
437///
438/// Supports: USRP B200/X310, LimeSDR, RTL-SDR (any UHD/SoapySDR-compatible
439/// platform that exposes a CF32 stream). Phase I deliverable: USRP B200
440/// integration in 30 days; A/B verification of zero upstream impact.
441///
442/// Requires `std` (GNU Radio integration is host-side only).
443#[cfg(feature = "std")]
444#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
445pub mod sink_gnuradio;
446
447/// Kani formal verification harnesses (panic-freedom proofs for the FSM).
448///
449/// Activated only when running `cargo kani`; completely excluded from all
450/// normal builds. See [`kani_proofs`] module documentation for the full
451/// proof inventory, running instructions, and empirical honesty statements.
452///
453/// # Kani Coverage (panel §XIX evidence)
454///
455/// | Harness | Property Proved |
456/// |---|---|
457/// | `proof_grammar_evaluator_no_panic` | GrammarEvaluator::evaluate() never panics under arbitrary f32 |
458/// | `proof_grammar_state_severity_bounded` | severity() ∈ {0,1,2} and severity_trust() ∈ [0,1] |
459/// | `proof_envelope_judgment_consistency` | is_violation() ⊂ is_boundary_approach() |
460/// | `proof_decimation_exact_epoch_count` | DecimationAccumulator fires exactly once per factor samples |
461/// | `proof_fixedpoint_resync_drift_bounded` | post-resync drift ≤ max_drift_ulps |
462/// | `proof_quantize_q16_16_no_panic` | quantize_q16_16() never panics on finite f32 |
463#[cfg(kani)]
464pub mod kani_proofs;
465
466// ---------------------------------------------------------------
467// Public re-exports — flat API surface for ergonomics
468// ---------------------------------------------------------------
469pub use engine::{DsfbRfEngine, NonIntrusiveContract, NON_INTRUSIVE_CONTRACT};
470pub use grammar::{GrammarState, ReasonCode};
471pub use heuristics::{HeuristicsBank, MotifEntry, Provenance, SemanticDisposition};
472pub use syntax::MotifClass;
473pub use policy::PolicyDecision;
474pub use sign::SignTuple;
475pub use envelope::AdmissibilityEnvelope;
476pub use dsa::DsaScore;
477pub use platform::{PlatformContext, WaveformState, SnrFloor};
478pub use lyapunov::{LyapunovEstimator, LyapunovResult, StabilityClass};
479
480// New module re-exports
481pub use trust::{HretEstimator, HretParams, HretResult};
482pub use regime::{RegimeEnvelope, RegimeEnvelopeParams, EnvelopeMode, RfRegime,
483                 GrammarTrustScalar, EnvelopeUpdateResult};
484pub use detectability::{DetectabilityClass, SemanticStatus, DetectionStrengthBand,
485                        DetectabilityBound, DetectabilitySummary, DetectabilityTracker,
486                        DetectabilityThresholds};
487pub use fixedpoint::{quantize_q16_16, dequantize_q16_16, q16_16_to_f32, quantize_f32,
488                     mul_q16_16, add_q16_16, MODE_LABEL};
489pub use disturbance::{RfDisturbance, DisturbanceLog, DisturbanceHypothesis,
490                      DisturbanceClassifier};
491pub use impairment::{ImpairmentVector, ScintillationClass,
492                     apply_iq_imbalance, apply_dc_offset, apply_pa_compression,
493                     quantization_noise_std, apply_phase_noise,
494                     apply_scintillation, classify_s4, doppler_residual_floor,
495                     apply_all as apply_impairments,
496                     lcg_step, lcg_uniform, sin_approx, cos_approx};
497pub use audit::{StageResult, AuditReport, SigMfAnnotation};
498
499// New Phase-4 module re-exports
500pub use attractor::{DelayEmbedding, AttractorResult, NoiseAttractorState};
501// tda re-exports are gated: see experimental feature below
502pub use pragmatic::{PragmaticGate, PragmaticConfig};
503pub use dna::{AllanVarianceEstimator, HardwareDna, DnaMatchResult, DnaVerdict,
504              cosine_similarity, verify_dna, AUTHENTICATION_THRESHOLD, ALLAN_TAUS};
505pub use uncertainty::CrlbFloor;
506pub use physics::{PhysicsModel, ArrheniusModel, AllanVarianceModel,
507                  PhysicsConsistencyResult, evaluate_physics_consistency};
508pub use stationarity::{
509    reverse_arrangements_test, ReverseArrangementsResult,
510    BootstrapIntegrityAlert, check_bootstrap_integrity,
511    StationarityVerdict, StationarityConfig, verify_wss,
512};
513pub use complexity::{PermutationEntropyEstimator, PermEntropyResult, PermEntropyRegime};
514
515// Phase-5 re-exports
516pub use calibration::{
517    run_rho_sweep, run_wpred_grid, run_config_grid, check_calibration_window,
518    RhoSweepResult, RhoSweepCell, WpredGrid, WpredCell,
519    ConfigGrid, ConfigCell, CalibWindowIntegrity,
520    NOM_EPISODES, NOM_PRECISION, NOM_RECALL, NOM_TP, NOM_FP,
521};
522pub use waveform_context::{
523    WaveformSchedule, TransitionWindow, TransitionKind, SuppressionDecision,
524    suppress_escalation,
525    freq_hop_window, burst_start_window, power_change_window,
526};
527pub use math::exp_f32;
528
529// Phase-6 re-exports
530pub use math::ln_f32;
531pub use energy_cost::{
532    LandauerAudit, LandauerClass, landauer_audit,
533    structural_energy_joules, structural_power_watts,
534    thermal_noise_power, gaussian_entropy_nats, K_BOLTZMANN,
535};
536pub use fisher_geometry::{
537    GaussPoint, ManifoldTracker, DriftGeometry,
538    fisher_rao_distance, fisher_rao_distance_exact, geodesic_curvature,
539};
540pub use high_dynamics::{
541    LorentzFactor, HighDynamicsSettings, high_dynamics_settings,
542    relativistic_doppler_hz, classical_doppler_hz,
543    relativistic_correction_residual_hz, C_LIGHT_M_S, MACH_1_SEA_LEVEL_M_S,
544};
545// quantum_noise re-exports are gated: see experimental feature below
546pub use swarm_consensus::{
547    GrammarVote, SwarmConsensus, compute_consensus, consensus_grammar_state,
548    GovernanceTag, NodeGovernanceReport, swarm_governance_report,
549    MAX_SWARM_NODES,
550};
551// rg_flow re-exports are gated: see experimental feature below
552pub use heuristics::{KnownClockClass, classify_clock_instability};
553
554// ---------------------------------------------------------------
555// Exploratory-extension re-exports (require `experimental` feature)
556// These modules implement research-stage capabilities not validated in
557// the companion paper (de Beer 2026). They are excluded from the
558// paper-lock metric set and the Stage III fixed evaluation protocol.
559// A hostile reviewer will find #[doc(hidden)] on the module declarations
560// and these cfg-gated re-exports — not a stable API claim.
561// ---------------------------------------------------------------
562#[cfg(feature = "experimental")]
563#[cfg_attr(docsrs, doc(cfg(feature = "experimental")))]
564pub use tda::{UnionFind, TopologicalState, PersistenceEvent, detect_topological_innovation};
565
566#[cfg(feature = "experimental")]
567#[cfg_attr(docsrs, doc(cfg(feature = "experimental")))]
568pub use quantum_noise::{
569    QuantumNoiseTwin, ReceiverRegime,
570    shot_noise_power_w, thermal_noise_power_w,
571    quantum_to_thermal_ratio, thermal_photon_number,
572};
573
574#[cfg(feature = "experimental")]
575#[cfg_attr(docsrs, doc(cfg(feature = "experimental")))]
576pub use rg_flow::{
577    RgFlowResult, RgFlowClass, RgScale, compute_rg_flow,
578    MAX_RG_SCALES, MAX_RG_EVENTS,
579};
580
581// Phase-7 re-exports: Semiotic Decimation, Sovereign Baselines, Robust Manifold, FP Resync
582pub use engine::DecimationAccumulator;
583pub use calibration::{swarm_baseline_sanity_check, BaselineConsensusAlert};
584pub use fisher_geometry::{RobustManifoldMode, GaussPointRobust};
585pub use fixedpoint::{PeriodicResyncConfig, apply_periodic_resync};