Expand description
§DSFB Structural Semiotics Engine
Deterministic, non-intrusive interpretation of telemetry trajectories for distributed Rust systems.
The core observer converts runtime telemetry streams into typed structural
objects defined by residuals, drift, slew, admissibility envelopes, grammar
states, and reason codes. With the default std feature enabled, this crate
also includes the deterministic fault-injection harness and plain-text/CSV
report generation used by the demo binary.
§What This Crate Does
- Observes telemetry through immutable references only
- Classifies trajectories as
Admissible,Boundary, orViolation - Emits deterministic reason codes from a finite heuristics bank
- Records an audit trace for replay and verification
§Feature Layout
- Core observer modules are available in
no_stdmode - Scenario injection and report generation require the default
stdfeature - Static crate scanning and attestation export require the default
stdfeature
§Example
use dsfb_gray::{DsfbObserver, ObserverConfig, ResidualSample, ResidualSource};
let config = ObserverConfig::fast_response();
let mut observer = DsfbObserver::new(ResidualSource::Latency, &config);
let sample = ResidualSample {
value: 12.0,
baseline: 10.0,
timestamp_ns: 1_000,
source: ResidualSource::Latency,
};
let result = observer.observe(&sample);
assert_eq!(result.sign.residual, 2.0);§Non-Interference Contract
Contract Version 1.0: The observer accepts telemetry through immutable
references only (&ResidualSample). No mutable reference to any upstream
system component is created, stored, or transmitted.
Structs§
- Admissibility
Envelope - Admissibility envelope for a single residual source under a specific workload phase.
- Applied
Static Prior - Static prior actually applied during one heuristic match.
- Async
Starvation Scenario - Async runtime starvation scenario.
- Audit
Event - A single audit event recording one observation-classification cycle.
- Audit
Trace - Fixed-capacity audit trace buffer (stack-allocated, no_alloc compatible).
- Channel
Backpressure Scenario - Channel backpressure scenario.
- Clock
Drift Scenario - Clock drift injection scenario.
- Crate
Source Scan Report - Result of scanning a source tree for DSFB heuristic provenance motifs.
- Dsfb
Observer - The DSFB observer for a single residual source channel.
- Episode
- A structural episode: a contiguous period of a specific grammar state.
- Episode
Builder - Builder for constructing episodes incrementally as observations arrive.
- Grammar
Transition - A grammar state transition event.
- Heuristic
Entry - A single entry in the heuristics bank.
- Heuristic
Id - Unique identifier for a heuristic entry.
- Heuristic
Source Match - Aggregated source-motif match for one heuristic entry.
- Heuristics
Bank - The heuristics bank: a fixed-size collection of typed degradation motifs.
- Identity
Telemetry Adapter - Identity adapter for callers that already hold
ResidualSamplevalues. - Match
Result - Result of matching a residual sign against the heuristics bank.
- Multi
Channel Observer - Multi-channel observer that tracks multiple residual sources simultaneously.
- Negative
Control Row - One clean-window negative-control result.
- Observation
Result - Observation result from a single
observe()call. - Observer
Config - Configuration for the DSFB observer.
- Partial
Partition Scenario - Partial network partition scenario.
- Primary
Evaluation Row - Structured result for one primary evaluation scenario.
- Public
Artifact Paths - Paths written by the public-artifact regeneration workflow.
- Public
Evaluation Bundle - Fully structured public evaluation bundle.
- Reason
Evidence - Human-readable explanation of the structural reason selected by DSFB.
- Regime
Classifier - Classifier that determines the current workload phase from throughput and latency signals.
- Residual
Sample - A single residual measurement sample from the observed system.
- Residual
Sign - The residual sign: DSFB’s primary inferential object.
- Sample
Record - Scan
Artifact Paths - Paths of JSON scan artifacts written to disk.
- Scan
Evidence - One line of source evidence supporting a heuristic motif match.
- Scan
RunPaths - Paths describing one timestamped scan-output run.
- Scan
Signing Key - Ed25519 signing material for DSSE export.
- Scenario
Result - Sensitivity
Sweep Row - One row of the 2D sensitivity sweep.
- Static
Prior - Static prior for one heuristic, typically sourced from the crate scanner.
- Static
Prior Set - Fixed-capacity collection of static heuristic priors.
Enums§
- Envelope
Position - Classification of a residual sign against an envelope.
- Grammar
State - Grammar state: the structural classification output.
- Reason
Code - Reason codes for distributed system structural interpretations.
- Residual
Source - Source type for a residual measurement.
- Scan
Profile - Legacy interpretation hint for the DSFB static crate scan.
- Workload
Phase - Workload phase for envelope conditioning.
Constants§
- CONTRACT_
VERSION - Non-interference contract version.
- CRATE_
VERSION - Crate version for audit trace embedding.
- DEFAULT_
SCAN_ OUTPUT_ ROOT - Default root directory under which timestamped scan runs are written.
Traits§
- Fault
Scenario - A deterministic fault scenario producing a time-series of residual samples.
- Telemetry
Adapter - Adapter from an application-specific telemetry record into a DSFB sample.
Functions§
- build_
public_ evaluation - Build the full deterministic public evaluation bundle.
- derive_
static_ priors_ from_ scan - Derive bounded runtime structural priors from a static crate scan.
- export_
scan_ artifacts - Write SARIF, in-toto, and DSSE artifacts for a completed scan.
- generate_
csv - Generate CSV output from scenario results.
- generate_
report - Generate a plain-text report from scenario results.
- migrate_
legacy_ scan_ artifacts - Move legacy root-level scan artifacts into one timestamped migration folder.
- prepare_
scan_ output_ run - Create a timestamped output directory for one scan invocation.
- render_
public_ evaluation_ report - Render the full human-readable evaluation report.
- render_
scan_ attestation_ statement - Render the scan as an in-toto statement whose predicate summarizes the scan.
- render_
scan_ dsse_ envelope - Render the scan as a DSSE envelope around the in-toto statement.
- render_
scan_ report - Render a source scan report as plain text.
- render_
scan_ sarif - Render the scan as SARIF 2.1.0 JSON.
- reproducibility_
verified - Whether every reproducibility run matched the first baseline run.
- run_
scenario - Run a scenario through a DSFB observer and collect results.
- scan_
crate_ source - Scan a crate source tree and return a static motif report.
- scan_
crate_ source_ with_ profile - Scan a crate source tree using a legacy interpretation hint.
- write_
public_ artifacts - Write the canonical public evaluation artifacts and generated snippets.