RagLeap
Tests

Tests: ragleap-physical

Test files: 31. Test functions: 324. Described by their authors (docstring or @DisplayName): 29. Where there is no description, the line shows the test name in words and says so.

Latest result: ragleap-physical-tests (3.11) passed 628 passed, 16 skipped, 0 failed CI job ragleap-physical-tests (3.12) passed 628 passed, 16 skipped, 0 failed CI job ragleap-physical-tests (3.10) passed 628 passed, 16 skipped, 0 failed CI job

test_adapter_conformance.py — 14 tests 14 passed, 0 failed, 0 skipped

Cross-adapter conformance checks for ragleap-physical 0.0.4+.

  • test_simulated_is_true passed
    Simulated is true (no description in the source; shown from the name)
  • test_observe_returns_the_common_raw_shape passed
    Observe returns the common raw shape (no description in the source; shown from the name)
  • test_targets_match_the_declared_capability passed
    Targets match the declared capability (no description in the source; shown from the name)
  • test_dry_run_is_implemented_or_refused_read_only passed
    Dry run is implemented or refused read only (no description in the source; shown from the name)
  • test_apply_is_implemented_or_refused_read_only passed
    Apply is implemented or refused read only (no description in the source; shown from the name)
  • test_stop_and_clear_stop_are_available passed
    Stop and clear stop are available (no description in the source; shown from the name)
  • test_entity_count_is_stable_across_stop_and_clear_stop passed
    Entity count is stable across stop and clear stop (no description in the source; shown from the name)
  • test_dry_run_does_not_change_observation passed
    Dry run does not change observation (no description in the source; shown from the name)
  • test_refused_apply_leaves_observation_unchanged passed
    Refused apply leaves observation unchanged (no description in the source; shown from the name)
  • test_bridge_can_stop_and_clear_for_every_adapter passed
    Bridge can stop and clear for every adapter (no description in the source; shown from the name)
  • test_ros2_bridge_can_be_cleared_after_stop passed
    Ros2 bridge can be cleared after stop (no description in the source; shown from the name)
  • test_apply_refuses_bad_input passed
    Apply refuses bad input (no description in the source; shown from the name)
  • test_dry_run_refuses_bad_input passed
    Dry run refuses bad input (no description in the source; shown from the name)
  • test_control_adapter_rejects_unknown_target_or_command passed
    Control adapter rejects unknown target or command (no description in the source; shown from the name)
test_adapters_exports.py — 2 tests 2 passed, 0 failed, 0 skipped

Every adapter name a user needs can be imported from ragleap_physical.adapters.

  • test_item_is_exported_and_is_the_mtconnect_item passed
    Item is exported and is the mtconnect item (no description in the source; shown from the name)
  • test_every_name_in_all_can_be_imported passed
    Every name in all can be imported (no description in the source; shown from the name)
test_approval_model.py — 14 tests 14 passed, 0 failed, 0 skipped

Real-Bridge conformance checks for the approval-flow abstract model.

  • test_model_checker_explores_safe_graph_and_finds_deliberate_reuse_break passed
    Model checker explores safe graph and finds deliberate reuse break (no description in the source; shown from the name)
  • test_propose_transition_matches_real_bridge passed
    Propose transition matches real bridge (no description in the source; shown from the name)
  • test_requester_self_approval_transition_matches_real_bridge passed
    Requester self approval transition matches real bridge (no description in the source; shown from the name)
  • test_second_approver_transition_matches_real_bridge passed
    Second approver transition matches real bridge (no description in the source; shown from the name)
  • test_apply_transition_matches_real_bridge passed
    Apply transition matches real bridge (no description in the source; shown from the name)
  • test_reuse_transition_matches_real_bridge passed
    Reuse transition matches real bridge (no description in the source; shown from the name)
  • test_stop_transition_matches_real_bridge passed
    Stop transition matches real bridge (no description in the source; shown from the name)
  • test_clear_transition_matches_real_bridge passed
    Clear transition matches real bridge (no description in the source; shown from the name)
  • test_expire_transition_matches_real_bridge passed
    Expire transition matches real bridge (no description in the source; shown from the name)
  • test_digest_change_transition_matches_real_bridge passed
    Digest change transition matches real bridge (no description in the source; shown from the name)
  • test_bridge_rejects_approval_of_an_altered_proposal_copy passed
    Bridge rejects approval of an altered proposal copy (no description in the source; shown from the name)
  • test_all_reachable_model_states_satisfy_five_invariants passed
    All reachable model states satisfy five invariants (no description in the source; shown from the name)
  • test_each_safety_property_has_a_detected_mutation passed
    Each safety property has a detected mutation (no description in the source; shown from the name)
  • test_replay_one_proposal_domain_through_length_five passed
    Replay the defined one-proposal domain; every compared result must agree.
test_approval_model_extensions.py — 10 tests 8 passed, 0 failed, 2 skipped

Issue #1337-#1339 desired-behaviour tests and explicit open-gap markers.

  • test_p8_identity_is_case_and_compatibility_form_insensitive passed
    P8 identity is case and compatibility form insensitive (no description in the source; shown from the name)
  • test_p8_deliberate_break_proof_mutates_model_identity_key passed
    P8 deliberate break proof mutates model identity key (no description in the source; shown from the name)
  • test_p6_stop_invalidates_outstanding_approvals_model_and_mutation_proof passed
    P6 stop invalidates outstanding approvals model and mutation proof (no description in the source; shown from the name)
  • test_p7_model_exposes_stop_at_adapter_call_boundary_and_mutation_proof passed
    P7 model exposes stop at adapter call boundary and mutation proof (no description in the source; shown from the name)
  • test_p7_bridge_rechecks_stop_after_dry_run_before_adapter_command passed
    P7 bridge rechecks stop after dry run before adapter command (no description in the source; shown from the name)
  • test_p7_a_stopped_adapter_does_not_move_when_stop_lands_at_the_adapter_call skipped
    The Bridge cannot stop a call it has already made; the adapter must refuse a command while stopped.
  • test_p8_bridge_rejects_case_variant_self_approval passed
    P8 bridge rejects case variant self approval (no description in the source; shown from the name)
  • test_multi_proposal_replay_has_no_p8_disagreement passed
    Multi proposal replay has no p8 disagreement (no description in the source; shown from the name)
  • test_multi_proposal_replay_has_no_p6_disagreement skipped
    Multi proposal replay has no p6 disagreement (no description in the source; shown from the name)
  • test_p8_non_ascii_compatibility_form_is_rejected_by_bridge_actor_grammar passed
    P8 non ascii compatibility form is rejected by bridge actor grammar (no description in the source; shown from the name)
test_arm3_mujoco_review.py — 2 tests 2 passed, 0 failed, 0 skipped

Review tests for arm3.xml with the real MuJoCo servo adapter (they skip when MuJoCo is not installed).

  • test_arm3_mujoco_review_m1_a_target_beyond_the_actuator_range_is_refused_not_silently_clamped passed
    Risk: a model actuator range narrower than the envelope would silently clamp a target that the envelope allows (1.5 rad
  • test_arm3_mujoco_review_m2_the_mujoco_servo_adapter_refuses_values_that_are_not_finite passed
    Risk: NaN, inf, text, bool and None must not reach MuJoCo, which answers a NaN control with a warning and a reset
test_arm3_review.py — 9 tests 9 passed, 0 failed, 0 skipped

Review tests for the three-joint stand-in arm (FakeArm3Adapter).

  • test_arm3_review_1_the_arm_can_still_be_observed_after_a_stop passed
    Risk: FakeArmAdapter.stop() resets the velocities to two numbers, so on the three-joint arm observe_raw() raises
  • test_arm3_review_2_the_arm_works_again_after_stop_and_clear_stop passed
    Risk: after stop() and clear_stop() the next apply/advance/dry_run raises IndexError (same two-number velocity
  • test_arm3_review_3_the_bridge_can_observe_after_a_stop passed
    Risk: every bridge call ends with observe(), so after Bridge.stop() on this arm every later call fails with
  • test_arm3_review_4_apply_refuses_values_that_are_not_finite_numbers passed
    Risk: apply() stores NaN, text or a bool as the target; with NaN the PD law saturates to the maximum acceleration,
  • test_arm3_review_5_dry_run_refuses_values_that_are_not_finite_numbers passed
    Risk: dry_run() converts the value with float() and returns a normal-looking prediction (NaN gave a final position
  • test_arm3_review_6_time_targets_and_step_limits_are_checked passed
    Risk: advance() and dry_run() give normal answers for NaN, negative and fractional inputs (a negative target says
  • test_arm3_review_7_the_constructor_refuses_meaningless_parameters passed
    Risk: dt=0 stops time, dt=-0.01 gives a negative simulated time (-0.5 s after advance), NaN gains give NaN physics,
  • test_arm3_review_8_the_model_fingerprint_identifies_the_parameters passed
    Risk (low): model_sha256 is the same placeholder for every parameter set, so the audit trail cannot tell a run with
  • test_arm3_review_9_the_default_pytest_run_collects_the_arm3_tests passed
    Risk: the project's pytest settings collect only the listed testpaths; examples/robots/test_arm3.py is outside them,
test_bridge.py — 30 tests 30 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_full_path_verifies_real_outcome passed
    Full path verifies real outcome (no description in the source; shown from the name)
  • test_missed_outcome_is_reported_failed_not_assumed_ok passed
    Missed outcome is reported failed not assumed ok (no description in the source; shown from the name)
  • test_same_inputs_give_same_result passed
    Same inputs give same result (no description in the source; shown from the name)
  • test_observe_level_cannot_propose_or_apply passed
    Observe level cannot propose or apply (no description in the source; shown from the name)
  • test_recommend_level_cannot_apply passed
    Recommend level cannot apply (no description in the source; shown from the name)
  • test_real_hardware_refused passed
    Real hardware refused (no description in the source; shown from the name)
  • test_command_not_on_list_refused passed
    Command not on list refused (no description in the source; shown from the name)
  • test_unknown_target_refused passed
    Unknown target refused (no description in the source; shown from the name)
  • test_out_of_range_refused_no_clamping passed
    Out of range refused no clamping (no description in the source; shown from the name)
  • test_nan_and_inf_values_refused passed
    Nan and inf values refused (no description in the source; shown from the name)
  • test_wrong_unit_refused passed
    Wrong unit refused (no description in the source; shown from the name)
  • test_outcome_beyond_episode_limit_refused passed
    Outcome beyond episode limit refused (no description in the source; shown from the name)
  • test_dry_run_speed_limit_blocks_before_any_motion passed
    Dry run speed limit blocks before any motion (no description in the source; shown from the name)
  • test_dry_run_force_limit_blocks_before_any_motion passed
    Dry run force limit blocks before any motion (no description in the source; shown from the name)
  • test_rate_limit passed
    Rate limit (no description in the source; shown from the name)
  • test_episode_step_cap_stops_to_safe_state passed
    Episode step cap stops to safe state (no description in the source; shown from the name)
  • test_apply_without_approval_refused passed
    Apply without approval refused (no description in the source; shown from the name)
  • test_changed_after_approval_refused passed
    Changed after approval refused (no description in the source; shown from the name)
  • test_reason_text_change_also_breaks_approval passed
    Reason text change also breaks approval (no description in the source; shown from the name)
  • test_approval_is_single_use_replay_refused passed
    Approval is single use replay refused (no description in the source; shown from the name)
  • test_expired_approval_refused passed
    Expired approval refused (no description in the source; shown from the name)
  • test_approver_must_be_a_named_id passed
    Approver must be a named id (no description in the source; shown from the name)
  • test_failed_check_still_consumes_approval passed
    Failed check still consumes approval (no description in the source; shown from the name)
  • test_stop_needs_no_approval_and_blocks_apply passed
    Stop needs no approval and blocks apply (no description in the source; shown from the name)
  • test_clear_stop_is_explicit passed
    Clear stop is explicit (no description in the source; shown from the name)
  • test_adapter_error_goes_to_safe_state passed
    Adapter error goes to safe state (no description in the source; shown from the name)
  • test_org_id_comes_from_bridge_not_device passed
    Org id comes from bridge not device (no description in the source; shown from the name)
  • test_injection_text_in_device_data_never_reaches_output passed
    Injection text in device data never reaches output (no description in the source; shown from the name)
  • test_envelope_view_cannot_change_limits passed
    Envelope view cannot change limits (no description in the source; shown from the name)
  • test_refused_applies_are_in_the_audit_log passed
    Refused applies are in the audit log (no description in the source; shown from the name)
test_bridge_limits.py — 10 tests 10 passed, 0 failed, 0 skipped

Threads, stop during a running command, and memory caps.

  • test_stop_during_apply_returns_at_once_and_halts_after_the_current_slice passed
    Stop during apply returns at once and halts after the current slice (no description in the source; shown from the name)
  • test_stop_flag_set_while_another_call_runs_is_enforced_when_it_finishes passed
    Stop flag set while another call runs is enforced when it finishes (no description in the source; shown from the name)
  • test_stop_does_not_depend_on_capability passed
    Stop does not depend on capability (no description in the source; shown from the name)
  • test_adapter_that_does_not_advance_is_caught_not_looped_forever passed
    Adapter that does not advance is caught not looped forever (no description in the source; shown from the name)
  • test_many_threads_proposing_get_unique_ids_and_a_consistent_ledger passed
    Many threads proposing get unique ids and a consistent ledger (no description in the source; shown from the name)
  • test_pending_limit_stops_a_proposal_flood_and_recovers_after_expiry passed
    Pending limit stops a proposal flood and recovers after expiry (no description in the source; shown from the name)
  • test_applying_a_proposal_frees_its_pending_slot passed
    Applying a proposal frees its pending slot (no description in the source; shown from the name)
  • test_old_records_are_evicted_but_a_replay_is_still_refused passed
    Old records are evicted but a replay is still refused (no description in the source; shown from the name)
  • test_live_proposals_are_never_evicted passed
    Live proposals are never evicted (no description in the source; shown from the name)
  • test_audit_list_is_capped_but_the_sink_gets_everything passed
    Audit list is capped but the sink gets everything (no description in the source; shown from the name)
test_claims_ledger.py — 4 tests 4 passed, 0 failed, 0 skipped

The claims ledger (docs/claims.json) stays true: every claim is still in the file it names, every test it names still exists, verified claims have evidence, and the README and docs contain none of the phrases we promised not to use.

  • test_the_ledger_is_well_formed passed
    The ledger is well formed (no description in the source; shown from the name)
  • test_every_claim_is_still_stated_where_the_ledger_says passed
    Every claim is still stated where the ledger says (no description in the source; shown from the name)
  • test_every_named_test_and_file_exists passed
    Every named test and file exists (no description in the source; shown from the name)
  • test_the_phrases_we_promised_not_to_use_are_absent passed
    The phrases we promised not to use are absent (no description in the source; shown from the name)
test_console.py — 15 tests 15 passed, 0 failed, 0 skipped

The operator console: a named person approves the exact proposal. Standard library only, loopback only.

  • test_configuration_is_strict passed
    Configuration is strict (no description in the source; shown from the name)
  • test_person_approves_then_applies_and_the_outcome_is_verified passed
    Person approves then applies and the outcome is verified (no description in the source; shown from the name)
  • test_the_approver_comes_from_the_token_never_from_the_request passed
    The approver comes from the token never from the request (no description in the source; shown from the name)
  • test_no_token_or_a_wrong_token_is_refused_everywhere passed
    No token or a wrong token is refused everywhere (no description in the source; shown from the name)
  • test_a_wrong_digest_is_refused_and_nothing_is_applied passed
    A wrong digest is refused and nothing is applied (no description in the source; shown from the name)
  • test_approval_is_single_use_and_apply_is_single_use passed
    Approval is single use and apply is single use (no description in the source; shown from the name)
  • test_an_expired_proposal_cannot_be_approved passed
    An expired proposal cannot be approved (no description in the source; shown from the name)
  • test_unknown_and_malformed_proposal_ids_are_refused passed
    Unknown and malformed proposal ids are refused (no description in the source; shown from the name)
  • test_stop_blocks_apply_and_needs_no_approval passed
    Stop blocks apply and needs no approval (no description in the source; shown from the name)
  • test_stop_takes_no_fields passed
    Stop takes no fields (no description in the source; shown from the name)
  • test_host_origin_size_type_and_method_checks passed
    Host origin size type and method checks (no description in the source; shown from the name)
  • test_allowed_origin_is_accepted passed
    Allowed origin is accepted (no description in the source; shown from the name)
  • test_errors_do_not_leak_tokens_or_internals passed
    Errors do not leak tokens or internals (no description in the source; shown from the name)
  • test_the_four_model_tools_are_unchanged_and_cannot_reach_the_console passed
    The four model tools are unchanged and cannot reach the console (no description in the source; shown from the name)
  • test_an_unexpected_internal_error_does_not_leak_its_details passed
    An unexpected internal error does not leak its details (no description in the source; shown from the name)
test_energy_adapter.py — 19 tests 19 passed, 0 failed, 0 skipped

A simulated energy site: observe only, sensors only, seeded. Invented numbers, no real meter, no network.

  • test_first_observation_has_the_expected_sensors_and_no_entities passed
    First observation has the expected sensors and no entities (no description in the source; shown from the name)
  • test_site_totals_are_the_sum_of_the_meters passed
    Site totals are the sum of the meters (no description in the source; shown from the name)
  • test_the_core_accepts_the_observation_and_drops_only_units_it_does_not_list_yet passed
    The core accepts the observation and drops only units it does not list yet (no description in the source; shown from the name)
  • test_the_largest_allowed_site_fits_in_one_observation passed
    The largest allowed site fits in one observation (no description in the source; shown from the name)
  • test_same_seed_same_numbers_different_seed_different_numbers passed
    Same seed same numbers different seed different numbers (no description in the source; shown from the name)
  • test_energy_is_power_times_time passed
    Energy is power times time (no description in the source; shown from the name)
  • test_power_follows_the_shift_and_the_day_repeats passed
    Power follows the shift and the day repeats (no description in the source; shown from the name)
  • test_power_is_never_negative_and_energy_never_goes_down passed
    Power is never negative and energy never goes down (no description in the source; shown from the name)
  • test_the_model_fingerprint_follows_the_model_not_the_seed passed
    The model fingerprint follows the model not the seed (no description in the source; shown from the name)
  • test_advance_stops_at_max_steps_and_while_stopped passed
    Advance stops at max steps and while stopped (no description in the source; shown from the name)
  • test_there_is_no_command_and_nothing_is_a_target passed
    There is no command and nothing is a target (no description in the source; shown from the name)
  • test_an_observe_bridge_reads_but_never_proposes passed
    An observe bridge reads but never proposes (no description in the source; shown from the name)
  • test_even_a_control_bridge_cannot_change_the_site passed
    Even a control bridge cannot change the site (no description in the source; shown from the name)
  • test_bad_configuration_is_refused passed
    Bad configuration is refused (no description in the source; shown from the name)
  • test_bad_meters_are_refused passed
    Bad meters are refused (no description in the source; shown from the name)
  • test_advance_refuses_a_bad_time_target_and_changes_nothing passed
    Advance refuses a bad time target and changes nothing (no description in the source; shown from the name)
  • test_advance_refuses_a_bad_step_limit_and_changes_nothing passed
    Advance refuses a bad step limit and changes nothing (no description in the source; shown from the name)
  • test_the_power_and_step_limits_are_enforced passed
    The power and step limits are enforced (no description in the source; shown from the name)
  • test_the_largest_allowed_settings_never_produce_a_non_finite_number passed
    The largest allowed settings never produce a non finite number (no description in the source; shown from the name)
test_energy_adapter_review.py — 6 tests 6 passed, 0 failed, 0 skipped

Independent review tests for the energy-site adapter.

  • test_review_fractional_max_steps_is_rejected_without_advancing passed
    Review fractional max steps is rejected without advancing (no description in the source; shown from the name)
  • test_review_boolean_max_steps_is_rejected_without_advancing passed
    Review boolean max steps is rejected without advancing (no description in the source; shown from the name)
  • test_review_infinite_target_is_rejected_without_advancing passed
    Review infinite target is rejected without advancing (no description in the source; shown from the name)
  • test_review_extreme_step_duration_is_rejected_before_telemetry_can_overflow passed
    Review extreme step duration is rejected before telemetry can overflow (no description in the source; shown from the name)
  • test_review_extreme_meter_power_is_rejected_before_energy_can_overflow passed
    Review extreme meter power is rejected before energy can overflow (no description in the source; shown from the name)
  • test_review_site_energy_and_totals_remain_finite_at_all_documented_limits passed
    Review site energy and totals remain finite at all documented limits (no description in the source; shown from the name)
test_envelope.py — 8 tests 8 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_valid_envelope_has_stable_digest passed
    Valid envelope has stable digest (no description in the source; shown from the name)
  • test_digest_changes_when_limits_change passed
    Digest changes when limits change (no description in the source; shown from the name)
  • test_unknown_key_refused_not_ignored passed
    Unknown key refused not ignored (no description in the source; shown from the name)
  • test_clamping_not_allowed passed
    Clamping not allowed (no description in the source; shown from the name)
  • test_unsupported_command_refused passed
    Unsupported command refused (no description in the source; shown from the name)
  • test_impossible_limits_refused passed
    Impossible limits refused (no description in the source; shown from the name)
  • test_view_is_a_copy passed
    View is a copy (no description in the source; shown from the name)
  • test_caller_cannot_change_envelope_through_input_dict passed
    Caller cannot change envelope through input dict (no description in the source; shown from the name)
test_fake_adapter_inputs.py — 4 tests 4 passed, 0 failed, 0 skipped

The one-joint and two-link stand-in adapters refuse command values that are not finite numbers.

  • test_apply_refuses_a_value_that_is_not_a_finite_number_and_changes_nothing passed
    Apply refuses a value that is not a finite number and changes nothing (no description in the source; shown from the name)
  • test_dry_run_refuses_a_value_that_is_not_a_finite_number passed
    Dry run refuses a value that is not a finite number (no description in the source; shown from the name)
  • test_dry_run_refuses_an_unknown_target_or_command passed
    Dry run refuses an unknown target or command (no description in the source; shown from the name)
  • test_a_good_value_still_works_and_an_integer_is_accepted passed
    A good value still works and an integer is accepted (no description in the source; shown from the name)
test_hardening.py — 24 tests 24 passed, 0 failed, 0 skipped

Regression tests for the hardening round (findings F01 to F06 and findings a to f of the independent reviews). Standard library only.

  • test_f01_nan_inf_and_negative_predictions_are_refused passed
    F01 nan inf and negative predictions are refused (no description in the source; shown from the name)
  • test_f01_non_numbers_and_bools_are_refused passed
    F01 non numbers and bools are refused (no description in the source; shown from the name)
  • test_f01_per_joint_values_are_checked passed
    F01 per joint values are checked (no description in the source; shown from the name)
  • test_f01_check_prediction_is_also_strict passed
    F01 check prediction is also strict (no description in the source; shown from the name)
  • test_f04_empty_per_joint_does_not_hide_bad_aggregates passed
    F04 empty per joint does not hide bad aggregates (no description in the source; shown from the name)
  • test_f04_bad_aggregate_is_refused_even_when_per_joint_looks_fine passed
    F04 bad aggregate is refused even when per joint looks fine (no description in the source; shown from the name)
  • test_non_finite_predicted_positions_are_refused passed
    Non finite predicted positions are refused (no description in the source; shown from the name)
  • test_f02_incomplete_second_point_is_refused passed
    F02 incomplete second point is refused (no description in the source; shown from the name)
  • test_f02_incomplete_point_cannot_hide_a_point_outside passed
    F02 incomplete point cannot hide a point outside (no description in the source; shown from the name)
  • test_f02_no_position_at_all_is_still_refused passed
    F02 no position at all is still refused (no description in the source; shown from the name)
  • test_f03_bad_ttl_is_refused passed
    F03 bad ttl is refused (no description in the source; shown from the name)
  • test_f03_bad_chunk_size_is_refused passed
    F03 bad chunk size is refused (no description in the source; shown from the name)
  • test_f03_caps_must_be_whole_positive_numbers passed
    F03 caps must be whole positive numbers (no description in the source; shown from the name)
  • test_a_trailing_newline_is_refused_in_identifiers_and_actors passed
    A trailing newline is refused in identifiers and actors (no description in the source; shown from the name)
  • test_b_huge_integers_become_a_validation_error passed
    B huge integers become a validation error (no description in the source; shown from the name)
  • test_c_the_size_cap_counts_invalid_items_too passed
    C the size cap counts invalid items too (no description in the source; shown from the name)
  • test_d_duplicate_ids_are_all_dropped passed
    D duplicate ids are all dropped (no description in the source; shown from the name)
  • test_e_control_and_bidi_characters_are_refused_in_reason passed
    E control and bidi characters are refused in reason (no description in the source; shown from the name)
  • test_f_deeply_nested_json_gets_an_answer_not_silence passed
    F deeply nested json gets an answer not silence (no description in the source; shown from the name)
  • test_observe_only_bridge_reads_but_never_proposes passed
    Observe only bridge reads but never proposes (no description in the source; shown from the name)
  • test_new_units_are_accepted passed
    New units are accepted (no description in the source; shown from the name)
  • test_the_requester_cannot_approve_its_own_proposal passed
    The requester cannot approve its own proposal (no description in the source; shown from the name)
  • test_f05_inverted_predicted_position_bounds_are_refused passed
    F05 inverted predicted position bounds are refused (no description in the source; shown from the name)
  • test_f06_aggregate_smaller_than_a_joint_value_is_refused passed
    F06 aggregate smaller than a joint value is refused (no description in the source; shown from the name)
test_industry_docs.py — 3 tests 3 passed, 0 failed, 0 skipped

The guide in docs/industry/ is executed here, so its examples cannot go out of date.

  • test_the_guide_has_its_two_examples passed
    The guide has its two examples (no description in the source; shown from the name)
  • test_every_example_runs_and_prints_exactly_what_the_guide_shows passed
    Every example runs and prints exactly what the guide shows (no description in the source; shown from the name)
  • test_the_guide_states_its_limits_and_has_no_addresses passed
    The guide states its limits and has no addresses (no description in the source; shown from the name)
test_known_gaps.py — 3 tests 2 passed, 0 failed, 1 skipped

Known gaps in the Bridge, written as tests first (pre-alpha, simulation only).

  • test_self_approval_with_other_letter_case_is_refused passed
    Gap 1: the requester ("employee:ops") must not approve its own proposal in another letter case.
  • test_stop_invalidates_an_approval_given_before_it skipped
    Gap 2 (design decision pending): an approval given before a stop must not survive stop and clear.
  • test_no_adapter_command_when_stop_lands_during_the_dry_run passed
    Gap 3: if stop() arrives during the dry run, the adapter must not receive the command at all.
test_lingering_close.py — 10 tests 10 passed, 0 failed, 0 skipped

A refused request is answered, and then the connection is closed the way HTTP servers are meant to close it (a "lingering close"): stop sending, read and throw away what the client is still sending for a short, bounded time. Without it, a Windows client that sends a body the server did not read can get a connection reset (WinError 10053) instead of the answer. Checked through server-side counters and a socket pair, because the reset itself cannot be forced on every operating system.

  • test_linger_discards_what_the_peer_still_sends_and_stops_when_it_closes passed
    Linger discards what the peer still sends and stops when it closes (no description in the source; shown from the name)
  • test_linger_is_bounded_in_bytes passed
    Linger is bounded in bytes (no description in the source; shown from the name)
  • test_linger_is_bounded_in_time_when_the_peer_stays_silent passed
    Linger is bounded in time when the peer stays silent (no description in the source; shown from the name)
  • test_linger_survives_a_peer_that_is_already_gone passed
    Linger survives a peer that is already gone (no description in the source; shown from the name)
  • test_mcp_server_discards_an_oversize_refused_body_after_answering passed
    Mcp server discards an oversize refused body after answering (no description in the source; shown from the name)
  • test_console_discards_an_oversize_refused_body_after_answering passed
    Console discards an oversize refused body after answering (no description in the source; shown from the name)
  • test_a_small_refused_body_is_still_drained_before_the_answer passed
    A small refused body is still drained before the answer (no description in the source; shown from the name)
  • test_an_answer_that_is_not_an_error_does_not_linger passed
    An answer that is not an error does not linger (no description in the source; shown from the name)
  • test_many_oversize_refusals_all_get_their_answer passed
    Many oversize refusals all get their answer (no description in the source; shown from the name)
  • test_a_client_that_sends_a_huge_body_cannot_hold_the_server passed
    A client that sends a huge body cannot hold the server (no description in the source; shown from the name)
test_machine_adapter_inputs.py — 7 tests 7 passed, 0 failed, 0 skipped

FakeMachineToolAdapter refuses command values that are not finite numbers, in apply() and in dry_run().

  • test_apply_refuses_every_bad_value_with_value_error_and_changes_nothing passed
    Apply refuses every bad value with value error and changes nothing (no description in the source; shown from the name)
  • test_apply_changes_nothing_after_a_refusal_even_when_the_tool_was_already_set passed
    Apply changes nothing after a refusal even when the tool was already set (no description in the source; shown from the name)
  • test_dry_run_refuses_every_bad_value_with_value_error_and_changes_nothing passed
    Dry run refuses every bad value with value error and changes nothing (no description in the source; shown from the name)
  • test_integers_and_floats_still_work_and_are_stored_as_floats passed
    Integers and floats still work and are stored as floats (no description in the source; shown from the name)
  • test_an_unknown_target_or_command_is_still_refused_first passed
    An unknown target or command is still refused first (no description in the source; shown from the name)
  • test_a_refused_value_does_not_disturb_the_simulation_that_follows passed
    A refused value does not disturb the simulation that follows (no description in the source; shown from the name)
  • test_the_check_is_the_same_as_in_the_other_stand_in_adapters passed
    machine.py carries its own copy of the check (the published fake.py may not have it yet). Where fake.py has it, both must agree.
test_machine_tool.py — 19 tests 19 passed, 0 failed, 0 skipped

A simulated machine tool: the AI may only adjust a tool offset, through proposal, approval and limits.

  • test_offset_target_config_is_validated passed
    Offset target config is validated (no description in the source; shown from the name)
  • test_a_joint_command_cannot_be_used_on_an_offset_target_and_the_other_way_round passed
    A joint command cannot be used on an offset target and the other way round (no description in the source; shown from the name)
  • test_a_small_offset_change_is_applied_and_verified passed
    A small offset change is applied and verified (no description in the source; shown from the name)
  • test_step_larger_than_the_maximum_is_refused passed
    Step larger than the maximum is refused (no description in the source; shown from the name)
  • test_offset_outside_the_range_is_refused passed
    Offset outside the range is refused (no description in the source; shown from the name)
  • test_wrong_unit_is_refused passed
    Wrong unit is refused (no description in the source; shown from the name)
  • test_changes_too_close_together_are_refused passed
    Changes too close together are refused (no description in the source; shown from the name)
  • test_unknown_state_fails_closed passed
    Unknown state fails closed (no description in the source; shown from the name)
  • test_the_approved_value_cannot_be_changed_afterwards passed
    The approved value cannot be changed afterwards (no description in the source; shown from the name)
  • test_changing_the_tool_is_not_a_command passed
    Changing the tool is not a command (no description in the source; shown from the name)
  • test_only_an_operator_can_replace_the_tool_and_it_resets_wear passed
    Only an operator can replace the tool and it resets wear (no description in the source; shown from the name)
  • test_stop_halts_production_and_blocks_changes passed
    Stop halts production and blocks changes (no description in the source; shown from the name)
  • test_same_seed_same_parts passed
    Same seed same parts (no description in the source; shown from the name)
  • test_wear_grows_and_uncorrected_parts_become_scrap passed
    Wear grows and uncorrected parts become scrap (no description in the source; shown from the name)
  • test_closed_loop_through_the_bridge_cuts_scrap_and_every_change_was_approved passed
    Closed loop through the bridge cuts scrap and every change was approved (no description in the source; shown from the name)
  • test_target_kinds_are_enforced_when_both_commands_are_allowed passed
    Target kinds are enforced when both commands are allowed (no description in the source; shown from the name)
  • test_the_gap_is_checked_again_at_apply_time_not_only_when_proposing passed
    The gap is checked again at apply time not only when proposing (no description in the source; shown from the name)
  • test_the_step_is_checked_again_at_apply_time passed
    The step is checked again at apply time (no description in the source; shown from the name)
  • test_change_tool_cannot_be_put_in_the_envelope_either passed
    Change tool cannot be put in the envelope either (no description in the source; shown from the name)
test_mcp_interop.py — 1 tests 1 passed, 0 failed, 0 skipped

Interop with the official MCP Python SDK client (v1 API: pip install "mcp>=1.28,<2"). Skipped if absent.

  • test_official_sdk_client_can_list_and_call passed
    Official sdk client can list and call (no description in the source; shown from the name)
test_mcp_server.py — 10 tests 10 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_initialize_and_version_choice passed
    Initialize and version choice (no description in the source; shown from the name)
  • test_notifications_and_replies_get_no_answer passed
    Notifications and replies get no answer (no description in the source; shown from the name)
  • test_bad_messages passed
    Bad messages (no description in the source; shown from the name)
  • test_tools_list_and_call_roundtrip passed
    Tools list and call roundtrip (no description in the source; shown from the name)
  • test_tool_errors_are_marked_is_error passed
    Tool errors are marked is error (no description in the source; shown from the name)
  • test_http_happy_path_and_human_in_the_loop passed
    Http happy path and human in the loop (no description in the source; shown from the name)
  • test_http_rejections passed
    Http rejections (no description in the source; shown from the name)
  • test_bearer_token passed
    Bearer token (no description in the source; shown from the name)
  • test_unsafe_bind_and_weak_token_refused passed
    Unsafe bind and weak token refused (no description in the source; shown from the name)
  • test_internal_errors_do_not_leak passed
    Internal errors do not leak (no description in the source; shown from the name)
test_mtconnect_adapter.py — 29 tests 29 passed, 0 failed, 0 skipped

An observe-only MTConnect mock: strict parsing of untrusted XML, replay as observations. Invented documents only.

  • test_a_stream_becomes_scaled_values_and_counts passed
    A stream becomes scaled values and counts (no description in the source; shown from the name)
  • test_the_highest_sequence_wins_and_a_later_normal_clears_a_fault passed
    The highest sequence wins and a later normal clears a fault (no description in the source; shown from the name)
  • test_without_sequences_the_later_element_wins passed
    Without sequences the later element wins (no description in the source; shown from the name)
  • test_ids_that_were_not_listed_never_become_sensors passed
    Ids that were not listed never become sensors (no description in the source; shown from the name)
  • test_odd_sequence_numbers_are_ignored_and_never_crash_the_parser passed
    Odd sequence numbers are ignored and never crash the parser (no description in the source; shown from the name)
  • test_unknown_condition_levels_are_skipped_not_counted passed
    Unknown condition levels are skipped not counted (no description in the source; shown from the name)
  • test_two_faults_at_the_same_time_on_one_data_item_are_both_counted passed
    The standard allows several concurrent condition activations on one data item (told apart by nativeCode or
  • test_a_normal_clears_only_its_own_activation passed
    A normal clears only its own activation (no description in the source; shown from the name)
  • test_condition_id_beats_native_code_and_one_native_code_can_have_two_activations passed
    Condition id beats native code and one native code can have two activations (no description in the source; shown from the name)
  • test_a_normal_without_any_code_does_not_clear_a_coded_fault passed
    Deliberately conservative (how real agents treat such a Normal is not verified): better one fault too many.
  • test_an_unavailable_condition_is_counted_on_its_own_never_as_no_fault passed
    An unavailable condition is counted on its own never as no fault (no description in the source; shown from the name)
  • test_only_plain_decimal_numbers_are_accepted passed
    Only plain decimal numbers are accepted (no description in the source; shown from the name)
  • test_the_namespace_is_optional_and_any_version_is_read passed
    The namespace is optional and any version is read (no description in the source; shown from the name)
  • test_time_has_microsecond_precision_and_comments_and_cdata_are_fine passed
    Time has microsecond precision and comments and cdata are fine (no description in the source; shown from the name)
  • test_unsafe_or_broken_documents_are_refused passed
    Unsafe or broken documents are refused (no description in the source; shown from the name)
  • test_a_dtd_or_entity_is_refused_before_the_parser_sees_it passed
    A dtd or entity is refused before the parser sees it (no description in the source; shown from the name)
  • test_bad_times_are_refused passed
    Bad times are refused (no description in the source; shown from the name)
  • test_a_document_with_too_many_elements_is_refused passed
    A document with too many elements is refused (no description in the source; shown from the name)
  • test_bad_item_maps_are_refused passed
    Bad item maps are refused (no description in the source; shown from the name)
  • test_the_first_document_is_the_first_observation passed
    The first document is the first observation (no description in the source; shown from the name)
  • test_replay_follows_document_time_and_reports_how_old_the_values_are passed
    Replay follows document time and reports how old the values are (no description in the source; shown from the name)
  • test_max_steps_and_stop_hold_the_replay passed
    Max steps and stop hold the replay (no description in the source; shown from the name)
  • test_the_adapter_refuses_bad_input passed
    The adapter refuses bad input (no description in the source; shown from the name)
  • test_the_error_names_the_document_that_was_refused passed
    The error names the document that was refused (no description in the source; shown from the name)
  • test_the_model_fingerprint_follows_the_documents_and_the_item_map passed
    The model fingerprint follows the documents and the item map (no description in the source; shown from the name)
  • test_text_from_the_device_never_reaches_the_observation passed
    Text from the device never reaches the observation (no description in the source; shown from the name)
  • test_there_is_no_command_and_nothing_is_a_target passed
    There is no command and nothing is a target (no description in the source; shown from the name)
  • test_an_observe_bridge_reads_but_never_proposes_and_the_core_accepts_the_observation passed
    An observe bridge reads but never proposes and the core accepts the observation (no description in the source; shown from the name)
  • test_even_a_control_bridge_cannot_change_the_replay passed
    Even a control bridge cannot change the replay (no description in the source; shown from the name)
test_mujoco_adapter.py — 5 tests 5 passed, 0 failed, 0 skipped

Runs only when MuJoCo is installed (the optional extra). Observe-only checks.

  • test_observe_through_bridge_is_clean passed
    Observe through bridge is clean (no description in the source; shown from the name)
  • test_model_hash_is_stable passed
    Model hash is stable (no description in the source; shown from the name)
  • test_advance_moves_the_pendulum_and_repeats_exactly passed
    Advance moves the pendulum and repeats exactly (no description in the source; shown from the name)
  • test_control_is_refused_until_phase_3 passed
    Control is refused until phase 3 (no description in the source; shown from the name)
  • test_step_cap_is_respected passed
    Step cap is respected (no description in the source; shown from the name)
test_mujoco_arm.py — 10 tests 10 passed, 0 failed, 0 skipped

Two-link arm on the real MuJoCo engine, with workspace limits. Runs only when MuJoCo is installed.

  • test_observation_reports_the_end_effector_position passed
    Observation reports the end effector position (no description in the source; shown from the name)
  • test_forward_kinematics_matches_the_two_link_formula passed
    Forward kinematics matches the two link formula (no description in the source; shown from the name)
  • test_a_move_inside_the_box_is_verified_on_the_real_engine passed
    A move inside the box is verified on the real engine (no description in the source; shown from the name)
  • test_end_pose_outside_the_box_is_refused_before_motion passed
    End pose outside the box is refused before motion (no description in the source; shown from the name)
  • test_same_command_gives_exactly_the_same_end_effector passed
    Same command gives exactly the same end effector (no description in the source; shown from the name)
  • test_envelope_must_list_both_joints passed
    Envelope must list both joints (no description in the source; shown from the name)
  • test_dry_run_reports_every_joint_and_the_path_extremes passed
    Dry run reports every joint and the path extremes (no description in the source; shown from the name)
  • test_dry_run_changes_nothing passed
    Dry run changes nothing (no description in the source; shown from the name)
  • test_stop_holds_both_joints passed
    Stop holds both joints (no description in the source; shown from the name)
  • test_runtime_monitor_catches_motion_that_leaves_the_box passed
    Runtime monitor catches motion that leaves the box (no description in the source; shown from the name)
test_mujoco_servo.py — 11 tests 11 passed, 0 failed, 0 skipped

MuJoCo control behind the bridge (Phase 3). Runs only when MuJoCo is installed.

  • test_full_path_on_real_engine_verifies_outcome passed
    Full path on real engine verifies outcome (no description in the source; shown from the name)
  • test_same_command_gives_exactly_same_result passed
    Same command gives exactly same result (no description in the source; shown from the name)
  • test_dry_run_changes_nothing passed
    Dry run changes nothing (no description in the source; shown from the name)
  • test_force_limit_blocks_before_motion passed
    Force limit blocks before motion (no description in the source; shown from the name)
  • test_speed_limit_blocks_before_motion passed
    Speed limit blocks before motion (no description in the source; shown from the name)
  • test_out_of_range_refused_before_any_engine_call passed
    Out of range refused before any engine call (no description in the source; shown from the name)
  • test_missed_outcome_is_failed passed
    Missed outcome is failed (no description in the source; shown from the name)
  • test_stop_holds_position_and_blocks_apply passed
    Stop holds position and blocks apply (no description in the source; shown from the name)
  • test_unknown_target_refused_by_adapter passed
    Unknown target refused by adapter (no description in the source; shown from the name)
  • test_no_approval_no_motion passed
    No approval no motion (no description in the source; shown from the name)
  • test_stop_holds_the_pose_it_stopped_at_even_after_clearing passed
    Stopping mid-motion must retarget the servo to where it is, not leave the old target in place.
test_observation.py — 7 tests 7 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_basic_fields_and_forced_flags passed
    Basic fields and forced flags (no description in the source; shown from the name)
  • test_bad_identifiers_are_dropped_and_counted passed
    Bad identifiers are dropped and counted (no description in the source; shown from the name)
  • test_non_finite_and_bool_numbers_dropped passed
    Non finite and bool numbers dropped (no description in the source; shown from the name)
  • test_unknown_unit_dropped passed
    Unknown unit dropped (no description in the source; shown from the name)
  • test_size_cap_truncates passed
    Size cap truncates (no description in the source; shown from the name)
  • test_bad_header_fields_raise passed
    Bad header fields raise (no description in the source; shown from the name)
  • test_free_text_in_source_rejected passed
    Free text in source rejected (no description in the source; shown from the name)
test_refusal_drain.py — 4 tests 4 passed, 0 failed, 0 skipped

A refused request must not leave its body unread: the server drains a small body first, so a client (notably on Windows) gets the answer and not a connection reset (WinError 10053). Checked through a server-side counter and the Connection header.

  • test_console_drains_a_small_refused_body_and_says_connection_close passed
    Console drains a small refused body and says connection close (no description in the source; shown from the name)
  • test_console_does_not_read_a_body_twice_when_it_answers_an_error_after_reading_it passed
    Console does not read a body twice when it answers an error after reading it (no description in the source; shown from the name)
  • test_mcp_server_drains_a_small_refused_body_and_says_connection_close passed
    Mcp server drains a small refused body and says connection close (no description in the source; shown from the name)
  • test_many_refused_posts_with_bodies_all_get_an_answer passed
    Many refused posts with bodies all get an answer (no description in the source; shown from the name)
test_review_findings.py — 9 tests 9 passed, 0 failed, 0 skipped

Review findings: attempts to break observation.py, tools.py and mcp_server.py.

  • test_finding_1a_an_identifier_with_a_trailing_newline_is_refused passed
    Risk: ident() and actor() accept 'abc\n' (the $ in the pattern matches before a final newline), so an id
  • test_finding_1b_an_approver_name_with_a_trailing_newline_is_refused passed
    Risk: a person id such as 'person:alice\n' is accepted by approve() and written into the audit log as
  • test_finding_2a_a_huge_integer_is_a_validation_error passed
    Risk: finite(10**400) raises OverflowError, not ValidationError, so code that catches only the project's
  • test_finding_2b_a_huge_integer_from_a_device_drops_one_item_not_the_whole_observation passed
    Risk: one sensor value above the float range makes Observation.from_raw raise OverflowError, so a single
  • test_finding_2c_a_huge_integer_in_a_proposal_is_reported_as_an_invalid_value passed
    Risk: the model-facing tool answers 'internal_error' for value=10**400, which hides a plain input mistake
  • test_finding_3_bad_items_count_against_the_size_cap passed
    Risk: the size cap counts accepted items only, so a device can make from_raw read an unbounded number of
  • test_finding_4_two_entities_with_the_same_id_are_not_both_kept passed
    Risk: a device can report the same id twice with different positions; the model is shown both, but
  • test_finding_5_a_reason_with_terminal_or_bidi_control_characters_is_refused passed
    Risk: the free-text reason is shown to the person who approves; an ESC sequence or a bidi override in it can
  • test_finding_6_deeply_nested_json_gets_a_clean_error_answer passed
    Risk: a body under the 64 KB cap with 30000 nested brackets makes json.loads raise RecursionError, which the
test_tools.py — 11 tests 11 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_exactly_four_tools_at_recommend_and_three_at_observe passed
    Exactly four tools at recommend and three at observe (no description in the source; shown from the name)
  • test_no_tool_can_apply_approve_stop_or_change_limits passed
    No tool can apply approve stop or change limits (no description in the source; shown from the name)
  • test_observe_level_cannot_call_propose passed
    Observe level cannot call propose (no description in the source; shown from the name)
  • test_propose_returns_proposal_and_moves_nothing passed
    Propose returns proposal and moves nothing (no description in the source; shown from the name)
  • test_a_person_still_has_to_approve_before_apply passed
    A person still has to approve before apply (no description in the source; shown from the name)
  • test_requested_by_cannot_be_chosen_by_the_caller passed
    Requested by cannot be chosen by the caller (no description in the source; shown from the name)
  • test_strict_arguments passed
    Strict arguments (no description in the source; shown from the name)
  • test_envelope_errors_come_back_as_data_not_exceptions passed
    Envelope errors come back as data not exceptions (no description in the source; shown from the name)
  • test_envelope_view_tool_cannot_change_limits passed
    Envelope view tool cannot change limits (no description in the source; shown from the name)
  • test_results_are_json_and_marked_untrusted passed
    Results are json and marked untrusted (no description in the source; shown from the name)
  • test_internal_failures_do_not_leak_details passed
    Internal failures do not leak details (no description in the source; shown from the name)
test_workspace.py — 14 tests 14 passed, 0 failed, 0 skipped

Workspace limits (a box in x, y, z) on a two-link arm, standard library only.

  • test_workspace_config_is_validated passed
    Workspace config is validated (no description in the source; shown from the name)
  • test_workspace_changes_the_digest passed
    Workspace changes the digest (no description in the source; shown from the name)
  • test_envelope_must_list_every_joint_the_adapter_can_move passed
    Envelope must list every joint the adapter can move (no description in the source; shown from the name)
  • test_a_move_inside_the_box_is_verified passed
    A move inside the box is verified (no description in the source; shown from the name)
  • test_second_joint_can_be_moved_too passed
    Second joint can be moved too (no description in the source; shown from the name)
  • test_end_pose_outside_the_box_is_refused_before_any_motion passed
    End pose outside the box is refused before any motion (no description in the source; shown from the name)
  • test_unknown_workspace_fails_closed passed
    Unknown workspace fails closed (no description in the source; shown from the name)
  • test_starting_outside_the_box_is_refused passed
    Starting outside the box is refused (no description in the source; shown from the name)
  • test_a_mid_path_excursion_is_refused_even_if_the_end_pose_is_fine passed
    A mid path excursion is refused even if the end pose is fine (no description in the source; shown from the name)
  • test_dry_run_that_reports_no_positions_fails_closed passed
    Dry run that reports no positions fails closed (no description in the source; shown from the name)
  • test_runtime_monitor_stops_a_real_motion_that_leaves_the_box_even_if_the_dry_run_lied passed
    Runtime monitor stops a real motion that leaves the box even if the dry run lied (no description in the source; shown from the name)
  • test_another_joint_over_its_limit_is_caught_not_only_the_target passed
    Another joint over its limit is caught not only the target (no description in the source; shown from the name)
  • test_a_joint_missing_from_the_envelope_may_not_move passed
    A joint missing from the envelope may not move (no description in the source; shown from the name)
  • test_approval_binding_still_holds_with_a_workspace passed
    Approval binding still holds with a workspace (no description in the source; shown from the name)

Compiled by script from the public repository, its CI logs and the GitHub API. To correct something, open an issue.

All tests