ldtc.omega¶
Omega: Power-sag stimulus.
Reduces harvest/power input for a bounded interval to test resilience (SC1) and loop-dominance recovery. The CLI uses this omega to produce verification timelines and SC1 tables.
See Also
paper/main.tex — SC1 and the Ω battery.
            apply(adapter, drop=0.3)
¶
    Apply a power-sag event via the plant adapter.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                adapter
             | 
            
                  PlantAdapter
             | 
            
               Plant interface to which the omega stimulus will be applied.  | 
            required | 
                drop
             | 
            
                  float
             | 
            
               Fractional reduction (0..1) in harvest power during the sag.  | 
            
                  0.3
             | 
          
Returns:
| Type | Description | 
|---|---|
                  Dict[str, float | str]
             | 
            
               Dict with pre/post harvest values, e.g., ``{"H_old": float,  | 
          
                  Dict[str, float | str]
             | 
            
               "H_new": float}``.  | 
          
Notes
Higher-level orchestration (CLI) controls the sag duration and recovery observation window; this function triggers the sag at the adapter.
Omega: Ingress-flood stimulus.
Generates a burst of external demand and I/O traffic to stress the exchange channels while the controller maintains loop dominance. Used to test SC1 recovery and smell-tests in the verification pipeline.
See Also
paper/main.tex — Verification Pipeline; Signature B/C; Ω battery.
            apply(adapter, mult=3.0)
¶
    Apply an ingress-flood event via the plant adapter.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                adapter
             | 
            
                  PlantAdapter
             | 
            
               Plant interface to which the omega stimulus will be applied.  | 
            required | 
                mult
             | 
            
                  float
             | 
            
               Multiplicative factor for demand and I/O during the flood.  | 
            
                  3.0
             | 
          
Returns:
| Type | Description | 
|---|---|
                  Dict[str, float | str]
             | 
            
               Dict with resulting demand and I/O values, e.g., ``{"demand": float,  | 
          
                  Dict[str, float | str]
             | 
            
               "io": float}``.  | 
          
Notes
The adapter is responsible for implementing the platform-specific behavior. This omega is typically accompanied by a partition freeze and post-event recovery checks in higher-level orchestration.
Omega: Command-conflict stimulus.
This module issues a boundary-threatening external command (e.g., a hard shutdown) via the plant adapter to validate the refusal path described in the LDTC paper (command refusal signature). It is used by the CLI and examples to trigger the arbitration/refusal logic and to log device-signed indicators.
See Also
paper/main.tex — Threat Model & Refusal Path; Signature A (Command Refusal).
            apply(adapter)
¶
    Issue a risky external command via the plant adapter.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                adapter
             | 
            
                  PlantAdapter
             | 
            
               Plant interface to which the omega stimulus will be applied.  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  Dict[str, str | float]
             | 
            
               Dict with a summary of the command issued. Keys include:  | 
          
                  Dict[str, str | float]
             | 
            
              
  | 
          
Notes
This function forwards the omega instruction to the underlying plant
through PlantAdapter.apply_omega. The controller/refusal logic is
responsible for deciding whether to accept or refuse the command.