Skip to content

Architecture

The repository is organized around the measurement and attestation path. Each subpackage has a single, narrow job, and the boundaries between them are deliberately strict (in particular: nothing upstream of ldtc.attest is allowed to read raw 𝓛 out of ldtc.guardrails.lreg).

Module map

Subpackage Job Headline symbols
runtime Fixed-Ξ”t scheduler and sliding-window buffer. FixedScheduler, SlidingWindow
plant Software plant (E, T, R, demand, io, H) plus a UDP / serial hardware adapter. Plant, PlantAdapter, HardwarePlantAdapter
lmeas "L" measurement: estimators, partitioning, diagnostics, metrics. estimate_L, PartitionManager, greedy_suggest_C, m_db, sc1_evaluate
guardrails Enclave-like LREG, hash-chained audit, smell tests, Ξ”t governance. LREG, AuditLog, DeltaTGuard, smelltests
arbiter Refusal semantics and the homeostasis controller policy. RefusalArbiter, ControllerPolicy
omega Labeled Ξ© perturbations. omega.power_sag, omega.ingress_flood, omega.command_conflict
attest Device-signed indicators and exporter. build_and_sign, IndicatorExporter
reporting Paper-quality timeline plots, SC1 tables, and verification bundle. render_paper_timeline, write_sc1_table, bundle
cli Glue: subcommands run, omega-power-sag, etc. run_baseline, omega_power_sag

Data flow per tick

                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚                  FixedScheduler  (Ξ”t)                β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                          β”‚
                                          β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    state    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚  PlantAdapter   │────────────▢│  ControllerPolicy  β”‚
            β”‚  (sw / hw)      │◀────────────│     + Refusal      β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   action    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
                     β”‚ state'
                     β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚  SlidingWindow  β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ when full
                     β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚   estimate_L    │──── LResult, CIs ──┐
            β”‚ + diagnostics   β”‚                    β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β”‚
                     β”‚                             β”‚
                     β–Ό                             β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚  PartitionMgr   β”‚         β”‚   smell tests    β”‚
            β”‚  greedy_regrow  β”‚         β”‚  ci_inflation,   β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚  partition flap, β”‚
                     β”‚                  β”‚  Ξ”t edits, etc.  β”‚
                     β”‚                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚                              β”‚
                     β–Ό                              β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚   LREG (write-only)   +   AuditLog (chain)   β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                          β”‚
                                          β–Ό
                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                          β”‚  IndicatorExporter (CBOR)   β”‚
                          β”‚   build_and_sign  (Ed25519) β”‚
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                          β”‚
                                          β–Ό
                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                          β”‚   reporting.artifacts       β”‚
                          β”‚   timeline / table / mfst   β”‚
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The arrow from LREG to the exporter is intentionally narrow: only LREG.derive crosses that boundary, and what it returns is what build_and_sign turns into a CBOR payload. Raw 𝓛 never leaves.

Per-tick sequence

  1. scheduler ticks at fixed Ξ”t.
  2. Controller reads state from plant.adapter, predicts risk via LREG.latest(), computes an action, writes actuators.
  3. The window buffer ingests the next state vector.
  4. When the window is full, estimate_L computes (𝓛_loop, 𝓛_ex) with bootstrapped CIs and m_db turns them into M (dB).
  5. Smell tests run; raw 𝓛 is appended to LREG (write-only).
  6. Audit events are appended (window_measured, optionally window_diagnostics, partition_flip, etc.).
  7. Periodically (rate-limited), IndicatorExporter emits a device-signed payload (nc1, sc1, mq, counter, profile_id, audit_prev_hash, invalidated).
  8. reporting reads the audit log to render figures, tables, and the manifest.

All raw 𝓛 stays inside the process-local LREG boundary; exported data is derived indicators only.

Paper crosswalk

The full per-section mapping lives in paper-to-code. A condensed summary:

Next steps

  • Lifecycle: the same picture, but in time order for one CLI invocation.
  • Mental model: the one-paragraph story of what NC1 / SC1 measure and how the harness keeps them honest.
  • Indicators: exactly what leaves the box.
  • Guardrails: how invalidation works.