Orchestrata Ultimate › Tests › Reference › orchestrator › test_intent_normalizer

Tests reference — tests/orchestrator/test_intent_normalizer.py

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

Prose pending.

tests/orchestrator/test_intent_normalizer.py

source · 24 tests · 387 lines

Test Standards Compliance (see AGENTS.md § Test Standards):

Covers: core.lru_cache, orchestrator.intent_classifier, orchestrator.intent_normalizer, orchestrator.pipeline_router

Kind Name Line Description
function test_unavailable_provider_returns_the_original_text 60
function test_passthrough_is_counted_so_an_outage_is_visible 72 A silent outage would look like a vocabulary regression — accuracy
function test_a_failed_call_is_not_cached 87 Caching a failure would pin the raw text for the whole TTL and keep
function test_empty_and_whitespace_input_short_circuits 99
function test_cached_normalization_is_returned_without_a_provider_call 114 Seeded through the constructor's cache seam: if the cache were missed,
function test_cache_key_separates_identical_text_under_different_context 131 "it hangs again" means different things after different turns, so the
function test_cache_key_is_order_sensitive_in_context 147 The turns are chronological — reversing them changes what a pronoun
function test_context_turns_reach_the_model_oldest_first 160
function test_no_context_sends_the_bare_turn 173
function test_prompt_names_the_kind_of_work_but_not_the_enum 182 Measured, and it overturned the rule this test used to assert.
function test_prompt_turns_a_complaint_into_the_work_it_asks_for 214 Measured, and it overturned an earlier rule.
function test_over_length_reply_is_rejected_in_favour_of_the_original 234 An elaborating model is a worse parser input than a messy user.
function test_empty_reply_is_rejected_in_favour_of_the_original 241
function test_reply_is_reduced_to_one_stripped_sentence 248
function test_model_and_ceiling_come_from_the_injected_env_not_a_hardcoded_literal 265
function test_classifier_owns_a_normalizer_by_default 279
function test_classify_async_records_what_the_grammar_read 283 With the provider unavailable the normalizer passes the raw text
function test_classify_async_survives_a_dead_normalizer_with_the_sync_verdict 296 The async path must never be WORSE than the sync one: same cascade,
function test_sync_classify_leaves_normalized_text_empty 310 The sync path does not normalize, and must not claim it did.
function test_ungrounded_reply_is_rejected_in_favour_of_the_original 320 The live failure this check was added for.
function test_a_real_rewrite_survives_the_grounding_check 341 The check must not reject the rewrites the tier exists to produce.
function test_grounding_counts_the_context_turns_too 354 Resolving a pronoun legitimately imports every content word from a
function test_short_function_words_do_not_ground_a_reply 372 "a", "is", "of" are shared by almost any pair of English sentences; if
function test_a_turn_with_no_tokens_to_ground_against_is_not_rejected 381 Punctuation/emoji-only input gives the check nothing to work with. It