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

Functions

 test_new_settings_are_unset_and_resolve_to_the_decided_defaults ()
 test_what_the_physics_or_the_drawing_decides_is_not_a_setting ()
 test_an_option_it_cannot_take_fails_preflight_before_anything_is_built (bad)
 test_the_router_mirrors_every_setting_with_the_same_default ()
 _tank (T=None, fluid="oxygen", source="measured")
 test_gn2_on_lox_is_flagged_above_nitrogens_saturation_pressure_by_hand ()
 test_the_492_psia_constant_is_gone ()
 test_expected_tank_rise_is_the_regulator_law_at_the_isentropic_bottle_by_hand ()
 test_a_bottle_that_cannot_hold_lockup_says_so ()
 _result (n=8, dt=0.05)
 _by_key (entries)
 test_the_default_chug_grade_is_todays_whole_burn_minimum_with_the_new_margins_beside_it ()
 test_the_drawing_basis_grades_the_stability_blocks_settled_minimum ()
 test_new_diagnostics_grade_amber_at_worst_and_old_limits_keep_their_grades ()
 test_without_diagnostics_the_limits_are_diag_limits_own ()
 test_every_event_gets_a_unique_stable_key ()
 test_the_model_record_flattens_every_block ()
 test_a_failing_diagnostic_is_reported_and_the_rest_stand (monkeypatch)
 api (tmp_path, monkeypatch)
 _export_run ()
 _save (lx, session, run_id, kind="run", sidecars=None, result=None)
 test_a_runs_sidecar_is_written_beside_it_served_and_deleted_with_it (api)
 test_pruning_takes_a_runs_sidecar_with_it (api, monkeypatch)
 test_the_run_job_hands_its_sidecars_to_the_job_not_the_result (api)
 test_a_finished_burn_exports_csv_parquet_and_the_fea_bundle (api)
 test_trade_and_optimise_runs_are_listed_and_read_as_legacy (api)
 test_the_catalogue_lists_shipped_rows_and_a_users_over_them (api)
 _study_with_a_cut_dome_line ()
 test_a_transducer_on_a_cut_dome_line_reads_the_dome ()

Variables

 ROOT = Path(__file__).resolve().parents[1]
str BASELINE = ROOT / "docs" / "layerx" / "baseline-2026-10-07.json"
float PSI = 6894.757293168361
tuple NEW_SETTINGS
dict AXIAL

Detailed Description

Layer X integration: the wave-1 diagnostics wired into the burn, the run record and the API.

What these hold (fast; the LE4 burns are tests/test_layerx_integration_le4.py, LAYERX_GOLDEN=1):

* **Defaults are today's.** Every new setting is ``None`` and resolves to the behaviour before it
  existed; the router mirrors them with the same defaults; the baseline's list of defaults is
  unchanged by their arrival.
* **GN2 on LOX** is refused for a hot fire on the physical criterion (nitrogen's saturation pressure
  at the LOX temperature, CoolProp), checked by hand, and runs with the acknowledgement.
* **The tanks at burnout** (preflight ``tank_rise``) follow the drawing's regulator law at the
  bottle's isentropic end pressure, re-derived here independently.
* **Limits** keep today's chug grade on the default basis with the settled and drawing-basis
  margins beside it (D7), and cap the new diagnostics at amber without touching the old limits.
* **Events** carry unique stable keys; **models** are flattened into the run record.
* **Router**: sidecars are written beside the run, served, pruned and deleted with it; exports;
  trade and optimise runs are listed as legacy.

Function Documentation

◆ _by_key()

◆ _export_run()

test_layerx_integration._export_run ( )
protected
A small finished burn the exporters can read (as tests/test_layerx_export.py builds it).

Definition at line 389 of file test_layerx_integration.py.

Referenced by test_a_finished_burn_exports_csv_parquet_and_the_fea_bundle(), and test_the_run_job_hands_its_sidecars_to_the_job_not_the_result().

◆ _result()

◆ _save()

◆ _study_with_a_cut_dome_line()

test_layerx_integration._study_with_a_cut_dome_line ( )
protected
The helium study drawing as LE4 has it: the dome loaded from the cart (its loader, PR-CTRL,
gone with the GSE) and a transducer on the dome line, clipped to a junction there.

Definition at line 504 of file test_layerx_integration.py.

Referenced by test_a_transducer_on_a_cut_dome_line_reads_the_dome().

◆ _tank()

test_layerx_integration._tank ( T = None,
fluid = "oxygen",
source = "measured" )
protected

◆ api()

test_layerx_integration.api ( tmp_path,
monkeypatch )

Definition at line 371 of file test_layerx_integration.py.

◆ test_a_bottle_that_cannot_hold_lockup_says_so()

test_layerx_integration.test_a_bottle_that_cannot_hold_lockup_says_so ( )

Definition at line 201 of file test_layerx_integration.py.

◆ test_a_failing_diagnostic_is_reported_and_the_rest_stand()

test_layerx_integration.test_a_failing_diagnostic_is_reported_and_the_rest_stand ( monkeypatch)

Definition at line 349 of file test_layerx_integration.py.

References _result().

◆ test_a_finished_burn_exports_csv_parquet_and_the_fea_bundle()

test_layerx_integration.test_a_finished_burn_exports_csv_parquet_and_the_fea_bundle ( api)

Definition at line 457 of file test_layerx_integration.py.

References _export_run(), and _save().

◆ test_a_runs_sidecar_is_written_beside_it_served_and_deleted_with_it()

test_layerx_integration.test_a_runs_sidecar_is_written_beside_it_served_and_deleted_with_it ( api)

Definition at line 420 of file test_layerx_integration.py.

References _save().

◆ test_a_transducer_on_a_cut_dome_line_reads_the_dome()

test_layerx_integration.test_a_transducer_on_a_cut_dome_line_reads_the_dome ( )
LE4's DP-PT-R sits on the dome line of DPR_HP, whose loader is on the cart: the burn left the
line at atmosphere and the Stand page predicted 0.0 psig under a 550 psia dome (D-27). The
line's transducers read the dome signal; every other one reads the network as before.

Definition at line 527 of file test_layerx_integration.py.

References _study_with_a_cut_dome_line().

◆ test_an_option_it_cannot_take_fails_preflight_before_anything_is_built()

test_layerx_integration.test_an_option_it_cannot_take_fails_preflight_before_anything_is_built ( bad)

Definition at line 84 of file test_layerx_integration.py.

◆ test_every_event_gets_a_unique_stable_key()

test_layerx_integration.test_every_event_gets_a_unique_stable_key ( )

Definition at line 311 of file test_layerx_integration.py.

References _result().

◆ test_expected_tank_rise_is_the_regulator_law_at_the_isentropic_bottle_by_hand()

test_layerx_integration.test_expected_tank_rise_is_the_regulator_law_at_the_isentropic_bottle_by_hand ( )
An affine regulator law (the drawing's: outlet rises ``k`` per psi the supply falls) and a
helium bottle, solved here by a separate fixed point.

Definition at line 165 of file test_layerx_integration.py.

◆ test_gn2_on_lox_is_flagged_above_nitrogens_saturation_pressure_by_hand()

test_layerx_integration.test_gn2_on_lox_is_flagged_above_nitrogens_saturation_pressure_by_hand ( )

Definition at line 125 of file test_layerx_integration.py.

References _tank().

◆ test_new_diagnostics_grade_amber_at_worst_and_old_limits_keep_their_grades()

test_layerx_integration.test_new_diagnostics_grade_amber_at_worst_and_old_limits_keep_their_grades ( )

Definition at line 283 of file test_layerx_integration.py.

References _by_key(), and _result().

◆ test_new_settings_are_unset_and_resolve_to_the_decided_defaults()

test_layerx_integration.test_new_settings_are_unset_and_resolve_to_the_decided_defaults ( )
Unset resolves to the default; for the chug that is D7 as the user decided it on 2026-10-03
(the drawing's lines, the eroded engine, graded from the first full-flow step).

Definition at line 47 of file test_layerx_integration.py.

◆ test_pruning_takes_a_runs_sidecar_with_it()

test_layerx_integration.test_pruning_takes_a_runs_sidecar_with_it ( api,
monkeypatch )

Definition at line 437 of file test_layerx_integration.py.

References _save().

◆ test_the_492_psia_constant_is_gone()

test_layerx_integration.test_the_492_psia_constant_is_gone ( )

Definition at line 155 of file test_layerx_integration.py.

◆ test_the_catalogue_lists_shipped_rows_and_a_users_over_them()

test_layerx_integration.test_the_catalogue_lists_shipped_rows_and_a_users_over_them ( api)

Definition at line 490 of file test_layerx_integration.py.

◆ test_the_default_chug_grade_is_todays_whole_burn_minimum_with_the_new_margins_beside_it()

test_layerx_integration.test_the_default_chug_grade_is_todays_whole_burn_minimum_with_the_new_margins_beside_it ( )

Definition at line 251 of file test_layerx_integration.py.

References _by_key(), and _result().

◆ test_the_drawing_basis_grades_the_stability_blocks_settled_minimum()

test_layerx_integration.test_the_drawing_basis_grades_the_stability_blocks_settled_minimum ( )

Definition at line 273 of file test_layerx_integration.py.

References _by_key(), and _result().

◆ test_the_model_record_flattens_every_block()

test_layerx_integration.test_the_model_record_flattens_every_block ( )

Definition at line 337 of file test_layerx_integration.py.

◆ test_the_router_mirrors_every_setting_with_the_same_default()

test_layerx_integration.test_the_router_mirrors_every_setting_with_the_same_default ( )

Definition at line 93 of file test_layerx_integration.py.

◆ test_the_run_job_hands_its_sidecars_to_the_job_not_the_result()

test_layerx_integration.test_the_run_job_hands_its_sidecars_to_the_job_not_the_result ( api)

Definition at line 446 of file test_layerx_integration.py.

References _export_run().

◆ test_trade_and_optimise_runs_are_listed_and_read_as_legacy()

test_layerx_integration.test_trade_and_optimise_runs_are_listed_and_read_as_legacy ( api)

Definition at line 480 of file test_layerx_integration.py.

References _save().

◆ test_what_the_physics_or_the_drawing_decides_is_not_a_setting()

test_layerx_integration.test_what_the_physics_or_the_drawing_decides_is_not_a_setting ( )
2026-10-03: the eroded nozzle's thrust, the eroded chug, the inline ascent are the physics;
the valve opening and the tank outlet bore are the drawing's. Saved settings that carry them
are accepted and change nothing.

Definition at line 70 of file test_layerx_integration.py.

◆ test_without_diagnostics_the_limits_are_diag_limits_own()

test_layerx_integration.test_without_diagnostics_the_limits_are_diag_limits_own ( )

Definition at line 299 of file test_layerx_integration.py.

References _result().

Variable Documentation

◆ AXIAL

dict test_layerx_integration.AXIAL
Initial value:
1= {"x_mm": [-10.0, 0.0, 10.0], "t": [0.05, 0.25], "q_MW_m2": [[1.0, 9.0, 3.0], [1.1, 9.5, 3.1]],
2 "T_wall_K": [[500.0, 2000.0, 900.0], [520.0, 2100.0, 950.0]]}

Definition at line 416 of file test_layerx_integration.py.

◆ BASELINE

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

Definition at line 37 of file test_layerx_integration.py.

◆ NEW_SETTINGS

tuple test_layerx_integration.NEW_SETTINGS
Initial value:
1= ("chug_basis", "chug_eroded", "card_eroded_nozzle", "flight_coupling", "fuel_lead_s",
2 "valve_travel_s", "outlet_d_mm", "ack_gn2_condensation", "test_mode")

Definition at line 40 of file test_layerx_integration.py.

◆ PSI

float test_layerx_integration.PSI = 6894.757293168361

Definition at line 38 of file test_layerx_integration.py.

◆ ROOT

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

Definition at line 36 of file test_layerx_integration.py.