Orchestrata Ultimate › Tests › Reference › knowledge_graph › test_conversation_consumer

Tests reference — tests/knowledge_graph/test_conversation_consumer.py

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

Prose pending.

tests/knowledge_graph/test_conversation_consumer.py

source · 34 tests · 857 lines

Tests for knowledge_graph.conversation_consumer (SPEC-021, US-021-007).

Covers: core.graph.adapters.bolt_sync, core.graph.config, core.graph.repository, core.infra_env_rule, knowledge_graph.conversation_consumer

Kind Name Line Description
class TestConversationRedisEndpointIsPinned 62 The queue half of the pipeline has its own endpoint, like the graph.
method TestConversationRedisEndpointIsPinned.test_ambient_redis_keys_cannot_redirect_the_queue 71
method TestConversationRedisEndpointIsPinned.test_unset_key_raises_even_with_healthy_ambient_redis 81
method TestConversationRedisEndpointIsPinned.test_blank_value_is_unset_and_non_integer_port_raises 95
method TestConversationRedisEndpointIsPinned.test_create_conversation_redis_builds_a_client_on_the_pinned_endpoint 105
method TestConversationRedisEndpointIsPinned.test_create_conversation_redis_raises_when_unset 119
class TestConversationTurnMessageParse 211
method TestConversationTurnMessageParse.test_parse_valid_v2_message 212
method TestConversationTurnMessageParse.test_parse_truncates_content_to_2000 237
method TestConversationTurnMessageParse.test_parse_rejects_invalid_json_and_v1 243
method TestConversationTurnMessageParse.test_parse_rejects_non_dict_json 273
method TestConversationTurnMessageParse.test_parse_rejects_missing_int_field 280
method TestConversationTurnMessageParse.test_parse_rejects_bool_as_int_field 299
method TestConversationTurnMessageParse.test_parse_rejects_colon_in_project 309
method TestConversationTurnMessageParse.test_parse_rejects_invalid_role 314
method TestConversationTurnMessageParse.test_parse_rejects_a_tool_names_length_mismatch 319 Names are POSITIONAL against ids, so a short list would mislabel
method TestConversationTurnMessageParse.test_parse_rejects_non_string_tool_names 331
method TestConversationTurnMessageParse.test_parse_accepts_a_message_with_no_tool_names_at_all 337
method TestConversationTurnMessageParse.test_parse_rejects_non_string_tool_call_ids 345
class TestTurnGraphMapper 357
method TestTurnGraphMapper.test_mapper_emits_only_merge_statements 358
method TestTurnGraphMapper.test_mapper_skips_tool_call_statement_when_none 387
class TestConversationQueueConsumerFlush 407
method TestConversationQueueConsumerFlush.test_flush_logs_non_empty_reports_at_info_and_stays_quiet_when_idle 408
method TestConversationQueueConsumerFlush.test_flush_creates_nodes_and_has_turn_edge 445
method TestConversationQueueConsumerFlush.test_flush_is_merge_idempotent_on_reconsume 484
method TestConversationQueueConsumerFlush.test_two_projects_same_seq_do_not_collide 520
method TestConversationQueueConsumerFlush.test_turn_ordering_by_turn_seq 557
method TestConversationQueueConsumerFlush.test_flush_links_tool_calls 587
method TestConversationQueueConsumerFlush.test_flush_records_tool_names_on_the_toolcall_nodes 617 Ids answer "did anything run"; names answer "was it work".
method TestConversationQueueConsumerFlush.test_flush_still_accepts_a_producer_that_sends_no_tool_names 659 Names are additive — an older producer must not start failing.
method TestConversationQueueConsumerFlush.test_depth_and_flush_when_pending 692
method TestConversationQueueConsumerFlush.test_quarantine_preserves_invalid_messages 715
method TestConversationQueueConsumerFlush.test_flush_nonblocking_on_graph_failure 740 A REAL BoltSyncRepository pointed at an unreachable port —
class TestConversationEndpointIsPinned 782 The conversation graph's endpoint must not follow the env profile.
method TestConversationEndpointIsPinned.test_test_profile_keys_cannot_redirect_the_conversation_writer 802 The exact split: a test-profile KG_ROUTING_URI is present and
method TestConversationEndpointIsPinned.test_unset_conversation_endpoint_raises 823 RUL-003's inverse: a required endpoint has NO literal fallback. A
method TestConversationEndpointIsPinned.test_blank_endpoint_is_treated_as_unset 839 An empty string is a misconfiguration, not a configured endpoint --
method TestConversationEndpointIsPinned.test_the_endpoint_keys_are_gated_as_required_infra 850 RUL-014: the rule needs a mechanism. core.infra_env_rule is the