Orchestrata Ultimate › Tests › Reference › scripts › test_ast_trace_audit
Tests reference — tests/scripts/test_ast_trace_audit.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_ast_trace_audit.py
source · 36 tests · 713 lines
Tests for the AST tool's
trace-auditandtrace-lintsubcommands —
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_trace_audit_records_have_expected_shape |
103 | |
| function | test_trace_audit_shotgun_detects_decorator_over_threshold |
115 | |
| function | test_trace_audit_fanout_detects_shared_id |
127 | |
| function | test_trace_audit_fanout_respects_min_threshold |
137 | |
| function | test_trace_audit_sequential_runs_detects_consecutive_increments |
144 | |
| function | test_trace_audit_sequential_runs_respects_min_threshold |
157 | |
| function | test_trace_audit_family_matrix_groups_by_package_and_family |
164 | |
| function | test_trace_audit_convention_stats_spec_prefix_and_story_shapes |
176 | |
| function | test_trace_audit_never_fails_even_with_bad_records |
202 | trace_audit is an instrument, not a gate: garbage ids/specs never |
| function | test_trace_audit_cli_summary_exits_zero |
217 | |
| function | test_trace_audit_cli_json_writes_full_payload |
230 | |
| function | test_trace_audit_cli_json_only_by_default_no_summary_dup |
260 | --json without --summary writes the file and skips the console summary |
| function | test_trace_audit_cli_json_and_summary_together |
284 | |
| function | test_trace_lint_dangling_id_is_an_error |
310 | |
| function | test_trace_lint_placeholder_id_is_an_error |
319 | |
| function | test_trace_lint_malformed_id_is_an_error |
328 | |
| function | test_trace_lint_shotgun_over_25_is_error |
337 | |
| function | test_trace_lint_shotgun_11_to_25_is_warning_only |
347 | |
| function | test_trace_lint_10_reqs_is_not_flagged |
365 | |
| function | test_trace_lint_unknown_spec_is_an_error |
381 | |
| function | test_trace_lint_known_spec_via_spec_prefix_normalized |
398 | A SPEC-prefixed spec= is normalized (prefix stripped) before matching |
| function | test_trace_lint_spec_known_via_dir_name_without_checklist |
415 | A spec dir with no requirements.md yet still grounds its spec number |
| function | test_trace_lint_ground_truth_accepts_heading_format |
433 | The '### REQ-...' heading format grounds an id just as the bold |
| function | test_trace_lint_fully_clean_tree_has_zero_findings |
455 | |
| function | test_trace_lint_does_not_judge_semantic_accuracy |
475 | A real, ground-truthed id used on a def it has nothing to do with is |
| function | test_trace_lint_cli_exit_nonzero_on_error_finding |
492 | |
| function | test_trace_lint_cli_exit_zero_on_clean_tree |
512 | |
| function | test_trace_lint_cli_exit_zero_on_warning_only |
538 | 11-25 reqs is a warning, not an error — must not fail the gate. |
| function | test_trace_lint_cli_max_caps_printed_findings |
567 | |
| function | test_load_requirement_ground_truth_skips_unreadable_file |
599 | |
| function | test_known_spec_numbers_empty_specs_dir |
610 | |
| function | test_traces_kwarg_str_none_when_kwarg_absent |
622 | A decorator missing spec=/story= entirely -> both helpers return None, |
| function | test_traces_kwarg_reqs_empty_when_kwarg_absent_or_not_list |
639 | A @traces(...) missing reqs=[...] entirely, or with a non-list value, |
| function | test_package_for_returns_empty_string_when_path_outside_root |
658 | Defensive branch: a path that isn't under root (ValueError from |
| function | test_trace_audit_cli_summary_prints_fanout_and_sequential_entries |
671 | With low --fanout-min/--seq-min the human summary's top-10 print |
| function | test_trace_records_skips_non_traces_decorators_in_mixed_list |
697 | A decorator list mixing a non-@traces decorator (e.g. @staticmethod) |