Orchestrata Ultimate › Tests › Reference › scripts › test_check_env_contract
Tests reference — tests/scripts/test_check_env_contract.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_check_env_contract.py
source · 17 tests · 522 lines
Tests for scripts/check_env_contract.py — the mechanized half of RUL-019
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_unloaded_entrypoint_reaching_a_raising_seam_fails |
163 | The primary violation shape, and the one measured live in this repo: |
| function | test_canonical_loader_makes_the_same_tree_pass |
180 | Not stuck-red: the SAME tree, with the canonical two-phase loader |
| function | test_loader_call_behind_a_conditional_still_counts |
194 | Reachability, not unconditional execution — gateway/cli.py guards |
| function | test_infra_free_entrypoint_is_silent |
217 | An entrypoint whose closure never reaches a required key or a raising |
| function | test_entrypoint_reached_via_direct_import_is_in_scope |
238 | The transitive step that matters: gateway/cli.py itself reads no |
| function | test_second_mutating_loader_is_a_violation |
275 | At most ONE module may own the env contract; a hand-rolled duplicate |
| function | test_non_mutating_dotenv_reader_is_not_a_loader |
299 | Counter-fixture for the named false-positive risk: llm/client.py's |
| function | test_lone_non_conforming_loader_names_what_it_is_missing |
326 | A single mutating loader that skips the profile overlay is still a |
| function | test_systemd_backslash_continuation_is_joined |
355 | A line-wise regex resolves ZERO targets out of deploy/systemd/* |
| function | test_pyproject_console_script_is_an_entrypoint |
371 | E1: a [project.scripts] target resolving under src/ counts even |
| function | test_deep_trigger_is_discarded_but_reported |
396 | The depth bound's discarded region must stay VISIBLE. A trigger three |
| function | test_unanalysable_tree_exits_two_not_zero |
446 | A tree with no src/ must not report a clean pass — a gate that |
| function | test_missing_canonical_key_set_exits_two |
458 | The infra key set is PARSED from core/infra_env_rule.py so RUL-003 |
| function | test_infra_keys_are_read_from_the_canonical_module |
471 | Directly exercise the parser against a real file — the set the gate |
| function | test_live_infra_env_rule_parses |
481 | The production key set must remain parseable by the gate — this is the |
| function | test_script_carries_the_rule_id_for_rulings_lint |
491 | scripts/rulings_lint.py::_check_gate passes only if the declared |
| function | test_live_repo_run_is_wellformed_and_sees_the_systemd_units |
503 | Read-only run against the live checkout. |