Orchestrata Ultimate › Tests › Reference › scripts › test_check_prolog_boundary
Tests reference — tests/scripts/test_check_prolog_boundary.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_check_prolog_boundary.py
source · 50 tests · 1166 lines
Tests for scripts/check_prolog_boundary.py — the Prolog boundary gate
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_parse_functor_arity_bare_atom |
107 | |
| function | test_parse_functor_arity_counts_top_level_commas_only |
111 | |
| function | test_parse_functor_arity_respects_nested_parens |
116 | |
| function | test_parse_functor_arity_strips_module_qualifier |
120 | |
| function | test_parse_functor_arity_rejects_non_goal_text |
128 | |
| function | test_parse_functor_arity_rejects_unbalanced_parens |
133 | |
| function | test_parse_functor_arity_rejects_trailing_garbage_after_bare_atom |
137 | |
| function | test_parse_functor_arity_rejects_trailing_garbage_after_closing_paren |
141 | |
| function | test_parse_functor_arity_empty_parens_is_arity_zero |
145 | |
| function | test_parse_functor_arity_handles_escaped_backslash_in_quoted_arg |
149 | A literal backslash inside a quoted argument must be treated as an |
| function | test_fstring_placeholder_counts_as_one_argument |
163 | f"foo({helper(a, b)})" must be arity 1 — the comma inside the {...} |
| function | test_direct_literal_call_site_is_discovered |
184 | |
| function | test_run_in_executor_indirect_call_site_is_discovered |
200 | The escalation_handler.py shape: a bare method reference passed |
| function | test_to_thread_indirect_call_site_is_discovered |
223 | The kernel/policy_evaluator.py shape: asyncio.to_thread(method, query). |
| function | test_passthrough_helper_multi_hop_call_site_is_discovered |
244 | The F2 shape (kernel/policy_evaluator.py): a public method builds the |
| function | test_dynamic_functor_in_governance_dir_without_whitelist_entry_is_flagged |
282 | A query built from a helper-function CALL (not a literal/f-string) in |
| function | test_dynamic_functor_outside_governance_dir_is_silently_skipped |
309 | The same dynamic-functor shape OUTSIDE a governance-shaped directory |
| function | test_non_prolog_query_method_shape_is_skipped |
332 | A Cypher-shaped call (Neo4j-style client.query(cypher, params)) |
| function | test_module_level_call_argument_has_no_enclosing_function |
349 | A query built via a Name argument at MODULE level (not inside any |
| function | test_matching_arity_passes |
373 | |
| function | test_wrong_arity_fails_naming_site_and_nearest_candidate |
396 | The F2 shape: shipped at one arity, queried at another — must hard |
| function | test_nonexistent_functor_reports_closest_name_candidate |
430 | When the functor doesn't exist at ANY arity, the candidate falls back |
| function | test_module_qualified_goal_resolves |
466 | A goal explicitly module-qualified (multiagent.pl's own convention) |
| function | test_out_of_scope_checked_site_is_silently_ignored_by_evaluate |
501 | A resolvable, parseable query site OUTSIDE a governance-shaped |
| function | test_build_engine_skips_canonical_files_already_loaded |
523 | A rules_dir containing one of the canonical GOVERNANCE_RULE_FILES |
| function | test_unresolved_dynamic_site_in_governance_dir_fails_the_gate |
539 | A dynamic-functor site inside a governance-shaped directory with no |
| function | test_never_queried_predicate_lands_in_advisory_not_failure |
572 | A predicate declared (via :- dynamic) in a curated governance rule |
| function | test_never_queried_predicate_via_module_export_list |
592 | The same advisory computation, but the predicate is declared via a |
| function | test_print_report_covers_advisory_branch |
607 | _print_report's advisory section — exercised directly with a |
| function | test_print_site_listing_covers_whitelisted_and_unwhitelisted_lines |
624 | _print_site_listing's WHITELISTED/UNWHITELISTED-DYNAMIC branches — |
| function | test_cli_json_shape |
654 | |
| function | test_cli_list_sites_debug_listing |
695 | |
| function | test_cli_exits_nonzero_on_failure |
725 | |
| function | test_live_discovery_finds_at_least_40_governance_query_sites |
750 | Sanity check over the REAL src/orchestrata_ultimate tree: this gate |
| function | test_live_discovery_includes_known_whitelisted_multiagent_site |
766 | A known dynamic-functor site (agents/prolog_bridge.py's _module_query() |
| class | TestIncludedFragmentsAreNotConsultedTwice |
780 | build_engine must skip files another file :- includes. |
| method | TestIncludedFragmentsAreNotConsultedTwice.test_includes_are_detected_from_source |
792 | |
| method | TestIncludedFragmentsAreNotConsultedTwice.test_double_quoted_include_is_detected |
803 | |
| method | TestIncludedFragmentsAreNotConsultedTwice.test_a_file_nobody_includes_is_not_a_fragment |
813 | |
| method | TestIncludedFragmentsAreNotConsultedTwice.test_the_shipped_generated_lexicon_is_the_real_fragment |
820 | The live case this was written for. |
| class | TestAdvisoryReachability |
833 | A predicate the RULES call is live code and must not be advised dead. |
| method | TestAdvisoryReachability.test_a_predicate_reached_from_another_rules_body_is_not_advised |
852 | |
| method | TestAdvisoryReachability.test_reachability_crosses_file_boundaries |
879 | The corpus is consulted as ONE rule base, so the graph is too. |
| method | TestAdvisoryReachability.test_reachability_is_transitive |
909 | Two hops from a Python entry point is still reached. |
| method | TestAdvisoryReachability.test_a_cycle_among_unreached_predicates_still_terminates_and_advises |
930 | Mutual recursion is ordinary Prolog; it must not hang the closure |
| method | TestAdvisoryReachability.test_the_shipped_corpus_advisory_shrinks_and_names_only_orphans |
952 | The live case, as a floor. |
| class | TestOrphanRatchet |
990 | The advisory can only shrink. |
| method | TestOrphanRatchet.test_the_shipped_corpus_sits_at_or_under_the_ceiling |
1000 | |
| method | TestOrphanRatchet.test_the_ceiling_is_not_slack |
1011 | A ceiling far above the real count is a ratchet that never bites. |
| method | TestOrphanRatchet.test_exceeding_the_ceiling_fails_the_gate |
1028 | The ratchet must FAIL, not warn. |
| method | TestOrphanRatchet.test_a_narrowed_source_does_not_trip_the_ratchet |
1060 | "Unreachable" is only meaningful when discovery saw the whole repo. |
| method | TestOrphanRatchet.test_run_boundary_check_arms_the_ratchet_only_for_the_real_source_root |
1113 | The glue, not just the flag. |
| method | TestOrphanRatchet.test_under_the_ceiling_does_not_fail |
1149 | The counterpart: the same corpus under a permissive ceiling passes, |