STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_layerx_integration_le4 Namespace Reference

Functions

 _script ()
 _golden ()
Dict[str, Any] _burn (str case, overrides=(), **Any settings)
 he_pad ()
 he_flight ()
 he_trip ()
 test_the_baseline_does_not_move_with_the_diagnostics_on (he_pad)
 test_every_diagnostics_block_is_there_with_its_contract_keys_and_finite_numbers (he_pad)
 test_the_network_is_recorded_and_its_blocks_match_the_audit (he_pad)
 test_le4_limits_follow_the_decisions (he_pad)
 test_le4_events_record_sidecar_and_cost (he_pad)
 test_the_helium_drawing_flies_and_matches_the_audits_he_ullage_what_if (he_flight)
 test_the_flight_settles_on_the_pad_first_then_flies_inline (he_flight, he_pad)
 test_the_audits_trip_stops_the_burn_at_the_trip (he_trip, he_pad)

Variables

 ROOT = Path(__file__).resolve().parents[1]
str BASELINE = ROOT / "docs" / "layerx" / "baseline-2026-10-07.json"
list pytestmark
dict CONTRACT
dict ROWS
dict FINITE
tuple NEEDS_NETWORK = ("ladder", "regulator", "solenoids", "saturation")
float FULL_IMPULSE_NS = 24244.24118762319
float TRIP_MAWP_PSI = 585.0

Detailed Description

LE4 burned with every diagnostic wired in: the baseline must not move, and every block must be there.

Slow (three LE4 burns, ~6 min): skipped unless ``LAYERX_GOLDEN=1``, like tests/test_layerx_golden.py,
whose baseline, config and tolerances these use.

* **he_pad, diagnostics on** (as the router runs every burn): the golden figures are reproduced
  within the golden bands (the diagnostics read the burn and change nothing in it), every
  DATA-CONTRACT 3 block is present with its contract keys and finite numbers, the limits follow
  the coordinator decisions, every event has a unique stable key, the run record lists every model,
  and the diagnostics cost under 10 % of the burn.
* **he_flight**: the helium hot-fire drawing flies now that the flight prices its ullage and refill
  as helium. It reproduces the baseline's "He ullage" what-if (AUDIT 8 first gave 24,235.2 N·s, 3.4461 s, apogee
  3,249 m AGL), which reached it by patching the config and flying the retired RocketPy outer loop.
  The burn settles on the pad first -- the same burn as he_pad, figure for figure -- then flies
  with the 1-DOF ascent stepped inside it (AUDIT D5-C), within 0.5 % of RocketPy's specific force.

Every burn records the whole feed network (``result.network``, DATA-CONTRACT 2, wired 2026-10-03), so
the blocks that read it (ladder, regulator, solenoids, saturation, the pressurant floor, the stability
block's start window) must all be there, and agree with the AUDIT's own hand figures for this burn.

* **The AUDIT's trip** (section 5, #1): TK-FUEL's MAWP restated (600 psi in the AUDIT, 585 psi since
  the default lockup became the drawing's dome). Before the wiring Layer X
  integrated the frozen stand to the 14 s horizon (99,478 N s, "Horizon reached", no trip). Now the
  burn stops where the tank crosses 614.7 psia (~3.1 s): its impulse, delivered impulse and burn time
  end there, it carries ``tripped``, a ``fail`` event keyed ``trip``, ``converged`` false, and a bad
  ``vessel_trip`` limit, with every diagnostics block still built.

Function Documentation

◆ _burn()

Dict[str, Any] test_layerx_integration_le4._burn ( str case,
overrides = (),
**Any settings )
protected
One LE4 burn as the router runs it: a private copy of the baseline's config, its own runner,
diagnostics on, the sidecar kept.

Definition at line 103 of file test_layerx_integration_le4.py.

References _script().

Referenced by he_flight(), he_pad(), and he_trip().

◆ _golden()

test_layerx_integration_le4._golden ( )
protected

◆ _script()

test_layerx_integration_le4._script ( )
protected

Definition at line 89 of file test_layerx_integration_le4.py.

Referenced by _burn().

◆ he_flight()

test_layerx_integration_le4.he_flight ( )

Definition at line 134 of file test_layerx_integration_le4.py.

References _burn().

◆ he_pad()

test_layerx_integration_le4.he_pad ( )

Definition at line 129 of file test_layerx_integration_le4.py.

References _burn().

◆ he_trip()

test_layerx_integration_le4.he_trip ( )

Definition at line 139 of file test_layerx_integration_le4.py.

References _burn().

◆ test_every_diagnostics_block_is_there_with_its_contract_keys_and_finite_numbers()

test_layerx_integration_le4.test_every_diagnostics_block_is_there_with_its_contract_keys_and_finite_numbers ( he_pad)

Definition at line 170 of file test_layerx_integration_le4.py.

References min.

◆ test_le4_events_record_sidecar_and_cost()

test_layerx_integration_le4.test_le4_events_record_sidecar_and_cost ( he_pad)

Definition at line 248 of file test_layerx_integration_le4.py.

◆ test_le4_limits_follow_the_decisions()

test_layerx_integration_le4.test_le4_limits_follow_the_decisions ( he_pad)
The team's answers of 2026-10-03: D7 (drawing lines, eroded engine, from the first full-flow
step), tank limits and the opening surge as information, the mains never closing.

Definition at line 229 of file test_layerx_integration_le4.py.

◆ test_the_audits_trip_stops_the_burn_at_the_trip()

test_layerx_integration_le4.test_the_audits_trip_stops_the_burn_at_the_trip ( he_trip,
he_pad )

Definition at line 307 of file test_layerx_integration_le4.py.

◆ test_the_baseline_does_not_move_with_the_diagnostics_on()

test_layerx_integration_le4.test_the_baseline_does_not_move_with_the_diagnostics_on ( he_pad)

Definition at line 153 of file test_layerx_integration_le4.py.

References _golden().

◆ test_the_flight_settles_on_the_pad_first_then_flies_inline()

test_layerx_integration_le4.test_the_flight_settles_on_the_pad_first_then_flies_inline ( he_flight,
he_pad )

Definition at line 286 of file test_layerx_integration_le4.py.

◆ test_the_helium_drawing_flies_and_matches_the_audits_he_ullage_what_if()

test_layerx_integration_le4.test_the_helium_drawing_flies_and_matches_the_audits_he_ullage_what_if ( he_flight)

Definition at line 271 of file test_layerx_integration_le4.py.

◆ test_the_network_is_recorded_and_its_blocks_match_the_audit()

test_layerx_integration_le4.test_the_network_is_recorded_and_its_blocks_match_the_audit ( he_pad)

Definition at line 210 of file test_layerx_integration_le4.py.

Variable Documentation

◆ BASELINE

str test_layerx_integration_le4.BASELINE = ROOT / "docs" / "layerx" / "baseline-2026-10-07.json"

Definition at line 42 of file test_layerx_integration_le4.py.

◆ CONTRACT

dict test_layerx_integration_le4.CONTRACT
Initial value:
1= {
2 "stability": ("basis", "t", "margin", "frequency_hz", "worst", "settled_min", "start_window_s", "nyquist",
3 "tau_sweep", "acoustic", "other_basis", "model"),
4 "hardware": ("t", "throat_d_mm", "At_ratio", "eps", "Lstar_m", "contraction", "liner_min_mm", "insert_back_K",
5 "insert_back_basis", "contour", "separation", "isp", "soak", "heatmap", "model"),
6 "pressurant": ("species", "loaded_kg", "used_kg", "residual_kg", "required_kg", "margin_kg", "bottle_T_K", "jt_dT_K"),
7 "cavitation": ("ox", "fuel"),
8 "injector": ("t", "v_ox", "v_fuel", "momentum_ratio", "design_momentum_ratio", "resultant_angle_deg", "eta_cstar"),
9 "thrust_shape": ("mean_N", "dev_max_pct", "dev_rms_pct", "breakdown"),
10 "start": ("t", "pc_psia", "mdot_ox", "mdot_fuel", "mr", "fuel_lead_s", "valve_travel_s", "prime_ox_s",
11 "prime_fuel_s", "ignition_s", "impulse_deficit_Ns", "hard_start", "model"),
12 "shutdown": ("first_dry", "mode", "tail_mr_max", "model"),
13 "vv": ("mass", "pressurant", "energy", "convergence"),
14 "ladder": ("t", "ox", "fuel"),
15 "regulator": ("t", "inlet_psia", "outlet_psia", "mdot", "capacity_mdot", "use_frac", "droop_psi", "spe_psi",
16 "choked", "wide_open", "cv"),
17 "saturation": ("nodes",),
18}

Definition at line 50 of file test_layerx_integration_le4.py.

◆ FINITE

dict test_layerx_integration_le4.FINITE
Initial value:
1= {
2 "start": ("fuel_lead_s", "valve_travel_s", "prime_ox_s", "prime_fuel_s", "ignition_s", "impulse_deficit_Ns"),
3 "shutdown": ("tail_mr_max",),
4 "pressurant": ("loaded_kg", "used_kg", "residual_kg"),
5 "thrust_shape": ("mean_N", "dev_max_pct", "dev_rms_pct"),
6 "stability": ("start_window_s",),
7}

Definition at line 75 of file test_layerx_integration_le4.py.

◆ FULL_IMPULSE_NS

float test_layerx_integration_le4.FULL_IMPULSE_NS = 24244.24118762319

Definition at line 84 of file test_layerx_integration_le4.py.

◆ NEEDS_NETWORK

tuple test_layerx_integration_le4.NEEDS_NETWORK = ("ladder", "regulator", "solenoids", "saturation")

Definition at line 82 of file test_layerx_integration_le4.py.

◆ pytestmark

list test_layerx_integration_le4.pytestmark
Initial value:
1= [
2 pytest.mark.skipif(os.environ.get("LAYERX_GOLDEN") != "1",
3 reason="slow LE4 burns: set LAYERX_GOLDEN=1 to run them"),
4]

Definition at line 44 of file test_layerx_integration_le4.py.

◆ ROOT

test_layerx_integration_le4.ROOT = Path(__file__).resolve().parents[1]

Definition at line 41 of file test_layerx_integration_le4.py.

◆ ROWS

dict test_layerx_integration_le4.ROWS
Initial value:
1= {
2 "water_hammer": ("line", "side", "closure_s", "joukowsky_psi", "slow_close_psi", "peak_psia", "rating_psia", "ok"),
3 "outflow": ("tank", "side", "ingestion_onset_s", "residual_kg", "outlet_d_mm", "model"),
4 "ledger": ("key", "label", "design_value", "unit", "delivered", "series_ref", "replaced", "note"),
5 "solenoids": ("id", "side", "cv", "dp_psi", "share_of_reg_to_tank"),
6}

Definition at line 68 of file test_layerx_integration_le4.py.

◆ TRIP_MAWP_PSI

float test_layerx_integration_le4.TRIP_MAWP_PSI = 585.0

Definition at line 86 of file test_layerx_integration_le4.py.