new feature: External guardrails/judges

This commit is contained in:
2026-08-24 11:14:10 -03:00
parent 05373deff2
commit fd37138c4f
384 changed files with 40593 additions and 3621 deletions

View File

@@ -1,64 +1,14 @@
[
"agent_framework_oci/tests/test_generic_tool_response_presentation.py::test_generic_lines_mode_preserves_order_shape",
"agent_framework_oci/tests/test_generic_tool_response_presentation.py::test_generic_list_mode_supports_contas_multiple_plans_without_none",
"agent_framework_oci/tests/test_generic_tool_response_presentation.py::test_generic_template_mode_preserves_template_backend_plan_contract",
"agent_framework_oci/tests/test_generic_tool_response_presentation.py::test_missing_renderer_falls_back_without_breaking_runtime",
"agent_framework_oci/tests/test_generic_tool_response_presentation.py::test_no_declared_response_keeps_legacy_fallback",
"agent_framework_oci/tests/test_generic_tool_response_presentation.py::test_renderer_mode_uses_application_registered_renderer",
"agent_framework_oci/tests/test_judge_transaction_sampling.py::test_awaiting_confirmation_bypasses_sampling",
"agent_framework_oci/tests/test_judge_transaction_sampling.py::test_completed_transaction_bypasses_sampling_from_mcp_result",
"agent_framework_oci/tests/test_judge_transaction_sampling.py::test_non_transactional_turn_respects_zero_sample_rate",
"agent_framework_oci/tests/test_judge_transaction_sampling.py::test_transactional_detection_from_tool_policy",
"agent_framework_oci/tests/test_mcp_parameter_extraction_runtime.py::test_collection_turn_reuses_declarative_parameter_extraction",
"agent_framework_oci/tests/test_mcp_parameter_extraction_runtime.py::test_explicit_order_id_has_precedence_over_contract_key",
"agent_framework_oci/tests/test_mcp_parameter_extraction_runtime.py::test_new_transaction_current_message_overrides_stale_subject_from_context",
"agent_framework_oci/tests/test_mcp_parameter_extraction_runtime.py::test_runtime_extracts_order_id_from_current_message",
"agent_framework_oci/tests/test_mcp_parameter_extraction_runtime.py::test_transaction_extracts_required_fields_before_first_missing_check",
"agent_framework_oci/tests/test_mcp_parameter_extraction_runtime.py::test_unique_transactional_tool_is_selected_after_routing_constrains_allowlist",
"agent_framework_oci/tests/test_route_stickiness_transaction_shift.py::test_explicit_keyword_shift_preempts_stickiness",
"agent_framework_oci/tests/test_route_stickiness_transaction_shift.py::test_same_agent_explicit_intent_shift_must_preempt_stickiness",
"agent_framework_oci/tests/test_route_stickiness_transaction_shift.py::test_same_agent_transaction_keyword_preempts_continuity",
"agent_framework_oci/tests/test_route_stickiness_transaction_shift.py::test_short_generic_keyword_does_not_preempt",
"agent_framework_oci/tests/test_transaction_state_router_interruption.py::test_state_policy_allows_high_confidence_new_intent",
"agent_framework_oci/tests/test_transaction_state_router_interruption.py::test_state_policy_keeps_short_parameter_answer_in_transaction",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_closed_transaction_is_not_operational_context_for_next_turn",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_collecting_parameters_can_be_cancelled_explicitly",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_collecting_parameters_does_not_replace_collected_subject_with_stale_context",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_completed_transaction_becomes_reusable_operational_evidence",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_new_contestation_does_not_inherit_subject_or_value_from_previous_transaction",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_pre_validation_passes_then_waits_for_confirmation",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_pre_validation_rejection_clears_collecting_latches_and_is_exposed_in_patch",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_pre_validation_rejects_before_confirmation_without_executing_transaction",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_pre_validation_runs_after_last_required_parameter_before_confirmation",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_route_intent_shift_clears_collecting_transaction_before_new_tools",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_runtime_source_contains_persisted_confirmation_contract",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_terminal_confirmation_closes_active_transaction_and_clears_latches",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_tool_policy_registry_reads_pre_validation",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_tool_policy_registry_reads_transactional_confirmation",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_transaction_evidence_is_correlated_by_resource_identifier",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_transaction_state_patch_exposes_prevalidation_and_terminal_lifecycle",
"agent_framework_oci/tests/test_transactional_tool_flow.py::test_transaction_waits_then_executes_after_confirmation",
"agent_framework_oci/tests/unit/test_agent_runtime.py::test_agent_runtime_without_cache_invokes_llm",
"agent_framework_oci/tests/unit/test_langgraph_checkpoint_saver.py::test_put_writes_does_not_restore_older_checkpoint",
"agent_framework_oci/tests/unit/test_langgraph_checkpoint_saver.py::test_repository_checkpoint_saver_put_get",
"agent_framework_oci/tests/unit/test_resilient_checkpointer.py::test_compaction_keeps_last_n_checkpoints",
"agent_framework_oci/tests/unit/test_resilient_checkpointer.py::test_integrity_envelope_and_recovery_skips_corrupt_latest",
"agent_framework_oci/tests/unit/test_resilient_checkpointer.py::test_recovery_raises_when_only_corrupt_checkpoints_exist",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_continue_bypasses_router_without_regex_rules",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_continue_without_active_agent_falls_back_to_router",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_end_session_is_returned_as_global_route",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_global_session_actions_work_without_active_agent",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_human_handoff_is_returned_as_global_route",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_invalid_output_falls_back_safely",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_low_confidence_continue_falls_back_safely",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_no_active_agent_still_classifies_global_session_actions",
"agent_framework_oci/tests/unit/test_semantic_route_stickiness.py::test_route_result_falls_back_to_enterprise_router",
"agent_framework_oci/tests/test_phraseology_rewrite_revalidation.py::test_phraseology_block_is_rewritten_once_and_all_rails_are_revalidated",
"agent_framework_oci/tests/test_phraseology_rewrite_revalidation.py::test_phraseology_rewrite_does_not_loop_when_rewritten_text_is_still_blocked",
"tests/migration/test_adversarial_parity.py::test_anatel_rail_e_framework_native_sem_dependencia_legado",
"tests/migration/test_adversarial_parity.py::test_cval_bloqueia_contestacao_antes_do_side_effect",
"tests/migration/test_adversarial_parity.py::test_finalizacao_informacional_infer_tipo_de_billing_analysis_json",
"tests/migration/test_adversarial_parity.py::test_finalizacao_informacional_infer_tipo_pela_fatura",
"tests/migration/test_adversarial_parity.py::test_fix_whole_utterance_transcription_preserva_fronteira_de_frase",
"tests/migration/test_adversarial_parity.py::test_output_guardrail_context_extrai_protocolos_das_tools",
"tests/migration/test_adversarial_parity.py::test_output_guardrail_context_inclui_pedido_atual_para_aoferta",
"tests/migration/test_adversarial_parity.py::test_output_guardrail_context_nao_duplica_user_text_ja_no_historico",
"tests/migration/test_adversarial_parity.py::test_post_finalize_replay_e_short_circuit_framework",
"tests/migration/test_adversarial_parity.py::test_post_finalize_replay_preserva_terminal_status_e_fallback_sem_historico",
"tests/migration/test_adversarial_parity.py::test_post_finalize_replay_status_invalido_usa_fallback_seguro",
@@ -185,6 +135,10 @@
"tests/migration/test_dispute_actions_remaining_parity.py::test_sms_usa_barcode_titular_e_payload_padrao",
"tests/migration/test_dispute_actions_remaining_parity.py::test_status_sr_nao_faz_tracking_de_fatura_errada",
"tests/migration/test_dispute_actions_remaining_parity.py::test_status_sr_sms_path_e_tracking_completo",
"tests/migration/test_external_guardrails_judges_spi.py::test_contas_config_substitui_policies_tim_por_extensoes",
"tests/migration/test_external_guardrails_judges_spi.py::test_external_judges_load_from_agent_config",
"tests/migration/test_external_guardrails_judges_spi.py::test_sync_external_rail_runs_in_worker_thread",
"tests/migration/test_external_guardrails_judges_spi.py::test_sync_judges_run_concurrently_in_threads",
"tests/migration/test_finalization_parity_extended.py::test_cpf_alias_is_forwarded_to_informational_protocol",
"tests/migration/test_finalization_parity_extended.py::test_deferred_bundle_and_strategic_items_create_combined_rt15_without_workflow_latch",
"tests/migration/test_finalization_parity_extended.py::test_existing_session_protocol_prevents_duplicate_informational_rt15",
@@ -236,7 +190,8 @@
"tests/migration/test_guardrail_binary_parity.py::test_binary_polarity_contract",
"tests/migration/test_guardrail_binary_parity.py::test_pinj_prompt_is_binary_and_keeps_examples",
"tests/migration/test_guardrail_binary_parity.py::test_revprec_prompt_preserves_boundaries",
"tests/migration/test_guardrail_original_defaults_parity.py::test_framework_loader_instancia_coer_e_fraseologia",
"tests/migration/test_guardrail_context_dict_history.py::test_format_context_block_suporta_history_em_dict_do_contas",
"tests/migration/test_guardrail_original_defaults_parity.py::test_framework_loader_instancia_coer_e_preserva_fraseologia_tim_desabilitada",
"tests/migration/test_guardrail_original_defaults_parity.py::test_original_default_guardrails_estao_ativos_no_pipeline_framework",
"tests/migration/test_invoice_context_framework_native.py::test_invoice_context_billing_analysis_falha_emite_cvn007_sem_perder_complete_invoices",
"tests/migration/test_invoice_context_framework_native.py::test_invoice_context_cache_hit_expoe_cache_age_sem_republicar_eventos",
@@ -250,10 +205,31 @@
"tests/migration/test_invoice_context_framework_native.py::test_invoice_context_singleflight_mesma_sessao_nao_duplica_chamadas",
"tests/migration/test_invoice_context_framework_native.py::test_invoice_context_use_cache_false_forca_nova_busca",
"tests/migration/test_invoice_context_framework_native.py::test_invoice_explanation_reusa_evidencia_prefetch_sem_nova_api",
"tests/migration/test_mcp_contestation_subject_guard.py::test_cancel_preflight_exact_plan_is_out_of_scope_and_never_rebound_to_vas",
"tests/migration/test_mcp_contestation_subject_guard.py::test_correct_subject_is_preserved",
"tests/migration/test_mcp_contestation_subject_guard.py::test_invoice_resolver_exact_plan_identity_wins_before_similarity_matcher",
"tests/migration/test_mcp_contestation_subject_guard.py::test_preflight_does_not_replace_explicit_plan_with_vas",
"tests/migration/test_mcp_contestation_subject_guard.py::test_recovers_explicit_contestation_subject_from_original_text",
"tests/migration/test_no_legacy_dependency.py::test_no_legacy_imports_or_references",
"tests/migration/test_observability_code_mapping.py::test_agent_observer_maps_before_analytics_and_event_bus",
"tests/migration/test_observability_code_mapping.py::test_contas_telemetry_observer_returns_mapped_envelope",
"tests/migration/test_observability_code_mapping.py::test_generation_observation_name_is_mapped_before_langfuse_and_event_bus",
"tests/migration/test_observability_code_mapping.py::test_langfuse_analytics_direct_sdk_path_also_maps_observation_name",
"tests/migration/test_observability_code_mapping.py::test_mapper_passthrough_and_contract_fields",
"tests/migration/test_observability_code_mapping.py::test_span_name_is_mapped_before_otel_event_bus_and_langfuse",
"tests/migration/test_observability_code_mapping.py::test_telemetry_maps_direct_events",
"tests/migration/test_observability_default_overlay_compatibility.py::test_agent_overlay_can_override_default_action",
"tests/migration/test_observability_default_overlay_compatibility.py::test_agent_overlay_overrides_only_declared_entries",
"tests/migration/test_observability_default_overlay_compatibility.py::test_framework_default_carries_legacy_phraseology_rewrite_policy",
"tests/migration/test_observability_default_overlay_compatibility.py::test_old_agent_without_mapping_gets_framework_default_registry",
"tests/migration/test_observability_default_overlay_compatibility.py::test_old_legacy_rail_keeps_retry_with_new_framework_and_no_agent_mapping",
"tests/migration/test_observability_mapping_provider_boundary.py::test_mapping_path_can_resolve_from_python_import_root",
"tests/migration/test_observability_mapping_provider_boundary.py::test_provider_maps_guardrail_name_before_telemetry",
"tests/migration/test_observability_mapping_registry_actions.py::test_action_resolution_accepts_internal_and_external_aliases",
"tests/migration/test_observability_mapping_registry_actions.py::test_compact_and_rich_mapping_are_backward_compatible",
"tests/migration/test_observability_mapping_registry_actions.py::test_guardrails_yaml_policy_precedes_registry_action",
"tests/migration/test_observability_mapping_registry_actions.py::test_output_supervisor_uses_registry_action_without_name_hardcode",
"tests/migration/test_observability_mapping_registry_actions.py::test_parallel_executor_uses_same_registry",
"tests/migration/test_original_compliance_anatel.py::test_fluxo_ajuste_com_protocolo_passa",
"tests/migration/test_original_compliance_anatel.py::test_fluxo_ajuste_sem_protocolo_bloqueia",
"tests/migration/test_original_compliance_anatel.py::test_fluxo_nao_ajuste_passa_sem_verificar",
@@ -660,6 +636,9 @@
"tests/migration/test_original_workflow_cases.py::test_original_workflow_case_on_framework_runtime[vas_bundle_puro_nao_reforca_e_registra_bundle]",
"tests/migration/test_original_workflow_cases.py::test_original_workflow_case_on_framework_runtime[vas_estrategico_nao_com_estrategico_explica_cancelamento]",
"tests/migration/test_original_workflow_cases.py::test_original_workflow_case_on_framework_runtime[vas_estrategico_sim_finaliza_sem_protocolo_imediato]",
"tests/migration/test_output_supervisor_no_contract_hardcodes.py::test_output_supervisor_contains_no_customer_grl_taxonomy_or_named_policy_switches",
"tests/migration/test_output_supervisor_no_contract_hardcodes.py::test_retry_is_driven_by_metadata_not_rail_name",
"tests/migration/test_output_supervisor_no_contract_hardcodes.py::test_rewrite_is_driven_by_remediation_metadata",
"tests/migration/test_pro_rata_full_parity.py::test_action_contestacao_pro_rata_usa_items_e_totais",
"tests/migration/test_pro_rata_full_parity.py::test_action_definir_devolucao_busca_danfe_quando_ausente",
"tests/migration/test_pro_rata_full_parity.py::test_calculo_falha_quando_danfe_nao_cobre_credito",
@@ -671,6 +650,13 @@
"tests/migration/test_rag_resilience_and_informational_context.py::test_framework_rag_falha_tecnica_nao_quebra_fluxo",
"tests/migration/test_rag_resilience_and_informational_context.py::test_informational_rag_avulso_preserva_contexto_para_finalizacao",
"tests/migration/test_rag_resilience_and_informational_context.py::test_informational_rag_estrategico_sem_invoice_detail",
"tests/migration/test_real_legacy_integration_compat.py::test_cancelamento_accepts_original_cancellation_aliases",
"tests/migration/test_real_legacy_integration_compat.py::test_divergencia_preserves_original_user_password_basic_auth",
"tests/migration/test_real_legacy_integration_compat.py::test_profile_bill_uses_complete_invoices_contract_like_original_factory",
"tests/migration/test_real_legacy_integration_compat.py::test_profile_full_appends_msisdn_when_original_url_has_no_placeholder",
"tests/migration/test_real_legacy_integration_compat.py::test_query_vas_accepts_original_aliases_and_timeout",
"tests/migration/test_real_legacy_integration_compat.py::test_query_vas_legacy_base_url_appends_country_code_and_msisdn",
"tests/migration/test_real_legacy_integration_compat.py::test_vas_history_and_contrato_default_client_id_match_original",
"tests/migration/test_remaining_command_contracts.py::test_cancelamento_always_sends_non_empty_message_id",
"tests/migration/test_remaining_command_contracts.py::test_contrato_uses_clientId_not_client_id",
"tests/migration/test_remaining_command_contracts.py::test_profile_full_uses_original_ClientID_header",