Orchestrata Ultimate › Tests › Reference › scripts › test_prolog_meta_lint

Tests reference — tests/scripts/test_prolog_meta_lint.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_prolog_meta_lint.py

source · 68 tests · 1054 lines

Tests for scripts/prolog_meta_lint.py — the Prolog governance-rulebase

Covers: core.base.traces

Kind Name Line Description
function test_mask_non_code_strips_line_comments 77
function test_mask_non_code_preserves_length_and_line_numbers 84
function test_mask_non_code_strips_quoted_atom_content 91
function test_mask_non_code_strips_double_quoted_string_content 98
function test_mask_non_code_handles_escaped_quote_in_atom 104
function test_mask_non_code_strips_block_comments 115
function test_mask_non_code_handles_char_code_notation_bare_char 123
function test_mask_non_code_char_code_notation_does_not_desync_later_quotes 137
function test_mask_non_code_char_code_doubled_quote_escape 149
function test_mask_non_code_char_code_backslash_escape 157
function test_mask_non_code_char_code_hex_escape 163
function test_mask_non_code_char_code_truncated_at_eof 172
function test_is_char_code_prefix_rejects_digit_run_prefix 180
function test_check_no_cut_detects_bare_cut 198
function test_check_no_cut_clean_file_no_violations 210
function test_check_no_cut_ignores_bang_in_comment_and_string 219
function test_check_no_dynamic_goal_detects_call_on_bound_variable 233
function test_check_no_dynamic_goal_detects_univ_then_call 245
function test_check_no_dynamic_goal_clean_file_no_violations 256
function test_check_no_dynamic_goal_detects_module_qualified_call_on_variable 265
function test_check_no_dynamic_goal_module_qualified_literal_goal_is_clean 280
function test_check_no_dynamic_goal_literal_call_is_clean 291
function test_check_no_rule_side_effects_detects_assertz_in_body 308
function test_check_no_rule_side_effects_detects_retractall_in_body 320
function test_check_no_rule_side_effects_ignores_dynamic_directive 331
function test_check_no_rule_side_effects_ignores_body_free_facts 340
function test_check_no_rule_side_effects_ignores_comment_mentions 351
function test_check_stratification_detects_naf_extension_point_path 366
function test_check_stratification_clean_when_no_naf_crossing 387
function test_check_stratification_clean_when_extension_point_reached_without_naf 403
function test_check_stratification_no_constitutional_file_present 422
function test_check_stratification_naf_unbalanced_parenthesized_goal 427
function test_check_stratification_no_module_exports 440
function test_check_stratification_naf_parenthesized_goal 450
function test_check_stratification_naf_bare_goal_ends_at_enclosing_close_paren 469
function test_check_no_redefinition_detects_moduleless_collision 497 THE NEGATIVE CORPUS. Two module-less files both define
function test_check_no_redefinition_clean_when_one_file_declares_module 528 REQ-114-FR2-003's actual mitigation: a module boundary, not merely a
function test_check_no_redefinition_dynamic_declaration_does_not_help 547 The variant explicitly tested (and refuted) during the vulnerability
function test_check_no_redefinition_clean_when_no_shared_head 566
function test_check_no_redefinition_clean_with_a_single_file 572
function test_check_no_redefinition_clean_on_real_governance_corpus 582 Measured 2026-08-19: four predicate names already repeat by NAME
function test_declares_module_true_for_two_arg_directive 596
function test_declares_module_false_when_absent 600
function test_run_lint_gate_mode_fails_on_redefinition 604 End-to-end through run_lint (not check_no_redefinition directly) —
function test_run_lint_gate_mode_passes_when_quarantine_file_is_module_scoped 636 The AFTER-FIX-and-following-the-spec control: REQ-114-FR2-003's own
function test_lint_file_combines_all_three_per_file_checks 669
function test_violation_format 680
function test_allowlist_line_format 690
function test_run_lint_default_mode_always_reports_allowlist_line 695
function test_run_lint_allowlisted_file_violations_never_gate 700
function test_run_lint_default_mode_does_not_scan_allowlist_contents 725
function test_run_lint_gate_mode_fails_on_governance_cut 748
function test_run_lint_gate_mode_fails_on_stratification_violation 766
function test_run_lint_all_mode_reports_application_and_unclassified_never_gating 800
function test_lint_report_to_dict_shape 827
function test_discover_all_pl_files_finds_the_real_governance_corpus 856
function test_classification_gaps_empty_for_real_repo 865
function test_discover_all_pl_files_skips_bak_and_injects_dir 873
function test_classification_gaps_reports_a_brand_new_unclassified_file 885
function test_classification_gaps_empty_when_file_is_classified 902
function test_scan_file_relpath_falls_back_to_name_outside_root 923
function test_split_clauses_tail_without_terminating_period 939
function test_print_report_shows_classification_gap 953
function test_main_json_mode_is_valid_json 966
function test_main_all_mode_always_exits_zero 977
function test_main_default_mode_exit_code_matches_report_passed 984
function test_main_json_and_all_combine 992
function test_lint_passes_on_governance_rulebases 1007 Pins the brief's "one live-repo assertion": the meta-lint gate is