mirror of
https://github.com/langgenius/dify.git
synced 2026-11-12 06:11:12 +08:00
3570 lines
238 KiB
Python
3570 lines
238 KiB
Python
from pathlib import Path
|
|
from xml.etree import ElementTree
|
|
|
|
import pytest
|
|
|
|
JUNIT = "builder-confirmed-tool-units.xml"
|
|
FILES = [
|
|
"api/tests/unit_tests/services/dify_builder/test_agent_test_workspace.py",
|
|
"api/tests/unit_tests/services/agent/test_workspace_service.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_agent_tool_declarations.py",
|
|
"api/tests/unit_tests/controllers/inner_api/agent/test_llm.py",
|
|
"api/tests/unit_tests/controllers/inner_api/agent/test_tools.py",
|
|
"api/tests/unit_tests/controllers/inner_api/agent/test_files.py",
|
|
"api/tests/unit_tests/controllers/inner_api/knowledge/test_retrieval.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_reconcile.py",
|
|
"api/tests/unit_tests/core/app/apps/test_builder_execution_admission.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_real_call_consent_service.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_confirmed_tool_launch.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_wiring.py",
|
|
"api/tests/unit_tests/controllers/console/test_dify_builder_routes.py",
|
|
"api/tests/unit_tests/controllers/console/test_wraps.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_gmail_read_policy.py",
|
|
"api/tests/unit_tests/core/tools/test_confirmed_tool_runtime.py",
|
|
"api/tests/unit_tests/libs/key_providers/test_rsa_key_provider.py",
|
|
"api/tests/unit_tests/core/helper/test_encrypter.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_resources.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_native_agent_catalog.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_native_agent_binding.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_node_policy.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_agent_binding.py",
|
|
"api/tests/unit_tests/controllers/common/test_agent_access.py",
|
|
"api/tests/unit_tests/core/workflow/generator/test_tool_catalogue.py",
|
|
"api/tests/unit_tests/services/tools/test_api_tool_catalogue.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_api_tool_output_context.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_native_api_string_input_binding.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_native_api_output_contract.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_native_http_output_contract.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_condition_evidence.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_native_constant_output_contract.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_dify_port_preflight.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_dify_port.py",
|
|
"api/tests/unit_tests/services/test_app_generate_service.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_node_factory.py",
|
|
"api/tests/unit_tests/services/workflow_generation/test_runner.py",
|
|
"api/tests/unit_tests/core/workflow/generator/test_output_contracts.py",
|
|
"api/tests/unit_tests/core/workflow/generator/test_template_generation.py",
|
|
"api/tests/unit_tests/core/workflow/generator/test_native_agent_output_contract.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_agent_node.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_node_factory.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_new_agent_recovery.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_build_cognition.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_planning_source.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_build_presentation.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_llm_agent.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_mock_inputs.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_trace_diagnostics.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_policy_trace_diagnostics.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_bound_resource_plan_reconciliation.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_build_nodes.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_initial_chatflow.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_build_plan_language.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_reply_language_prompts.py",
|
|
"api/tests/unit_tests/services/test_workflow_generator_service.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_fix.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_draft_tool_setup.py",
|
|
"api/tests/unit_tests/services/test_draft_tool_admission.py",
|
|
"api/tests/unit_tests/repositories/credentials/test_query_repository.py",
|
|
"api/tests/unit_tests/events/event_handlers/test_delete_tool_parameters_cache_when_sync_draft_workflow.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_no_repair_gate.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_execution_policy.py",
|
|
"api/tests/unit_tests/core/workflow/test_restricted_execution.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_node_factory.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_execution_policy_service.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_json_tool_execution_admission.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_json_tool_execution.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_json_tool_metadata.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_json_tool_runtime.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_verification.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_build.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_replan_apply.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_localize.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_session_ui_localization.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_runner.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_template_execution.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_template_presentation.py",
|
|
"api/tests/unit_tests/controllers/console/app/test_workflow_empty_draft.py",
|
|
]
|
|
FILES += [
|
|
"api/tests/unit_tests/services/tools/test_ordinary_plugin_credentials.py",
|
|
"api/tests/unit_tests/core/tools/test_tool_manager.py",
|
|
"api/tests/unit_tests/core/tools/plugin_tool/test_confirmed_plugin_tool.py",
|
|
"api/tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py",
|
|
]
|
|
FILES += ["api/tests/unit_tests/services/test_agent_tool_inner_service.py"]
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/test_effect_disclosure.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_effect_mock.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_confirmed_full_run.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_initialization_recovery.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_initialization_runtime.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_effect_confirmation_gate.py",
|
|
]
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/test_effect_account_bindings.py"]
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/test_revision.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_contract.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_workflow_generator.py",
|
|
"api/tests/unit_tests/core/app/apps/test_base_app_generator.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_chatflow_generator.py",
|
|
"api/tests/unit_tests/services/test_app_generate_service_in_process.py",
|
|
]
|
|
FILES += [
|
|
path
|
|
for path in [
|
|
"api/tests/unit_tests/clients/agent_backend/test_event_adapter.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_workflow_generator.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_base_runner.py",
|
|
"api/tests/unit_tests/core/app/entities/test_app_invoke_entities.py",
|
|
"api/tests/unit_tests/core/repositories/test_sqlalchemy_workflow_node_execution_repository.py",
|
|
"api/tests/unit_tests/services/workflow_runtime/test_agent_node.py",
|
|
"api/tests/unit_tests/core/workflow/nodes/agent_v2/test_confirmed_agent_node.py",
|
|
"api/tests/unit_tests/services/agent/test_workflow_run_recovery.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_agent_context.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_agent_risk_assessor.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_confirmed_agent_commands.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_confirmed_agent_continuation.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_confirmed_full_run.py",
|
|
"api/tests/unit_tests/services/test_app_generate_service_agent_context.py",
|
|
"api/tests/unit_tests/services/test_app_generate_service_in_process.py",
|
|
]
|
|
if path not in FILES
|
|
]
|
|
FILES += [
|
|
path
|
|
for path in [
|
|
"api/tests/unit_tests/services/dify_builder/test_agent_confirmed_workspace.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_agent_operation_owner.py",
|
|
]
|
|
if path not in FILES
|
|
]
|
|
FILES += [
|
|
path
|
|
for path in ["api/tests/unit_tests/services/dify_builder/native_testing/test_confirmed_agent_completion.py"]
|
|
if path not in FILES
|
|
]
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/native_testing/test_confirmed_agent_terminal_scan.py"]
|
|
FILES += [
|
|
path
|
|
for path in ["api/tests/unit_tests/services/dify_builder/test_agent_model_result_canonical.py"]
|
|
if path not in FILES
|
|
]
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/test_test_actions.py"]
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/test_advance_task.py"]
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/test_output_evidence.py"]
|
|
FILES += ["api/tests/unit_tests/services/test_workflow_run_service.py"]
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/test_code_risk_assessment.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_code_risk_preparation.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_ports.py",
|
|
]
|
|
# Keep Code failure-policy cognition paths in the same normal unit lane.
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/test_edit_cognition.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_fix_cognition.py",
|
|
]
|
|
# ENG-1254 / ENG-1101: edit guidance and resource matching.
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/test_edit_plan_generation.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_edit_plan_lifecycle.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_resource_grounding.py",
|
|
]
|
|
# Local P1 generation, tool semantics and business acceptance regressions.
|
|
FILES += [
|
|
"api/tests/unit_tests/core/workflow/generator/test_native_aggregator_generation_contract.py",
|
|
"api/tests/unit_tests/core/workflow/generator/test_native_code_output_contract.py",
|
|
"api/tests/unit_tests/core/workflow/generator/test_native_loop_generation_contract.py",
|
|
"api/tests/unit_tests/core/workflow/generator/test_planner_token_budget.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_business_acceptance.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_business_acceptance_integration.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_business_failure_repair.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_business_failure_port.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_native_docx_evidence.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_planning_tool_contract.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_tool_parameter_semantics.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_plugin_tool_output_context.py",
|
|
]
|
|
# PR44527: continuous native observations and commit notifications.
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/test_native_live_stream.py"]
|
|
# ENG-1321: independent task controls must run with the execution owners.
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/test_task_controls.py"]
|
|
FILES += ["api/tests/unit_tests/services/dify_builder/test_stream_frames.py"]
|
|
# ENG-1240: fixed admission deadlines and terminal unused-permit settlement.
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_scope_deadline.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_unconsumed_failure.py",
|
|
]
|
|
# ENG-1386: actor-scoped knowledge metadata and nonexecuting preference protocol.
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/test_knowledge_inventory.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_knowledge_discovery.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_knowledge_source_cue.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_knowledge_source_intent.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_requirement_provenance.py",
|
|
]
|
|
# First-phase release blockers: repair evidence, initial inputs and metadata readiness.
|
|
FILES += [
|
|
"api/tests/unit_tests/services/dify_builder/test_diagnostic_context.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_api_tool_effects.py",
|
|
"api/tests/unit_tests/services/tools/test_mcp_tool_catalogue.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_credential_failure_attribution.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_fix_context.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_testdata_code_refresh.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_predefined_model_readiness.py",
|
|
"api/tests/unit_tests/core/plugin/impl/test_model_readiness.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_cognition_thread_context.py",
|
|
]
|
|
SELECTED_GUARDS = [
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_edit.py::test_sufficient_goal_reaches_plan_gate_or_actionable_retry_with_monotonic_progress",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_edit.py::test_edit_capability_check_renders_agent_fields",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_edit.py::test_re_fix_branches_clear_stale_test_input_ref_and_verify_run_id",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_edit.py::test_disconnected_tool_failure_surfaces_current_checklist_and_bounded_exit",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_edit.py::test_same_goal_capability_reentry_preserves_repair_budget",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_edit.py::test_connect_existing_form_selection_reaches_plan_and_real_intent_guard",
|
|
"api/tests/unit_tests/services/dify_builder/test_conversation_tasks.py::test_new_task_after_completion_resets_native_failure_budget",
|
|
"api/tests/unit_tests/services/dify_builder/test_conversation_tasks.py::test_known_failed_run_allows_fresh_form_without_reusing_consent",
|
|
"api/tests/unit_tests/services/dify_builder/test_execution_recovery_messages.py::test_preparation_failure_localizes_reason_and_retains_machine_evidence",
|
|
"api/tests/unit_tests/services/dify_builder/test_graph_ops.py::test_insert_between_can_reuse_complete_existing_node_and_replay_without_duplicates",
|
|
"api/tests/unit_tests/services/dify_builder/test_graph_ops.py::test_reuse_existing_insertion_rejects_invalid_or_ambiguous_request",
|
|
"api/tests/unit_tests/services/dify_builder/test_graph_ops.py::test_reuse_existing_insertion_preserves_unrelated_edges_and_exact_branch_handle",
|
|
"api/tests/unit_tests/services/dify_builder/test_recovery.py::test_conflict_restart_reanalyzes_saved_edit_goal_without_a_send_choice",
|
|
"api/tests/unit_tests/services/dify_builder/test_recovery.py::test_restart_same_goal_and_executable_graph_keeps_repeated_failure_budget",
|
|
"api/tests/unit_tests/services/dify_builder/test_serde.py::test_repair_loop_fields_round_trip",
|
|
"api/tests/unit_tests/services/dify_builder/test_serde.py::test_repair_loop_fields_default_when_absent",
|
|
"api/tests/unit_tests/core/dify_builder/test_handlers_edit.py::test_edit_test_fail_with_no_proposed_repair_still_routes_to_gate",
|
|
"api/tests/unit_tests/controllers/console/app/test_workflow.py::TestWorkflowCases::test_sync_draft_workflow_rejects_empty_graph_without_confirmation",
|
|
]
|
|
FILES = list(dict.fromkeys(FILES))
|
|
# ENG-1392/1410: reviewed repair presentation and same-Run Tool structure owners.
|
|
FILES += [
|
|
"api/tests/unit_tests/core/dify_builder/test_fix_flow.py",
|
|
"api/tests/unit_tests/core/dify_builder/test_repair_readability.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_repair_presentation.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_tool_output_evidence.py",
|
|
]
|
|
# ENG-1240: pure recovery state and reservation owner regressions.
|
|
FILES += [
|
|
"api/tests/unit_tests/controllers/inner_api/test_agent_runtime_lineage.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_agent_associations.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_agent_recovery.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_agent_recovery_state.py",
|
|
"api/tests/unit_tests/services/dify_builder/native_testing/test_native_runtime.py",
|
|
"api/tests/unit_tests/services/dify_builder/test_agent_asset_operations.py",
|
|
]
|
|
code = pytest.main(
|
|
[
|
|
*FILES,
|
|
*SELECTED_GUARDS,
|
|
"-p",
|
|
"no:benchmark",
|
|
"--no-cov",
|
|
"-vv",
|
|
"-rA",
|
|
"--tb=long",
|
|
f"--junitxml={JUNIT}",
|
|
]
|
|
)
|
|
# Full module identity avoids silently merging same-basename owners.
|
|
module_paths = [*FILES, *(selection.split("::", 1)[0] for selection in SELECTED_GUARDS)]
|
|
modules = {Path(path).with_suffix("").as_posix().removeprefix("api/").replace("/", "."): 0 for path in module_paths}
|
|
identities = set()
|
|
problems = []
|
|
if not Path(JUNIT).is_file():
|
|
problems.append("unit JUnit report missing")
|
|
else:
|
|
for case in ElementTree.parse(JUNIT).getroot().iter("testcase"):
|
|
classname, name = case.get("classname") or "", case.get("name") or ""
|
|
normalized = classname.removeprefix("api.")
|
|
matching = [module for module in modules if normalized == module or normalized.startswith(module + ".")]
|
|
if len(matching) != 1:
|
|
problems.append(f"unexpected unit case {classname}::{name}")
|
|
continue
|
|
identity = (classname, name)
|
|
if identity in identities:
|
|
problems.append(f"duplicate unit case {classname}::{name}")
|
|
identities.add(identity)
|
|
modules[matching[0]] += 1
|
|
if any(case.find(tag) is not None for tag in ("skipped", "failure", "error")):
|
|
problems.append(f"nonpassing unit case {classname}::{name}")
|
|
for module, count in modules.items():
|
|
print(f"COLLECTED {module}: {count} unit cases", flush=True)
|
|
if count == 0:
|
|
problems.append(f"missing unit module {module}")
|
|
a3_expected = {
|
|
"tests.unit_tests.services.dify_builder.test_agent_tool_declarations": {
|
|
"test_schema_preparation_never_constructs_runtime_or_refreshes_expired_oauth": 2,
|
|
"test_default_plugin_metadata_path_does_not_call_dynamic_or_credential_runtime": 1,
|
|
"test_same_permit_validation_does_not_claim_or_spend": 10,
|
|
"test_marked_request_builder_stops_missing_ref_before_metadata": 1,
|
|
"test_private_bridge_maps_exact_decisions_without_losing_payload": 4,
|
|
"test_materialization_rejects_phase_mismatch_and_missing_fence_before_io": 1,
|
|
"test_private_native_routes_require_existing_service_auth": 4,
|
|
"test_private_before_call_bridge_serialization_preserves_wait_reason": 3,
|
|
"test_native_credential_phases_wait_refresh_then_business_without_double_spend": 1,
|
|
"test_native_materializer_phase_rejected_before_credential_selection": 1,
|
|
"test_actual_native_materializer_uses_existing_oauth_owner_then_cas_before_business": 1,
|
|
"test_missing_credential_configuration_wait_precedes_business_intent": 1,
|
|
"test_endpoint_lineage_requires_exact_envelope_before_physical_owner_refusal": 4,
|
|
"test_actual_llm_endpoint_rejects_known_native_omission_before_prepare": 1,
|
|
"test_private_claim_route_refuses_repeated_requests_without_consuming_permit": 1,
|
|
"test_native_refresh_cas_rechecks_detached_snapshot_before_write": 4,
|
|
"test_endpoint_typed_json_guard_precedes_physical_owner_refusal": 10,
|
|
},
|
|
"tests.unit_tests.controllers.inner_api.agent.test_llm": {
|
|
"test_post_streams_plugin_compatible_envelope": 1,
|
|
"test_post_preserves_raw_prompts_without_serializing_them": 2,
|
|
"test_post_rejects_invalid_body_before_model_resolution": 1,
|
|
"test_post_preserves_preflight_quota_failure": 1,
|
|
"test_post_preserves_stream_quota_failure": 1,
|
|
},
|
|
"tests.unit_tests.controllers.inner_api.agent.test_tools": {
|
|
"test_post_returns_service_response": 1,
|
|
"test_post_returns_400_for_invalid_body": 1,
|
|
"test_post_preserves_service_error_status_code_and_description": 1,
|
|
"test_post_preserves_refresh_error_classification_through_real_credential_resolution": 8,
|
|
},
|
|
"tests.unit_tests.controllers.inner_api.agent.test_files": {
|
|
"test_upload_request_returns_origin_free_uri": 1,
|
|
"test_upload_request_payload_requires_non_negative_max_size": 1,
|
|
"test_download_request_returns_origin_free_uri_for_sandbox": 1,
|
|
"test_download_request_binds_requested_url": 3,
|
|
},
|
|
"tests.unit_tests.controllers.inner_api.knowledge.test_retrieval": {
|
|
"test_post_returns_404_when_api_key_missing": 1,
|
|
"test_post_returns_404_when_api_key_invalid": 1,
|
|
"test_post_returns_400_for_invalid_body": 1,
|
|
"test_post_returns_404_for_service_not_found_error": 1,
|
|
"test_post_returns_403_for_service_forbidden_error": 1,
|
|
"test_post_returns_422_for_retrieval_config_value_error": 1,
|
|
"test_post_returns_429_for_rate_limit_error": 1,
|
|
"test_post_returns_400_for_manual_metadata_without_conditions": 1,
|
|
"test_post_returns_400_for_automatic_metadata_without_model_config": 1,
|
|
"test_post_returns_502_for_external_knowledge_failure": 1,
|
|
"test_post_returns_service_response": 1,
|
|
},
|
|
}
|
|
a4_expected = {
|
|
"tests.unit_tests.services.dify_builder.test_agent_test_workspace": {
|
|
"test_resource_metadata_cannot_authorize_an_operation": 1,
|
|
"test_native_allocation_reservation_preserves_effect_entries": 1,
|
|
"test_prepare_pins_home_and_never_allocates_conversation_or_updates_soul": 1,
|
|
"test_ambiguous_allocation_reconciles_exact_ids_without_new_create": 1,
|
|
"test_cross_tenant_or_changed_pin_and_input_import_refuse_before_io": 1,
|
|
"test_cancel_between_physical_allocation_and_finalize_cleans_same_scope": 1,
|
|
"test_separate_invocations_reserve_distinct_mutable_home_and_workspace_ids": 1,
|
|
"test_known_native_binding_requires_actual_owned_workspace_rows": 1,
|
|
},
|
|
"tests.unit_tests.services.agent.test_workspace_service": {
|
|
"test_workspace_client_honors_the_configured_snapshot_timeout": 1,
|
|
"test_create_binding_success_persists_new_workspace_and_binding": 1,
|
|
"test_create_binding_without_home_snapshot_uses_backend_default": 1,
|
|
"test_create_binding_rejects_missing_explicit_home_snapshot_before_backend_call": 1,
|
|
"test_create_second_binding_reuses_existing_workspace": 1,
|
|
"test_get_active_binding_resolves_exact_participant": 1,
|
|
"test_get_active_binding_rejects_wrong_owner": 1,
|
|
"test_retire_non_final_binding_keeps_workspace_active": 1,
|
|
"test_retire_final_binding_retires_workspace": 1,
|
|
"test_retire_workspace_retires_all_active_bindings": 1,
|
|
"test_resolve_active_binding_for_scope_returns_matching_participant": 1,
|
|
"test_retire_all_for_conversation_retires_only_matching_conversation_workspaces": 1,
|
|
"test_retire_all_for_app_retires_only_active_workspaces_for_that_app": 1,
|
|
"test_collect_binding_without_retired_workspace_destroys_binding_only": 1,
|
|
"test_collect_workspace_destroys_workspace_then_remaining_bindings": 1,
|
|
"test_collect_workspace_remaining_failure_preserves_ledgers_and_replay_converges": 1,
|
|
"test_collect_retired_workspace_without_retired_binding_raises": 1,
|
|
"test_binding_collection_database_failure_propagates": 1,
|
|
"test_binding_collection_backend_failure_propagates_and_preserves_retired_binding": 1,
|
|
"test_workspace_collection_backend_failure_propagates_and_preserves_retired_resources": 1,
|
|
"test_workspace_collection_final_delete_failure_propagates": 1,
|
|
"test_binding_creation_ignores_unavailable_metering_configuration": 1,
|
|
"test_binding_lookups_ignore_bad_metering_configuration_and_remain_tenant_scoped": 1,
|
|
},
|
|
}
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.tools.test_ordinary_plugin_credentials": {
|
|
"test_explicit_reference_reaches_actual_plugin_runtime": 2,
|
|
"test_mismatched_stored_identity_refuses_before_decryption": 3,
|
|
"test_invalid_explicit_reference_never_selects_default": 1,
|
|
"test_default_reference_resolves_credentials": 1,
|
|
"test_no_auth_uses_empty_credentials_without_read": 1,
|
|
"test_confirmed_plugin_rejected_before_credential_or_provider_work": 1,
|
|
"test_native_json_rejection_precedes_credential_work": 1,
|
|
"test_refresh_persists_actual_selected_row": 4,
|
|
"test_refresh_conflict_refuses_runtime_without_cache_invalidation": 4,
|
|
"test_workspace_credential_delegation_does_not_compare_runtime_user_to_creator": 1,
|
|
"test_policy_refusal_precedes_decrypt_refresh_or_dispatch": 1,
|
|
"test_ordinary_refresh_failure_refuses_without_cache_invalidation": 1,
|
|
"test_hardcoded_refresh_retains_original_state_across_session_expiration": 1,
|
|
"test_empty_reference_preserves_default_selection": 1,
|
|
"test_refresh_update_compiles_for_supported_database_configuration": 4,
|
|
"test_refresh_requires_proven_write_before_cache_and_dispatch": 5,
|
|
"test_refresh_commit_uncertainty_refuses_cache_invalidation_and_dispatch": 1,
|
|
},
|
|
"tests.unit_tests.core.tools.test_tool_manager": {
|
|
"test_clear_hardcoded_providers_cache_resets": 1,
|
|
"test_convert_tool_parameters_type_agent_and_workflow_branches": 1,
|
|
"test_convert_tool_parameters_type_constant_branch": 1,
|
|
"test_convert_tool_parameters_type_model_selector_from_constant_value_config": 1,
|
|
"test_convert_tool_parameters_type_model_selector_from_legacy_top_level_config": 1,
|
|
"test_generate_mcp_tool_icon_url_returns_provider_icon": 1,
|
|
"test_generate_tool_icon_urls_for_builtin_and_plugin": 1,
|
|
"test_generate_tool_icon_urls_for_workflow_and_api": 1,
|
|
"test_generate_tool_icon_urls_missing_workflow_and_api_use_default": 1,
|
|
"test_get_agent_runtime_apply_runtime_parameters": 1,
|
|
"test_get_agent_runtime_raises_when_runtime_missing": 1,
|
|
"test_get_api_provider_controller_not_found_raises": 1,
|
|
"test_get_api_provider_controller_returns_controller_and_credentials": 1,
|
|
"test_get_builtin_provider_returns_plugin_for_missing_hardcoded": 1,
|
|
"test_get_hardcoded_provider_loads_cache_when_empty": 1,
|
|
"test_get_mcp_provider_controller_missing_raises": 1,
|
|
"test_get_mcp_provider_controller_returns_controller": 1,
|
|
"test_get_plugin_provider_raises_when_provider_missing": 1,
|
|
"test_get_plugin_provider_translates_plugin_not_found_to_domain_error": 2,
|
|
"test_get_plugin_provider_uses_context_cache": 1,
|
|
"test_get_tool_icon_for_api_workflow_and_mcp": 1,
|
|
"test_get_tool_icon_for_builtin_provider_variants": 1,
|
|
"test_get_tool_icon_invalid_provider_type_raises": 1,
|
|
"test_get_tool_icon_plugin_error_returns_default": 1,
|
|
"test_get_tool_label_loads_cache_and_handles_missing": 1,
|
|
"test_get_tool_runtime_api_path": 1,
|
|
"test_get_tool_runtime_app_not_implemented": 1,
|
|
"test_get_tool_runtime_builtin_maps_oauth_refresh_failure_to_credential_error": 1,
|
|
"test_get_tool_runtime_builtin_missing_tool_raises": 1,
|
|
"test_get_tool_runtime_builtin_plugin_credential_deleted_raises": 1,
|
|
"test_get_tool_runtime_builtin_plugin_without_workspace_credential_raises": 1,
|
|
"test_get_tool_runtime_builtin_refreshes_expired_oauth_credentials": 9,
|
|
"test_get_tool_runtime_builtin_with_credentials_decrypts_and_forks": 1,
|
|
"test_get_tool_runtime_builtin_without_credentials": 1,
|
|
"test_get_tool_runtime_from_plugin_only_uses_form_parameters": 1,
|
|
"test_get_tool_runtime_hardcoded_provider_without_credential_raises": 1,
|
|
"test_get_tool_runtime_mcp_path": 1,
|
|
"test_get_tool_runtime_plugin_path": 1,
|
|
"test_get_tool_runtime_workflow_path": 1,
|
|
"test_get_workflow_runtime_apply_runtime_parameters": 1,
|
|
"test_hardcoded_provider_icon_missing_raises": 1,
|
|
"test_hardcoded_provider_icon_success": 1,
|
|
"test_list_default_builtin_providers_uses_persisted_defaults": 2,
|
|
"test_list_hardcoded_providers_cache_hit": 1,
|
|
"test_list_hardcoded_providers_internal_loader": 1,
|
|
"test_list_providers_from_api_covers_builtin_api_workflow_and_mcp": 1,
|
|
"test_registered_external_provider_classes_join_hardcoded_providers": 1,
|
|
"test_user_get_api_provider_masks_credentials_and_adds_labels": 1,
|
|
},
|
|
"tests.unit_tests.core.tools.plugin_tool.test_confirmed_plugin_tool": {
|
|
"test_plugin_tool_rejects_after_cast_before_manager_invoke": 1,
|
|
"test_tool_engine_merge_is_checked_lazily_before_transport": 1,
|
|
"test_tool_engine_exact_envelope_dispatches_once_with_pinned_headers": 1,
|
|
"test_unexpected_output_is_refused_before_it_reaches_file_transformation": 3,
|
|
"test_audited_message_id_variable_is_forwarded_once_without_observation": 1,
|
|
"test_unaudited_variable_is_refused_before_it_is_yielded": 6,
|
|
"test_consumer_cancellation_finishes_unknown_once_without_reconstruction": 1,
|
|
"test_native_transport_error_stays_native_and_never_reaches_builder_metadata": 1,
|
|
"test_dispatch_header_failure_after_business_claim_is_unknown_not_retried": 1,
|
|
"test_fork_preserves_guard_outside_runtime_and_serialization": 1,
|
|
"test_ordinary_plugin_tool_has_no_guard_and_unchanged_dispatch": 1,
|
|
"test_manager_merges_exactly_the_three_confirmed_headers": 1,
|
|
"test_manager_refuses_any_other_confirmed_header_set_before_transport": 7,
|
|
},
|
|
"tests.unit_tests.core.workflow.nodes.agent_v2.test_dify_tools_builder": {
|
|
"test_build_layers_normalizes_mcp_provider_ids_to_server_identifier": 1,
|
|
"test_build_layers_rejects_app_provider_type": 1,
|
|
"test_build_layers_rejects_dataset_retrieval_provider_type": 1,
|
|
"test_build_layers_routes_api_and_workflow_via_core": 2,
|
|
"test_build_layers_routes_plugin_direct_and_builtin_via_core": 1,
|
|
"test_builds_builtin_compat_plugin_tool_with_files_llm_parameter_schema": 1,
|
|
"test_builds_core_tool_with_file_llm_parameter": 1,
|
|
"test_builds_core_tool_with_missing_required_select_default": 1,
|
|
"test_builds_dify_plugin_tools_layer_from_existing_tool_runtime": 1,
|
|
"test_builds_plugin_tool_with_file_llm_parameter_schema": 1,
|
|
"test_builds_plugin_tool_with_files_llm_parameter_schema": 1,
|
|
"test_credential_validation_error_maps_to_credential_invalid": 1,
|
|
"test_disabled_tools_are_skipped": 1,
|
|
"test_explicit_tool_entry_wins_over_provider_expansion": 1,
|
|
"test_generic_value_error_maps_to_config_invalid": 1,
|
|
"test_invoke_from_is_forwarded_to_tool_runtime_provider": 1,
|
|
"test_legacy_provider_name_and_tool_parameters_normalized": 1,
|
|
"test_list_provider_tool_names_reads_builtin_provider": 1,
|
|
"test_native_layers_without_an_injected_preparer_fail_closed": 1,
|
|
"test_normalizes_fully_qualified_builtin_plugin_provider_for_daemon_transport": 1,
|
|
"test_ordinary_layers_do_not_use_an_injected_native_preparer": 1,
|
|
"test_plugin_id_plus_provider_fallback_when_provider_id_missing": 1,
|
|
"test_provider_level_entry_expands_to_all_tools": 1,
|
|
"test_provider_level_entry_unknown_provider_maps_to_declaration_not_found": 1,
|
|
"test_provider_level_entry_with_no_tools_maps_to_declaration_not_found": 1,
|
|
"test_provider_scoped_tool_accepts_authorized_without_credential_id": 2,
|
|
"test_rejects_duplicate_exposed_tool_names": 1,
|
|
"test_rejects_missing_required_runtime_parameter": 1,
|
|
"test_rejects_non_scalar_credential_value": 1,
|
|
"test_rejects_unknown_provider_type_at_config_boundary": 1,
|
|
"test_research_tool_exposes_one_choice_per_bound_agent_knowledge_space": 2,
|
|
"test_research_tool_uses_sole_bound_agent_knowledge_space": 2,
|
|
"test_research_tool_without_single_bound_space_still_requires_resource": 1,
|
|
"test_tool_provider_not_found_maps_to_declaration_not_found": 1,
|
|
"test_tool_scoped_provider_still_requires_credential_id": 2,
|
|
"test_unauthorized_tool_without_credentials": 1,
|
|
},
|
|
}
|
|
)
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.test_agent_tool_inner_service": {
|
|
"test_actual_plugin_cast_frontend_and_converter_preserve_file_wire": 5,
|
|
"test_api_select_list_repr_is_not_decoded_as_an_array": 2,
|
|
"test_api_output_observation_and_file_messages_use_existing_owners": 7,
|
|
"test_invoke_maps_runtime_lookup_errors_to_service_error_codes": 3,
|
|
"test_invoke_maps_tool_invoke_error_without_private_tool_engine_helper": 1,
|
|
"test_invoke_maps_tool_runtime_app_not_found_value_error_to_specific_error_code": 1,
|
|
"test_invoke_raises_app_not_found_when_session_has_no_app": 1,
|
|
"test_invoke_raises_app_tenant_mismatch_when_app_belongs_to_other_tenant": 1,
|
|
"test_invoke_uses_agent_tool_runtime_and_returns_observation": 2,
|
|
"test_non_plugin_runtime_keeps_existing_configured_precedence": 4,
|
|
"test_ordinary_plugin_service_multiple_select_uses_actual_full_declaration": 3,
|
|
"test_ordinary_plugin_service_preserves_prepared_live_values_and_cached_runtime": 2,
|
|
}
|
|
}
|
|
)
|
|
# Confirmed Agent recovery: exact function counts from pytest collection.
|
|
for module, functions in {
|
|
"tests.unit_tests.clients.agent_backend.test_event_adapter": {
|
|
"test_event_adapter_maps_pydantic_ai_stream_event": 1,
|
|
"test_event_adapter_maps_pydantic_ai_stream_event_agent_message_delta_annotation": 1,
|
|
"test_event_adapter_maps_run_cancelled_to_terminal_cancelled": 1,
|
|
"test_event_adapter_maps_run_failed_to_failed_result": 1,
|
|
"test_event_adapter_maps_run_started": 1,
|
|
"test_event_adapter_maps_run_succeeded_to_final_output": 1,
|
|
"test_event_adapter_preserves_resumption_generation": 1,
|
|
"test_event_adapter_preserves_wait_identity_without_converting_it_to_failure": 1,
|
|
},
|
|
"tests.unit_tests.services.workflow_runtime.test_workflow_generator": {
|
|
"test_actual_generation_marks_configuration_failure_before_worker_dispatch": 1,
|
|
"test_builder_worker_refuses_draft_changed_after_confirmation_before_runner": 1,
|
|
"test_confirmed_agent_generator_keeps_preallocated_identity": 5,
|
|
"test_confirmed_agent_resume_keeps_original_context_and_run": 2,
|
|
"test_ensure_snippet_start_node_delegates_when_snippet_exists": 1,
|
|
"test_ensure_snippet_start_node_in_worker_applies_snippet_start_injection": 1,
|
|
"test_ensure_snippet_start_node_in_worker_returns_snippet_workflow_when_snippet_missing": 1,
|
|
"test_ensure_snippet_start_node_in_worker_returns_standard_workflow_without_lookup": 1,
|
|
"test_ensure_snippet_start_node_returns_original_for_non_snippet_workflow": 1,
|
|
"test_ensure_snippet_start_node_returns_original_when_snippet_is_from_another_tenant": 1,
|
|
"test_execution_grants_default_files_to_worker_and_response": 4,
|
|
"test_generate_forwards_pause_configuration_and_state": 1,
|
|
"test_generate_includes_parent_trace_context_in_extras": 1,
|
|
"test_generate_prepares_start_inputs": 2,
|
|
"test_generate_preserves_trigger_inputs": 12,
|
|
"test_generate_stream_joins_worker_after_response_exhaustion": 1,
|
|
"test_generate_worker_uses_end_user_session_for_external_invocation": 1,
|
|
"test_handle_response_closed_file_raises_stopped": 1,
|
|
"test_resume_delegates_to_generate": 1,
|
|
"test_resume_preserves_existing_trace_scope": 1,
|
|
"test_resume_recreates_trace_scope_when_missing": 1,
|
|
"test_service_api_preserves_caller_identity_and_file_access": 6,
|
|
"test_single_iteration_generate_includes_trace_session_id_in_extras": 1,
|
|
"test_single_iteration_generate_validates_args": 1,
|
|
"test_single_loop_generate_includes_trace_session_id_in_extras": 1,
|
|
"test_single_loop_generate_validates_args": 1,
|
|
"test_worker_executes_and_persists_a_workflow_through_the_injected_driver": 1,
|
|
},
|
|
"tests.unit_tests.services.workflow_runtime.test_base_runner.TestWorkflowAppRunnerCoreCases.TestWorkflowBasedAppRunner": {
|
|
"test_get_graph_and_variable_pool_for_single_node_run_does_not_mutate_inputs": 1,
|
|
"test_get_graph_and_variable_pool_for_single_node_run_includes_trace_session_id": 1,
|
|
"test_get_graph_and_variable_pool_preloads_constructor_variables_before_graph_init": 1,
|
|
"test_handle_graph_aborted_publishes_stopped_terminal": 1,
|
|
"test_handle_graph_run_events_and_pause_notifications": 1,
|
|
"test_handle_human_input_form_filled_event_preserves_submitted_data": 1,
|
|
"test_handle_nested_answer_success_publishes_text_chunk": 1,
|
|
"test_handle_node_events_publishes_queue_events": 1,
|
|
"test_handle_root_answer_success_does_not_publish_extra_text_chunk": 1,
|
|
"test_handle_start_node_result_events_project_outputs": 4,
|
|
"test_init_graph_includes_trace_session_id_in_run_context": 1,
|
|
"test_init_graph_validates_graph_structure": 1,
|
|
"test_ordinary_init_graph_keeps_python_mode_typed_serialization": 1,
|
|
"test_prepare_single_node_execution_requires_run": 1,
|
|
"test_resolve_user_from": 1,
|
|
},
|
|
"tests.unit_tests.core.app.entities.test_app_invoke_entities": {
|
|
"test_advanced_chat_generate_entity_roundtrip_excludes_trace_scope": 1,
|
|
"test_dify_run_context_normalizes_unknown_created_by_values": 1,
|
|
"test_get_credit_usage_app_type_maps_app_mode": 7,
|
|
"test_get_credit_usage_created_by_defaults_to_unknown": 1,
|
|
"test_get_credit_usage_created_by_maps_app_mode": 7,
|
|
"test_openapi_distinct_from_service_api": 1,
|
|
"test_openapi_variant_present": 1,
|
|
"test_runs_as_account_only_for_console_contexts": 1,
|
|
"test_workflow_app_generate_entity_roundtrip_excludes_trace_scope": 1,
|
|
"test_workflow_resumption_context_roundtrip": 2,
|
|
},
|
|
"tests.unit_tests.core.repositories.test_sqlalchemy_workflow_node_execution_repository": {
|
|
"test_agent_ack_is_not_cleared_by_stale_terminal_receipt": 1,
|
|
"test_agent_create_receipt_survives_stale_terminal_and_offload_write": 3,
|
|
"test_agent_receipt_identity_cannot_change_on_terminal_write": 3,
|
|
"test_duplicate_detection_and_id_regeneration": 1,
|
|
"test_get_by_workflow_execution_maps_real_rows_to_domain": 1,
|
|
"test_get_by_workflow_run_filters_tenant_app_trigger_and_paused_and_orders": 1,
|
|
"test_helper_functions_and_truncator_configuration": 1,
|
|
"test_init_accepts_real_engine_and_sessionmaker_and_sets_role": 1,
|
|
"test_init_rejects_invalid_factory_and_missing_tenant": 1,
|
|
"test_init_uses_resource_tenant_when_account_has_no_current_tenant": 1,
|
|
"test_inputs_truncated_with_offload_data": 1,
|
|
"test_invalid_agent_receipts_refuse_terminal_overwrite": 3,
|
|
"test_json_encode_uses_runtime_converter": 1,
|
|
"test_offload_preserves_ack_committed_during_upload": 1,
|
|
"test_outputs_truncated_with_offload_data": 1,
|
|
"test_process_data_truncated_with_offload_data": 1,
|
|
"test_resume_history_includes_paused_nodes_without_changing_default_reads": 2,
|
|
"test_run_reads_keep_workflow_tool_internals_in_their_source_scope": 1,
|
|
"test_save_exceeds_max_retries_raises_error": 1,
|
|
"test_save_execution_data_persists_each_truncation_offload": 3,
|
|
"test_save_execution_data_updates_existing_and_creates_missing": 1,
|
|
"test_save_inserts_and_updates_persisted_execution": 1,
|
|
"test_save_logs_and_reraises_non_duplicate_and_unexpected_errors": 1,
|
|
"test_save_non_duplicate_integrity_error_raises_immediately": 1,
|
|
"test_save_owned_session_rolls_back_failed_insert": 1,
|
|
"test_save_retries_postgres_duplicate_key": 1,
|
|
"test_save_with_duplicate_key_retries_with_new_uuid": 1,
|
|
"test_save_with_existing_record_updates_instead_of_insert": 1,
|
|
"test_to_db_model_requires_creator_context": 1,
|
|
"test_to_db_model_uses_context_and_deterministic_json": 1,
|
|
"test_to_domain_model_loads_offloaded_storage": 1,
|
|
"test_to_domain_model_without_offload_data": 1,
|
|
"test_truncate_and_upload_keeps_file_boundary_mocked": 1,
|
|
"test_truncate_and_upload_returns_none_for_missing_or_small_values": 1,
|
|
"test_truncated_properties_without_offload_attribute": 1,
|
|
"test_truncated_properties_without_offload_data": 1,
|
|
"test_workflow_tool_scope_isolates_execution_history_with_same_tenant_and_creator": 2,
|
|
},
|
|
"tests.unit_tests.services.workflow_runtime.test_agent_node": {
|
|
"test_agent_node_cancels_backend_run_for_unexpected_internal_event": 1,
|
|
"test_agent_node_cancels_backend_run_when_stream_ends_without_terminal_event": 1,
|
|
"test_agent_node_cancels_backend_run_when_stream_fails": 1,
|
|
"test_agent_node_cancels_backend_run_when_stream_raises_unexpected_error": 1,
|
|
"test_agent_node_default_value_plain_run_keeps_agent_message_delta_out_of_text_stream": 1,
|
|
"test_agent_node_forwards_last_stream_cursor_when_cancelling_after_failure": 1,
|
|
"test_agent_node_maps_persisted_participant_lookup_error_to_node_failure": 1,
|
|
"test_agent_node_passes_execution_id_to_session_store_and_runtime_request_builder": 1,
|
|
"test_agent_node_records_only_trusted_knowledge_sources_and_deduplicates": 1,
|
|
"test_agent_node_records_stream_usage_metadata": 1,
|
|
"test_agent_node_rejects_invalid_route_selection_without_custom_outputs": 5,
|
|
"test_agent_node_resume_resolves_the_generation_from_the_persisted_execution": 1,
|
|
"test_agent_node_run_maps_failed_agent_backend_run_to_node_result": 1,
|
|
"test_agent_node_run_maps_successful_agent_backend_run_to_node_result": 1,
|
|
"test_agent_node_run_normalizes_declared_array_file_output_with_canonical_mappings": 1,
|
|
"test_agent_node_run_normalizes_declared_datasource_file_output_with_canonical_mapping": 1,
|
|
"test_agent_node_run_normalizes_declared_file_output_with_canonical_mapping": 1,
|
|
"test_agent_node_run_normalizes_declared_remote_url_file_output_with_canonical_mapping": 1,
|
|
"test_agent_node_run_streams_agent_message_delta_as_text_chunks": 1,
|
|
"test_agent_node_run_when_session_store_save_raises_records_persist_error_in_metadata": 1,
|
|
"test_agent_node_saves_success_snapshot_and_reuses_existing_snapshot": 1,
|
|
"test_agent_node_selects_the_configured_success_exit": 2,
|
|
"test_agent_node_snapshot_save_failure_preserves_original_failure": 2,
|
|
"test_agent_node_structured_output_type_failure_stops_the_node": 1,
|
|
"test_agent_node_structured_run_keeps_agent_message_delta_out_of_text_stream": 1,
|
|
"test_agent_node_structured_success_preserves_text_and_checks_only_custom_outputs": 1,
|
|
"test_agent_node_terminal_without_snapshot_preserves_prior_session_without_write": 2,
|
|
"test_agent_node_unexpected_post_resolution_failure_keeps_binding_identity": 1,
|
|
"test_agent_node_uses_graph_abort_reason_when_cancel_request_fails": 1,
|
|
"test_agent_node_uses_resolved_backend_binding_before_backend_invocation": 1,
|
|
"test_agent_node_workflow_tool_does_not_resolve_outer_conversation_participant": 1,
|
|
"test_agent_route_conditions_load_variables_only_when_routing_is_enabled": 2,
|
|
"test_agent_routes_initialize_through_workflow_node_factory": 5,
|
|
"test_agent_routes_use_the_successful_retry_to_fan_out_and_skip_other_branches": 1,
|
|
"test_disabled_routes_continue_through_graphon_default_values": 1,
|
|
"test_enabled_routes_reject_default_value_before_execution": 1,
|
|
"test_extract_variable_selector_to_variable_mapping_uses_frontend_agent_task_markers": 1,
|
|
},
|
|
"tests.unit_tests.core.workflow.nodes.agent_v2.test_confirmed_agent_node": {
|
|
"test_confirmed_output_validation_retry_cannot_allocate_a_second_child": 1,
|
|
"test_confirmed_stream_ack_loss_preserves_child_without_implicit_cancel": 2,
|
|
"test_confirmed_wait_emits_pause_after_checkpoint_owner_without_failure_or_cancel": 1,
|
|
"test_lost_continue_ack_pauses_without_streaming_or_another_create": 1,
|
|
"test_node_factory_injects_confirmed_owners_only_for_server_marker": 1,
|
|
"test_node_recovers_terminal_child_after_lost_continue_ack_without_second_continue": 1,
|
|
"test_restore_continues_same_child_without_compose_or_create": 1,
|
|
"test_unknown_create_ack_pauses_without_approval_or_failure": 1,
|
|
"test_unverified_wait_never_becomes_resumable_approval": 1,
|
|
},
|
|
"tests.unit_tests.services.agent.test_workflow_run_recovery": {
|
|
"test_acknowledged_child_is_pinned_and_cannot_be_replaced": 1,
|
|
"test_backend_validation_refusal_does_not_lookup_or_recreate": 1,
|
|
"test_binding_child_requires_the_original_durable_intent": 1,
|
|
"test_changed_payload_or_key_cannot_reuse_attempt": 1,
|
|
"test_create_intent_is_committed_before_transport_and_survives_service_restart": 1,
|
|
"test_every_execution_owner_component_is_required_before_reservation": 6,
|
|
"test_explicit_output_retry_has_distinct_bounded_attempt_and_preserves_prior_identity": 1,
|
|
"test_invalid_or_unbounded_identity_refuses_without_persistence": 4,
|
|
"test_lost_ack_missing_conflicting_or_unavailable_lookup_stays_unknown": 3,
|
|
"test_lost_create_ack_queries_existing_child_once_and_never_reposts": 1,
|
|
"test_recovery_needs_no_executable_request_and_never_posts": 1,
|
|
"test_saved_workflow_binding_must_match": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_agent_context": {
|
|
"test_marker_is_frozen_and_ref_has_no_credentials": 1,
|
|
"test_marker_requires_canonical_uuid_string": 4,
|
|
"test_marker_round_trips_graph_context_and_pause_entity": 1,
|
|
"test_ordinary_context_has_no_agent_marker": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_agent_risk_assessor": {
|
|
"test_model_cannot_replace_displayed_target_or_grant_permission": 1,
|
|
"test_model_failure_refuses_without_disclosing_provider_error_or_inventing_risk": 1,
|
|
"test_reasoning_sees_exact_business_arguments_without_secret_fields": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_commands": {
|
|
"test_actual_resume_task_refuses_malformed_marked_envelope_before_unscoped_storage": 1,
|
|
"test_actual_sql_outbox_survives_lost_enqueue_ack_and_reuses_dispatch": 1,
|
|
"test_completed_child_recovery_requeues_original_claim_only_after_terminal_proof": 1,
|
|
"test_continuation_readback_recovers_same_generation_without_second_continue": 5,
|
|
"test_guard_uses_claim_owner_and_drops_redelivery_without_second_resume": 1,
|
|
"test_lost_create_ack_status_recovery_uses_saved_sql_identity_and_no_second_post": 1,
|
|
"test_marked_resume_requires_exact_dispatch_envelope_before_any_claim": 5,
|
|
"test_ordinary_legacy_resume_keeps_its_existing_path": 1,
|
|
"test_readback_accepts_actual_backend_retained_cursor_on_empty_event_page": 1,
|
|
"test_reconcile_pending_routes_current_request_to_its_stored_profile": 2,
|
|
"test_reconcile_confirmed_outbox_retries_original_workflow_resume_queue_after_lost_ack": 1,
|
|
"test_native_reconcile_and_outbox_sql_stay_with_selected_profile_request": 2,
|
|
"test_resume_publishes_only_after_committed_lifecycle_resume": 1,
|
|
"test_stored_profile_router_uses_actual_scoped_sql_request": 1,
|
|
"test_terminal_projection_does_not_erase_unknown_effects": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_continuation": {
|
|
"test_actual_graphon_pause_readback_retains_exact_execution_identity": 1,
|
|
"test_actual_sql_parent_pause_requires_complete_owned_run_chain": 8,
|
|
"test_parent_snapshot_refuses_unpaused_or_foreign_context": 4,
|
|
"test_pending_intent_requires_actual_saved_operation_and_parent_occurrence": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_confirmed_full_run": {
|
|
"test_a_confirmed_side_effect_runs_for_real_and_destructive_stays_mocked": 1,
|
|
"test_a_failed_run_is_sealed_native_failure_for_repair": 1,
|
|
"test_a_run_without_native_proof_is_unknown": 1,
|
|
"test_chatflow_sends_the_user_message_as_the_query": 1,
|
|
"test_committed_reservation_before_native_launch_survives_interruption": 1,
|
|
"test_completed_attempt_recovers_after_builder_result_commit_is_lost": 2,
|
|
"test_concurrent_deliveries_have_one_durable_launch_winner": 1,
|
|
"test_confirmed_pause_frame_is_public_only_after_durable_parent_barrier": 2,
|
|
"test_disclosure_is_empty_when_the_flag_is_off": 1,
|
|
"test_disclosure_is_empty_when_the_restricted_runtime_admits_the_draft": 1,
|
|
"test_interruption_before_native_acknowledgement_never_relaunches": 1,
|
|
"test_interruption_before_result_snapshot_commit_recovers_without_relaunch": 1,
|
|
"test_interruption_in_first_event_callback_recovers_bound_native_run": 1,
|
|
"test_legacy_agent_cannot_use_confirmed_profile_to_bypass_nested_tool_controls": 1,
|
|
"test_lost_launch_acknowledgement_stays_unknown_without_relaunch": 1,
|
|
"test_mocked_agent_never_admits_a_real_agent_scope": 1,
|
|
"test_parent_recovery_requires_an_actual_fully_owned_native_row": 1,
|
|
"test_real_agent_admission_uses_reserved_parent_and_current_saved_input": 1,
|
|
"test_recovery_keeps_existing_attempt_when_runtime_selection_changes": 1,
|
|
"test_recovery_reads_the_existing_native_database_outcome": 3,
|
|
"test_test_input_from_another_session_is_refused": 1,
|
|
"test_unconfirmed_side_effects_are_mocked_and_listed": 1,
|
|
"test_working_build_handler_reentry_after_result_commit_failure_keeps_one_effect": 1,
|
|
},
|
|
"tests.unit_tests.services.test_app_generate_service_agent_context": {
|
|
"test_confirmed_agent_refuses_unsupported_entry_before_guardrails": 6,
|
|
"test_confirmed_agent_server_context_and_preallocated_run_reach_workflow": 2,
|
|
"test_effective_agent_mode_cannot_drop_context": 1,
|
|
},
|
|
"tests.unit_tests.services.test_app_generate_service_in_process": {
|
|
"test_in_process_stream_does_not_enqueue_a_child_task_and_releases_its_rate_limit": 6,
|
|
"test_posted_live_mode_cannot_select_builder_policy": 1,
|
|
"test_restricted_dispatch_rejects_other_modes_before_guardrails": 3,
|
|
"test_restricted_marker_cannot_enter_agent_dispatch_of_workflow_app": 1,
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, {}).update(functions)
|
|
# Confirmed Agent recovery: exact function counts from pytest collection.
|
|
for module, functions in {
|
|
"tests.unit_tests.controllers.inner_api.agent.test_llm": {
|
|
"test_native_stream_error_is_bounded_even_if_provider_raises_private_text": 2,
|
|
"test_post_preserves_preflight_quota_failure": 1,
|
|
"test_post_preserves_raw_prompts_without_serializing_them": 2,
|
|
"test_post_preserves_stream_quota_failure": 1,
|
|
"test_post_rejects_invalid_body_before_model_resolution": 1,
|
|
"test_post_streams_plugin_compatible_envelope": 1,
|
|
}
|
|
}.items():
|
|
a3_expected.setdefault(module, {}).update(functions)
|
|
# Confirmed Agent recovery: exact function counts from pytest collection.
|
|
for module, functions in {
|
|
"tests.unit_tests.services.dify_builder.test_agent_confirmed_workspace": {
|
|
"test_current_normal_workspace_requires_complete_sql_owner_chain": 5,
|
|
"test_parent_discovery_reuses_input_identity_and_never_writes": 4,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_agent_operation_owner": {
|
|
"test_actual_inner_tool_service_never_prepares_or_dispatches_before_permission": 2,
|
|
"test_backend_lost_response_preserves_real_api_completed_result": 2,
|
|
"test_confirmed_model_exception_never_returns_private_provider_text": 2,
|
|
"test_confirmed_plugin_declaration_uses_api_owned_core_without_credentials": 1,
|
|
"test_confirmed_tool_error_never_returns_private_provider_text": 1,
|
|
"test_current_resource_drift_stops_before_physical_claim_or_business": 1,
|
|
"test_direct_service_cannot_lose_a_known_native_envelope_before_runtime": 1,
|
|
"test_lost_business_response_closes_unknown_and_never_retries": 1,
|
|
"test_model_target_keeps_the_published_provider_and_model": 1,
|
|
"test_only_the_selected_confirmed_model_can_use_the_outer_task_grant": 1,
|
|
"test_physical_claim_is_adjacent_to_dispatch_and_real_result_is_saved": 1,
|
|
"test_prepare_actual_call_freezes_builder_reasoning_without_business_or_oauth": 2,
|
|
"test_reasoning_assessment_cannot_grant_or_hide_opaque_tool_scope": 1,
|
|
"test_result_upload_cannot_create_or_replace_a_physical_result": 1,
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, {}).update(functions)
|
|
# Confirmed parent completion: collected exact inventory, including concurrent observers.
|
|
for module, functions in {
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion": {
|
|
"test_actual_native_failure_closes_old_run_without_diagnosis_or_new_execution": 1,
|
|
"test_concurrent_terminal_observers_commit_one_result_on_the_same_attempt": 1,
|
|
"test_inflight_builder_command_keeps_its_session_lease": 1,
|
|
"test_resume_finalizes_actual_c03_before_closing_original_builder_run": 2,
|
|
"test_terminal_projection_refuses_stale_or_unsettled_original_attempt": 7,
|
|
"test_terminal_public_read_closes_same_builder_run_and_review_without_dispatch": 1,
|
|
"test_user_session_cas_wins_during_terminal_result_read": 1,
|
|
}
|
|
}.items():
|
|
a4_expected.setdefault(module, {}).update(functions)
|
|
# Confirmed blank Home: collected required-field, isolated-owner and real SQL restore cases.
|
|
for module, functions in {
|
|
"tests.unit_tests.services.dify_builder.test_agent_confirmed_workspace": {
|
|
"test_current_normal_workspace_requires_complete_sql_owner_chain": 10
|
|
}
|
|
}.items():
|
|
a4_expected.setdefault(module, {}).update(functions)
|
|
# Candidate 3: frozen exact collection; retain every previously required function.
|
|
a4_expected.setdefault("tests.unit_tests.services.dify_builder.test_agent_model_result_canonical", {}).update(
|
|
{"test_model_receipt_matches_sdk_roundtrip_without_changing_stream_or_accepting_replacement": 2}
|
|
)
|
|
a4_expected.setdefault(
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion",
|
|
{},
|
|
).update(
|
|
{
|
|
"test_actual_terminal_run_can_use_the_protected_context_native_id_without_a_column_ack": 1,
|
|
"test_completion_uses_the_immutable_admitted_revision_basis": 3,
|
|
"test_context_native_identity_never_replaces_the_actual_owned_native_run": 2,
|
|
}
|
|
)
|
|
# Direct native Agent output evidence; retain the ordinary producer regressions.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_output_evidence"] = {
|
|
"test_verification_terminal_outputs": 4,
|
|
"test_verification_node_availability_and_inputs": 1,
|
|
"test_output_evidence": 9,
|
|
"test_output_evidence_container_and_retry_unknown": 1,
|
|
"test_verification_offloaded_outputs_are_not_complete": 1,
|
|
"test_verification_native_missing_outputs_stays_unavailable": 1,
|
|
"test_output_evidence_wfs_reported_tool_reference": 1,
|
|
"test_native_agent_direct_declared_output_evidence": 4,
|
|
"test_native_agent_evidence_requires_native_identity": 5,
|
|
"test_native_agent_evidence_requires_valid_declaration": 5,
|
|
"test_native_agent_evidence_does_not_infer_undeclared_or_nested_outputs": 3,
|
|
"test_native_agent_evidence_keeps_ambiguous_provenance_unknown": 8,
|
|
"test_native_agent_evidence_requires_single_succeeded_complete_row": 5,
|
|
"test_native_agent_offloaded_outputs_do_not_prove_key_absence": 1,
|
|
}
|
|
# Declined confirmed Agent: original native stop and Builder settlement.
|
|
a4_expected.setdefault(
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion",
|
|
{},
|
|
).update(
|
|
{
|
|
"test_cancel_rechecks_owned_pause_dispatch_and_effect_facts_after_external_ack": 12,
|
|
"test_cancel_reconnect_finishes_only_original_preparation_and_projection_once": 1,
|
|
"test_cancel_settles_original_paused_native_without_claiming_physical_cleanup": 1,
|
|
"test_clean_physical_receipt_cannot_finish_confirmed_paused_parent_without_logical_proof": 1,
|
|
"test_declined_builder_cas_race_preserves_newer_user_work": 1,
|
|
"test_declined_projection_preserves_prior_immutable_terminal_builder_evidence": 2,
|
|
"test_declined_result_cannot_publish_and_preserves_graph_and_original_ids": 1,
|
|
"test_declined_terminal_proof_closes_same_builder_attempt_and_returns_editable_review": 1,
|
|
"test_failed_preparation_still_revokes_without_fabricating_native_stop": 1,
|
|
"test_unverified_child_never_stops_native_or_projects_declined_result": 5,
|
|
}
|
|
)
|
|
# Explicit cancellation retry retains the same protected child.
|
|
a4_expected.setdefault(
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion",
|
|
{},
|
|
).update(
|
|
{
|
|
"test_cancel_retry_refuses_missing_forged_stale_or_foreign_retained_proof": 5,
|
|
"test_explicit_cancel_retry_reaches_same_child_after_real_active_reader_refusal": 1,
|
|
}
|
|
)
|
|
# Native scheduling waits have no human form and must not become HTTP 500.
|
|
a4_expected["tests.unit_tests.services.test_workflow_run_service"] = {
|
|
"test_get_paginate_advanced_chat_workflow_runs_should_attach_message_fields_when_message_exists": 1,
|
|
"test_get_paginate_workflow_runs_should_forward_filters_and_parse_limit": 1,
|
|
"test_get_pause_details_hides_private_scheduling_messages": 4,
|
|
"test_get_pause_details_maps_human_input_and_token": 1,
|
|
"test_get_pause_details_rejects_a_checkpoint_with_a_missing_human_input_form": 1,
|
|
"test_get_pause_details_returns_empty_details_without_an_active_pause": 2,
|
|
"test_get_pause_details_returns_none_when_run_is_not_found": 1,
|
|
"test_get_workflow_run_node_executions_should_return_empty_list_when_run_not_found": 1,
|
|
"test_get_workflow_run_node_executions_should_use_request_workspace": 1,
|
|
"test_get_workflow_run_should_delegate_to_repository_by_tenant_and_app": 1,
|
|
"test_get_workflow_runs_count_should_forward_optional_filters": 1,
|
|
"test_workflow_tool_details_require_the_root_app_run_and_hide_internal_correlation": 1,
|
|
}
|
|
# The ordinary initial Agent run has no continuation dispatch row.
|
|
a4_expected.setdefault(
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion",
|
|
{},
|
|
).update(
|
|
{
|
|
"test_initial_no_source_proof_refuses_dispatch_added_after_child_cancel": 2,
|
|
"test_initial_ordinary_run_without_dispatch_settles_same_declined_attempt_once": 1,
|
|
"test_initial_sealed_cancel_public_receipt_is_readonly_terminal": 14,
|
|
"test_later_generation_requires_its_completed_source_before_declined_settlement": 2,
|
|
}
|
|
)
|
|
# Code risk reasoning and preparation: exact reviewed function inventories.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_code_risk_assessment"] = {
|
|
"test_code_facts_bind_original_typed_values_without_sharing_them": 4,
|
|
"test_code_upstream_confirmation_survives_canvas_title_and_node_order_only": 1,
|
|
"test_file_declared_type_is_projected_without_file_url_or_content": 1,
|
|
"test_invalid_reasoning_is_unavailable_never_pure": 3,
|
|
"test_missing_input_is_distinct_from_null_and_canvas_is_not_new_execution": 1,
|
|
"test_missing_or_changed_code_snapshot_cannot_accept_forged_confirmation": 1,
|
|
"test_model_facts_hide_body_file_and_credentials_and_notice_is_sanitized": 1,
|
|
"test_notice_redaction_retains_task_credential_provenance_without_storing_task": 1,
|
|
"test_oversize_and_failed_reasoning_are_unavailable_without_retry": 1,
|
|
"test_persisted_projection_rejects_extra_source_and_historical_missing_entries": 1,
|
|
"test_same_code_type_uses_prepared_reasoning_for_actual_choice": 5,
|
|
"test_selected_model_fenced_json_is_assessed_in_one_attempt": 1,
|
|
"test_selected_model_malformed_json_is_not_automatically_retried": 5,
|
|
"test_unavailable_reply_is_human_and_actionable_in_session_language": 2,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_code_risk_preparation"] = {
|
|
"test_changed_code_input_redisplays_before_accepting_checkbox_and_reuses_shown_snapshot": 1,
|
|
"test_confirmed_code_write_launches_once_and_its_prose_cannot_rebind_target": 1,
|
|
"test_preparation_reuses_one_snapshot_and_does_not_hold_database_during_reasoning": 1,
|
|
"test_recovery_keeps_mocked_legacy_agent_when_code_snapshot_disappears": 1,
|
|
"test_stale_worker_risk_returns_existing_input_interaction_without_repair": 3,
|
|
"test_unavailable_code_is_selectively_mocked_and_recovery_keeps_original_attempt": 1,
|
|
"test_worker_input_race_preserves_boolean_number_type_distinction": 1,
|
|
"test_worker_race_after_reservation_cannot_dispatch_stale_code": 3,
|
|
"test_worker_refuses_missing_or_changed_snapshot_before_dispatch": 1,
|
|
"test_worker_uses_persisted_assessment_for_native_mock_choice": 4,
|
|
"test_workflow_feature_scope_change_invalidates_shown_code_explanation": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.core.dify_builder.test_ports"] = {
|
|
"test_actor_replaces_forward_auth_on_dify_port_methods": 1,
|
|
"test_apply_result_defaults_and_changed_nodes_not_shared": 1,
|
|
"test_change_set_defaults_and_changed_nodes_not_shared": 1,
|
|
"test_mutation_intent_defaults_and_args_not_shared": 1,
|
|
}
|
|
# Exact collected Code failure-policy regression inventories (Local JUnit/AST checked).
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_bound_resource_plan_reconciliation"] = {
|
|
"test_confirmed_resource_reconciles_fallback_and_overview_before_approval": 1,
|
|
"test_unusable_reconciliation_keeps_resource_gate_and_does_not_offer_approval": 3,
|
|
"test_reconciliation_rereads_selected_facts_and_uses_one_model_reply": 1,
|
|
"test_reconciliation_never_invents_an_available_selected_agent": 3,
|
|
"test_discovery_gap_receives_candidate_facts_and_does_not_treat_abstract_absence_as_fact": 1,
|
|
"test_real_id_suffix_does_not_turn_a_fallback_into_a_bound_action": 4,
|
|
"test_an_unused_extra_selection_does_not_force_an_invented_action": 1,
|
|
"test_failed_reconciliation_keeps_live_resource_card_and_accepts_a_new_selection": 1,
|
|
"test_snapshot_drift_requires_explicit_rediscovery_and_new_snapshot_confirmation": 2,
|
|
"test_missing_resource_id_correction_is_actionable_and_bounded": 2,
|
|
"test_missing_id_diagnostic_does_not_mask_other_binding_guards": 8,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_trace_diagnostics"] = {
|
|
"test_provider_failure_is_scoped_safe_and_recoverable": 1,
|
|
"test_resolution_failure_and_callback_failure_do_not_crash": 1,
|
|
"test_json_and_schema_have_distinct_codes": 1,
|
|
"test_env_bounds_resets_and_correlates_diagnostics": 1,
|
|
"test_generation_projection_retains_attempt_not_arbitrary_strings": 1,
|
|
"test_connection_refusal_requires_typed_error_without_echo": 2,
|
|
"test_cas_emission_and_reload_preserve_additive_safe_diagnostics": 1,
|
|
"test_catalogue_failure_differs_from_successful_empty": 1,
|
|
"test_context_scope_does_not_leak_between_nested_calls": 1,
|
|
"test_resolved_model_identifiers_are_bounded_without_extra_config": 1,
|
|
"test_previous_operation_callback_cannot_contaminate_new_operation": 1,
|
|
"test_edit_fix_and_mock_response_shapes_are_observed": 1,
|
|
"test_graph_generation_retry_evidence_survives_success": 1,
|
|
"test_stream_iterator_failure_retains_scope": 1,
|
|
"test_http_history_serializer_retains_safe_diagnostics": 1,
|
|
"test_http_session_snapshot_retains_safe_diagnostics": 1,
|
|
"test_language_detection_failure_is_scoped_and_keeps_existing_fallback": 1,
|
|
"test_snapshot_history_preserves_identity_and_previous_failure_after_success": 1,
|
|
"test_existing_sse_dto_keeps_diagnostic_payload": 1,
|
|
"test_native_preparation_diagnostic_is_persisted_with_handler_reply": 1,
|
|
"test_resource_binding_refusal_retains_safe_code_and_target_without_private_message": 1,
|
|
"test_native_model_projection_is_fixed_and_does_not_copy_exception_metadata": 1,
|
|
"test_current_native_diagnostic_merge_is_bounded_and_deduplicated": 1,
|
|
"test_native_model_projection_keeps_allowlisted_stage_and_category": 10,
|
|
"test_native_model_projection_rejects_malformed_classification": 4,
|
|
"test_resource_plan_missing_id_code_survives_projection_report_and_history": 1,
|
|
"test_repair_detail_projection_bounds_counts_and_drops_arbitrary_metadata": 1,
|
|
"test_repair_details_survive_real_cas_item_history_and_http_projection": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.workflow_generation.test_runner"] = {
|
|
"test_a_dotted_reference_to_a_scalar_start_variable_is_repaired_to_its_root": 1,
|
|
"test_a_dotted_reference_to_the_start_node_is_never_injected_as_an_input": 1,
|
|
"test_a_dotted_root_that_names_nothing_is_still_reported": 1,
|
|
"test_a_file_attribute_reference_survives_reconciliation_untouched": 1,
|
|
"test_a_file_list_attribute_reference_is_repaired_to_its_root": 1,
|
|
"test_a_file_list_start_variables_attributes_do_not_resolve": 1,
|
|
"test_a_file_start_variables_attributes_are_declared": 6,
|
|
"test_a_garbage_declaration_is_indistinguishable_from_no_declaration": 1,
|
|
"test_a_genuine_selector_in_the_same_node_is_still_harvested": 1,
|
|
"test_a_json_object_attribute_reference_survives_reconciliation_untouched": 1,
|
|
"test_a_json_object_start_variable_is_addressable_too": 1,
|
|
"test_a_leftover_schema_still_repairs_to_text": 2,
|
|
"test_a_loop_does_not_publish_an_iterations_item": 1,
|
|
"test_a_missing_or_garbage_declaration_never_raises": 11,
|
|
"test_a_name_at_the_grammar_limit_is_kept": 1,
|
|
"test_a_name_the_reference_grammar_rejects_is_dropped": 6,
|
|
"test_a_non_container_node_still_has_its_invented_name_repaired": 1,
|
|
"test_a_padded_plan_id_still_finds_its_own_declaration": 1,
|
|
"test_a_padded_selector_is_repaired_not_just_reported": 1,
|
|
"test_a_padded_three_element_structured_selector_is_repaired": 1,
|
|
"test_a_plan_without_the_key_renders_byte_identical_prompts": 1,
|
|
"test_a_real_iteration_output_survives_the_repair_path_untouched": 3,
|
|
"test_a_real_loop_output_survives_the_repair_path_untouched": 3,
|
|
"test_a_scalar_start_variable_has_nothing_to_address": 1,
|
|
"test_a_schema_property_is_not_a_flat_output": 1,
|
|
"test_a_structured_output_selector_is_harvested_whatever_the_target_is": 1,
|
|
"test_a_structured_output_selector_on_a_drifted_llm_is_repaired_like_the_placeholder": 1,
|
|
"test_a_structured_output_selector_resolves_on_a_real_structured_output_node": 1,
|
|
"test_a_structured_output_shaped_tag_on_a_code_node_is_not_rewritten": 1,
|
|
"test_a_three_element_list_that_is_not_structured_output_is_not_a_reference": 1,
|
|
"test_a_three_segment_structured_output_selector_is_a_reference": 1,
|
|
"test_a_two_member_type_union_is_not_a_reference": 1,
|
|
"test_a_two_name_required_array_is_not_a_reference": 1,
|
|
"test_a_two_value_enum_is_not_a_reference": 1,
|
|
"test_a_type_with_fixed_outputs_may_not_redeclare_them": 1,
|
|
"test_acyclic_graph_produces_no_errors": 1,
|
|
"test_advanced_chat_missing_answer_returns_error": 1,
|
|
"test_an_invented_name_is_still_undeclared": 1,
|
|
"test_an_invented_name_on_a_drifted_node_is_repaired_end_to_end": 1,
|
|
"test_an_invented_name_on_an_iteration_is_reported_not_guessed": 1,
|
|
"test_an_object_output_named_structured_output_is_addressed_not_repaired": 1,
|
|
"test_an_unknown_root_is_still_undeclared": 1,
|
|
"test_an_unplanned_node_id_is_dropped": 1,
|
|
"test_an_unrepairable_branch_handle_is_an_invalid_branch_handle_error_naming_the_node": 1,
|
|
"test_arbitrary_three_string_data_remains_untouched": 1,
|
|
"test_assigns_true_then_false_to_default_handle_edges": 1,
|
|
"test_auto_ignores_invalid_planner_mode_value": 1,
|
|
"test_auto_injects_missing_start_variable": 1,
|
|
"test_auto_planner_failure_stamps_conversational_default": 1,
|
|
"test_auto_prompt_and_plan_event_carry_resolved_mode": 1,
|
|
"test_auto_resolves_from_planner_mode_field": 1,
|
|
"test_auto_with_no_terminal_node_defaults_to_conversational": 1,
|
|
"test_auto_without_mode_field_infers_from_terminal_node": 1,
|
|
"test_backfills_allowed_file_types_so_draft_loads": 1,
|
|
"test_blocking_result_includes_resolved_mode": 1,
|
|
"test_builder_concurrency_caps_at_configured_workers": 1,
|
|
"test_builder_prompt_is_scoped_to_planned_node_types": 1,
|
|
"test_builder_raises_invoke_error": 1,
|
|
"test_builder_response_without_config_object_fails_closed": 1,
|
|
"test_clamp_for_planner_caps_max_tokens_when_missing": 1,
|
|
"test_clamp_for_planner_injects_default_when_missing": 1,
|
|
"test_clamp_for_planner_lowers_high_temperature": 1,
|
|
"test_clamp_for_planner_preserves_caller_max_tokens": 1,
|
|
"test_clamp_for_planner_preserves_low_temperature": 1,
|
|
"test_code_node_reference_is_untouched_by_the_llm_alias_table": 1,
|
|
"test_collect_container_errors": 1,
|
|
"test_collect_container_errors_cycle": 1,
|
|
"test_collect_container_errors_empty_container": 1,
|
|
"test_collect_edge_cycle_errors": 1,
|
|
"test_collect_unknown_tools": 1,
|
|
"test_collect_unresolved_refs": 1,
|
|
"test_collision_between_stripped_and_existing_id_gets_a_suffix": 1,
|
|
"test_confirmed_duration_and_authored_choice_remain_only_in_http_builder_user_message": 1,
|
|
"test_consumer_keeps_authored_literals_metadata_and_mutable_assignment_unchanged": 1,
|
|
"test_consumer_system_distinguishes_transitive_mutation_from_a_published_constant": 3,
|
|
"test_consumer_user_context_binds_only_relevant_qualified_transitive_producers": 1,
|
|
"test_container_children_are_not_repositioned": 1,
|
|
"test_create_mode_injects_no_existing_graph_section": 1,
|
|
"test_cycle_members_are_parked_instead_of_hanging": 1,
|
|
"test_cyclic_builder_output_surfaces_graph_cycle_code": 1,
|
|
"test_declared_handles_pass": 1,
|
|
"test_declared_http_output_survives_reconciliation": 4,
|
|
"test_declared_outputs_reach_the_producer_and_its_consumers": 1,
|
|
"test_declared_producer_outputs_are_kept": 1,
|
|
"test_declares_variable": 1,
|
|
"test_defaults_to_empty_strings_when_planner_omits_metadata": 1,
|
|
"test_diamond_branches_share_a_column_in_separate_lanes": 1,
|
|
"test_document_extractor_start_vars": 1,
|
|
"test_does_not_re_inject_declared_start_variable": 1,
|
|
"test_does_not_retry_permanent_invoke_error": 1,
|
|
"test_drops_custom_file_type_without_extensions": 1,
|
|
"test_duplicate_ids_surface_dedicated_code": 1,
|
|
"test_duplicate_start_identity_does_not_gain_a_native_contract": 2,
|
|
"test_each_consumer_receives_actual_fresh_start_id_without_invented_inputs": 6,
|
|
"test_edge_references_unknown_node": 1,
|
|
"test_edge_with_non_string_endpoint_is_rejected": 1,
|
|
"test_end_builder_system_grounds_public_name_separately_from_selected_producer_root": 1,
|
|
"test_every_walk_order_produces_the_same_repair": 2,
|
|
"test_existing_graph_is_scoped_to_planner_and_updated_node": 1,
|
|
"test_existing_llm_context_placeholder_is_left_untouched": 1,
|
|
"test_explicit_mode_wins_over_contradictory_planner_mode": 1,
|
|
"test_failed_builder_cancels_queued_builders": 1,
|
|
"test_generation_returns_failure_for_the_known_impossible_reference": 2,
|
|
"test_generator_carries_failure_and_http_contract_to_real_code_builder": 3,
|
|
"test_genuine_answer_array_keeps_two_attempt_correction_budget": 4,
|
|
"test_gives_up_after_exhausting_transient_retries": 1,
|
|
"test_happy_path_returns_empty_errors_list": 1,
|
|
"test_happy_path_returns_valid_graph": 1,
|
|
"test_happy_path_terminates_with_answer": 1,
|
|
"test_higher_worker_config_runs_all_builders_in_one_wave": 1,
|
|
"test_http_builder_system_grounds_requested_duration_in_native_timeout_axes": 1,
|
|
"test_human_input_outputs_and_action_handles_follow_main_contract": 1,
|
|
"test_id_with_no_valid_characters_gets_a_fallback": 1,
|
|
"test_ids_match_after_stripping_on_both_sides": 1,
|
|
"test_ignores_non_file_variables": 1,
|
|
"test_illegal_outputs_are_not_guessed_from_alias_or_sole_declaration": 12,
|
|
"test_inline_reasoning_envelope_preserves_think_tags_in_answer_strings": 1,
|
|
"test_inner_node_positions_are_preserved": 1,
|
|
"test_inserted_retrieval_template_uses_existing_localized_titles": 2,
|
|
"test_invalid_config_corrects_only_the_rejected_node": 4,
|
|
"test_invalid_config_exhaustion_returns_schema_error_and_empty_graph": 3,
|
|
"test_invalid_fragment_retries_once_then_fails_without_partial_graph": 1,
|
|
"test_invalid_router_query_schema_falls_back_to_legacy_prompt": 4,
|
|
"test_invalid_router_response_falls_back_to_legacy_80_tool_prompt": 1,
|
|
"test_invented_structured_output_name_aliases_to_text_when_flag_off_despite_a_leftover_schema": 5,
|
|
"test_invented_structured_output_name_aliases_to_text_when_never_planned": 5,
|
|
"test_invented_structured_output_name_is_not_aliased_when_really_enabled": 5,
|
|
"test_join_lands_right_of_its_deepest_branch": 1,
|
|
"test_json_and_config_failures_share_two_attempts": 3,
|
|
"test_keeps_structured_output_reference_unresolved_on_a_real_structured_output_llm": 1,
|
|
"test_keeps_unresolved_reference_when_source_outputs_are_ambiguous": 1,
|
|
"test_kept_actual_type_and_version_override_the_planners_claim": 5,
|
|
"test_kept_child_without_planned_parent_recovers_containment": 1,
|
|
"test_kept_node_with_removed_container_sheds_stale_markers": 1,
|
|
"test_known_scalar_text_placeholder_cannot_expose_json_fields": 1,
|
|
"test_large_catalogue_routes_chinese_instruction_to_relevant_english_tool": 1,
|
|
"test_leaves_already_clean_ids_untouched": 1,
|
|
"test_leaves_ambiguous_assignments_alone": 1,
|
|
"test_leaves_valid_file_variable_untouched": 1,
|
|
"test_legacy_provider_name_identifies_the_known_producer": 1,
|
|
"test_list_operator_declares_its_fixed_outputs": 1,
|
|
"test_llm_builder_prompt_documents_new_node_reasoning_default": 1,
|
|
"test_llm_reasoning_default_applies_only_to_new_nodes": 9,
|
|
"test_llm_unrelated_invented_name_is_not_aliased": 1,
|
|
"test_logs_each_re_homed_edge_and_not_the_ones_left_as_they_were": 1,
|
|
"test_loop_children_are_stamped_and_wired_to_loop_start": 1,
|
|
"test_malformed_edge_entry_is_rejected": 1,
|
|
"test_marker_defaults_canonicalize_wrapper_without_changing_topology": 8,
|
|
"test_metadata_is_recorded_before_parser_exception_and_preserves_two_attempt_limit": 1,
|
|
"test_metadata_is_stripped_of_surrounding_whitespace": 1,
|
|
"test_metadata_records_actual_usage_for_rejected_reply_and_successful_retry": 2,
|
|
"test_metadata_unavailable_counters_are_not_coerced": 4,
|
|
"test_missing_edges_array_is_rejected": 1,
|
|
"test_missing_end_node_returns_error": 1,
|
|
"test_missing_result_event_falls_back_to_stamped_empty_envelope": 1,
|
|
"test_missing_terminal_mode_auto": 1,
|
|
"test_multiple_human_input_outputs_are_ambiguous": 1,
|
|
"test_named_json_fields_stay_unresolved_even_with_forged_node_schema": 3,
|
|
"test_native_code_declared_boolean_and_array_outputs_are_accepted": 2,
|
|
"test_no_dotted_start_reference_ever_injects_a_form_input": 5,
|
|
"test_node_entry_without_node_type_is_rejected": 1,
|
|
"test_non_branch_nodes_are_untouched": 1,
|
|
"test_non_list_nodes_value_is_rejected": 1,
|
|
"test_normalizes_malformed_sys_query_selector": 2,
|
|
"test_normalizes_start_select_variable_with_empty_options": 1,
|
|
"test_normalizes_sys_query_references_across_node_types": 14,
|
|
"test_numeric_equality_accepts_a_text_status_literal": 1,
|
|
"test_ordinary_node_defaults_preserve_caller_wrapper": 1,
|
|
"test_other_schema_less_tool_identities_keep_dynamic_output_compatibility": 4,
|
|
"test_other_tool_result_declaration_and_unambiguous_alias_remain_compatible": 2,
|
|
"test_other_tools_keep_declared_custom_outputs": 1,
|
|
"test_out_of_order_node_array_still_flows_left_to_right": 1,
|
|
"test_output_representations_reach_both_builders_without_changing_runtime_data": 1,
|
|
"test_parser_exception_response_text_is_not_echoed_or_logged": 2,
|
|
"test_partial_garbage_keeps_the_usable_names": 1,
|
|
"test_planned_edge_handles_are_copied_to_graph_edges": 1,
|
|
"test_planner_cannot_own_container_start_markers": 2,
|
|
"test_planner_invalid_json_emits_invalid_json_code": 1,
|
|
"test_planner_json_failure_retries_once_then_recovers": 1,
|
|
"test_planner_json_failure_retries_only_once_then_gives_up": 1,
|
|
"test_planner_no_nodes_surfaces_clear_error": 1,
|
|
"test_planner_returns_invalid_json": 1,
|
|
"test_planner_schema_retries_once_then_uses_single_builder_contract": 1,
|
|
"test_postprocess_dedupes_repeated_edges": 1,
|
|
"test_postprocess_fills_the_esq1_302_body_item_types_but_does_not_collapse_items": 1,
|
|
"test_postprocess_graph_edges": 1,
|
|
"test_postprocess_heals_the_esq1_303_draft": 1,
|
|
"test_postprocess_lays_out_nodes_left_to_right_regardless_of_input": 1,
|
|
"test_promotes_mistyped_var_consumed_by_document_extractor": 1,
|
|
"test_provider_reasoning_json_does_not_contaminate_valid_answer": 2,
|
|
"test_purpose_fallback_does_not_select_a_prefix_tool": 1,
|
|
"test_question_classifier_uses_class_ids": 1,
|
|
"test_refine_entry_edge_keeps_existing_target_over_plan_order": 1,
|
|
"test_refine_entry_retains_one_canonical_marker_and_existing_child": 4,
|
|
"test_refine_reuses_keep_nodes_and_only_builds_updated_nodes": 2,
|
|
"test_refine_still_returns_a_valid_graph": 1,
|
|
"test_rejection_feedback_enables_correction_at_the_model_boundary": 6,
|
|
"test_rejects_undeclared_code_reference_even_with_one_output": 1,
|
|
"test_repair_branch_edge_handles": 1,
|
|
"test_repair_branch_edge_handles_classmethod_keeps_its_contract": 1,
|
|
"test_repairs_http_request_response_reference_to_body": 1,
|
|
"test_repairs_invented_structured_output_reference_to_text_on_a_schemaless_llm": 1,
|
|
"test_repairs_llm_that_uses_only_one_of_two_incoming_retrieval_results": 1,
|
|
"test_repeated_names_are_declared_once_in_planner_order": 1,
|
|
"test_representation_contracts_preserve_parallel_call_count_and_public_events": 1,
|
|
"test_requested_end_name_and_original_purpose_stay_in_user_message_without_renaming_selector": 2,
|
|
"test_respects_an_already_correct_handle": 1,
|
|
"test_response_body_alias_resolves_to_body": 4,
|
|
"test_retries_transient_invoke_error_then_succeeds": 1,
|
|
"test_rewrites_placeholder_string_when_id_is_remapped": 1,
|
|
"test_rewrites_value_selector_lists": 1,
|
|
"test_router_exception_falls_back_without_blocking_generation": 1,
|
|
"test_router_exception_logs_pinned_fallback_tool": 1,
|
|
"test_router_failure_does_not_surface_as_model_error": 1,
|
|
"test_router_json_parser_exception_falls_back_to_legacy_prompt": 1,
|
|
"test_router_needs_no_tools_but_keeps_existing_refine_tool": 1,
|
|
"test_sanitizes_dots_and_spaces": 1,
|
|
"test_self_loop_is_flagged_with_the_node_id": 1,
|
|
"test_shared_planner_keeps_original_goal_and_authored_metadata_in_user_message": 1,
|
|
"test_shared_planner_system_distinguishes_mutation_from_a_published_constant": 1,
|
|
"test_sibling_edges_inside_container_are_flagged": 1,
|
|
"test_single_human_input_output_is_inferred": 1,
|
|
"test_single_parameter_extractor_output_is_inferred": 1,
|
|
"test_small_catalogue_is_injected_without_router_call": 1,
|
|
"test_stage_error_to_envelope_code": 1,
|
|
"test_stage_schema_error": 1,
|
|
"test_standard_envelope_roots_remain_accepted": 1,
|
|
"test_start_inputs_flow_into_builder_user_prompt": 1,
|
|
"test_stream_and_blocking_results_match": 1,
|
|
"test_stream_emits_plan_then_result": 1,
|
|
"test_stream_planner_failure_emits_only_result": 1,
|
|
"test_string_operator_on_native_http_status_is_a_numeric_operator_schema_error": 4,
|
|
"test_string_operator_outside_direct_native_http_status_keeps_existing_behavior": 12,
|
|
"test_strips_hyphens_from_every_node_id": 1,
|
|
"test_structured_output_is_declared_only_when_really_enabled_with_a_schema": 1,
|
|
"test_structured_tool_selection_hydrates_trusted_installed_metadata": 1,
|
|
"test_surfaces_planner_app_name_and_icon": 1,
|
|
"test_sys_query_is_resolved_in_advanced_chat_mode": 1,
|
|
"test_the_always_present_engine_outputs_are_declared": 5,
|
|
"test_the_error_codes_are_stable_enum_members": 1,
|
|
"test_the_esq1_302_json_body_is_an_invalid_http_body_error_naming_the_node": 1,
|
|
"test_the_keywords_are_excluded_wherever_they_appear": 1,
|
|
"test_the_placeholder_form_of_that_start_reference_is_reported_too": 1,
|
|
"test_the_production_error_string_is_gone_from_a_whole_graph": 1,
|
|
"test_the_reported_errors_come_out_in_a_stable_order": 1,
|
|
"test_the_schemaless_default_output_is_unchanged": 1,
|
|
"test_the_walk_is_handed_a_sorted_list_not_a_set": 1,
|
|
"test_tool_catalogue_reaches_planner_and_only_the_tool_builder": 1,
|
|
"test_tool_hydration_skips_unrelated_nodes_and_can_resolve_from_graph_data": 1,
|
|
"test_tool_node_declares_its_fixed_envelope": 1,
|
|
"test_tool_node_declares_its_output_schema_properties": 1,
|
|
"test_tool_node_fails_open_when_output_schema_is_not_a_dict": 1,
|
|
"test_tool_node_fails_open_when_properties_is_not_a_dict": 1,
|
|
"test_tool_node_fails_open_without_an_output_schema": 1,
|
|
"test_tool_node_rejects_an_undeclared_output_when_a_schema_is_present": 1,
|
|
"test_tool_result_is_aliased_to_text": 1,
|
|
"test_tool_selection_falls_back_to_exact_identifier_in_purpose": 1,
|
|
"test_top_level_nodes_still_get_auto_layout": 1,
|
|
"test_two_node_cycle_is_flagged_once": 1,
|
|
"test_unclosed_reasoning_envelope_does_not_extract_reasoning_json": 2,
|
|
"test_unknown_or_dynamic_kept_producer_does_not_gain_a_native_contract": 9,
|
|
"test_unknown_or_nested_http_alias_remains_unresolved": 6,
|
|
"test_unmatched_router_query_falls_back_to_legacy_prompt": 1,
|
|
"test_unmatched_router_query_logs_capped_omitted_tool_preview": 1,
|
|
"test_unrelated_constant_producer_is_not_added_to_consumer_contract": 1,
|
|
"test_unusable_representation_metadata_preserves_names_only_prompts": 3,
|
|
"test_validate_structure_accepts_a_structured_output_reference": 1,
|
|
"test_validate_structure_rejects_a_flat_schema_property_reference": 1,
|
|
"test_validator_emits_missing_terminal_code": 1,
|
|
"test_validator_rejects_container_without_children": 1,
|
|
"test_validator_rejects_dangling_parent_id": 1,
|
|
"test_validator_rejects_unknown_tool": 1,
|
|
"test_validator_skips_tool_check_when_catalogue_is_none": 1,
|
|
"test_value_selector_references_are_walked": 1,
|
|
"test_walker_does_not_match_hyphenated_placeholders": 1,
|
|
"test_walker_matches_double_brace_placeholders_only": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_build_cognition"] = {
|
|
"test_agent_binding_names_new_agent_step_instead_of_end": 1,
|
|
"test_analyze_goal_answers_a_blank_goal_restating_field_with_the_goal": 1,
|
|
"test_analyze_goal_degrades_to_generic_field_on_boom": 1,
|
|
"test_analyze_goal_degrades_to_generic_field_on_none": 1,
|
|
"test_analyze_goal_does_not_answer_a_goal_restating_select": 1,
|
|
"test_analyze_goal_does_not_explain_a_field_that_has_a_value": 1,
|
|
"test_analyze_goal_empty_clarification_preserves_fixed_values_for_planning": 1,
|
|
"test_analyze_goal_explains_a_field_it_leaves_blank": 1,
|
|
"test_analyze_goal_keeps_a_necessary_unanswered_business_question": 1,
|
|
"test_analyze_goal_keeps_the_answer_the_model_gave_a_goal_restating_field": 1,
|
|
"test_analyze_goal_never_asks_for_a_credential_in_a_text_field": 1,
|
|
"test_analyze_goal_reconciles_field_type_with_value": 1,
|
|
"test_analyze_goal_requests_only_necessary_unanswered_business_requirements": 1,
|
|
"test_analyze_goal_returns_fields_and_values": 1,
|
|
"test_analyze_goal_scrubs_invented_defaults_end_to_end": 1,
|
|
"test_assess_capability_gap_names_the_gap_in_plain_words": 1,
|
|
"test_preapproval_feasibility_unknown_is_disclosed_without_changing_approval": 14,
|
|
"test_knowledge_only_discovery_does_not_report_missing_plan_assessment": 2,
|
|
"test_feasibility_reply_does_not_attribute_earlier_discovery_failure": 2,
|
|
"test_feasibility_policy_denial_is_not_an_unknown_assessment": 1,
|
|
"test_assess_capability_gap_reports_no_gap_for_an_empty_plan": 1,
|
|
"test_assess_capability_gap_reports_unknown_on_model_failure": 1,
|
|
"test_assess_capability_gap_reports_unknown_on_unparseable_reply": 1,
|
|
"test_assess_capability_gap_reports_no_gap_when_the_plan_is_covered": 1,
|
|
"test_assess_capability_gap_reports_unknown_without_a_model": 1,
|
|
"test_assess_capability_gap_retains_source_and_distinguishes_same_label_resource_ids": 1,
|
|
"test_assess_capability_gap_shows_the_model_each_option_and_its_readiness": 1,
|
|
"test_bind_resources_allows_schema_binding_without_borrowing_a_private_credential": 1,
|
|
"test_bind_resources_binds_each_resource_to_the_step_it_covers": 1,
|
|
"test_bind_resources_binds_each_tool_to_the_step_naming_its_id": 1,
|
|
"test_bind_resources_cleans_an_old_aggregate_suffix_before_rebinding": 1,
|
|
"test_bind_resources_falls_back_to_the_last_step_when_nothing_matches": 1,
|
|
"test_bind_resources_keeps_model_label_and_ignores_selected_dataset": 1,
|
|
"test_bind_resources_names_the_tool_id_on_an_empty_plan_too": 1,
|
|
"test_bind_resources_rebind_with_a_changed_selection_drops_the_deselected_label": 1,
|
|
"test_bind_resources_rebind_with_the_same_selection_is_idempotent": 1,
|
|
"test_bind_resources_refuses_dataset_binding": 1,
|
|
"test_bind_resources_retains_installed_tools_requiring_setup": 1,
|
|
"test_bind_resources_tool_suffix_carries_the_id_the_generator_pins_on": 2,
|
|
"test_build_nodes_admits_only_actual_installed_action_schemas": 5,
|
|
"test_build_nodes_private_credentials_do_not_hide_the_installed_action_schema": 1,
|
|
"test_build_nodes_restricts_generation_to_the_uncapped_installed_inventory": 1,
|
|
"test_build_nodes_sends_the_directive_to_the_generator": 1,
|
|
"test_covering_step_llm_keyword_does_not_match_a_fulfillment_substring": 1,
|
|
"test_covering_step_prefers_the_step_naming_the_resource_id_over_the_kind_keyword": 1,
|
|
"test_covering_step_still_matches_llm_in_cjk_step_text": 1,
|
|
"test_covering_step_tool_keyword_does_not_match_a_toolkit_substring": 1,
|
|
"test_discover_resources_keeps_only_ids_the_model_actually_picked": 1,
|
|
"test_discover_resources_never_falls_back_to_the_whole_inventory": 1,
|
|
"test_discover_resources_recommends_nothing_when_the_call_fails": 1,
|
|
"test_discover_resources_recommends_nothing_without_a_model": 1,
|
|
"test_discover_resources_refuses_dataset_recommendations": 1,
|
|
"test_discover_resources_retains_full_source_in_model_payload": 1,
|
|
"test_discover_resources_shows_the_model_each_options_readiness": 1,
|
|
"test_discovery_grounds_minimal_dependencies_in_native_capabilities": 2,
|
|
"test_discovery_keeps_selected_tools_with_bounded_localized_reason_fallback": 14,
|
|
"test_discovery_projects_localized_business_purposes_without_tool_manuals": 2,
|
|
"test_discovery_prompt_keeps_the_readiness_reason_for_a_long_description": 2,
|
|
"test_discovery_recommends_an_unauthenticated_installed_tool_as_requiring_setup": 1,
|
|
"test_discovery_with_no_model_signal_still_recommends_nothing": 1,
|
|
"test_gap_keeps_source_and_external_resource_readiness_in_user_message": 3,
|
|
"test_gap_system_defines_missing_config": 1,
|
|
"test_gap_system_distinguishes_mutation_from_a_published_constant": 1,
|
|
"test_gap_system_preserves_explicit_named_tool_model_and_new_agent_constraints": 1,
|
|
"test_gap_system_receives_native_workflow_vocabulary_with_no_selected_external_resources": 1,
|
|
"test_gap_system_separates_native_draft_coverage_from_runtime_admission": 1,
|
|
"test_gap_system_treats_absent_named_candidates_as_unconfirmed_external_inventory": 1,
|
|
"test_grounding_preserves_retrieval_config_without_dataset_assignment": 1,
|
|
"test_initial_plan_defers_agent_catalogue_failure_and_discovery_distinguishes_empty": 2,
|
|
"test_initial_plan_defers_actor_eligible_published_agent_metadata_to_discovery": 2,
|
|
"test_learn_from_build_degrades_on_boom": 1,
|
|
"test_learn_from_build_degrades_to_generic": 1,
|
|
"test_outline_keeps_original_goal_literals_and_metadata_in_user_message": 1,
|
|
"test_outline_system_distinguishes_mutation_from_a_published_constant": 1,
|
|
"test_plan_distinguishes_stop_on_error_from_diagnostic_output": 1,
|
|
"test_plan_prompt_carries_the_node_vocabulary": 1,
|
|
"test_plan_prompt_names_capabilities_dify_lacks": 1,
|
|
"test_plan_prompt_names_the_ready_tools_it_may_use": 1,
|
|
"test_plan_prompt_still_requests_json_and_language": 1,
|
|
"test_plan_prompt_without_tools_has_no_tool_section": 1,
|
|
"test_planner_catalogue_includes_setup_tools_and_remains_capped": 1,
|
|
"test_planner_describes_only_first_phase_nodes_to_the_model": 1,
|
|
"test_planner_keeps_conditional_model_preference_separate_from_required_behavior": 1,
|
|
"test_planner_can_ask_a_required_select_without_inventing_a_recommendation": 1,
|
|
"test_planner_never_approves_a_malformed_clarification": 4,
|
|
"test_planner_returns_later_discovered_business_questions_with_editable_defaults": 1,
|
|
"test_initial_plan_defers_installed_tools_and_discovery_ranks_delayed_setup_beyond_the_old_name_cap": 1,
|
|
"test_propose_plan_v1_corrects_schema_once_with_full_source_and_same_provider_parameters": 1,
|
|
"test_propose_plan_v1_does_not_retry_a_provider_failure": 1,
|
|
"test_propose_plan_v1_preserves_valid_plan_strings_without_content_thresholds": 1,
|
|
"test_propose_plan_v1_rejects_the_entire_invalid_plan_with_one_correction": 13,
|
|
"test_propose_plan_v1_reports_no_plan_on_provider_failure": 1,
|
|
"test_propose_plan_v1_reports_no_plan_without_a_model": 1,
|
|
"test_propose_plan_v1_returns_overview_and_steps_in_one_call": 1,
|
|
"test_ready_tool_catalogue_degrades_to_empty_when_the_listing_fails": 1,
|
|
"test_scrub_invented_defaults_blanks_a_bearer_placeholder_under_a_non_credential_key": 1,
|
|
"test_scrub_invented_defaults_blanks_a_credential_the_goal_does_not_state": 1,
|
|
"test_scrub_invented_defaults_blanks_a_placeholder_under_a_credential_key": 1,
|
|
"test_scrub_invented_defaults_blanks_a_plausible_invented_host": 1,
|
|
"test_scrub_invented_defaults_blanks_the_real_s5b_invented_endpoint_and_credential": 1,
|
|
"test_scrub_invented_defaults_keeps_a_credential_the_goal_states": 1,
|
|
"test_scrub_invented_defaults_keeps_a_non_credential_placeholder_looking_string": 1,
|
|
"test_scrub_invented_defaults_keeps_a_url_whose_host_the_goal_names": 1,
|
|
"test_scrub_invented_defaults_keeps_a_url_whose_host_the_goal_names_without_a_scheme": 1,
|
|
"test_scrub_invented_defaults_keeps_lookalike_keys_that_are_not_credentials": 1,
|
|
"test_scrub_invented_defaults_still_blanks_a_single_label_host_named_as_a_stray_word": 1,
|
|
"test_topology_directive_carries_node_usage_guidance": 1,
|
|
"test_topology_directive_does_not_restate_the_whitelist": 1,
|
|
"test_topology_directive_keeps_the_workflow_rules": 1,
|
|
"test_topology_directive_no_longer_steers_away_from_installed_tools": 1,
|
|
"test_analyze_goal_keeps_business_fields_but_removes_secret_requests": 1,
|
|
"test_analyze_goal_removes_nested_secret_values_without_losing_business_booleans": 1,
|
|
"test_analyze_goal_removes_a_secret_labeled_as_optional": 1,
|
|
"test_analyze_goal_rejects_secret_text_mislabeled_as_boolean": 1,
|
|
"test_analyze_goal_removes_secret_label_with_punctuation": 1,
|
|
"test_business_clarification_hides_only_marked_internal_defaults_but_keeps_them_for_planning": 1,
|
|
"test_business_clarification_keeps_required_unanswered_structured_questions": 4,
|
|
"test_business_clarification_preserves_explicit_required_technical_structure": 1,
|
|
"test_business_clarification_prompt_uses_scalar_controls_for_necessary_questions": 1,
|
|
"test_business_clarification_keeps_explicit_optional_json_editable_through_real_handlers": 1,
|
|
"test_business_clarification_protects_unmarked_or_editable_complex_defaults": 7,
|
|
"test_business_clarification_keeps_internal_marked_question_without_a_default": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_build_nodes"] = {
|
|
"test_approved_generation_preserves_business_source_and_satisfies_historical_approval": 1,
|
|
"test_build_nodes_corrects_list_schema_before_returning_complete_intents": 1,
|
|
"test_build_nodes_degrades_to_empty_on_generator_error": 1,
|
|
"test_build_nodes_does_not_duplicate_an_endpoint_variable_the_start_node_already_declares": 1,
|
|
"test_build_nodes_error_reason_joins_errors_list_when_no_top_level_error": 1,
|
|
"test_build_nodes_grounds_a_bare_key_param": 1,
|
|
"test_build_nodes_grounds_a_bare_scheme_word_keeping_it": 1,
|
|
"test_build_nodes_grounds_a_bearer_key_the_goal_only_mentions_as_a_word": 1,
|
|
"test_build_nodes_grounds_a_credential_header_preserving_crlf_line_endings": 1,
|
|
"test_build_nodes_grounds_a_placeholder_endpoint_into_a_required_start_variable": 1,
|
|
"test_build_nodes_grounds_an_empty_api_key_authorization_config": 1,
|
|
"test_build_nodes_grounds_an_empty_credential_header_line": 1,
|
|
"test_build_nodes_grounds_an_endpoint_the_user_never_supplied_even_when_not_placeholder_shaped": 1,
|
|
"test_build_nodes_grounds_an_invented_api_key_authorization_config": 1,
|
|
"test_build_nodes_grounds_an_invented_api_key_param": 1,
|
|
"test_build_nodes_grounds_an_invented_azure_subscription_key_header": 1,
|
|
"test_build_nodes_grounds_an_invented_credential_header_into_a_required_start_variable": 1,
|
|
"test_build_nodes_grounds_an_invented_secret_absent_from_trusted_text": 1,
|
|
"test_build_nodes_grounds_both_an_invented_url_and_an_invented_header_on_the_same_node": 1,
|
|
"test_build_nodes_grounds_each_placeholder_endpoint_into_its_own_start_variable": 1,
|
|
"test_build_nodes_grounds_model_on_question_classifier_node": 1,
|
|
"test_build_nodes_grounds_model_without_adding_dataset_nodes": 1,
|
|
"test_build_nodes_grounds_only_the_origin_of_a_placeholder_url_with_a_templated_path": 1,
|
|
"test_build_nodes_grounds_only_the_origin_of_an_invented_url_with_a_templated_path": 1,
|
|
"test_build_nodes_grounds_only_the_origin_of_an_invented_url_with_a_templated_query": 1,
|
|
"test_build_nodes_grounds_to_selected_model_resource": 1,
|
|
"test_build_nodes_instruction_states_workflow_topology": 1,
|
|
"test_build_nodes_keeps_the_whole_url_label_for_a_url_without_templates": 1,
|
|
"test_build_nodes_leaves_a_header_credential_alone_when_the_user_actually_supplied_it": 1,
|
|
"test_build_nodes_leaves_a_non_placeholder_secret_alone_in_placeholder_only_mode": 1,
|
|
"test_build_nodes_leaves_a_real_endpoint_and_a_templated_url_alone": 1,
|
|
"test_build_nodes_leaves_a_url_whose_host_a_requirement_names_without_a_scheme": 1,
|
|
"test_build_nodes_leaves_a_url_whose_host_is_a_template_alone": 1,
|
|
"test_build_nodes_leaves_a_url_whose_host_the_goal_names_without_a_scheme": 1,
|
|
"test_build_nodes_leaves_an_already_templated_credential_header_alone": 1,
|
|
"test_build_nodes_leaves_an_endpoint_alone_when_the_user_actually_supplied_its_host": 1,
|
|
"test_build_nodes_leaves_cache_key_and_key_points_params_alone": 1,
|
|
"test_build_nodes_logs_traceback_when_generation_raises": 1,
|
|
"test_build_nodes_logs_when_generator_reports_error": 1,
|
|
"test_build_nodes_passes_confirmed_failure_policy_to_generator": 1,
|
|
"test_build_nodes_preserves_original_fixed_constraints_absent_from_plan": 1,
|
|
"test_build_nodes_records_diagnostic_when_generation_raises": 1,
|
|
"test_build_nodes_records_structured_diagnostics_for_the_debug_export": 1,
|
|
"test_build_nodes_refuses_complete_candidate_when_one_edge_is_rejected": 1,
|
|
"test_build_nodes_refuses_dynamic_template_after_bounded_schema_attempts": 1,
|
|
"test_build_nodes_refuses_generated_retrieval_nodes_through_corrective_path": 1,
|
|
"test_build_nodes_replaces_a_bare_scheme_word_wholesale_off_an_authorization_line": 1,
|
|
"test_build_nodes_retries_twice_then_succeeds_within_budget": 1,
|
|
"test_build_nodes_retries_with_corrective_instruction_on_terminal_error": 1,
|
|
"test_build_nodes_returns_exception_text_as_error_reason": 1,
|
|
"test_build_nodes_returns_specific_generator_error_reason": 1,
|
|
"test_build_nodes_stops_after_three_attempts_and_reports_every_error": 1,
|
|
"test_build_nodes_valid_list_candidate_succeeds_without_correction": 1,
|
|
"test_build_nodes_without_selected_model_grounds_to_session_model": 1,
|
|
"test_every_variable_url_grounding_creates_is_excluded_from_mocks_and_path_data_is_not": 1,
|
|
"test_full_build_accepts_complete_healthcheck_without_retry_or_rewiring": 1,
|
|
"test_full_build_accepts_native_assembled_nested_containers": 1,
|
|
"test_full_build_allows_a_separate_terminal_on_each_branch": 1,
|
|
"test_full_build_completeness_accepts_complete_parallel_fanout_only": 1,
|
|
"test_full_build_completeness_does_not_change_authored_partial_edit_preflight": 1,
|
|
"test_full_build_completeness_does_not_hide_unowned_children": 3,
|
|
"test_full_build_completeness_does_not_trust_data_only_container_markers": 2,
|
|
"test_full_build_completeness_leaves_refinement_context_unrestricted": 1,
|
|
"test_full_build_completeness_preserves_legacy_aggregator_identity": 1,
|
|
"test_full_build_completeness_requires_one_actual_start": 2,
|
|
"test_full_build_completeness_treats_nested_container_children_as_internal_execution": 1,
|
|
"test_full_build_completeness_uses_the_actual_mode_terminal": 2,
|
|
"test_full_build_corrects_disconnected_healthcheck_within_existing_retry_budget": 1,
|
|
"test_full_build_rejects_disconnected_convergence_before_returning_intents": 4,
|
|
"test_grounding_a_templated_url_is_idempotent": 1,
|
|
"test_is_placeholder_endpoint_recognises_the_usual_inventions": 1,
|
|
"test_selected_workflow_model_resolves_model_resource_only": 1,
|
|
"test_terminal_retry_instruction_includes_every_error_and_reference_guidance": 1,
|
|
"test_terminal_retry_instruction_keeps_topology_text_for_a_topology_error": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_edit_cognition"] = {
|
|
"test_a_batch_refused_twice_still_goes_to_the_gate_where_the_write_refuses_it_loudly": 1,
|
|
"test_a_batch_the_engine_accepts_never_spends_the_reprompt": 1,
|
|
"test_a_first_attempt_the_guards_condemn_surfaces_even_when_the_retry_is_unusable": 1,
|
|
"test_a_model_that_ignores_the_guidance_twice_surfaces_instead_of_writing": 1,
|
|
"test_a_model_that_takes_the_guidance_on_the_retry_is_written_as_normal": 1,
|
|
"test_a_nested_sentinel_in_a_create_node_config_is_refused_too": 1,
|
|
"test_a_purely_structural_rejection_still_falls_back_to_the_first_attempt": 1,
|
|
"test_a_real_value_for_the_same_field_is_still_writable": 1,
|
|
"test_a_retry_that_returns_nothing_usable_falls_back_to_the_first_attempt": 1,
|
|
"test_a_write_carrying_the_sentinel_leaves_the_stored_credential_intact": 1,
|
|
"test_analyze_impact_non_list_target_node_ids_degrades_without_raising": 1,
|
|
"test_analyze_impact_none_model_degrades": 1,
|
|
"test_analyze_impact_provider_error_degrades": 1,
|
|
"test_analyze_impact_reconciles_boolean_value_with_field_type": 1,
|
|
"test_analyze_impact_returns_fields_values_targets": 1,
|
|
"test_build_edit_intents_degrades_to_empty_on_none": 1,
|
|
"test_build_edit_intents_non_list_intents_degrades_to_empty": 1,
|
|
"test_build_edit_intents_partial_reject_keeps_first_attempt_when_retry_still_fails": 1,
|
|
"test_build_edit_intents_partial_reject_retries_once_then_recovers_both": 1,
|
|
"test_build_edit_intents_provider_error_degrades_to_empty": 1,
|
|
"test_build_edit_intents_puts_the_target_config_in_the_prompt": 1,
|
|
"test_build_edit_intents_quotes_the_engines_refusal_of_the_previous_attempt": 1,
|
|
"test_build_edit_intents_reprompts_on_a_node_the_engine_would_refuse_and_recovers": 1,
|
|
"test_build_edit_intents_total_reject_reprompts_then_recovers": 1,
|
|
"test_build_edit_intents_total_reject_twice_returns_empty": 1,
|
|
"test_build_edit_intents_validates_and_drops_bad": 1,
|
|
"test_build_edit_intents_with_no_targets_falls_back_to_the_plain_context": 1,
|
|
"test_edit_plan_sees_existing_workflow_inputs_and_outputs": 1,
|
|
"test_edit_receives_stop_policy_and_preserves_known_error_strategy": 1,
|
|
"test_graph_context_does_not_take_the_extra_hop_past_a_plain_target": 1,
|
|
"test_graph_context_inlines_the_target_nodes_cases_verbatim": 1,
|
|
"test_graph_context_leaves_a_non_target_non_neighbour_as_one_line": 1,
|
|
"test_graph_context_legend_warns_the_model_off_writing_the_sentinel_back": 1,
|
|
"test_graph_context_lists_branch_handles_and_a_named_edge_handle": 1,
|
|
"test_graph_context_marks_an_oversized_node_config_as_truncated": 1,
|
|
"test_graph_context_omits_keys_still_at_their_type_default": 1,
|
|
"test_graph_context_omits_the_two_dozen_default_keys_of_an_http_node": 1,
|
|
"test_graph_context_plain_edge_has_no_handle_suffix": 1,
|
|
"test_graph_context_reaches_the_aggregator_two_hops_past_a_branch_target": 1,
|
|
"test_graph_context_skips_a_config_line_that_would_only_repeat_the_summary": 1,
|
|
"test_graph_context_withholds_an_api_key_behind_the_sentinel": 1,
|
|
"test_graph_context_withholds_header_and_param_values_but_keeps_their_names": 1,
|
|
"test_graph_context_without_targets_keeps_todays_one_line_form": 1,
|
|
"test_no_previous_refusal_leaves_the_prompt_exactly_as_it_was": 1,
|
|
"test_op_schema_mentions_source_handle_for_branch_connects": 1,
|
|
"test_op_schema_teaches_the_array_and_operator_rules_the_engine_enforces": 1,
|
|
"test_propose_edit_plan_bullets": 1,
|
|
"test_propose_edit_plan_non_list_plan_returns_no_approvable_plan": 1,
|
|
"test_propose_edit_plan_none_model_returns_no_approvable_plan": 1,
|
|
"test_propose_edit_plan_provider_error_returns_no_approvable_plan": 1,
|
|
"test_redaction_does_not_mutate_the_live_graph": 1,
|
|
"test_the_corrective_reprompt_quotes_the_engines_own_words": 1,
|
|
"test_the_drafts_pre_existing_problems_do_not_spend_the_reprompt": 1,
|
|
"test_the_engines_text_separates_two_refusals_the_preflight_key_cannot": 1,
|
|
"test_the_previous_refusal_stays_in_front_of_the_model_through_the_retry": 1,
|
|
"test_truncation_names_the_keys_it_dropped": 1,
|
|
}
|
|
# ENG-1269: retain the exact inventory guard while adding insertion regressions.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_edit_cognition"].update(
|
|
{
|
|
"test_edit_corrects_retained_bypass_before_returning_insertion": 1,
|
|
"test_edit_refuses_still_condemned_bypass": 2,
|
|
"test_edit_keeps_explicit_parallel_path": 1,
|
|
"test_insertion_retry_cannot_drop_or_reclassify_the_required_path": 2,
|
|
"test_insertion_only_retry_preserves_valid_new_node_config": 1,
|
|
"test_edit_checks_paths_through_multiple_added_nodes": 1,
|
|
"test_bypass_detection_respects_original_edge_handles": 2,
|
|
"test_assessment_has_candidate_node_metadata_and_full_plan": 1,
|
|
"test_unavailable_assessment_does_not_authorize_a_bypass": 1,
|
|
"test_edit_does_not_accept_unassessed_bypass": 3,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_fix_cognition"] = {
|
|
"test_a_branch_connect_with_a_declared_handle_is_accepted_first_time": 1,
|
|
"test_a_branch_connect_without_a_handle_is_refused_and_the_retry_recovers_it": 1,
|
|
"test_a_handle_less_branch_connect_twice_still_surfaces_to_the_human": 1,
|
|
"test_a_pre_existing_broken_node_does_not_veto_a_repair_elsewhere": 1,
|
|
"test_a_purely_structural_refusal_keeps_the_generic_surface_reason": 1,
|
|
"test_a_repair_that_answers_the_guard_on_the_retry_is_staged_as_normal": 1,
|
|
"test_a_repair_that_breaks_its_already_invalid_culprit_further_is_rejected": 1,
|
|
"test_a_repair_that_clobbers_an_array_surfaces_with_the_reason": 1,
|
|
"test_a_repair_that_leaves_an_aggregator_unfed_surfaces_with_the_reason": 1,
|
|
"test_a_repair_the_engine_accepts_never_spends_the_reprompt": 1,
|
|
"test_a_repair_the_engine_refuses_twice_surfaces_to_the_human": 1,
|
|
"test_a_within_budget_culprit_config_is_rendered_whole_as_json": 1,
|
|
"test_an_over_budget_culprit_config_drops_the_whole_key_and_names_it": 1,
|
|
"test_culprit_config_survives_a_node_whose_data_is_not_a_mapping": 1,
|
|
"test_culprit_config_withholds_the_nodes_secrets": 1,
|
|
"test_diagnose_bad_severity_coerced": 1,
|
|
"test_diagnose_checklist_none_model_degrades": 1,
|
|
"test_diagnose_checklist_valid": 1,
|
|
"test_diagnose_launch_failure_withholds_graph_credentials_and_preserves_safe_error": 1,
|
|
"test_diagnose_none_model_degrades_with_real_error": 1,
|
|
"test_diagnose_none_model_surfaces_launch_error_when_no_failed_nodes": 1,
|
|
"test_diagnose_nonexistent_culprit_falls_back": 1,
|
|
"test_diagnose_provider_error_degrades": 1,
|
|
"test_diagnose_redacts_known_graph_credentials_before_truncating_runtime_text": 1,
|
|
"test_diagnose_valid": 1,
|
|
"test_diagnose_withholds_nested_runtime_credentials_without_changing_evidence": 1,
|
|
"test_diagnose_withholds_runtime_only_credentials_repeated_in_graph_labels": 2,
|
|
"test_invalid_model_replacement_still_fails_native_preflight": 1,
|
|
"test_propose_config_fix_auto_applies_low_risk": 1,
|
|
"test_propose_dangling_ref_reprompts_then_recovers": 1,
|
|
"test_propose_external_config_forced_high": 1,
|
|
"test_propose_invalid_twice_surfaces_to_human": 1,
|
|
"test_propose_none_model_surfaces_to_human": 1,
|
|
"test_propose_provider_error_surfaces": 1,
|
|
"test_propose_repair_prompt_does_not_carry_the_culprits_credentials": 1,
|
|
"test_propose_repair_reprompts_on_a_node_the_engine_would_refuse_and_recovers": 1,
|
|
"test_propose_structural_forced_high": 1,
|
|
"test_real_fix_aggregator_source_switch_waits_for_explicit_approval": 2,
|
|
"test_real_fix_cognition_routes_repairs_through_core_approval": 2,
|
|
"test_real_fix_native_data_access_changes_wait_for_explicit_approval": 22,
|
|
"test_repair_receives_native_failure_rule_without_inventing_a_stop_policy": 1,
|
|
"test_the_fix_reprompt_quotes_the_engines_own_words": 1,
|
|
"test_the_repair_prompt_states_the_handle_rule_and_shows_the_handles": 1,
|
|
}
|
|
# Exact additions/expanded cases after main integration; retain existing cases.
|
|
for module, functions in {
|
|
"tests.unit_tests.services.dify_builder.test_agent_tool_declarations": {
|
|
"test_workflow_factory_injects_native_declaration_preparation": 1
|
|
}
|
|
}.items():
|
|
a3_expected.setdefault(module, {}).update(functions)
|
|
for module, functions in {
|
|
"tests.unit_tests.services.workflow_runtime.test_workflow_generator": {
|
|
"test_actual_generation_marks_configuration_failure_before_worker_dispatch": 1,
|
|
"test_generate_forwards_pause_configuration_and_state": 1,
|
|
"test_worker_executes_and_persists_a_workflow_through_the_injected_driver": 1,
|
|
},
|
|
"tests.unit_tests.services.workflow_runtime.test_base_runner.TestWorkflowAppRunnerCoreCases.TestWorkflowBasedAppRunner": {
|
|
"test_container_queue_events_preserve_lifecycle_and_ancestor_metadata": 4,
|
|
"test_init_graph_preserves_container_execution_scopes": 3,
|
|
"test_nested_engine_events_retain_both_container_ancestors": 3,
|
|
"test_single_container_debugging_preserves_descendants": 9,
|
|
},
|
|
"tests.unit_tests.core.repositories.test_sqlalchemy_workflow_node_execution_repository": {
|
|
"test_resume_history_includes_paused_nodes_without_changing_default_reads": 2
|
|
},
|
|
"tests.unit_tests.core.workflow.nodes.agent_v2.test_dify_tools_builder": {
|
|
"test_native_layers_without_an_injected_preparer_fail_closed": 1,
|
|
"test_ordinary_layers_do_not_use_an_injected_native_preparer": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_agent_risk_assessor": {
|
|
"test_shell_assessment_uses_configured_assets_and_actual_script": 1,
|
|
"test_shell_reasoning_receives_owner_scope_and_preserves_unknown_risk_and_model_verdict": 2,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_commands": {
|
|
"test_public_pause_read_refreshes_callback_and_preserves_only_live_owned_resume": 16
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion": {
|
|
"test_edit_terminal_failure_or_decline_preserves_edit_family_without_execution": 2,
|
|
"test_edit_terminal_projection_refuses_stale_unknown_or_wrong_task_family": 5,
|
|
"test_edit_terminal_success_closes_same_attempt_in_edit_review_once": 4,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_agent_model_result_canonical": {
|
|
"test_actual_oversized_model_output_stops_before_yield_and_keeps_unknown_without_replay": 1,
|
|
"test_model_receipt_matches_sdk_roundtrip_without_changing_stream_or_accepting_replacement": 4,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_agent_operation_owner": {
|
|
"test_prepare_actual_call_freezes_builder_reasoning_without_business_or_oauth": 5
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_code_risk_assessment": {
|
|
"test_code_reasoner_uses_session_language_instead_of_old_goal_language": 1,
|
|
"test_code_risk_language_is_bound_to_snapshot_without_translating_source": 1,
|
|
"test_code_risk_policy_denial_is_not_downgraded_to_simulation": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_confirmed_full_run": {
|
|
"test_closed_preparation_failure_is_not_reconciled_as_a_dispatched_run": 1,
|
|
"test_error_after_observed_dispatch_remains_unknown": 1,
|
|
"test_failed_native_plugin_resource_uses_actual_historical_graph": 3,
|
|
"test_observed_preparation_failure_is_failed_and_never_redispatched": 1,
|
|
"test_preparation_failure_identifies_only_the_observed_resource_nodes": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_edit_cognition": {
|
|
"test_edit_exposes_approved_insertion_plan_and_preserves_receipt_contract": 1,
|
|
"test_edit_refuses_partial_added_node_when_its_wiring_is_rejected": 2,
|
|
"test_edit_retry_can_correct_added_node_wiring_to_existing_anchor": 1,
|
|
"test_edit_retry_cannot_remove_rejected_wiring_and_keep_same_isolated_addition": 1,
|
|
"test_edit_rule_labels_receive_explicit_session_language_and_preserve_business_value": 1,
|
|
"test_edit_still_allows_intentional_isolated_draft_addition": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_trace_diagnostics": {
|
|
"test_native_preparation_diagnostic_is_persisted_with_handler_reply": 1,
|
|
"test_resource_binding_refusal_retains_safe_code_and_target_without_private_message": 1,
|
|
},
|
|
"tests.unit_tests.services.test_app_generate_service_in_process": {
|
|
"test_pre_generator_tool_admission_failure_has_qualified_preparation_boundary": 4
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, {}).update(functions)
|
|
# ENG-1254 / ENG-1101: exact collected guidance/resource inventories.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_edit_plan_generation": {
|
|
"test_edit_plan_correction_keeps_session_language_above_technical_input": 1,
|
|
"test_edit_plan_uses_explicit_session_language_even_when_rules_are_english": 1,
|
|
"test_edit_planning_can_compare_requested_configuration_with_current_values": 1,
|
|
"test_end_output_types_reach_the_edit_planner": 2,
|
|
"test_first_success_uses_one_call_and_provider_failure_does_not_invent_a_plan": 1,
|
|
"test_incomplete_edit_plan_never_discards_steps_into_an_approvable_placeholder": 15,
|
|
"test_invalid_json_and_schema_share_the_two_call_budget": 1,
|
|
"test_invalid_non_actionable_response_uses_existing_correction_budget": 3,
|
|
"test_invalid_steps_fail_after_one_correction": 4,
|
|
"test_long_input_definitions_are_not_removed_by_the_generic_config_limit": 1,
|
|
"test_multiple_input_types_and_outputs_are_present_without_secrets_or_graph_mutation": 1,
|
|
"test_non_actionable_edit_is_explained_without_schema_retry": 2,
|
|
"test_non_actionable_reason_redacts_full_graph_and_submitted_credentials": 1,
|
|
"test_one_correction_recovers_the_complete_plan_and_keeps_the_source": 2,
|
|
"test_read_only_plan_context_redacts_credentials_inside_http_body": 1,
|
|
"test_webhook_fields_survive_graph_distance_and_keep_distinct_planning_sources": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_edit_plan_lifecycle": {
|
|
"test_failed_replanning_preserves_snapshot_and_recovers_on_retry": 12
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_resource_grounding": {
|
|
"test_ambiguous_resources_have_no_automatic_choice": 1,
|
|
"test_blank_editor_node_remains_an_explicit_unconfigured_placeholder": 1,
|
|
"test_catalogue_failure_is_distinct_from_successful_empty": 1,
|
|
"test_changed_model_requires_exact_catalogue_identity_and_confirmed_choice": 1,
|
|
"test_configuration_failure_keeps_selected_resource_and_requests_a_plan_change": 1,
|
|
"test_edit_gate_resolves_resource_choices_before_asking_for_plan": 1,
|
|
"test_edit_resource_form_uses_canonical_unique_match": 1,
|
|
"test_existing_build_plugin_selection_uses_the_same_exact_tool_identity": 1,
|
|
"test_explicit_unbound_tool_draft_does_not_offer_a_concrete_resource": 1,
|
|
"test_explicit_unchanged_target_must_match_its_confirmed_resource": 1,
|
|
"test_explicitly_deprecated_models_are_not_candidates": 1,
|
|
"test_installed_unauthorized_tool_can_bind_for_later_setup": 1,
|
|
"test_malformed_resource_request_does_not_crash_edit_preparation": 1,
|
|
"test_missing_candidate_from_failed_source_is_not_reported_as_absent": 1,
|
|
"test_missing_choice_returns_to_edit_form_instead_of_failed_task": 1,
|
|
"test_model_binding_uses_exact_source_ids_without_claiming_live_health": 1,
|
|
"test_model_mode_declaration_change_invalidates_shown_choice": 1,
|
|
"test_named_missing_resource_is_explained_before_approval": 4,
|
|
"test_named_missing_resource_never_offers_unrequested_alternatives": 2,
|
|
"test_native_noop_rechecks_explicit_resource_choice_before_transaction": 1,
|
|
"test_open_resource_discovery_still_offers_available_choices": 1,
|
|
"test_partial_tool_catalogue_retains_verified_entries_and_source_failure": 1,
|
|
"test_real_edit_agent_discovers_actor_scoped_resource_choices": 1,
|
|
"test_real_write_boundary_rechecks_workspace_before_opening_write_transaction": 1,
|
|
"test_replacing_tool_rejects_parameters_not_declared_by_selected_action": 1,
|
|
"test_resource_cognition_receives_configuration_and_unknown_health_facts": 1,
|
|
"test_resource_removed_after_form_creation_is_rejected_before_planning": 1,
|
|
"test_resource_version_change_requires_new_choice_and_plan": 1,
|
|
"test_revising_goal_recovers_from_missing_resource_form": 6,
|
|
"test_selected_model_preserves_declared_mode_for_compatibility": 1,
|
|
"test_selected_tool_binding_contains_native_required_public_fields": 1,
|
|
"test_tool_schema_change_invalidates_confirmed_choice": 1,
|
|
"test_two_confirmed_resources_cannot_be_swapped_between_target_nodes": 1,
|
|
"test_unbound_draft_flag_cannot_skip_a_requested_concrete_resource": 2,
|
|
"test_unbound_tool_draft_cannot_be_newly_connected_without_configuration": 1,
|
|
"test_unbound_tool_draft_preserves_only_unchanged_historical_nodes": 4,
|
|
"test_unrelated_old_resource_does_not_block_other_edits": 1,
|
|
"test_visible_model_without_configuration_is_not_ready": 1,
|
|
},
|
|
}
|
|
)
|
|
# Local P1: exact collected function and parameter inventories.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.core.workflow.generator.test_native_aggregator_generation_contract": {
|
|
"test_each_parallel_builder_receives_contract_and_nested_end_selectors_survive": 1,
|
|
"test_native_aggregate_does_not_turn_branch_text_into_requested_fields": 4,
|
|
"test_native_aggregate_object_reaches_end_as_nested_typed_fields": 2,
|
|
"test_planner_and_shared_plan_name_native_aggregate_envelope": 1,
|
|
},
|
|
"tests.unit_tests.core.workflow.generator.test_native_code_output_contract": {
|
|
"test_generation_prompts_declare_native_numeric_output_types": 1,
|
|
"test_native_code_accepts_number_declaration_for_integer_and_float": 2,
|
|
},
|
|
"tests.unit_tests.core.workflow.generator.test_native_loop_generation_contract": {
|
|
"test_loop_declarations_survive_real_planner_and_parallel_builder_boundaries": 1,
|
|
"test_loop_plan_names_reach_producer_and_consumers_without_granting_output_authority": 1,
|
|
"test_loop_prompt_declares_native_state_instead_of_just_exit_conditions": 1,
|
|
"test_prompt_state_initializes_native_pool_and_assigner_increments_same_selector": 2,
|
|
},
|
|
"tests.unit_tests.core.workflow.generator.test_planner_token_budget": {
|
|
"test_default_planner_budget_has_reasoning_and_answer_headroom": 1,
|
|
"test_explicit_budget_and_reasoning_choices_are_preserved_without_schema_lookup": 3,
|
|
"test_injected_default_respects_public_model_maximum": 3,
|
|
"test_real_planner_invocation_uses_schema_bound_budget_for_existing_attempts": 1,
|
|
"test_unavailable_public_schema_keeps_bounded_default": 1,
|
|
"test_unusable_model_maximum_keeps_bounded_default": 8,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_business_acceptance": {
|
|
"test_changed_contract_or_task_does_not_reuse_historical_success": 1,
|
|
"test_contract_rejects_duplicate_cases_and_empty_checks": 1,
|
|
"test_docx_filename_is_unverified_without_storage_byte_evidence": 1,
|
|
"test_exact_paid_outputs_and_real_required_invocations_pass": 1,
|
|
"test_failed_forbidden_tool_invocation_cannot_hide_in_successful_error_branch": 1,
|
|
"test_file_evidence_is_not_read_for_unbound_or_stale_native_run": 1,
|
|
"test_forbidden_external_execution_fails_even_on_expected_outputs": 1,
|
|
"test_foreign_input_or_run_reference_is_not_authority": 1,
|
|
"test_invalid_json_input_cannot_satisfy_valid_paid_case_even_with_expected_outputs": 1,
|
|
"test_latest_failed_rerun_replaces_previous_case_pass": 1,
|
|
"test_missing_immutable_builder_run_id_is_unverified": 1,
|
|
"test_missing_required_case_is_uncovered_and_blocks_coverage": 1,
|
|
"test_nonnull_contract_survives_persisted_json_roundtrip": 1,
|
|
"test_real_owned_docx_byte_evidence_satisfies_explicit_file_expectation": 1,
|
|
"test_required_nonnull_value_fails_when_null_or_absent": 2,
|
|
"test_required_tool_presence_without_execution_fails": 1,
|
|
"test_simulated_required_tool_never_passes_business_acceptance": 1,
|
|
"test_stale_native_revision_remains_unverified": 2,
|
|
"test_successful_execution_with_wrong_missing_null_or_boolean_outputs_fails": 4,
|
|
"test_unconfirmed_contract_is_not_authority": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_business_acceptance_integration": {
|
|
"test_acceptance_context_and_run_evidence_survive_persisted_json": 1,
|
|
"test_action_proposal_needs_no_private_task_or_source_identifiers": 1,
|
|
"test_all_confirmed_cases_required_and_stale_or_replaced_task_cannot_publish": 1,
|
|
"test_confirmed_completed_run_is_retained_without_post_effect_graph_read": 1,
|
|
"test_confirmed_new_request_source_clears_prior_acceptance_authority": 2,
|
|
"test_continuing_task_clears_prior_business_authority": 1,
|
|
"test_contract_metadata_stays_out_of_start_inputs_and_invalid_only_cannot_publish": 3,
|
|
"test_explicit_contract_cannot_bind_foreign_task_source_or_sample": 6,
|
|
"test_failed_forbidden_tool_on_handled_branch_blocks_shared_publication": 1,
|
|
"test_invalid_annotation_preserves_completed_native_run_and_blocks_publication": 1,
|
|
"test_no_contract_retains_execution_only_review_without_inferred_business_truth": 1,
|
|
"test_nonfinite_contract_is_rejected_before_native_execution": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_native_docx_evidence": {
|
|
"test_actual_small_docx_zip_from_native_tool_file_passes": 1,
|
|
"test_actual_sql_lookup_scopes_tool_file_to_tenant": 1,
|
|
"test_conflicting_main_part_content_types_do_not_prove_docx": 1,
|
|
"test_declared_size_limit_prevents_storage_read": 1,
|
|
"test_duplicate_office_document_relationship_is_not_a_verified_docx": 1,
|
|
"test_file_annotation_lookup_or_read_error_preserves_completed_run": 2,
|
|
"test_file_list_passes_only_when_a_real_docx_was_validated": 1,
|
|
"test_file_lookup_requires_the_graph_bound_to_immutable_native_run": 1,
|
|
"test_filename_url_remote_or_conflicting_identity_never_reads_storage": 7,
|
|
"test_internal_root_relationship_resolves_a_declared_readable_main_part": 1,
|
|
"test_invalid_or_external_root_relationship_cannot_prove_docx": 6,
|
|
"test_main_part_must_have_the_docx_content_type_declaration": 1,
|
|
"test_missing_root_document_relationship_cannot_prove_docx": 1,
|
|
"test_non_generator_closeable_stream_releases_owner_on_completion": 1,
|
|
"test_plain_iterable_stream_needs_no_close_method": 1,
|
|
"test_readable_invalid_docx_bytes_fail_even_with_docx_filename": 5,
|
|
"test_root_relationship_requires_existing_safe_package_part": 3,
|
|
"test_root_relationship_xml_has_the_same_read_bound_as_document_xml": 1,
|
|
"test_storage_key_is_taken_only_from_owned_database_row": 1,
|
|
"test_stream_is_bounded_and_closed_when_actual_bytes_exceed_limit": 1,
|
|
"test_unavailable_database_or_storage_bytes_remain_unverified": 2,
|
|
"test_unrelated_or_failed_tool_output_cannot_prove_terminal_file": 1,
|
|
"test_wrong_tenant_row_never_reads_storage": 1,
|
|
"test_zip_uncompressed_size_bound_is_checked_before_expansion": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_planning_tool_contract": {
|
|
"test_high_level_plan_receives_tool_channels_before_committing_consumer_steps": 1,
|
|
"test_inventory_exposes_output_schema_availability_to_the_high_level_planner": 3,
|
|
"test_planner_and_discovery_receive_the_actual_action_parameters": 1,
|
|
"test_unknown_parameter_contract_is_distinct_from_a_no_parameter_action": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_tool_parameter_semantics": {
|
|
"test_generated_parser_feeds_distinct_native_tool_parameters": 3,
|
|
"test_missing_parser_repair_receives_installed_contract_and_start_schema": 2,
|
|
"test_planner_and_builders_receive_semantic_binding_rules": 1,
|
|
"test_repair_contract_matches_exact_provider_action_and_type": 1,
|
|
"test_repair_contract_source_failure_is_explicit": 1,
|
|
"test_repair_reference_literals_uses_real_selector_shape": 2,
|
|
"test_source_declarations_exclude_values_and_code": 1,
|
|
},
|
|
}
|
|
)
|
|
# ENG-1102: exact public plugin output-channel contract inventory.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_plugin_tool_output_context": {
|
|
"test_native_text_json_does_not_populate_json_messages": 1,
|
|
"test_planner_and_code_builder_distinguish_channels_and_require_shape_validation": 1,
|
|
"test_plugin_contract_states_preserve_public_declarations_without_inventing_transport": 3,
|
|
"test_workspace_schema_stays_user_data_and_api_context_is_not_replaced": 1,
|
|
"test_missing_or_unbound_plugin_context_does_not_guess": 2,
|
|
"test_real_generation_delivers_upstream_plugin_contract_to_isolated_code_builder": 1,
|
|
"test_bounded_context_reports_omitted_upstream_tools": 1,
|
|
}
|
|
}
|
|
)
|
|
# ENG-1187: current business failures and owned native write provenance.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_business_failure_repair": {
|
|
"test_business_context_does_not_reuse_unbound_or_unavailable_findings": 6,
|
|
"test_business_diagnosis_keeps_successful_native_run_and_uses_no_failed_run_lookup": 1,
|
|
"test_business_diagnosis_uses_bounded_successful_upstream_native_observations": 1,
|
|
"test_business_observations_do_not_promote_unusable_native_rows": 5,
|
|
"test_business_proposal_retains_noop_routing_and_unknown_if_guards": 4,
|
|
"test_business_proposal_stops_if_task_source_changes_after_diagnosis": 1,
|
|
"test_diagnostic_projection_redacts_before_model_boundary_and_keeps_oracle_immutable": 1,
|
|
"test_explicit_approval_forwards_builder_business_run_identity_without_native_failure_authority": 3,
|
|
"test_explicit_fix_again_uses_latest_business_run_and_retains_owned_sample": 1,
|
|
"test_fix_business_failure_uses_same_bounded_proposal_breaker": 1,
|
|
"test_legacy_fix_again_does_not_read_graph_for_absent_business_contract": 1,
|
|
"test_native_success_with_current_business_failure_reaches_existing_repair_gate": 2,
|
|
"test_progress_to_a_different_failing_path_resets_existing_repeat_counter": 1,
|
|
"test_real_fix_prompt_boundary_receives_goal_oracle_and_native_success_kind": 1,
|
|
"test_real_llm_builder_proposal_vets_a_current_business_code_repair": 1,
|
|
"test_repair_checkpoint_restores_pre_repair_graph_and_preserves_run_oracle": 2,
|
|
"test_same_unmet_case_uses_existing_repeat_breaker_across_revisions_and_run_ids": 1,
|
|
"test_unverified_or_absent_expectations_do_not_trigger_business_repair": 3,
|
|
"test_valid_explicit_null_is_not_reported_as_a_business_mismatch": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_business_failure_port": {
|
|
"test_ambiguous_native_and_business_repair_authority_is_rejected": 1,
|
|
"test_business_case_is_rechecked_at_the_actual_write_boundary": 1,
|
|
"test_current_business_failure_writes_configuration_without_changing_successful_run": 1,
|
|
"test_untrusted_or_stale_business_failure_cannot_write": 10,
|
|
},
|
|
}
|
|
)
|
|
# PR44527: exact native observation function and parameter inventory.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_native_live_stream": {
|
|
"test_legacy_stream_ignores_native_change_notifications": 1,
|
|
"test_native_change_notification_follows_commit_and_never_rollback": 2,
|
|
"test_native_idle_stream_waits_for_bus_change_and_hydrates_terminal_projection": 1,
|
|
"test_native_snapshots_never_call_execution_recovery": 1,
|
|
"test_native_snapshot_scope_expiry_preserves_utc_microsecond_boundary": 8,
|
|
"test_native_stream_continues_after_command_finished": 1,
|
|
"test_native_stream_does_not_miss_creation_after_initial_snapshot_or_delayed_result": 1,
|
|
"test_notification_failure_does_not_fail_or_replay_committed_execution": 1,
|
|
"test_read_only_snapshot_keeps_physically_clean_paused_parent_unresolved": 1,
|
|
}
|
|
}
|
|
)
|
|
# Business-context mock inputs: full module inventory, including typed fallbacks.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_mock_inputs"] = {
|
|
"test_generate_uses_llm_values_keyed_by_variable": 1,
|
|
"test_generate_degrades_to_typed_defaults_on_boom": 1,
|
|
"test_generate_degrades_on_none_model": 1,
|
|
"test_generate_empty_schema_is_empty_inputs": 1,
|
|
"test_all_mock_input_paths_ground_prompt_in_current_business_context": 6,
|
|
"test_business_context_preserves_existing_type_fallbacks": 5,
|
|
}
|
|
# ENG-1255: persisted reply language across Builder generation and diagnosis.
|
|
a4_expected["tests.unit_tests.services.workflow_generation.test_runner"].update(
|
|
{
|
|
"test_inserted_retrieval_template_uses_existing_localized_titles": 2,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_build_nodes"].update(
|
|
{
|
|
"test_build_nodes_forwards_session_reply_language": 1,
|
|
}
|
|
)
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_build_plan_language": {
|
|
"test_plan_uses_explicit_session_reply_language": 1
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_reply_language_prompts": {
|
|
"test_language_instruction_constants": 1,
|
|
"test_chat_prompt_has_language_instruction": 1,
|
|
"test_plan_prompt_keeps_keys_english": 1,
|
|
"test_fix_prompt_uses_persisted_language_with_english_evidence": 3,
|
|
},
|
|
"tests.unit_tests.services.test_workflow_generator_service": {
|
|
"test_forwards_model_instance_and_complete_catalogue_to_generator": 1,
|
|
"test_catalogue_build_failure_falls_back_to_empty_text": 1,
|
|
"test_defaults_ideal_output_to_empty_string": 1,
|
|
"test_forwards_current_graph_for_refine": 1,
|
|
"test_defaults_current_graph_to_none_for_create": 1,
|
|
"test_auto_mode_forwards_sentinel_to_runner": 1,
|
|
"test_explicit_mode_passes_through_unchanged": 1,
|
|
"test_stream_delegates_to_runner_stream": 1,
|
|
"test_allowlist_filters_catalogue_and_validator_keys": 1,
|
|
"test_empty_allowlist_means_no_executable_tools": 1,
|
|
"test_allowlist_keeps_validation_on_when_the_catalogue_fails": 1,
|
|
"test_session_reply_language_reaches_planner_and_node_builders": 4,
|
|
},
|
|
"tests.unit_tests.core.dify_builder.test_handlers_fix": {
|
|
"test_diagnose_then_propose_high_risk_stops_at_await_approval": 1,
|
|
"test_handle_propose_empty_intents_explains_the_missing_repair": 1,
|
|
"test_diagnose_then_propose_low_risk_creates_checkpoint_and_stages_repair": 1,
|
|
"test_apply_writes_graph_locks_during_work_unlocks_at_await_verify": 1,
|
|
"test_apply_refuses_to_apply_an_empty_staged_repair": 1,
|
|
"test_apply_surfaces_a_stale_intent_instead_of_failing_the_session": 1,
|
|
"test_apply_says_a_fix_that_would_not_start_is_not_a_stale_fix": 1,
|
|
"test_apply_forwards_env_emit_canvas_to_the_adapters_on_canvas_callback": 1,
|
|
"test_apply_without_env_emit_canvas_does_not_error": 1,
|
|
"test_apply_streams_change_summary_when_adapter_omits_scope_and_changes": 1,
|
|
"test_diagnose_records_structure_fingerprint": 1,
|
|
"test_await_approval_stray_action_no_auto_apply_approve_advances": 1,
|
|
"test_run_validation_exposes_testdata_form_for_start_inputs": 1,
|
|
"test_mock_validation_inputs_use_the_workflow_start_schema": 1,
|
|
"test_verify_mints_new_immutable_run_original_untouched": 1,
|
|
"test_verify_threads_test_inputs_to_run_draft": 1,
|
|
"test_verify_fail_freezes_run_allows_re_fix": 1,
|
|
"test_verify_running_without_proof_stops_at_decision": 1,
|
|
"test_decision_publish_reaches_success": 1,
|
|
"test_decision_undo_is_append_only": 1,
|
|
"test_decision_re_fix_loops_back_to_diagnose_and_clears_repair_state": 1,
|
|
"test_checklist_fix_diagnose_to_apply_reaches_await_recheck": 1,
|
|
"test_checklist_fix_recheck_passed_requires_native_run_before_publish": 1,
|
|
"test_checklist_fix_recheck_failed_loops_back_to_diagnose": 1,
|
|
"test_checklist_fix_await_recheck_undo_reaches_success": 1,
|
|
"test_fix_registry_has_exactly_twelve_states": 1,
|
|
"test_start_schema_reads_start_node_variables": 1,
|
|
"test_start_schema_empty_when_no_start_or_no_vars": 1,
|
|
"test_needs_upload_inputs_false_for_an_all_text_schema": 1,
|
|
"test_needs_upload_inputs_false_when_there_are_no_variables": 1,
|
|
"test_needs_upload_inputs_true_for_a_file_variable": 1,
|
|
"test_needs_upload_inputs_true_for_a_file_list_variable": 1,
|
|
"test_needs_upload_inputs_true_for_a_mixed_schema": 1,
|
|
"test_endpoint_variable_names_finds_a_start_variable_referenced_as_the_whole_url": 1,
|
|
"test_endpoint_variable_names_ignores_a_url_template_not_in_host_position": 1,
|
|
"test_endpoint_variable_names_finds_a_leading_start_template_before_a_path": 1,
|
|
"test_endpoint_variable_names_finds_a_start_template_inside_the_host": 1,
|
|
"test_endpoint_variable_names_ignores_non_credential_header_and_param_keys": 1,
|
|
"test_endpoint_variable_names_ignores_a_reference_to_a_non_start_node": 1,
|
|
"test_endpoint_variable_names_empty_when_there_is_no_http_request_node": 1,
|
|
"test_endpoint_variable_names_collects_headers_too": 1,
|
|
"test_endpoint_variable_names_also_collects_params_and_authorization_api_key": 1,
|
|
"test_without_endpoint_values_drops_only_the_endpoint_keys": 1,
|
|
"test_without_endpoint_values_keeps_everything_when_no_url_reads_a_start_variable": 1,
|
|
"test_fix_await_testdata_mock_leaves_the_endpoint_for_the_form": 1,
|
|
"test_is_input_failure_matches_input_signals": 1,
|
|
"test_is_input_failure_does_not_misclassify_a_config_required_field_error": 1,
|
|
"test_testdata_form_fields_preserves_file_type": 1,
|
|
"test_testdata_form_fields_copies_start_input_constraints": 1,
|
|
"test_testdata_form_fields_drops_malformed_constraints": 1,
|
|
"test_is_input_failure_matches_launch_error_input_validation": 1,
|
|
"test_is_input_failure_launch_error_non_input_is_config": 1,
|
|
"test_launch_error_text_prefers_message_falls_back_to_type": 1,
|
|
"test_model_config_error_text_matches_model_and_provider_not_exist": 1,
|
|
"test_model_config_error_text_ignores_non_model_errors": 1,
|
|
"test_build_change_set_survives_non_string_changed_nodes": 1,
|
|
"test_verify_keeps_the_ports_run_error": 1,
|
|
"test_verify_survives_a_run_draft_that_raises": 1,
|
|
"test_verify_marks_a_succeeded_run_that_reached_no_end_as_no_output": 1,
|
|
"test_dead_end_branch_node_id_finds_a_branch_whose_target_never_ran": 1,
|
|
"test_dead_end_branch_node_id_is_empty_once_a_target_shows_up_with_any_status": 1,
|
|
"test_dead_end_branch_node_id_treats_no_outgoing_edges_as_routing_nowhere": 1,
|
|
"test_run_finished_without_output_is_false_without_an_end_node": 1,
|
|
"test_each_unknown_outcome_stops_at_the_fix_decision_gate": 1,
|
|
"test_re_fix_after_unknown_requires_new_inputs": 1,
|
|
"test_the_unknown_outcome_counter_is_exported_with_its_cap": 1,
|
|
"test_a_repair_the_guards_condemned_reaches_the_gate_with_its_reason": 1,
|
|
"test_a_staged_repair_still_carries_no_error_card": 1,
|
|
"test_missing_test_input_ref_requests_test_data_without_launch": 1,
|
|
"test_confirmed_fix_verify_uses_saved_input_without_repair_and_returns_to_decision": 1,
|
|
"test_confirmed_fix_without_saved_input_refuses_instead_of_generating_mocks": 1,
|
|
"test_checklist_diagnosis_and_repair_use_persisted_reply_language": 1,
|
|
},
|
|
}
|
|
)
|
|
# ENG-1300: empty proposals preserve an actionable reason without applying a repair.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_fix_cognition": {
|
|
"test_diagnose_valid": 1,
|
|
"test_diagnose_nonexistent_culprit_falls_back": 1,
|
|
"test_diagnose_bad_severity_coerced": 1,
|
|
"test_diagnose_none_model_degrades_with_real_error": 1,
|
|
"test_diagnose_provider_error_degrades": 1,
|
|
"test_diagnose_checklist_valid": 1,
|
|
"test_diagnose_checklist_none_model_degrades": 1,
|
|
"test_propose_config_fix_auto_applies_low_risk": 1,
|
|
"test_real_fix_cognition_routes_repairs_through_core_approval": 2,
|
|
"test_invalid_model_replacement_still_fails_native_preflight": 1,
|
|
"test_real_fix_aggregator_source_switch_waits_for_explicit_approval": 2,
|
|
"test_real_fix_native_data_access_changes_wait_for_explicit_approval": 22,
|
|
"test_propose_external_config_forced_high": 1,
|
|
"test_propose_structural_forced_high": 1,
|
|
"test_propose_dangling_ref_reprompts_then_recovers": 1,
|
|
"test_propose_invalid_twice_surfaces_to_human": 1,
|
|
"test_propose_none_model_surfaces_to_human": 1,
|
|
"test_propose_provider_error_surfaces": 1,
|
|
"test_diagnose_none_model_surfaces_launch_error_when_no_failed_nodes": 1,
|
|
"test_diagnose_withholds_nested_runtime_credentials_without_changing_evidence": 1,
|
|
"test_diagnose_redacts_known_graph_credentials_before_truncating_runtime_text": 1,
|
|
"test_diagnose_launch_failure_withholds_graph_credentials_and_preserves_safe_error": 1,
|
|
"test_diagnose_withholds_runtime_only_credentials_repeated_in_graph_labels": 2,
|
|
"test_culprit_config_withholds_the_nodes_secrets": 1,
|
|
"test_propose_repair_prompt_does_not_carry_the_culprits_credentials": 1,
|
|
"test_culprit_config_survives_a_node_whose_data_is_not_a_mapping": 1,
|
|
"test_an_over_budget_culprit_config_drops_the_whole_key_and_names_it": 1,
|
|
"test_a_within_budget_culprit_config_is_rendered_whole_as_json": 1,
|
|
"test_propose_repair_reprompts_on_a_node_the_engine_would_refuse_and_recovers": 1,
|
|
"test_the_fix_reprompt_quotes_the_engines_own_words": 1,
|
|
"test_a_repair_the_engine_refuses_twice_surfaces_to_the_human": 1,
|
|
"test_a_repair_the_engine_accepts_never_spends_the_reprompt": 1,
|
|
"test_a_pre_existing_broken_node_does_not_veto_a_repair_elsewhere": 1,
|
|
"test_a_repair_that_breaks_its_already_invalid_culprit_further_is_rejected": 1,
|
|
"test_a_branch_connect_with_a_declared_handle_is_accepted_first_time": 1,
|
|
"test_a_branch_connect_without_a_handle_is_refused_and_the_retry_recovers_it": 1,
|
|
"test_a_handle_less_branch_connect_twice_still_surfaces_to_the_human": 1,
|
|
"test_the_repair_prompt_states_the_handle_rule_and_shows_the_handles": 1,
|
|
"test_a_repair_that_leaves_an_aggregator_unfed_surfaces_with_the_reason": 1,
|
|
"test_a_repair_that_clobbers_an_array_surfaces_with_the_reason": 1,
|
|
"test_a_purely_structural_refusal_keeps_the_generic_surface_reason": 1,
|
|
"test_a_repair_that_answers_the_guard_on_the_retry_is_staged_as_normal": 1,
|
|
"test_repair_receives_native_failure_rule_without_inventing_a_stop_policy": 1,
|
|
"test_empty_repair_preserves_permission_reason_without_validation_or_retry": 1,
|
|
"test_empty_repair_redacts_graph_and_runtime_secrets_before_bounding_reason": 1,
|
|
"test_retry_empty_repair_preserves_reason_and_only_prior_actual_refusal": 1,
|
|
"test_defensive_nonempty_nonapplicable_verdict_is_not_refused_or_empty": 1,
|
|
"test_malformed_repair_is_schema_invalid_not_empty_proposal": 3,
|
|
"test_rejected_nonempty_repair_remains_validation_refused": 1,
|
|
"test_empty_repair_without_explanation_uses_existing_generic_reason": 2,
|
|
"test_empty_repair_redacts_overlapping_credentials_with_complete_runtime_profile": 2,
|
|
"test_refusals_keep_distinct_actual_stage_and_reason_per_attempt": 1,
|
|
"test_semantic_final_early_return_keeps_both_refusal_observations": 1,
|
|
"test_valid_code_syntax_repair_after_native_refusal_preserves_declarations": 1,
|
|
},
|
|
"tests.unit_tests.core.dify_builder.test_handlers_edit": {
|
|
"test_edit_test_fail_with_no_proposed_repair_still_routes_to_gate": 3
|
|
},
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_advance_task"] = {
|
|
"test_input_only_testdata_survives_revision_drift_through_the_worker": 6,
|
|
"test_revision_bound_commands_reject_draft_changes_while_queued": 3,
|
|
"test_input_only_testdata_still_rejects_a_session_change_while_queued": 1,
|
|
"test_terminal_review_projects_current_persisted_verification": 5,
|
|
"test_repair_command_only_requests_retest_after_a_committed_repair": 6,
|
|
"test_applied_repair_follow_up_respects_the_completed_views_lifecycle_restriction": 6,
|
|
"test_advance_session_drives_state_forward_emits_events_and_releases_lock": 1,
|
|
"test_progress_snapshot_is_cumulative_and_saved_before_broadcast": 1,
|
|
"test_progress_snapshot_failure_does_not_block_command_completion": 1,
|
|
"test_expired_queued_task_does_not_run_or_release_newer_lock": 1,
|
|
"test_advance_session_conflict_error_publishes_conflict_and_releases_lock": 1,
|
|
"test_terminal_error_is_published_after_the_advance_lock_is_released": 1,
|
|
"test_terminal_state_is_published_after_the_advance_lock_is_released": 1,
|
|
"test_terminal_state_projection_failure_publishes_error_frame": 1,
|
|
"test_message_advance_publishes_assistant_delta_before_durable_reply": 1,
|
|
"test_message_failure_keeps_the_durable_user_half_retryable": 1,
|
|
"test_advance_session_generic_exception_publishes_generic_error_and_releases_lock": 1,
|
|
"test_stale_worker_failure_does_not_overwrite_a_newer_session_head": 1,
|
|
"test_observer_publish_failure_is_best_effort_and_terminal_state_is_still_published_once": 1,
|
|
"test_advance_session_setup_failure_still_releases_lock": 1,
|
|
"test_agent_setup_failure_persists_restartable_failed_state": 1,
|
|
"test_start_build_emits_complete_reply_with_form_and_reaches_goal_analysis": 1,
|
|
"test_advance_session_resolves_edit_handler_via_merged_registry": 1,
|
|
"test_advance_builds_the_agent_for_the_acting_account": 1,
|
|
"test_first_test_command_finished_contains_native_receipt_without_opt_in": 1,
|
|
"test_replaced_same_session_owner_cannot_persist_generic_failure": 1,
|
|
"test_replaced_between_advisory_check_and_sql_cas_cannot_commit": 1,
|
|
"test_replaced_owner_cannot_persist_early_setup_failure": 1,
|
|
}
|
|
# ENG-1293: action API and terminal projection regressions, exact inventory.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_test_actions"] = {
|
|
"test_approval_only_resumes_the_eligible_saved_wait": 5,
|
|
"test_action_accepts_stable_client_identity_without_changing_old_requests": 1,
|
|
"test_action_rejects_invalid_client_identity": 3,
|
|
"test_risk_action_preserves_pending_version_and_explicit_target": 1,
|
|
"test_risk_action_rejects_forged_or_coerced_authority": 3,
|
|
"test_resume_keeps_original_request_and_generation": 1,
|
|
"test_session_projects_test_state_without_starting_another_run": 1,
|
|
"test_resume_action_preserves_request_and_finishes_on_existing_transport": 1,
|
|
"test_old_request_cannot_control_current_test": 1,
|
|
"test_native_controls_keep_session_and_draft_version_guards": 1,
|
|
"test_response_loss_retries_same_action_without_a_second_native_command": 1,
|
|
"test_readonly_session_sse_retains_receipt_and_explicit_action_payload": 1,
|
|
"test_unknown_result_does_not_allow_run_test_or_implicit_replay": 1,
|
|
"test_waiting_operation_uses_existing_choice_with_concrete_risk_details": 1,
|
|
"test_standard_choice_envelope_can_submit_native_control": 1,
|
|
"test_earlier_action_identity_cannot_be_reused_after_another_command": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion"].update(
|
|
{
|
|
"test_native_control_only_commits_do_not_strand_successful_builder_run": 1,
|
|
"test_terminal_projection_crash_is_recovered_without_get_or_dispatch": 1,
|
|
"test_resumed_terminal_run_records_current_business_acceptance_on_original_attempt": 4,
|
|
"test_delayed_cancel_is_settled_by_worker_without_get_or_another_cancel": 2,
|
|
"test_native_control_receipt_cannot_hide_an_intervening_user_change": 1,
|
|
"test_paused_initial_ack_without_dispatch_is_selected_for_worker_recovery": 1,
|
|
}
|
|
)
|
|
a4_expected.setdefault(
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion",
|
|
{},
|
|
).update({"test_expired_terminal_context_requires_actual_owned_terminal_workflow": 7})
|
|
a4_expected.setdefault("tests.unit_tests.services.dify_builder.test_agent_operation_owner", {}).update(
|
|
{"test_expired_completed_receipt_requires_exact_original_permit_and_result": 1}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_terminal_scan"] = {
|
|
"test_terminal_scan_compares_input_ids_as_strings": 2
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion"].update(
|
|
{
|
|
"test_cancel_after_completed_effects_closes_original_parent": 2,
|
|
"test_resumed_saved_cancellation_projects_only_unchanged_terminal_proof": 17,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_native_live_stream"].update(
|
|
{
|
|
"test_resumed_cancelled_parent_session_history_and_sse_stay_readonly": 1,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_task_controls"] = {
|
|
"test_stop_during_advance_preserves_checkpoint_and_fences_generation": 1,
|
|
"test_stop_accepts_progress_but_old_stop_cannot_pause_resumed_generation": 1,
|
|
"test_resume_unknown_enqueue_ack_is_not_replayed": 1,
|
|
"test_stop_replay_returns_durable_original_projection_after_resume": 1,
|
|
"test_blocked_provider_late_result_cannot_be_consumed": 1,
|
|
"test_continuation_delivery_is_claimed_once_and_old_finally_keeps_new_owner": 1,
|
|
"test_stopped_generation_rejects_sql_mutation_even_with_unchanged_app_revision": 1,
|
|
"test_internal_continuation_cannot_enter_through_public_action": 1,
|
|
"test_native_stop_settlement_is_truthful_and_unknown_never_resumes": 3,
|
|
"test_resume_preserves_goal_inputs_checkpoint_and_passes_complete_dsl_to_cognition": 1,
|
|
"test_pending_stop_get_reconciles_terminal_evidence_without_cancelling_again": 1,
|
|
"test_resume_rejects_autosave_between_dsl_read_and_reservation": 1,
|
|
"test_retest_after_resume_mints_new_input_and_builder_run_without_consent": 1,
|
|
"test_stop_captures_late_old_generation_lease_and_resume_keeps_new_owner": 1,
|
|
"test_stale_queued_action_cannot_bind_to_new_resumed_generation": 1,
|
|
"test_actual_action_stream_closes_on_stop_of_blocked_command": 1,
|
|
"test_actual_wired_command_stream_reads_after_request_context_teardown": 1,
|
|
"test_legacy_flag_only_pause_resumes_through_dsl_owner": 1,
|
|
"test_direct_native_admission_rejects_stopped_task_without_worker_context": 1,
|
|
"test_resume_response_receipt_cannot_invalidate_running_worker_cas": 1,
|
|
"test_resume_opening_edit_goal_continues_cognition_without_resubmission": 2,
|
|
"test_busy_edit_goal_is_not_persisted_without_dispatch_admission": 1,
|
|
"test_unknown_continuation_ack_still_accepts_its_exact_first_delivery": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_stream_frames"] = {
|
|
"test_stream_advance_frames_closes_subscription_when_never_iterated": 1,
|
|
"test_stream_advance_frames_relays_typed_envelopes_until_command_finished": 1,
|
|
"test_stream_advance_frames_turns_invalid_progress_into_typed_terminal_error": 3,
|
|
"test_stream_advance_frames_normalizes_internal_error_event": 1,
|
|
"test_native_workflow_terminal_event_does_not_end_the_builder_command": 3,
|
|
"test_ignored_workflow_event_is_not_sent_to_the_browser": 1,
|
|
"test_stream_advance_frames_settled_call_yields_minimal_command_handshake_only": 1,
|
|
"test_stream_advance_frames_can_emit_public_command_finished_for_settled_message": 1,
|
|
"test_reconnect_stream_skips_handshake_and_emits_settled_state": 1,
|
|
"test_reconnect_recovers_settled_state_when_terminal_notification_is_missing": 3,
|
|
"test_reconnect_keeps_watching_while_the_worker_is_active": 1,
|
|
"test_stream_advance_frames_emits_synchronously_persisted_items_individually": 1,
|
|
"test_reconnect_restores_progress_before_live_events_without_replaying_committed_progress": 2,
|
|
"test_observation_uses_original_command_only_for_task_stop": 4,
|
|
}
|
|
task_control_transport_expected = {
|
|
"test_task_control_routes_delegate_fixed_operation_and_return_session_json": 2,
|
|
"test_task_control_invalid_payload_never_calls_service": 20,
|
|
"test_task_control_domain_errors_raise_standard_http_errors": 8,
|
|
"test_task_control_served_json_preserves_trusted_actor_and_no_request_sql": 2,
|
|
"test_task_control_served_errors_follow_console_contract": 6,
|
|
"test_task_control_requires_authentication_before_service": 2,
|
|
}
|
|
for function, count in task_control_transport_expected.items():
|
|
actual = sum(
|
|
classname.removeprefix("api.") == "tests.unit_tests.controllers.console.test_dify_builder_routes"
|
|
and name.split("[", 1)[0] == function
|
|
for classname, name in identities
|
|
)
|
|
if actual != count:
|
|
problems.append(f"Task control transport inventory mismatch {function}: {actual} != {count}")
|
|
# Current priority closeout: exact Local-collected regression inventory.
|
|
a4_expected["tests.unit_tests.core.dify_builder.test_handlers_build"] = {
|
|
"test_a_determinate_outcome_resets_the_unknown_outcome_count": 1,
|
|
"test_a_missing_config_tool_still_lets_the_gap_agent_report_a_gap": 1,
|
|
"test_a_model_with_no_proposal_leaves_the_derived_name_alone": 1,
|
|
"test_a_named_capability_gap_is_surfaced_in_the_reply": 1,
|
|
"test_a_passing_test_does_not_expand_the_card_for_oversized_output": 1,
|
|
"test_a_passing_test_does_not_put_outputs_in_the_card": 1,
|
|
"test_a_passing_test_with_no_output_has_the_same_minimal_shape": 1,
|
|
"test_a_real_recommendation_carries_no_such_notice": 1,
|
|
"test_a_rename_that_stored_nothing_leaves_the_context_name_alone": 1,
|
|
"test_a_side_effect_only_arm_that_ran_to_completion_is_still_a_pass": 1,
|
|
"test_a_succeeded_fail_branch_node_in_a_linear_graph_is_still_a_pass": 1,
|
|
"test_a_succeeded_run_that_took_a_branch_and_reached_no_end_is_not_a_pass": 1,
|
|
"test_a_succeeded_run_that_took_a_branch_and_reached_the_end_is_still_a_pass": 1,
|
|
"test_adjustment_submission_requires_new_text": 3,
|
|
"test_an_app_named_by_its_user_is_never_renamed": 1,
|
|
"test_an_empty_recommendation_and_a_capability_gap_use_the_card_and_reply": 1,
|
|
"test_an_empty_recommendation_is_explained_rather_than_shown_blank": 1,
|
|
"test_await_repair_approve_applies_and_waits_for_retest": 1,
|
|
"test_await_repair_ignores_unknown_action": 1,
|
|
"test_await_repair_keep_draft_completes_without_second_confirmation": 1,
|
|
"test_await_repair_refuses_to_apply_an_empty_staged_repair": 1,
|
|
"test_await_repair_says_a_fix_that_would_not_start_is_not_a_stale_fix": 1,
|
|
"test_await_repair_surfaces_a_stale_intent_instead_of_failing_the_session": 1,
|
|
"test_await_repair_undo_reverts": 1,
|
|
"test_await_testdata_mock_leaves_the_endpoint_for_the_form": 1,
|
|
"test_await_testdata_mock_prepares_input_and_advances": 1,
|
|
"test_await_testdata_provided_inputs_used": 1,
|
|
"test_breaker_fires_through_the_handler_although_diagnoses_are_reworded": 1,
|
|
"test_breaker_restarts_when_the_engine_failure_actually_changes": 1,
|
|
"test_build_await_repair_is_waiting_and_projected": 1,
|
|
"test_build_await_testdata_is_waiting_and_projected": 1,
|
|
"test_build_form_fields_whitelists_and_coerces_type": 1,
|
|
"test_build_registry_covers_all_non_terminal_build_states": 1,
|
|
"test_build_registry_maps_capability_check": 1,
|
|
"test_capability_check_automatically_advances_to_goal_analysis": 1,
|
|
"test_capability_check_binds_session_language_in_requirement_prompt": 3,
|
|
"test_capability_check_reads_the_goal_persisted_at_session_creation": 1,
|
|
"test_capability_check_rejects_a_session_without_a_persisted_goal": 1,
|
|
"test_capability_check_renders_agent_fields": 1,
|
|
"test_changed_test_scope_uses_a_localizable_reason": 1,
|
|
"test_confirmed_build_test_uses_saved_input_without_repair_and_returns_to_review": 1,
|
|
"test_continue_adjusting_reaches_resources_without_find_resources_action": 1,
|
|
"test_continue_adjusting_still_reaches_resource_discovery": 1,
|
|
"test_default_build_test_never_passes_consent_even_with_a_pending_reference": 1,
|
|
"test_execution_revert_records_intent_only": 1,
|
|
"test_execution_revert_then_retry_after_revert_reapprove_is_idempotent": 1,
|
|
"test_execution_run_test_advances_to_test_and_repair": 1,
|
|
"test_failed_inventory_is_not_reported_as_no_matching_resources": 1,
|
|
"test_failure_signature_falls_back_to_the_launch_error": 1,
|
|
"test_failure_signature_is_stable_across_reworded_diagnoses": 1,
|
|
"test_failure_signature_is_whitespace_insensitive": 1,
|
|
"test_failure_signature_separates_different_errors_on_one_node": 1,
|
|
"test_failure_signature_separates_the_same_error_on_different_nodes": 1,
|
|
"test_first_build_that_applies_nothing_reports_honestly": 1,
|
|
"test_full_build_flow_file_schema_routes_through_testdata_gate_via_fsm": 1,
|
|
"test_full_build_flow_goal_to_complete": 1,
|
|
"test_full_build_flow_keep_draft_reaches_complete_without_publish": 1,
|
|
"test_goal_analysis_renames_an_app_still_carrying_its_derived_name": 1,
|
|
"test_invalid_requirement_submission_keeps_default_unconfirmed": 6,
|
|
"test_invisible_requirement_specs_cannot_block_the_rendered_form": 1,
|
|
"test_later_planner_questions_return_to_requirements_without_writes": 4,
|
|
"test_launch_error_without_native_proof_never_stages_repair": 1,
|
|
"test_launch_input_error_without_proof_stops_at_review": 1,
|
|
"test_loop_back_reapprove_is_still_idempotent": 1,
|
|
"test_missing_proof_running_result_stops_at_review": 1,
|
|
"test_mock_inputs_route_a_missing_endpoint_back_to_the_testdata_gate": 1,
|
|
"test_no_gap_notice_when_the_agent_reports_no_gap": 1,
|
|
"test_no_rename_callback_wired_costs_no_model_call": 1,
|
|
"test_normalized_select_still_rejects_an_unoffered_answer": 1,
|
|
"test_omitted_optional_input_remains_unconfirmed_and_preserves_its_value": 1,
|
|
"test_plan_approval_approve_builds_graph_and_notifies_once": 1,
|
|
"test_plan_approval_deletes_pre_existing_start_on_from_scratch_build": 1,
|
|
"test_plan_approval_does_not_call_an_unapplicable_graph_a_workflow_that_cannot_start": 1,
|
|
"test_plan_approval_empty_build_surfaces_error_and_keeps_canvas": 1,
|
|
"test_plan_approval_ignores_non_approve_action": 1,
|
|
"test_plan_approval_passes_trusted_text_matching_user_supplied_trusted_text_for": 1,
|
|
"test_plan_approval_records_diagnostics_in_backend_logs": 1,
|
|
"test_plan_approval_surfaces_a_draft_that_would_not_start_instead_of_crashing": 1,
|
|
"test_plan_approval_survives_generator_reusing_the_deleted_placeholder_start_id": 1,
|
|
"test_publish_calls_dify_and_completes_with_text_receipt": 1,
|
|
"test_re_fix_branches_clear_stale_test_input_ref_and_verify_run_id": 1,
|
|
"test_recovery_continue_reruns_interrupted_publish_step": 1,
|
|
"test_recovery_restart_resets_interrupted_step_to_entry_state": 1,
|
|
"test_repair_counter_survives_same_task_recovery_reentry": 1,
|
|
"test_repair_counter_tracks_consecutive_repeats_of_the_same_error": 1,
|
|
"test_repeated_failure_stops_offering_a_repair": 1,
|
|
"test_rendered_requirement_normalization_accepts_the_visible_answer": 3,
|
|
"test_resource_recommendation_confirm_creates_internal_checkpoint_and_plan": 1,
|
|
"test_reverted_retry_returns_to_initial_plan": 1,
|
|
"test_reverted_clarification_clears_old_attempt_before_fresh_build_and_testdata": 1,
|
|
"test_reverted_planning_failure_retains_prior_attempt_context": 1,
|
|
"test_review_continue_adjusting_collects_a_fresh_request_before_planning": 1,
|
|
"test_review_continue_adjusting_then_reapprove_is_idempotent": 1,
|
|
"test_review_keep_draft_completes_without_publish": 1,
|
|
"test_review_publish_advances_to_publish": 1,
|
|
"test_review_revert_records_intent_only": 1,
|
|
"test_run_test_prefill_omits_a_placeholder_credential_but_keeps_other_fields": 1,
|
|
"test_run_test_prefill_omits_a_placeholder_endpoint_but_keeps_other_fields": 1,
|
|
"test_run_test_prefills_the_form_with_mock_values": 1,
|
|
"test_run_test_routes_to_testdata_gate_when_no_input": 1,
|
|
"test_run_test_skips_gate_when_input_prepared": 1,
|
|
"test_run_test_still_asks_when_a_file_is_declared_among_other_variables": 1,
|
|
"test_submitting_requirements_prepares_plan_before_automatic_resource_stage": 1,
|
|
"test_scalar_requirement_submission_preserves_zero_false_and_unbounded_integers": 3,
|
|
"test_submitted_recommendation_or_edit_replans_preserving_prior_answers": 2,
|
|
"test_submitting_requirements_progress_has_monotonic_revisions_for_each_committed_stage": 1,
|
|
"test_test_and_repair_config_failure_still_routes_to_repair_gate": 1,
|
|
"test_test_and_repair_defensive_mock_leaves_the_endpoint_for_the_form": 1,
|
|
"test_test_and_repair_fail_routes_to_await_repair_with_staged_repair": 1,
|
|
"test_test_and_repair_fail_with_no_proposed_repair_still_routes_to_gate": 3,
|
|
"test_test_and_repair_input_failure_routes_to_testdata_gate": 1,
|
|
"test_test_and_repair_model_config_failure_surfaces_without_repair": 1,
|
|
"test_test_and_repair_pass_goes_to_review_with_real_run": 1,
|
|
"test_test_and_repair_reuses_gate_prepared_input_ref": 1,
|
|
"test_test_and_repair_reuses_persisted_inputs_on_retest": 1,
|
|
"test_test_and_repair_run_draft_raises_captures_error_on_run": 1,
|
|
"test_test_and_repair_run_draft_raises_routes_to_await_repair_failed": 1,
|
|
"test_test_and_repair_stops_offering_a_repair_through_the_handler": 1,
|
|
"test_the_card_is_still_emitted_when_nothing_matched": 1,
|
|
"test_the_context_records_the_name_the_database_actually_took": 1,
|
|
"test_the_empty_recommendation_description_is_localizable": 1,
|
|
"test_the_test_result_card_names_the_dify_run_so_the_canvas_is_reachable_later": 1,
|
|
"test_unknown_outcome_requires_review_on_every_attempt": 1,
|
|
"test_wrong_scalar_requirement_types_cannot_replan": 5,
|
|
}
|
|
a4_expected["tests.unit_tests.core.dify_builder.test_handlers_edit"] = {
|
|
"test_connect_existing_form_selection_reaches_plan_and_real_intent_guard": 2,
|
|
"test_disconnected_tool_failure_surfaces_current_checklist_and_bounded_exit": 1,
|
|
"test_edit_capability_check_renders_agent_fields": 1,
|
|
"test_edit_test_fail_with_no_proposed_repair_still_routes_to_gate": 3,
|
|
"test_re_fix_branches_clear_stale_test_input_ref_and_verify_run_id": 1,
|
|
"test_same_goal_capability_reentry_preserves_repair_budget": 1,
|
|
"test_sufficient_goal_reaches_plan_gate_or_actionable_retry_with_monotonic_progress": 2,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_conversation_tasks"] = {
|
|
"test_new_task_after_completion_resets_native_failure_budget": 1,
|
|
"test_known_failed_run_allows_fresh_form_without_reusing_consent": 2,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_initialization_recovery"] = {
|
|
"test_root_metadata_failure_is_sealed_but_other_worker_failures_remain_unknown": 9,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_initialization_runtime"] = {
|
|
"test_real_root_graph_failure_proves_no_execution_only_before_first_preparation": 2,
|
|
"test_real_graph_failure_is_saved_once_and_same_input_recovery_does_not_dispatch": 1,
|
|
"test_repaired_metadata_and_fresh_input_execute_new_native_run_without_replaying_failure": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_execution_recovery_messages"] = {
|
|
"test_preparation_failure_localizes_reason_and_retains_machine_evidence": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_dify_port_preflight"] = {
|
|
"test_a_node_the_healer_touched_is_still_not_a_node_this_batch_wrote": 1,
|
|
"test_a_pre_existing_broken_node_the_repair_does_not_touch_does_not_veto_it": 1,
|
|
"test_a_preflight_rejection_is_the_core_draft_would_not_start_error": 1,
|
|
"test_a_repair_that_heals_the_broken_node_is_written": 1,
|
|
"test_a_repair_that_leaves_its_own_culprit_invalid_is_refused_not_applied": 1,
|
|
"test_a_repair_that_only_half_fixes_the_node_it_wrote_is_refused_too": 1,
|
|
"test_a_repair_that_would_not_start_is_rejected_before_it_is_written": 1,
|
|
"test_apply_repair_canonicalizes_an_ascii_comparison_operator_before_the_preflight": 1,
|
|
"test_apply_repair_coerces_a_numeric_condition_value_before_the_preflight": 1,
|
|
"test_apply_repair_counts_a_node_the_chokepoint_normalizer_heals_as_changed": 1,
|
|
"test_apply_repair_fills_http_body_item_types_before_the_preflight": 1,
|
|
"test_apply_repair_heals_an_authorization_without_type_and_writes": 1,
|
|
"test_apply_repair_preserves_unrelated_existing_numeric_http_operator_exemption": 1,
|
|
"test_apply_repair_refuses_numeric_http_status_string_operator_before_sync": 1,
|
|
"test_apply_repair_rejects_a_crashing_node_it_cannot_heal_instead_of_raising_it": 1,
|
|
"test_apply_repair_reuses_full_existing_node_and_reports_only_actual_wiring": 1,
|
|
"test_apply_repair_still_rejects_an_ambiguous_equality_operator": 1,
|
|
"test_apply_repair_unwraps_a_nested_parameter_extractor_query_before_the_preflight": 1,
|
|
"test_apply_repair_writes_a_template_transform_the_llm_created_without_variables": 1,
|
|
"test_direct_write_allows_edge_only_wiring_without_retrieval_config_changes": 1,
|
|
"test_direct_write_preserves_already_present_create_replay": 3,
|
|
"test_direct_write_refuses_disguised_type_conversion": 4,
|
|
"test_direct_write_refuses_first_phase_additions_before_sync": 8,
|
|
"test_direct_write_refuses_legacy_agent_to_native_new_agent_conversion": 1,
|
|
"test_direct_write_refuses_retrieval_binding_change": 1,
|
|
"test_direct_write_retains_historical_nodes_and_allows_permitted_repairs": 3,
|
|
"test_reuse_existing_cannot_make_unbound_tool_executable": 1,
|
|
"test_wiring_an_already_broken_node_is_still_written": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_edit_cognition"] = {
|
|
"test_a_batch_refused_twice_still_goes_to_the_gate_where_the_write_refuses_it_loudly": 1,
|
|
"test_a_batch_the_engine_accepts_never_spends_the_reprompt": 1,
|
|
"test_a_first_attempt_the_guards_condemn_surfaces_even_when_the_retry_is_unusable": 1,
|
|
"test_a_model_that_ignores_the_guidance_twice_surfaces_instead_of_writing": 1,
|
|
"test_a_model_that_takes_the_guidance_on_the_retry_is_written_as_normal": 1,
|
|
"test_a_nested_sentinel_in_a_create_node_config_is_refused_too": 1,
|
|
"test_a_purely_structural_rejection_still_falls_back_to_the_first_attempt": 1,
|
|
"test_a_real_value_for_the_same_field_is_still_writable": 1,
|
|
"test_a_retry_that_returns_nothing_usable_falls_back_to_the_first_attempt": 1,
|
|
"test_a_write_carrying_the_sentinel_leaves_the_stored_credential_intact": 1,
|
|
"test_analyze_impact_non_list_target_node_ids_degrades_without_raising": 1,
|
|
"test_analyze_impact_none_model_degrades": 1,
|
|
"test_analyze_impact_provider_error_degrades": 1,
|
|
"test_analyze_impact_reconciles_boolean_value_with_field_type": 1,
|
|
"test_analyze_impact_returns_fields_values_targets": 1,
|
|
"test_approved_existing_orphan_requires_complete_path_or_refusal": 6,
|
|
"test_approved_insertion_corrects_missing_wiring_once": 3,
|
|
"test_approved_insertion_rejects_or_corrects_fully_wired_wrong_anchors": 8,
|
|
"test_approved_intentional_parallel_span_keeps_existing_path": 1,
|
|
"test_approved_plan_keeps_intentional_or_unrelated_isolated_draft": 2,
|
|
"test_assessment_has_candidate_node_metadata_and_full_plan": 1,
|
|
"test_build_edit_intents_degrades_to_empty_on_none": 1,
|
|
"test_build_edit_intents_non_list_intents_degrades_to_empty": 1,
|
|
"test_build_edit_intents_partial_reject_keeps_first_attempt_when_retry_still_fails": 1,
|
|
"test_build_edit_intents_partial_reject_retries_once_then_recovers_both": 1,
|
|
"test_build_edit_intents_provider_error_degrades_to_empty": 1,
|
|
"test_build_edit_intents_puts_the_target_config_in_the_prompt": 1,
|
|
"test_build_edit_intents_quotes_the_engines_refusal_of_the_previous_attempt": 1,
|
|
"test_build_edit_intents_reprompts_on_a_node_the_engine_would_refuse_and_recovers": 1,
|
|
"test_build_edit_intents_total_reject_reprompts_then_recovers": 1,
|
|
"test_build_edit_intents_total_reject_twice_returns_empty": 1,
|
|
"test_build_edit_intents_validates_and_drops_bad": 1,
|
|
"test_build_edit_intents_with_no_targets_falls_back_to_the_plain_context": 1,
|
|
"test_bypass_detection_respects_original_edge_handles": 2,
|
|
"test_edit_checks_paths_through_multiple_added_nodes": 1,
|
|
"test_edit_corrects_retained_bypass_before_returning_insertion": 1,
|
|
"test_edit_does_not_accept_unassessed_bypass": 3,
|
|
"test_edit_exposes_approved_insertion_plan_and_preserves_receipt_contract": 1,
|
|
"test_edit_keeps_explicit_parallel_path": 1,
|
|
"test_edit_plan_sees_existing_workflow_inputs_and_outputs": 1,
|
|
"test_edit_receives_stop_policy_and_preserves_known_error_strategy": 1,
|
|
"test_edit_refuses_partial_added_node_when_its_wiring_is_rejected": 2,
|
|
"test_edit_refuses_still_condemned_bypass": 2,
|
|
"test_edit_retry_can_correct_added_node_wiring_to_existing_anchor": 1,
|
|
"test_edit_retry_cannot_remove_rejected_wiring_and_keep_same_isolated_addition": 1,
|
|
"test_edit_rule_labels_receive_explicit_session_language_and_preserve_business_value": 1,
|
|
"test_edit_still_allows_intentional_isolated_draft_addition": 1,
|
|
"test_existing_orphan_correction_cannot_recreate_away_canvas_metadata": 1,
|
|
"test_graph_context_does_not_take_the_extra_hop_past_a_plain_target": 1,
|
|
"test_graph_context_inlines_the_target_nodes_cases_verbatim": 1,
|
|
"test_graph_context_leaves_a_non_target_non_neighbour_as_one_line": 1,
|
|
"test_graph_context_legend_warns_the_model_off_writing_the_sentinel_back": 1,
|
|
"test_graph_context_lists_branch_handles_and_a_named_edge_handle": 1,
|
|
"test_graph_context_marks_an_oversized_node_config_as_truncated": 1,
|
|
"test_graph_context_omits_keys_still_at_their_type_default": 1,
|
|
"test_graph_context_omits_the_two_dozen_default_keys_of_an_http_node": 1,
|
|
"test_graph_context_plain_edge_has_no_handle_suffix": 1,
|
|
"test_graph_context_reaches_the_aggregator_two_hops_past_a_branch_target": 1,
|
|
"test_graph_context_skips_a_config_line_that_would_only_repeat_the_summary": 1,
|
|
"test_graph_context_withholds_an_api_key_behind_the_sentinel": 1,
|
|
"test_graph_context_withholds_header_and_param_values_but_keeps_their_names": 1,
|
|
"test_graph_context_without_targets_keeps_todays_one_line_form": 1,
|
|
"test_insertion_only_retry_preserves_valid_new_node_config": 1,
|
|
"test_insertion_retry_cannot_drop_or_reclassify_the_required_path": 2,
|
|
"test_no_previous_refusal_leaves_the_prompt_exactly_as_it_was": 1,
|
|
"test_op_schema_mentions_source_handle_for_branch_connects": 1,
|
|
"test_op_schema_teaches_the_array_and_operator_rules_the_engine_enforces": 1,
|
|
"test_propose_edit_plan_bullets": 1,
|
|
"test_propose_edit_plan_non_list_plan_returns_no_approvable_plan": 1,
|
|
"test_propose_edit_plan_none_model_returns_no_approvable_plan": 1,
|
|
"test_propose_edit_plan_provider_error_returns_no_approvable_plan": 1,
|
|
"test_redaction_does_not_mutate_the_live_graph": 1,
|
|
"test_sufficient_impact_retains_original_request_without_a_confirmation_field": 1,
|
|
"test_the_corrective_reprompt_quotes_the_engines_own_words": 1,
|
|
"test_the_drafts_pre_existing_problems_do_not_spend_the_reprompt": 1,
|
|
"test_the_engines_text_separates_two_refusals_the_preflight_key_cannot": 1,
|
|
"test_the_previous_refusal_stays_in_front_of_the_model_through_the_retry": 1,
|
|
"test_truncation_names_the_keys_it_dropped": 1,
|
|
"test_unavailable_assessment_does_not_authorize_a_bypass": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_graph_ops"] = {
|
|
"test_insert_between_can_reuse_complete_existing_node_and_replay_without_duplicates": 1,
|
|
"test_reuse_existing_insertion_preserves_unrelated_edges_and_exact_branch_handle": 1,
|
|
"test_reuse_existing_insertion_rejects_invalid_or_ambiguous_request": 15,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_build_presentation"] = {
|
|
"test_duplicate_titles_preserve_distinct_changed_identities": 1,
|
|
"test_missing_or_internal_titles_use_native_type": 8,
|
|
"test_noop_does_not_claim_proposed_creates_were_applied": 2,
|
|
"test_removed_and_existing_nodes_use_before_graph_native_types": 1,
|
|
"test_summary_bounds_long_multiline_markdown_titles_and_many_nodes": 1,
|
|
"test_summary_uses_actual_titles_without_mutating_technical_evidence": 1,
|
|
"test_unknown_native_type_uses_generic_label": 4,
|
|
}
|
|
a4_expected["tests.unit_tests.core.dify_builder.test_planning_source"] = {
|
|
"test_empty_plan_preserves_context_and_stays_at_its_waiting_gate": 3,
|
|
"test_resource_discovery_uses_persisted_session_language": 8,
|
|
"test_runtime_cognition_receives_full_original_goal_and_confirmed_requirements": 4,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_native_agent_catalog"] = {
|
|
"test_agent_contract_reaches_planning_without_private_soul_values": 3,
|
|
"test_agent_discovery_never_repairs_unknown_malformed_or_stale_full_ids": 8,
|
|
"test_agent_discovery_refuses_ambiguous_short_identity": 1,
|
|
"test_agent_discovery_returns_current_canonical_identity_and_selected_reason": 3,
|
|
"test_agent_only_legacy_or_malformed_reason_response_is_not_a_false_no_match": 4,
|
|
"test_agent_reason_cannot_select_an_unchosen_candidate": 1,
|
|
"test_agent_recommendation_preserves_selection_with_an_unavailable_reason_note": 14,
|
|
"test_catalog_public_version_matches_native_visible_history_with_hidden_revisions": 4,
|
|
"test_catalog_source_failure_is_not_an_empty_catalog": 1,
|
|
"test_catalog_without_native_visible_version_labels_only_the_snapshot_revision": 1,
|
|
"test_changed_agent_selection_cannot_silently_rebind": 1,
|
|
"test_confirmed_agent_is_revalidated_directly_after_catalog_page_movement": 3,
|
|
"test_missing_tool_credentials_remain_discoverable_with_setup_status": 1,
|
|
"test_native_catalog_filters_before_pagination": 1,
|
|
"test_projection_is_published_and_output_contract_is_honest": 1,
|
|
"test_projection_rejects_cross_owner_snapshot": 1,
|
|
"test_public_roster_description_is_an_honest_capability_fallback": 3,
|
|
"test_selected_agent_uses_existing_resource_option_and_fresh_binding": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_recovery"] = {
|
|
"test_conflict_restart_reanalyzes_saved_edit_goal_without_a_send_choice": 1,
|
|
"test_restart_same_goal_and_executable_graph_keeps_repeated_failure_budget": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_resource_grounding"] = {
|
|
"test_ambiguous_resources_have_no_automatic_choice": 1,
|
|
"test_blank_editor_node_remains_an_explicit_unconfigured_placeholder": 1,
|
|
"test_catalogue_failure_is_distinct_from_successful_empty": 1,
|
|
"test_changed_model_requires_exact_catalogue_identity_and_confirmed_choice": 1,
|
|
"test_configuration_failure_keeps_selected_resource_and_requests_a_plan_change": 1,
|
|
"test_edit_gate_resolves_resource_choices_before_asking_for_plan": 1,
|
|
"test_edit_resource_form_uses_canonical_unique_match": 1,
|
|
"test_existing_build_plugin_selection_uses_the_same_exact_tool_identity": 1,
|
|
"test_explicit_unbound_tool_draft_does_not_offer_a_concrete_resource": 1,
|
|
"test_explicit_unchanged_target_must_match_its_confirmed_resource": 1,
|
|
"test_explicitly_deprecated_models_are_not_candidates": 1,
|
|
"test_installed_unauthorized_tool_can_bind_for_later_setup": 1,
|
|
"test_malformed_resource_request_does_not_crash_edit_preparation": 1,
|
|
"test_missing_candidate_from_failed_source_is_not_reported_as_absent": 1,
|
|
"test_missing_choice_returns_to_edit_form_instead_of_failed_task": 1,
|
|
"test_model_binding_uses_exact_source_ids_without_claiming_live_health": 1,
|
|
"test_model_mode_declaration_change_invalidates_shown_choice": 1,
|
|
"test_named_missing_resource_is_explained_before_approval": 4,
|
|
"test_named_missing_resource_never_offers_unrequested_alternatives": 2,
|
|
"test_native_noop_rechecks_explicit_resource_choice_before_transaction": 1,
|
|
"test_open_resource_discovery_still_offers_available_choices": 1,
|
|
"test_partial_tool_catalogue_retains_verified_entries_and_source_failure": 1,
|
|
"test_real_edit_agent_discovers_actor_scoped_resource_choices": 1,
|
|
"test_real_write_boundary_rechecks_workspace_before_opening_write_transaction": 1,
|
|
"test_replacing_tool_rejects_parameters_not_declared_by_selected_action": 1,
|
|
"test_resource_cognition_receives_configuration_and_unknown_health_facts": 1,
|
|
"test_resource_removed_after_form_creation_is_rejected_before_planning": 1,
|
|
"test_resource_version_change_requires_new_choice_and_plan": 1,
|
|
"test_revising_goal_recovers_from_missing_resource_form": 6,
|
|
"test_selected_model_preserves_declared_mode_for_compatibility": 1,
|
|
"test_selected_tool_binding_contains_native_required_public_fields": 1,
|
|
"test_tool_schema_change_invalidates_confirmed_choice": 1,
|
|
"test_two_confirmed_resources_cannot_be_swapped_between_target_nodes": 1,
|
|
"test_unavailable_resource_public_form_recovers_from_fresh_catalogue_without_losing_request": 4,
|
|
"test_unbound_draft_flag_cannot_skip_a_requested_concrete_resource": 2,
|
|
"test_unbound_tool_draft_cannot_be_newly_connected_without_configuration": 1,
|
|
"test_unbound_tool_draft_preserves_only_unchanged_historical_nodes": 4,
|
|
"test_unrelated_old_resource_does_not_block_other_edits": 1,
|
|
"test_visible_model_without_configuration_is_not_ready": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_serde"] = {
|
|
"test_repair_loop_fields_default_when_absent": 1,
|
|
"test_repair_loop_fields_round_trip": 1,
|
|
}
|
|
# Actual Local insertion assessment must retain satisfied placements.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_edit_cognition"].update(
|
|
{
|
|
"test_local_preserved_start_is_not_an_invented_insertion_requirement": 2,
|
|
"test_requested_placement_is_checked_from_actual_graph_facts": 1,
|
|
"test_repeated_legacy_assessment_refuses_without_inventing_requested_edges": 1,
|
|
}
|
|
)
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_scope_deadline": {
|
|
"test_admission_deadline_uses_stricter_existing_cap_without_renewal": 6,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_unconsumed_failure": {
|
|
"test_failed_exact_source_seals_unconsumed_attempt_and_preserves_completed_results": 2,
|
|
"test_restored_real_permit_then_expired_preparation_reconciles_original_run_on_get": 1,
|
|
"test_real_physical_claim_and_terminal_settlement_serialize_on_existing_owner": 2,
|
|
"test_failure_settlement_refuses_ambiguous_or_changed_evidence": 16,
|
|
"test_optional_terminal_proof_failure_does_not_block_original_resume_settlement": 3,
|
|
"test_stranded_fixture_restores_real_storage_after_patch_owner_teardown": 1,
|
|
"test_periodic_worker_settles_original_unused_failure_without_public_get_or_replay": 2,
|
|
"test_periodic_worker_excludes_unproven_unknown_candidates": 6,
|
|
"test_periodic_worker_beat_routes_registered_task_to_builder_consumer_queue": 1,
|
|
},
|
|
}
|
|
)
|
|
# ENG-1240: frozen safe model diagnostics; retain every earlier exact inventory.
|
|
for module, functions in {
|
|
"tests.unit_tests.controllers.inner_api.agent.test_llm": {
|
|
"test_native_model_failure_stage_survives_real_gateway_without_private_text": 14,
|
|
"test_native_model_failure_decoder_rejects_untrusted_text": 9,
|
|
"test_native_model_failure_codec_preserves_all_fixed_stage_category_pairs": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_agent_model_result_canonical": {
|
|
"test_closed_model_stream_preserves_generator_exit_and_unknown_without_diagnostic": 1,
|
|
"test_model_diagnostic_observer_failure_preserves_original_owner_exception": 2,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_trace_diagnostics": {
|
|
"test_native_model_projection_is_fixed_and_does_not_copy_exception_metadata": 1,
|
|
"test_current_native_diagnostic_merge_is_bounded_and_deduplicated": 1,
|
|
"test_native_model_projection_keeps_allowlisted_stage_and_category": 10,
|
|
"test_native_model_projection_rejects_malformed_classification": 4,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_native_live_stream": {
|
|
"test_current_model_failure_diagnostic_is_stable_owned_and_readonly": 2,
|
|
"test_native_model_diagnostic_owner_drift": 12,
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, a3_expected.get(module, {}).copy()).update(functions)
|
|
# ENG-1240: additive waiting-binding retention and fair maintenance inventory.
|
|
for module, functions in {
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion": {
|
|
"test_waiting_binding_retention_is_health_only_and_fails_closed": 24,
|
|
"test_waiting_binding_task_selects_bounded_owned_wait_without_recovery": 1,
|
|
"test_profiled_retention_only_forwards_the_confirmed_owner": 2,
|
|
"test_waiting_binding_cursor_reaches_101st_owner_after_a_blocked_prefix": 3,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_reconcile": {
|
|
"test_waiting_binding_retention_has_own_one_minute_schedule": 2,
|
|
"test_waiting_binding_task_has_a_finite_wall_time_budget": 1,
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, a3_expected.get(module, {}).copy()).update(functions)
|
|
# Promote the previously unguarded reconciler module with its full inventory.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_reconcile"] = {
|
|
"test_reconcile_flags_stale_working_session_with_no_live_lock": 1,
|
|
"test_reconcile_empty_sweep_when_nothing_stale": 1,
|
|
"test_reconcile_settles_stranded_confirmed_launch_without_redispatch": 1,
|
|
"test_reconcile_skips_confirmed_launch_while_its_lease_is_live": 1,
|
|
"test_stranded_observation_and_settlement_close_sql_before_redis": 1,
|
|
"test_waiting_binding_retention_has_own_one_minute_schedule": 2,
|
|
"test_waiting_binding_task_has_a_finite_wall_time_budget": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.core.workflow.generator.test_template_generation"] = {
|
|
"test_generated_template_correction_reaches_native_aliases": 2,
|
|
"test_invalid_template_exhausts_shared_correction_budget_without_graph": 4,
|
|
"test_valid_native_jinja_is_preserved_without_rendering_or_alias_guessing": 9,
|
|
"test_kept_historical_template_bypasses_generated_syntax_validation": 1,
|
|
}
|
|
# ENG-1236: exact shared representation and strict sample generation inventory.
|
|
a4_expected["tests.unit_tests.services.workflow_generation.test_runner"].update(
|
|
{
|
|
"test_output_representations_reach_both_builders_without_changing_runtime_data": 1,
|
|
"test_unusable_representation_metadata_preserves_names_only_prompts": 3,
|
|
"test_representation_contracts_preserve_parallel_call_count_and_public_events": 1,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_mock_inputs"] = {
|
|
"test_generate_uses_llm_values_keyed_by_variable": 1,
|
|
"test_generate_degrades_to_typed_defaults_on_boom": 1,
|
|
"test_generate_degrades_on_none_model": 1,
|
|
"test_generate_empty_schema_is_empty_inputs": 1,
|
|
"test_all_mock_input_paths_ground_prompt_in_current_business_context": 6,
|
|
"test_business_context_preserves_existing_type_fallbacks": 5,
|
|
"test_json_text_samples_are_serialized_once_for_declared_text_fields": 1,
|
|
"test_malformed_outer_json_is_corrected_before_nested_values_are_used": 1,
|
|
"test_invalid_generated_content_gets_one_correction": 7,
|
|
"test_outer_and_inner_failures_share_two_completion_budget": 1,
|
|
"test_legacy_strings_and_nontext_values_keep_their_original_representation": 1,
|
|
"test_explicit_json_string_is_validated_without_reserializing": 1,
|
|
"test_json_text_metadata_cannot_reinterpret_a_nontext_field": 1,
|
|
}
|
|
a4_expected["tests.unit_tests.core.workflow.generator.test_output_contracts"] = {
|
|
"test_contracts_bind_to_normalized_declared_names_and_skip_kept_producers": 1,
|
|
"test_malformed_contracts_degrade_to_names_only": 6,
|
|
"test_bad_entries_do_not_discard_valid_siblings": 5,
|
|
"test_contracts_are_capped_at_ten_producers_and_six_outputs": 1,
|
|
"test_representations_preserve_generic_units_scale_shape_and_timezone": 4,
|
|
}
|
|
# SSE startup observation: defer only the owned pre-initialization window.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_native_live_stream"].update(
|
|
{
|
|
"test_startup_stream_defers_only_until_sql_root_initialization": 9,
|
|
"test_session_stream_relays_buffered_commands_and_native_state_on_one_subscription": 1,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_stream_frames"].update(
|
|
{
|
|
"test_stream_defers_initializing_observation_until_real_view": 2,
|
|
"test_stream_surfaces_projection_policy_refusal_as_terminal_error": 2,
|
|
}
|
|
)
|
|
# Risk wording keeps unknown isolation separate from a destructive verdict.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_agent_operation_owner"].update(
|
|
{
|
|
"test_prepare_actual_call_freezes_builder_reasoning_without_business_or_oauth": 8,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.native_testing.test_agent_risk_assessor"].update(
|
|
{
|
|
"test_risk_rubric_separates_observed_destruction_from_uncertain_side_effects": 1,
|
|
}
|
|
)
|
|
# Exact additions from native cancellation, fix risk preparation and complete-goal handling.
|
|
for module, functions in {
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion": {
|
|
"test_cancel_control_repause_uses_real_workflow_stop_owner": 69,
|
|
"test_cancel_before_queued_resume_claim_stops_original_pause": 10,
|
|
"test_running_cancel_observes_native_cancelled_child_without_rewriting_failed_parent": 32,
|
|
"test_revocation_before_child_terminal_consumption_observes_original_cancelled_child": 12,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_code_risk_preparation": {
|
|
"test_fix_preparation_assesses_without_business_goal_and_keeps_native_confirmation": 6,
|
|
"test_fix_risk_failure_keeps_code_simulated": 8,
|
|
"test_fix_risk_snapshot_cannot_authorize_changed_execution": 6,
|
|
"test_empty_nonfix_context_cannot_acquire_code_assessment": 7,
|
|
"test_malformed_persisted_fix_context_remains_unavailable": 6,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_test_actions": {
|
|
"test_native_metadata_read_does_not_construct_private_command_owner": 1,
|
|
"test_native_command_keeps_owner_authorization_after_metadata_check": 3,
|
|
"test_native_command_projects_private_disclosure_only_after_execution": 2,
|
|
"test_native_metadata_read_selects_only_current_owned_input": 1,
|
|
},
|
|
"tests.unit_tests.core.dify_builder.test_handlers_build": {
|
|
"test_complete_goal_automatically_reaches_resources_without_a_requirements_submission": 2,
|
|
"test_complete_goal_without_a_usable_plan_fails_explicitly_without_an_empty_form": 1,
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, a3_expected.get(module, {}).copy()).update(functions)
|
|
# ENG-1386: exact collected functions and parameters, including the actor contract.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_knowledge_inventory": {
|
|
"test_no_actor_never_returns_tenant_catalogue": 1,
|
|
"test_legacy_access_uses_actual_member_and_positive_partial_grants": 1,
|
|
"test_nonmember_or_cross_workspace_actor_returns_no_names": 2,
|
|
"test_rbac_uses_native_whitelist_and_exact_resource_permissions": 1,
|
|
"test_permission_use_does_not_imply_metadata_preview": 1,
|
|
"test_rbac_maintainer_retains_native_visibility_and_use_without_batch_grants": 2,
|
|
"test_rbac_failure_is_unavailable_not_tenantwide_or_successful_empty": 1,
|
|
"test_empty_knowledge_is_discoverable_but_not_runtime_readiness": 1,
|
|
"test_document_status_metadata_ignores_disabled_and_archived_content": 1,
|
|
"test_inventory_reads_only_authorized_metadata_columns": 1,
|
|
"test_native_legacy_role_visibility_is_retained": 2,
|
|
"test_banned_account_cannot_discover_metadata": 1,
|
|
"test_indexed_and_failed_document_metadata_remains_discovery_only": 2,
|
|
"test_tags_are_authorized_tenant_metadata_only": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_knowledge_discovery": {
|
|
"test_explicit_knowledge_waiver_can_clarify_business_rules_before_replanning": 1,
|
|
"test_only_dataset_is_recommended_as_nonexecuting_preference": 1,
|
|
"test_knowledge_confirmation_is_metadata_only_and_never_replans": 1,
|
|
"test_revoked_or_missing_selected_knowledge_refuses_entire_selection": 2,
|
|
"test_handler_remembers_preference_but_waits_without_checkpoint_or_plan_approval": 1,
|
|
"test_unoffered_knowledge_id_never_reaches_reconciliation": 1,
|
|
"test_mixed_unoffered_knowledge_id_does_not_silently_keep_model": 1,
|
|
"test_selected_knowledge_cannot_be_unchecked_into_a_silent_executable_substitute": 1,
|
|
"test_metadata_confirmation_does_not_even_resolve_a_cognition_model": 1,
|
|
"test_source_failure_never_uses_a_retained_dataset_as_authority": 1,
|
|
"test_real_agent_and_handler_wait_without_any_workflow_or_model_side_effect": 1,
|
|
"test_real_discovery_card_persists_its_exact_knowledge_allowlist": 1,
|
|
"test_reconfirmation_rechecks_permission_even_after_preference_was_recorded": 1,
|
|
"test_first_decline_asks_explicit_goal_change_instead_of_approving": 2,
|
|
"test_knowledge_catalogue_failure_without_selected_id_cannot_approve": 1,
|
|
"test_model_only_confirmation_does_not_ask_to_waive_an_explicitly_excluded_knowledge_goal": 1,
|
|
"test_mixed_or_uncertain_source_cannot_bypass_handler_with_false_model_hint": 8,
|
|
"test_refusing_goal_change_keeps_knowledge_wait_and_never_replans": 1,
|
|
"test_explicit_goal_change_is_traceable_and_allows_no_knowledge_plan": 1,
|
|
"test_forged_or_old_decision_field_does_not_modify_goal": 1,
|
|
"test_public_description_is_bounded_escaped_data_in_same_discovery_call": 1,
|
|
"test_replaying_resolved_scope_card_does_not_reauthorize_or_replan": 1,
|
|
"test_decision_is_rejected_after_goal_task_or_actor_changes": 2,
|
|
"test_real_discovery_empty_or_failed_source_cannot_authorize_omission": 4,
|
|
"test_excluded_resource_list_reaches_formal_plan_without_a_knowledge_waiver": 3,
|
|
"test_excluded_resource_list_never_disables_server_or_model_source_guards": 3,
|
|
"test_no_extra_components_resource_list_reaches_plan_without_changing_the_original_goal": 1,
|
|
"test_full_captured_bare_resource_exclusion_reaches_plan_without_a_knowledge_waiver": 1,
|
|
"test_captured_meeting_model_only_confirmation_preserves_goal_without_a_knowledge_waiver": 1,
|
|
"test_nonbare_knowledge_item_keeps_handler_clarification_with_false_model_hint": 6,
|
|
"test_shared_source_predicate_keeps_handler_clarification_with_false_model_hint": 5,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_requirement_provenance": {
|
|
"test_actual_fresh_analysis_ignores_only_unconfirmed_derived_source_summary": 1,
|
|
"test_explicitly_submitted_source_values_and_defaults_remain_guarded": 4,
|
|
"test_only_present_offered_payload_keys_are_confirmed_and_current_values_are_used": 1,
|
|
"test_raw_goal_without_complete_explicit_exclusion_keeps_full_requirements_guard": 4,
|
|
"test_unknown_malformed_or_missing_key_provenance_never_drops_the_source_guard": 6,
|
|
"test_missing_confirmed_key_fails_closed_even_without_another_source_value": 1,
|
|
"test_fresh_provenance_never_waives_other_server_source_guards": 4,
|
|
"test_confirmation_provenance_roundtrips_without_aliasing": 3,
|
|
"test_malformed_serialized_provenance_decodes_as_legacy_unknown": 6,
|
|
"test_missing_serialized_provenance_stays_unknown_after_a_later_submission": 1,
|
|
"test_reanalysis_replaces_stale_confirmation_provenance": 1,
|
|
"test_new_task_reset_cannot_reuse_old_confirmation_provenance": 4,
|
|
"test_adjustment_history_retains_confirmed_source_after_request_is_cleared": 1,
|
|
"test_clear_discards_confirmation_provenance_at_the_durable_owner": 1,
|
|
"test_fix_activation_clears_provenance_with_replaced_requirements": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_knowledge_source_cue": {
|
|
"test_explicitly_excluded_source_does_not_create_a_knowledge_goal": 11,
|
|
"test_affirmative_mixed_or_uncertain_source_still_requires_clarification": 29,
|
|
"test_requirement_keys_and_nontext_values_do_not_invent_source_use": 6,
|
|
"test_affirmative_requirement_overrides_goal_exclusion": 5,
|
|
"test_captured_agent_only_goal_and_forbidden_resource_list_do_not_invent_knowledge_use": 3,
|
|
"test_direct_add_exclusion_only_discounts_known_resource_categories": 5,
|
|
"test_explicit_resource_exclusion_list_keeps_its_role_when_nested": 3,
|
|
"test_exclusion_lists_never_hide_positive_unknown_or_node_only_requirements": 14,
|
|
"test_captured_no_extra_components_list_does_not_invent_knowledge_use": 2,
|
|
"test_explicit_negative_resource_collection_role_recognizes_bounded_identifier_variants": 8,
|
|
"test_negative_substrings_and_node_collection_keys_never_hide_source_mentions": 14,
|
|
"test_general_resource_list_role_never_skips_unknown_or_positive_children": 9,
|
|
"test_positive_goal_dominates_a_general_negative_resource_list_role": 1,
|
|
"test_full_captured_bare_disallowed_role_does_not_invent_knowledge_use": 2,
|
|
"test_bare_explicit_negative_roles_obtain_collection_meaning_only_from_the_list": 5,
|
|
"test_bare_role_prefixes_still_require_a_complete_identifier": 4,
|
|
"test_bare_negative_roles_do_not_hide_nonlist_unknown_positive_or_nested_values": 9,
|
|
"test_positive_goal_still_dominates_a_bare_negative_resource_role": 1,
|
|
"test_captured_meeting_goal_excludes_knowledge_without_a_goal_change": 2,
|
|
"test_complete_preceding_resource_items_allow_bounded_new_descriptors": 8,
|
|
"test_excluded_knowledge_mention_requires_a_complete_bare_list_item": 12,
|
|
"test_english_source_suffix_prose_is_not_a_bare_excluded_item": 6,
|
|
"test_bare_excluded_item_accepts_end_punctuation_or_list_connector": 7,
|
|
"test_preceding_item_expansion_preserves_unknown_uncertain_and_affirmative_guards": 12,
|
|
"test_compound_source_subject_does_not_hide_a_shared_predicate": 10,
|
|
"test_english_compound_source_subject_requires_complete_exclusion_framing": 6,
|
|
"test_complete_known_suffix_lists_remain_explicit_exclusions": 8,
|
|
"test_new_resource_prefix_does_not_waive_ambiguous_postcomma_prose": 3,
|
|
"test_legacy_independent_postcomma_clause_preserves_explicit_exclusion": 2,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_resources": {
|
|
"test_list_tenant_resources_normalizes_all_three_kinds": 1,
|
|
"test_each_source_degrades_to_empty": 1,
|
|
"test_mixed_failure_partial_success": 1,
|
|
"test_malformed_tool_record_degrades": 1,
|
|
"test_an_unauthorized_tool_is_reported_as_missing_config": 1,
|
|
"test_a_tool_needing_no_credentials_is_ready": 1,
|
|
"test_an_authorized_tool_is_ready": 1,
|
|
"test_authorization_lookup_failure_is_never_reported_ready": 1,
|
|
"test_list_tenant_resources_logs_when_a_source_fails": 1,
|
|
"test_installed_unauthenticated_tool_is_discoverable_as_missing_config": 1,
|
|
"test_configured_no_auth_and_hardcoded_tools_are_ready": 1,
|
|
"test_credential_visibility_follows_the_acting_account": 6,
|
|
"test_without_an_actor_only_team_shared_credentials_count": 1,
|
|
"test_invalid_partial_grants_do_not_make_a_tool_ready": 3,
|
|
"test_legacy_and_colliding_provider_ids_follow_native_normalization": 4,
|
|
"test_other_tenants_rows_and_installs_never_leak": 1,
|
|
"test_an_unverifiable_credential_lookup_reports_not_ready_with_a_reason": 1,
|
|
"test_a_plugin_daemon_outage_keeps_hardcoded_tools_in_the_inventory": 1,
|
|
"test_models_keep_semantics_and_knowledge_inventory_receives_actor": 1,
|
|
},
|
|
}
|
|
)
|
|
# ENG-1426: approved draft replacement and replanning run in this lane in full.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.core.dify_builder.test_replan_apply": {
|
|
"test_changed_owned_code_applies_only_after_fresh_plan_approval_and_reapproval_is_noop": 1,
|
|
"test_replan_collision_refuses_the_whole_batch_before_writing": 5,
|
|
"test_replan_uses_creation_defaults_and_authoritative_node_type_for_generated_fields": 1,
|
|
"test_replan_cannot_write_a_redacted_generated_value": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_initial_chatflow": {
|
|
"test_recognizes_the_console_starter_graph": 1,
|
|
"test_recognition_ignores_automatic_model_and_canvas_initialization": 1,
|
|
"test_configured_drafts_are_never_replaced_as_initial_templates": 10,
|
|
"test_modified_topology_is_not_an_initial_template": 5,
|
|
"test_chatflow_generation_accepts_answer_and_uses_the_actual_mode": 1,
|
|
"test_chatflow_retry_rejects_a_workflow_terminal": 1,
|
|
"test_approved_build_replaces_the_whole_template_and_remains_revertible": 2,
|
|
"test_failed_generation_keeps_the_initial_template": 1,
|
|
"test_chatflow_mode_reaches_planning_capability_checks_and_generation": 1,
|
|
"test_chatflow_planning_and_capability_prompts_use_answer_nodes": 1,
|
|
"test_worker_resolves_the_persisted_app_mode_before_constructing_the_agent": 1,
|
|
"test_rejected_generated_graph_keeps_the_initial_template": 1,
|
|
},
|
|
}
|
|
)
|
|
# Exact first-phase P0 additions; retain all unrelated reviewed cases.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_agent_operation_owner"].update(
|
|
{"test_native_model_permission_expiring_during_metadata_prevents_preparation_and_claim": 1}
|
|
)
|
|
# The latest main merge adds transaction-lifetime witnesses to the existing owner.
|
|
a4_expected["tests.unit_tests.services.test_workflow_run_service"].update(
|
|
{"test_trace_assembly_uses_a_session_from_the_injected_factory": 2}
|
|
)
|
|
a4_expected["tests.unit_tests.core.workflow.generator.test_native_code_output_contract"].update(
|
|
{"test_batch_code_contract_validates_identity_before_grouping": 3}
|
|
)
|
|
knowledge_cases = a4_expected["tests.unit_tests.services.dify_builder.test_knowledge_discovery"]
|
|
del knowledge_cases["test_refusing_goal_change_keeps_knowledge_wait_and_never_replans"]
|
|
knowledge_cases.update(
|
|
{
|
|
"test_named_unready_knowledge_prompt_preserves_discovery_preference": 2,
|
|
"test_named_knowledge_selection_keeps_model_ranking_and_exact_identity": 1,
|
|
"test_named_knowledge_empty_model_selection_never_invents_a_preference": 2,
|
|
"test_selected_knowledge_opens_goal_decision_instead_of_repeating_resource_confirmation": 1,
|
|
"test_refusing_goal_change_keeps_current_actionable_form_and_does_not_repeat_wait_message": 2,
|
|
"test_explicit_goal_change_is_traceable_and_allows_no_knowledge_plan": 4,
|
|
"test_forged_or_old_decision_field_does_not_modify_goal": 2,
|
|
"test_old_decision_version_cannot_waive_after_retaining_goal": 1,
|
|
"test_retained_goal_stays_adjustable_after_sql_stop_resume": 4,
|
|
"test_legacy_goal_form_requires_its_original_generation_before_task_scope_upgrade": 4,
|
|
"test_stale_legacy_form_cannot_restore_for_a_different_goal_task_or_actor": 5,
|
|
"test_required_knowledge_reaches_actor_scoped_discovery_before_executable_planning": 3,
|
|
"test_required_business_answer_is_not_skipped_by_knowledge_discovery": 1,
|
|
"test_excluded_knowledge_goal_keeps_normal_executable_planning": 1,
|
|
"test_preflight_knowledge_selection_waits_until_waiver_then_preserves_business_clarification": 1,
|
|
}
|
|
)
|
|
# P1 privacy, tool consent, MCP and credential attribution: frozen reviewed counts.
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.services.dify_builder.test_diagnostic_context": {
|
|
"test_nested_sensitive_fields_are_redacted_without_hiding_ordinary_key": 6,
|
|
"test_graph_credentials_repeated_in_run_and_output_text_are_removed": 11,
|
|
"test_authorization_scheme_is_removed_when_only_the_token_repeats_in_error": 1,
|
|
"test_falsey_diagnostic_values_are_preserved_in_independent_copies": 1,
|
|
"test_overlapping_credentials_do_not_leave_a_suffix_in_free_text": 1,
|
|
"test_short_graph_credential_does_not_corrupt_an_inserted_sentinel": 1,
|
|
"test_structured_redaction_preserves_exact_sentinels_when_a_credential_matches_part_of_them": 1,
|
|
"test_read_task_dsl_withholds_body_code_nested_and_known_echoes": 1,
|
|
"test_final_prompt_projects_synchronized_dsl_without_mutating_snapshot": 9,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_api_tool_effects": {
|
|
"test_read_shaped_api_name_without_owned_definition_never_runs": 1,
|
|
"test_owned_api_definition_uses_semantic_assessment": 4,
|
|
"test_native_admission_refuses_owned_api_drift_before_decryption": 4,
|
|
"test_confirmation_to_native_tool_recording_transport": 14,
|
|
"test_bound_api_cannot_use_another_credential_version_from_provider_name_cache": 1,
|
|
"test_api_reasoning_withholds_parameter_values_account_version_and_url_secrets": 1,
|
|
"test_missing_api_bindings_never_resolve_ordinary_with_surviving_marker": 6,
|
|
},
|
|
"tests.unit_tests.services.tools.test_mcp_tool_catalogue": {
|
|
"test_cached_mcp_discovery_reads_only_public_columns_and_exact_native_identity": 1,
|
|
"test_mcp_configuration_does_not_borrow_builtin_credentials": 1,
|
|
"test_selected_mcp_binding_rejects_stale_or_foreign_declarations": 5,
|
|
"test_mcp_catalogue_constructs_bound_graph_without_schema_or_identity_guesses": 1,
|
|
"test_search_named_mcp_still_requires_explicit_confirmation": 1,
|
|
"test_bound_mcp_graph_uses_native_tool_adapter_and_end_returns_transport_output": 1,
|
|
"test_empty_or_malformed_mcp_cache_never_fabricates_tools": 3,
|
|
"test_mcp_inventory_failure_is_reported_without_losing_other_tool_sources": 1,
|
|
"test_native_mcp_adapter_rechecks_current_owned_provider_before_dispatch": 3,
|
|
"test_mcp_without_output_declaration_keeps_native_generic_outputs": 1,
|
|
"test_mcp_destructive_evidence_remains_unconfirmable": 1,
|
|
"test_malformed_mcp_action_does_not_hide_other_cached_actions": 1,
|
|
"test_native_identity_collision_keeps_selected_mcp_binding_and_provider": 1,
|
|
"test_colliding_untyped_lookup_refuses_and_routed_catalogue_retains_native_types": 1,
|
|
"test_valid_mcp_sibling_reaches_native_resolver_with_boolean_property_schema": 1,
|
|
"test_collision_namespaced_pinning_and_explicit_type_remain_authoritative": 1,
|
|
"test_authoritative_selector_refuses_complete_alternate_graph_before_hydration": 2,
|
|
"test_generation_refuses_authoritative_selector_before_alternate_builder": 2,
|
|
"test_generic_tool_choice_without_selector_still_generates_installed_tool": 1,
|
|
"test_normalized_authoritative_selectors_never_fall_back_to_prose": 4,
|
|
"test_normalized_valid_typed_selector_binds_exact_identity_despite_unrelated_prose": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_credential_failure_attribution": {
|
|
"test_handler_attributes_global_credentials_to_exact_failed_tool": 6,
|
|
"test_bare_credentials_and_tool_providers_are_not_model_configuration": 4,
|
|
"test_typed_tool_credential_diagnostics_are_bounded": 4,
|
|
"test_observational_tool_fallback_rejects_unbound_or_ambiguous_evidence": 14,
|
|
"test_missing_tool_credentials_do_not_claim_enterprise_policy": 1,
|
|
"test_sealed_credentials_name_resource_kind_without_copying_provider_error": 4,
|
|
"test_credential_scope_uses_only_explicit_typed_cause_and_never_error_text": 1,
|
|
"test_legacy_model_exception_details_are_not_echoed_to_public_copy": 1,
|
|
"test_actual_native_model_configuration_errors_are_recognized": 2,
|
|
"test_native_model_setup_failures_keep_existing_handler_gate_without_graph_repair": 6,
|
|
"test_native_model_setup_matcher_does_not_admit_tool_or_secret_bearing_variants": 4,
|
|
},
|
|
}
|
|
)
|
|
# Source-bound semantic intent: exact captured-negative and safety cases.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_knowledge_source_intent"] = {
|
|
"test_actual_pending_business_form_stop_resume_keeps_logical_task_requirement": 2,
|
|
"test_actual_source_exclusion_survives_sql_stop_resume_and_model_only_confirmation": 1,
|
|
"test_actual_submitted_control_refreshes_intent_in_the_existing_plan_call": 2,
|
|
"test_analysis_preserves_fixed_grounded_source_intent_without_an_extra_call": 1,
|
|
"test_confirmed_bool_source_cannot_match_a_changed_numeric_value": 1,
|
|
"test_established_positive_cannot_be_waived_by_new_model_classification": 3,
|
|
"test_fixed_intent_preserves_semantic_positive_mixed_and_arbitrary_exclusions": 7,
|
|
"test_fresh_semantic_exclusion_does_not_override_independent_source_guards": 3,
|
|
"test_fresh_semantic_exclusion_reaches_both_gates_without_a_waiver": 1,
|
|
"test_invalid_typed_submission_does_not_refresh_or_confirm_a_default": 5,
|
|
"test_missing_or_malformed_semantics_keep_the_conservative_gate": 4,
|
|
"test_missing_or_unknown_refresh_cannot_drop_a_new_typed_source_answer": 2,
|
|
"test_new_logical_task_does_not_inherit_positive_and_old_exclusion_is_stale": 1,
|
|
"test_old_planning_intent_cannot_be_rebound_after_a_new_real_answer": 1,
|
|
"test_planning_clarification_keeps_semantic_metadata_without_extra_calls": 1,
|
|
"test_resume_rejects_inflight_exclusion_stamp_but_preserves_accepted_interpretation": 1,
|
|
"test_retained_source_cannot_be_waived_by_semantic_exclusion": 1,
|
|
"test_semantic_source_survives_the_real_context_json_boundary": 1,
|
|
"test_stale_or_forged_exclusion_cannot_be_rebound_to_new_source": 5,
|
|
}
|
|
a4_expected.update(
|
|
{
|
|
"tests.unit_tests.core.plugin.impl.test_model_readiness": {
|
|
"test_loopback_repeats_only_pinned_credential_free_metadata_after_exact_gateway_failure": 1,
|
|
"test_provider_or_unclassified_metadata_failure_never_authorizes_another_read": 8,
|
|
"test_gateway_metadata_retry_exhaustion_is_bounded": 1,
|
|
"test_generic_http_502_does_not_authorize_metadata_retry": 1,
|
|
"test_revocation_after_first_metadata_response_prevents_retry": 1,
|
|
"test_metadata_schema_for_another_model_fails_closed": 1,
|
|
"test_elapsed_metadata_budget_prevents_another_request": 1,
|
|
"test_blank_or_partial_metadata_heartbeats_cannot_hide_the_body_deadline": 2,
|
|
"test_legitimate_delayed_first_gateway_envelope_still_allows_the_single_metadata_retry": 1,
|
|
"test_metadata_response_byte_limit_does_not_change_other_stream_consumers": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_predefined_model_readiness": {
|
|
"test_qualified_metadata_gate_bypasses_schema_cache_and_preserves_prepared_credentials": 1,
|
|
"test_config_dependent_or_unpinned_models_keep_existing_dispatch_behavior": 5,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_cognition_thread_context": {
|
|
"test_threaded_generation_rechecks_current_policy_without_losing_application_context": 2,
|
|
"test_policy_revoked_during_real_metadata_read_prevents_retry_and_inference": 1,
|
|
"test_cold_static_initial_selection_reaches_fresh_metadata_before_single_uncertain_inference": 2,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_fix_context": {
|
|
"test_repair_prompt_preserves_long_culprit_source_and_binding_contract": 2,
|
|
"test_repair_prompt_names_oversized_source_without_showing_an_incomplete_fragment": 1,
|
|
"test_expanded_repair_context_uses_only_redacted_culprit_config": 1,
|
|
"test_repair_source_budget_counts_utf8_bytes": 2,
|
|
"test_repair_source_surrogate_is_json_escaped": 1,
|
|
"test_preflight_correction_keeps_complete_source_in_both_repair_attempts": 1,
|
|
"test_repair_cannot_replace_a_field_omitted_from_its_context": 6,
|
|
"test_omitted_source_does_not_block_a_visible_unrelated_field_repair": 1,
|
|
"test_diagnosis_sees_complete_current_parser_with_bound_format_facts": 2,
|
|
"test_diagnosis_does_not_expand_unbound_or_mismatched_source": 6,
|
|
"test_diagnosis_expanded_source_redacts_credentials_and_excludes_neighbors": 1,
|
|
"test_diagnosis_oversized_source_is_explicitly_omitted_without_a_prefix": 1,
|
|
"test_code_diagnosis_and_proposal_share_failure_policy_at_source_boundary": 6,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_testdata_code_refresh": {
|
|
"test_initial_file_submission_refreshes_low_risk_code_and_saves_inputs_once": 6,
|
|
"test_new_code_risk_requires_fresh_disclosure_without_saving_or_dispatching": 12,
|
|
"test_prior_effect_approval_prevents_automatic_code_scope_refresh": 3,
|
|
"test_selected_code_checkbox_for_changed_input_still_requires_fresh_consent": 3,
|
|
"test_initial_input_refresh_cannot_silently_accept_a_changed_pure_code_draft": 3,
|
|
"test_initial_code_refresh_rechecks_session_owner_permission": 3,
|
|
"test_draft_change_during_code_reasoning_returns_to_form_without_dispatch": 3,
|
|
"test_invalid_submitted_inputs_are_not_assessed_even_when_the_form_is_regenerated": 18,
|
|
},
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.core.dify_builder.test_handlers_fix"].update(
|
|
{"test_re_fix_selects_only_current_owned_known_native_failure": 19}
|
|
)
|
|
# ENG-1429: bounded planning facts and typed provider observations.
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_trace_diagnostics"].update(
|
|
{
|
|
"test_plan_failure_facts_survive_actual_capture_without_values": 13,
|
|
"test_plan_generic_validation_failure_remains_unknown": 1,
|
|
"test_plan_detail_projection_rejects_private_paths_and_invalid_counts": 1,
|
|
"test_planning_facts_survive_sql_cas_and_public_trace_export": 2,
|
|
}
|
|
)
|
|
a4_expected["tests.unit_tests.services.dify_builder.test_policy_trace_diagnostics"] = {
|
|
"test_policy_wrapped_provider_reason_survives_without_retry_or_secret_projection": 16,
|
|
"test_explicit_setup_refusal_keeps_priority_over_underlying_timeout": 1,
|
|
"test_nested_explicit_causes_preserve_known_reason_and_terminate_cycles": 1,
|
|
"test_diagnostic_cause_walk_is_bounded_and_does_not_use_implicit_context": 1,
|
|
"test_serverless_502_real_plugin_decoder_keeps_bounded_reason_without_replay": 2,
|
|
"test_generic_wrapper_text_cannot_mask_explicit_typed_provider_cause": 2,
|
|
"test_provider_http_status_projection_rejects_untrusted_values": 8,
|
|
"test_provider_http_status_cause_walk_is_bounded_and_explicit": 1,
|
|
}
|
|
# ENG-1392/1410: exact affected-module inventories; retain all existing registrations.
|
|
for module, functions in {
|
|
"tests.unit_tests.core.dify_builder.test_fix_flow": {
|
|
"test_full_fix_flow_request_fix_to_publish_success": 1,
|
|
"test_full_fix_flow_stale_base_version_raises_conflict": 1,
|
|
"test_checklist_entry_flow_wires_diagnose_through_await_recheck_to_decision": 1,
|
|
},
|
|
"tests.unit_tests.core.dify_builder.test_repair_readability": {
|
|
"test_apply_owners_name_real_changed_fields_and_do_not_infer_verification": 6,
|
|
"test_proposal_owners_show_business_title_rationale_and_retest_boundary": 3,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_api_tool_output_context": {
|
|
"test_direct_public_response_schema_stays_separate_from_native_outputs": 1,
|
|
"test_actual_code_model_request_gets_upstream_api_envelope_and_declared_body": 1,
|
|
"test_absent_ambiguous_reference_or_oversized_declaration_never_guesses_body": 6,
|
|
"test_non_upstream_api_is_not_dumped_into_consumer_context": 1,
|
|
"test_deep_schema_is_bounded_without_exposing_partial_guessed_fields": 1,
|
|
"test_response_body_transport_matches_native_object_only_json_message": 3,
|
|
"test_many_relevant_api_nodes_have_bounded_context_and_explicit_omissions": 1,
|
|
"test_api_code_system_rules_resolve_actual_no_filter_plan_and_independent_result_bound": 1,
|
|
"test_api_code_system_rules_do_not_change_unrelated_or_non_code_builders": 3,
|
|
"test_api_code_system_rules_keep_undeclared_shapes_unknown": 2,
|
|
"test_fixed_system_rules_use_context_only_as_gate_without_promoting_workspace_data": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_condition_evidence": {
|
|
"test_diagnosis_shows_active_condition_even_without_historical_binding": 1,
|
|
"test_real_proposal_rejects_an_unknown_evidence_operator_guess": 1,
|
|
"test_same_run_producer_json_type_is_distinct_from_unresolved_if_operand": 8,
|
|
"test_incomplete_or_ambiguous_producer_evidence_stays_unknown": 9,
|
|
"test_native_legacy_fallback_and_explicit_empty_cases": 3,
|
|
"test_historical_graph_does_not_borrow_current_condition_or_schema": 1,
|
|
"test_error_only_credential_is_collected_before_projection_and_truncation": 1,
|
|
"test_all_graphs_and_later_upstream_rows_are_redacted_before_budget": 1,
|
|
"test_projection_budget_discards_whole_conditions_and_marks_unknown": 1,
|
|
"test_real_write_rejects_value_only_noop_that_leaves_observed_mismatch": 1,
|
|
"test_adapter_denies_mismatched_run_before_reading_any_execution": 3,
|
|
"test_adapter_denies_row_identity_before_ephemeral_raw_handling": 4,
|
|
"test_adapter_unavailable_native_evidence_does_not_gain_observed_types": 5,
|
|
"test_real_write_proven_numeric_equality_changes_only_nested_operator": 1,
|
|
"test_actual_write_gate_preserves_threshold_selector_and_ordering": 4,
|
|
"test_real_model_boundary_diagnosis_and_proposal_share_sanitized_types": 1,
|
|
"test_minimal_numeric_equality_repair_preserves_unrelated_invalid_sibling": 1,
|
|
"test_harmless_if_metadata_edit_preserves_valid_comparison": 7,
|
|
"test_malformed_historical_graph_cannot_crash_or_bind_runtime_types": 5,
|
|
"test_real_vet_rejects_equality_transition_with_native_incompatible_expected": 7,
|
|
"test_runtime_build_edit_handlers_bind_native_condition_evidence": 2,
|
|
"test_real_proposal_cannot_bypass_failed_if_gate_via_other_graph_mutations": 5,
|
|
"test_native_run_error_credentials_are_collected_for_ordinary_fix": 1,
|
|
"test_incomplete_or_repeated_execution_scope_cannot_establish_types": 4,
|
|
"test_real_proposal_cannot_claim_value_only_noop_is_an_if_repair": 3,
|
|
"test_quoted_and_expected_credentials_are_collected_before_projection": 4,
|
|
"test_over_budget_execution_identifiers_cannot_escape_context_budget": 1,
|
|
"test_actual_write_refuses_indirect_if_gate_bypass": 3,
|
|
"test_proven_equality_repair_preserves_native_threshold_route": 4,
|
|
"test_runtime_handler_write_reloads_trusted_failed_run_and_refuses_value_only": 3,
|
|
"test_runtime_non_if_fix_keeps_existing_native_write_behavior": 1,
|
|
"test_review_r1_handled_exception_cannot_hide_terminal_failed_if": 3,
|
|
"test_review_r1_r2_unknown_failure_identity_cannot_authorize_producer_rewrite": 10,
|
|
"test_review_r3_historical_if_replaced_by_same_id_code_is_stale": 2,
|
|
"test_review_r4_normalized_explicit_credentials_never_reach_prompts_or_evidence": 15,
|
|
"test_review_r2_missing_history_cannot_use_current_non_if_type": 2,
|
|
"test_review_r2_write_does_not_trust_prior_available_diagnosis": 2,
|
|
"test_review_r2_unavailable_context_rejects_schema_and_routing": 4,
|
|
"test_review_r2_successful_run_cannot_authorize_a_terminal_non_if_repair": 1,
|
|
"test_review_r4_known_credential_repeated_as_failure_identity_is_sanitized": 1,
|
|
"test_review_r4_non_sensitive_wrapper_cannot_hide_explicit_inner_credential": 4,
|
|
"test_review_r2_unregistered_historical_type_cannot_prove_non_if": 2,
|
|
"test_failed_code_format_facts_reach_diagnosis_and_repair_without_values": 1,
|
|
"test_failed_code_format_classifies_only_observed_table_samples": 5,
|
|
"test_code_format_facts_require_unique_failed_historical_code": 5,
|
|
"test_code_format_facts_bound_samples_and_never_traverse_nested_values": 1,
|
|
"test_code_format_facts_do_not_claim_changed_bindings_or_unknown_run": 4,
|
|
"test_code_format_facts_keep_native_row_identity_after_redaction_collisions": 1,
|
|
"test_code_format_facts_bound_input_count_without_exposing_authored_keys": 1,
|
|
"test_code_format_facts_degrade_when_current_graph_is_malformed": 3,
|
|
"test_normal_historical_owner_carries_tool_structure_to_both_requests": 1,
|
|
"test_invalid_unicode_tool_text_cannot_abort_historical_diagnosis_or_proposal": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_llm_agent": {
|
|
"test_is_dify_builder_agent": 1,
|
|
"test_llm_agent_build_methods_delegate_to_build": 1,
|
|
"test_build_methods_call_build_module_with_resolved_model": 1,
|
|
"test_remaining_build_methods_thread_model_and_tenant_args": 1,
|
|
"test_fix_methods_degrade_without_model": 1,
|
|
"test_model_is_resolved_lazily_and_memoized": 1,
|
|
"test_fix_methods_call_fix_module_with_resolved_model": 1,
|
|
"test_model_or_none_swallows_resolution_error": 1,
|
|
"test_llm_agent_generate_mock_inputs_delegates": 1,
|
|
"test_llm_agent_edit_methods_delegate_to_edit": 1,
|
|
"test_edit_methods_call_edit_module_with_resolved_model": 1,
|
|
"test_model_or_none_logs_resolution_failure_once": 1,
|
|
"test_message_reply_delegates_stream_callback": 1,
|
|
"test_initial_plan_defers_catalogue_and_discovery_receives_goal_and_requirements": 1,
|
|
"test_every_tool_owner_receives_the_acting_account": 1,
|
|
"test_an_agent_without_an_actor_passes_none_rather_than_inventing_one": 1,
|
|
"test_repair_public_output_declaration_uses_exact_existing_catalogue_read": 3,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_repair_presentation": {
|
|
"test_proposal_groups_fields_and_bindings_with_business_titles": 1,
|
|
"test_applied_uses_only_result_diff_even_when_proposal_was_larger": 1,
|
|
"test_noop_and_unknown_result_do_not_claim_repairs_applied": 1,
|
|
"test_native_fallback_connections_delete_and_chinese": 1,
|
|
"test_sensitive_nested_values_hostile_markdown_and_bounds": 1,
|
|
"test_unknown_node_uses_id_without_inventing_a_title": 1,
|
|
"test_proposal_bounds_many_distinct_nodes_fields_and_binding_selectors": 1,
|
|
"test_rationale_cannot_echo_opaque_code_or_payloads": 1,
|
|
"test_direct_selector_and_output_schema_explain_bound_field_names": 1,
|
|
"test_multiple_new_nodes_without_ids_keep_separate_native_groups": 1,
|
|
"test_blank_result_title_does_not_replace_native_fallback": 1,
|
|
"test_sensitive_url_schemes_are_case_insensitive": 1,
|
|
"test_dotted_private_proposal_values_are_redacted_without_hiding_field_and_selector_names": 8,
|
|
"test_insertion_names_authoritative_node_and_original_edge_endpoints": 4,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_tool_output_evidence": {
|
|
"test_text_json_and_native_json_remain_distinct_without_values": 1,
|
|
"test_unknown_or_ambiguous_provenance_has_no_tool_shape": 8,
|
|
"test_text_parse_state_and_samples_never_claim_universal_items": 4,
|
|
"test_structure_limits_and_unsafe_dynamic_keys_are_explicit": 1,
|
|
"test_projection_reaches_existing_diagnose_and_propose_requests": 1,
|
|
"test_tool_count_and_combined_byte_limits_report_omissions": 1,
|
|
"test_malformed_tool_identity_is_never_copied_as_runtime_values": 1,
|
|
"test_unsafe_field_names_are_omitted_even_when_they_look_like_identifiers": 9,
|
|
"test_invalid_unicode_text_is_malformed_without_losing_independent_json_structure": 3,
|
|
"test_runtime_data_keys_have_no_field_provenance_in_either_channel": 2,
|
|
"test_anonymous_object_samples_preserve_empty_heterogeneity_and_all_shape_limits": 1,
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, {}).update(functions)
|
|
# ENG-1240: exact additions from affected module collection; retain prior inventories.
|
|
for module, functions in {
|
|
"tests.unit_tests.controllers.inner_api.agent.test_llm": {"test_post_streams_plugin_compatible_envelope": 2},
|
|
"tests.unit_tests.controllers.inner_api.test_agent_runtime_lineage": {
|
|
"test_actual_native_identity_with_all_body_markers_removed_refuses_before_services": 20,
|
|
"test_agent_bearer_refuses_equality_with_existing_enterprise_or_daemon_credential": 2,
|
|
"test_blank_agent_credential_never_authenticates": 3,
|
|
"test_control_handler_itself_cannot_consume_a_physical_permit": 1,
|
|
"test_duplicate_selection_header_cannot_select_a_run": 1,
|
|
"test_expired_runtime_only_admits_existing_result_ack_and_outcome": 4,
|
|
"test_genuine_plugin_and_verified_ordinary_retain_real_knowledge_resource_authorization": 8,
|
|
"test_legacy_plugin_route_never_accepts_agent_bearer": 1,
|
|
"test_legacy_rejects_explicit_native_envelope": 1,
|
|
"test_ordinary_private_identity_rejects_native_envelope_before_service": 2,
|
|
"test_prepare_intent_refusal_logs_only_bounded_policy_category": 2,
|
|
"test_private_read_failure_never_reaches_model_service": 2,
|
|
"test_registered_resumed_config_read_requires_current_bound_exact_owner": 7,
|
|
"test_registered_strict_route_refuses_missing_bearer": 20,
|
|
"test_run_bound_claim_route_reaches_shell_owner_only_after_exact_lineage": 1,
|
|
"test_runtime_admission_cannot_leak_into_a_later_legacy_request_on_shared_app_context": 1,
|
|
"test_runtime_schema_documents_its_distinct_bearer_and_selection": 1,
|
|
"test_strict_initial_control_reaches_exact_s1_owner_without_effect_envelope": 2,
|
|
"test_strict_route_rejects_equal_agent_plugin_credentials": 1,
|
|
"test_strict_route_rejects_wrong_or_mixed_credentials": 4,
|
|
"test_strict_route_requires_complete_bounded_selection": 5,
|
|
"test_strict_route_requires_installed_lineage_even_without_markers": 1,
|
|
"test_transport_selection_refuses_noncanonical_or_duplicate_key_json": 4,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_agent_associations": {
|
|
"test_actual_agent_access_and_publication_guards_precede_private_write": 5,
|
|
"test_actual_allocation_owner_parser_rejects_malformed_scope_and_unknown_proof": 2,
|
|
"test_actual_operation_cursor_finish_is_untouched_by_agent_associations": 1,
|
|
"test_actual_sql_workspace_backend_reference_cannot_drift": 1,
|
|
"test_actual_state_nonempty_bind_wait_final_are_immutable_owned_objects": 1,
|
|
"test_agent_contract_imports_are_pure_without_database_flask_or_backend_sdk": 1,
|
|
"test_agent_run_cannot_alias_workflow_native_run_or_inject_proof_fields": 1,
|
|
"test_backend_generation_seven_cp_local_zero_remains_readable_at_local_two_scope_three": 1,
|
|
"test_blank_home_never_weakens_required_fields_or_pin_equality": 3,
|
|
"test_blank_home_recovery_association_is_data_not_isolated_admission": 1,
|
|
"test_cancellation_metadata_read_ignores_only_expiry": 5,
|
|
"test_checkpoint_association_requires_one_exact_saved_parent_journal": 5,
|
|
"test_commit_checkpoint_rejects_unselected_agent_private_material": 4,
|
|
"test_contract_purity_guard_detects_runtime_dependencies": 9,
|
|
"test_current_local_generation_controls_config_write_without_shared_counter_alias": 1,
|
|
"test_empty_agent_checkpoint_keeps_legacy_private_payload_and_repeat_identity": 1,
|
|
"test_expired_projection_keeps_agent_checkpoint_proof_without_writes": 1,
|
|
"test_lost_post_commit_ack_reuses_existing_selected_checkpoint_without_storage_write": 1,
|
|
"test_missing_actual_workspace_owner_refuses_without_agent_private_write": 1,
|
|
"test_normal_blank_home_association_roundtrip_retains_explicit_none": 1,
|
|
"test_nullable_normal_home_cannot_enter_isolated_workspace_owner": 2,
|
|
"test_parent_locator_rejects_untyped_or_noncanonical_identity": 4,
|
|
"test_protected_read_timing_failure_does_not_change_guard_result": 1,
|
|
"test_pure_association_preserves_distinct_runs_and_no_effect_cursor": 1,
|
|
"test_read_checkpoint_rechecks_selected_outer_metadata_after_private_io": 2,
|
|
"test_read_checkpoint_revalidates_current_agent_private_relations": 6,
|
|
"test_same_logical_key_rejects_changed_agent_material": 4,
|
|
"test_second_distinct_occurrence_cannot_silently_reuse_single_workspace": 1,
|
|
"test_sql_recheck_after_private_io_refuses_drift_before_ack": 3,
|
|
"test_stored_parent_input_owner_rejects_before_agent_write": 4,
|
|
"test_v2_association_validation_reads_selected_config_once": 2,
|
|
"test_v2_single_config_read_keeps_sql_recheck_after_io": 2,
|
|
"test_wait_structure_never_accepts_caller_ack_or_cleanup_authority": 7,
|
|
"test_workspace_data_counter_is_strict_even_without_association": 4,
|
|
"test_workspace_ref_remains_same_public_reexport": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_agent_recovery": {
|
|
"test_allocation_ack_is_strict_and_rejects_reused_physical_refs": 1,
|
|
"test_allocation_settlement_retains_ack_after_revocation_and_rejects_rewrite": 1,
|
|
"test_blocked_settlement_retains_ack_after_revocation_and_never_rewrites_ready": 1,
|
|
"test_checkpoint_writer_rejects_reserved_identity_before_mutation": 1,
|
|
"test_coalescing_never_accepts_changed_immutable_reconstruction": 1,
|
|
"test_completed_handshake_requires_exact_operation_prefix": 4,
|
|
"test_confirmed_execution_rebind_requires_exact_caller_and_old_binding": 1,
|
|
"test_confirmed_snapshot_refusal_is_nonfatal_and_never_uses_generic_saver": 1,
|
|
"test_confirmed_snapshot_capture_failure_is_nonfatal_and_logs_no_private_values": 1,
|
|
"test_confirmed_sql_finalization_retires_exact_participant_and_keeps_snapshot": 1,
|
|
"test_corrupt_present_record_fails_closed": 1,
|
|
"test_every_partial_recovery_blocks_mutation": 6,
|
|
"test_finalization_requires_exact_successor_checkpoint_object": 1,
|
|
"test_finalize_selection_atomically_rebinds_and_selects_acknowledged_bundle": 1,
|
|
"test_fresh_wait_ack_is_required_and_predecessor_never_becomes_current": 1,
|
|
"test_operation_owner_rejects_reserved_predecessor_before_resolving_resources": 1,
|
|
"test_ordinary_mutation_without_recovery_preserves_existing_generation": 2,
|
|
"test_pending_state_alone_never_proves_zero_dispatch": 1,
|
|
"test_reconnect_coalesces_advanced_attempt_without_reallocating": 5,
|
|
"test_recovery_config_validation_requires_original_confirmed_create_key": 1,
|
|
"test_reservation_and_claim_require_exact_active_sql_owner": 4,
|
|
"test_reservation_coalesces_keys_and_creating_has_one_winner": 1,
|
|
"test_snapshot_store_refuses_missing_authenticated_root": 1,
|
|
"test_snapshot_write_reloads_reservation_from_sql": 1,
|
|
"test_snapshot_write_uses_complete_original_identity_and_recovery_gate": 1,
|
|
"test_sql_selection_rejects_matching_digest_foreign_input_result_ref": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_agent_recovery_state": {
|
|
"test_attempt_identity_coalesces_interactions_but_changes_with_predecessor": 1,
|
|
"test_phase_transition_is_pure_and_never_retries_unknown_or_changes_immutable_args": 1,
|
|
"test_record_rejects_invalid_refs_versions_phases_and_identity": 7,
|
|
"test_sql_ready_preserves_separate_sdk_receipt_and_wait_acknowledgements": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_confirmed_agent_completion": {
|
|
"test_terminal_projection_requires_settled_retired_intent": 4
|
|
},
|
|
"tests.unit_tests.services.dify_builder.native_testing.test_native_runtime": {
|
|
"test_actual_activated_startup_failure_consumes_only_original_zero_activity_verifier": 1,
|
|
"test_actual_delivery_capacity_is_bound_before_claim_but_lifetime_stays_inactive": 1,
|
|
"test_actual_inactive_retained_delivery_and_missing_cancel_handles_grant_no_cleanup": 1,
|
|
"test_actual_stream_cleanup_returns_without_signalling_retired_host": 1,
|
|
"test_actual_wait_snapshot_restores_exact_objects_journal_and_generation_gap": 2,
|
|
"test_broker_actor_hint_cannot_replace_persisted_request_owner": 1,
|
|
"test_cancel_original_joined_owner_rechecks_retained_snapshot": 2,
|
|
"test_cancel_projection_includes_owned_sources": 12,
|
|
"test_cancel_projection_never_infers_clean_from_incomplete_source_history": 5,
|
|
"test_cancel_projection_reloads_after_outside_writer_cleanup": 3,
|
|
"test_cancel_projection_repeated_cancel_observes_source_state_change": 1,
|
|
"test_cancel_projection_retains_older_unresolved_source": 1,
|
|
"test_cleanup_only_log_release_refuses_live_dispatcher_and_keeps_original_lease": 1,
|
|
"test_code_capability_requires_explicit_trusted_owner_and_default_stays_http": 1,
|
|
"test_composed_cancel_does_not_upgrade_incomplete_or_noninitial_history": 5,
|
|
"test_composed_start_cancel_before_delivery_reconciles_without_physical_acquisition": 1,
|
|
"test_consumed_generation_zero_in_other_owner_cannot_ack_live_generation_one": 1,
|
|
"test_delivered_unclaimed_cancel_retires_logically_without_consuming_lifetime": 1,
|
|
"test_get_cancel_interleaving_refreshes_orm_state_and_projects_one_cancellation": 4,
|
|
"test_initial_dispatch_uses_no_checkpoint_and_duplicate_delivery_never_runs_again": 1,
|
|
"test_logical_preclaim_retirement_rechecks_proof_and_exact_retained_owners": 5,
|
|
"test_over_128_delivered_unclaimed_logical_cancellations_reclaim_same_worker_slots": 1,
|
|
"test_real_dify_initial_http_wait_and_claimed_resume_keep_same_run": 20,
|
|
"test_resume_history_refuses_fake_host_before_any_repository_cache_or_io": 1,
|
|
"test_resume_settlement_refuses_committed_wait_before_actual_finalization": 3,
|
|
"test_same_worker_reclaims_over_128_closed_consumed_requests_but_keeps_unknown_live": 1,
|
|
"test_unknown_joined_owner_can_release_only_actual_dead_dispatcher_lease": 1,
|
|
"test_unrestored_host_cannot_authorize_arbitrary_snapshot_or_resume_history": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_agent_asset_operations": {
|
|
"test_confirmed_composer_keeps_published_config_and_shell": 4,
|
|
"test_runtime_shell_result_commits_before_return_and_preserves_exact_key": 1,
|
|
"test_saved_shell_operation_revalidates_for_public_approval_without_runtime_request": 1,
|
|
"test_shell_intent_uses_exact_protected_composition_and_current_workspace": 8,
|
|
"test_shell_revalidation_refuses_destructive_or_changed_intent_before_claim": 3,
|
|
"test_stub_read_requires_claimed_unsettled_shell_operation": 4,
|
|
},
|
|
}.items():
|
|
a4_expected.setdefault(module, {}).update(functions)
|
|
for module, expected in {**a3_expected, **a4_expected}.items():
|
|
actual = {}
|
|
for classname, name in identities:
|
|
normalized = classname.removeprefix("api.")
|
|
if normalized == module or normalized.startswith(module + "."):
|
|
function = name.split("[", 1)[0]
|
|
actual[function] = actual.get(function, 0) + 1
|
|
if actual != expected:
|
|
problems.append(f"A3 function inventory mismatch {module}: {actual}")
|
|
json_admission_module = "tests.unit_tests.services.dify_builder.test_json_tool_execution_admission"
|
|
expected_json_admission = {
|
|
f"test_owned_json_parse_prepare_persists_restricted_request[{variant}]"
|
|
for variant in ("raw-true", "raw-false", "constant-true", "constant-false")
|
|
}
|
|
expected_json_admission.update(
|
|
{
|
|
"test_json_prepare_reloads_owner_and_inputs_after_metadata",
|
|
"test_existing_restricted_policies_skip_json_metadata",
|
|
}
|
|
)
|
|
actual_json_admission = {
|
|
name for classname, name in identities if classname.removeprefix("api.") == json_admission_module
|
|
}
|
|
if actual_json_admission != expected_json_admission:
|
|
problems.append("JSON admission case identities differ from the reviewed prepare variants and owner checks")
|
|
json_policy_module = "tests.unit_tests.services.dify_builder.test_json_tool_execution"
|
|
json_policy_expected = {
|
|
"test_reviewed_pure_mixed_graph_admits_exact_native_chain": 1,
|
|
"test_native_editor_metadata_admits_without_changing_graph_or_parameters": 2,
|
|
"test_native_editor_tool_metadata_refuses_bad_types_bounds_and_unknown_fields": 14,
|
|
"test_native_editor_end_metadata_keeps_exact_text_tool_selector": 6,
|
|
"test_string_source_variants": 6,
|
|
"test_final_parameters_keep_native_boolean": 4,
|
|
"test_non_boolean_ensure_ascii_refuses_before_coercion": 10,
|
|
"test_exact_graph_and_static_tool_shape_refuse_mutations": 29,
|
|
"test_wrong_resolved_tool_class_refuses_before_class_validation": 1,
|
|
"test_pure_mixed_native_marker_source_limits": 3,
|
|
"test_direct_variable_retains_general_name_limit": 1,
|
|
"test_missing_or_duplicated_ensure_ascii_refuses": 1,
|
|
"test_non_pure_mixed_refuses_before_resolution": 12,
|
|
"test_content_constant_lookup_hazards_refuse": 12,
|
|
"test_direct_start_text_keeps_literal_markers_and_dots": 1,
|
|
"test_native_generation_and_log_read_only_declared_start_values": 2,
|
|
"test_native_jsonpath_constant_cannot_read_non_start_value": 1,
|
|
"test_admitted_jsonpath_grammar": 9,
|
|
"test_jsonpath_grammar_refuses_constant_and_resolved_values": 36,
|
|
"test_content_utf8_byte_boundary": 4,
|
|
"test_parameter_validator_requires_exact_final_types_and_keys": 1,
|
|
"test_qualified_binding_is_frozen_and_strict": 1,
|
|
"test_reserved_native_owner_refuses_for_every_node": 9,
|
|
"test_optional_start_user_id_cannot_collide_with_native_system_owner": 1,
|
|
"test_constant_json_parameters_need_no_start_declarations_or_inputs": 1,
|
|
"test_empty_start_declarations_still_refuse_variable_selector": 1,
|
|
}
|
|
json_runtime_expected = {
|
|
"tests.unit_tests.services.dify_builder.test_json_tool_metadata": {
|
|
"test_reviewed_normalized_declaration_matches_frozen_digests": 1,
|
|
"test_zero_or_multiple_installations_refuse": 2,
|
|
"test_installation_identity_or_runtime_drift_refuses": 11,
|
|
"test_provider_identity_drift_refuses": 3,
|
|
"test_schema_credential_oauth_dynamic_or_default_drift_refuses": 5,
|
|
"test_transport_failure_is_sanitized": 1,
|
|
"test_malformed_native_response_is_sanitized": 1,
|
|
"test_persisted_binding_drift_refuses": 1,
|
|
"test_qualified_serverless_installation_persists_its_own_binding": 1,
|
|
"test_qualified_serverless_binding_preserves_runtime_and_digest": 1,
|
|
"test_cross_variant_expected_binding_drift_refuses": 2,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_json_tool_runtime": {
|
|
"test_native_plugin_casts_final_boolean_and_preserves_unicode": 2,
|
|
"test_exact_native_text_is_data_not_status": 4,
|
|
"test_forbidden_message_closes_transport_before_file_transform": 1,
|
|
"test_text_byte_and_count_limits_close_transport": 2,
|
|
"test_aggregate_multibyte_text_limit_is_exact": 2,
|
|
"test_invalid_unicode_text_refuses_and_closes_transport": 1,
|
|
"test_final_envelope_mismatch_prevents_native_dispatch": 1,
|
|
"test_native_form_conversion_keeps_explicit_boolean": 4,
|
|
"test_actual_controller_drift_refuses_before_credentials": 1,
|
|
"test_current_native_controller_credential_drift_refuses_before_all_credential_owners": 2,
|
|
"test_actual_parse_schema_drift_refuses_before_dynamic_fetch": 1,
|
|
"test_hardcoded_fallback_refuses_before_credential_branch": 1,
|
|
"test_static_resolution_never_reads_dynamic_or_decrypts": 1,
|
|
"test_json_native_getter_rejects_incompatible_guard_arguments": 4,
|
|
"test_full_native_text_path_receipt_and_replay": 1,
|
|
"test_prior_handle_and_recorder_failure_never_emit_receipt": 1,
|
|
"test_post_dispatch_metadata_change_prevents_receipt": 1,
|
|
"test_post_dispatch_runtime_variant_change_prevents_receipt": 1,
|
|
"test_interrupted_stream_closes_native_generator_without_receipt": 1,
|
|
"test_non_text_is_refused_before_native_file_transform": 1,
|
|
"test_file_producing_output_refuses_before_all_file_owners": 2,
|
|
"test_metadata_and_native_dispatch_have_no_active_own_transaction": 1,
|
|
},
|
|
}
|
|
json_contract_expected = {
|
|
"tests.unit_tests.core.app.apps.test_builder_execution_admission": {
|
|
"test_serialized_native_markers_cannot_disappear": 1,
|
|
"test_celery_refuses_marker_before_logging_or_initialization": 1,
|
|
"test_factory_composes_restricted_without_live_adapters": 6,
|
|
"test_worker_readmission_rejects_reload_races_inside_queue_lifecycle": 9,
|
|
"test_worker_claims_once_and_shares_recorder_with_runner_and_completion": 1,
|
|
"test_resume_marker_refused_before_restore_trace_or_cancellation_reset": 1,
|
|
"test_native_worker_outer_finally_acknowledges_context_entry_failure": 1,
|
|
"test_json_marker_round_trips_existing_native_carriers": 3,
|
|
"test_json_celery_refuses_before_logging_or_runner": 1,
|
|
"test_json_generate_refuses_unsupported_transport_before_workflow_read": 2,
|
|
"test_json_workflow_generator_refuses_before_file_or_graph_effect": 3,
|
|
"test_json_resume_refuses_before_trace_or_graph_restore": 1,
|
|
"test_json_factory_refuses_nonissued_recorder_before_ordinary_setup": 1,
|
|
"test_json_task_resume_refuses_before_snapshot_restore": 1,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_template_presentation": {
|
|
"test_generic_missing_coverage_keeps_workflow_editable": 1,
|
|
"test_json_coverage_refusal_uses_only_static_actionable_copy": 10,
|
|
},
|
|
"tests.unit_tests.core.dify_builder.test_verification": {
|
|
"test_json_native_success_text_remains_data_requiring_review": 2,
|
|
"test_json_completion_preserves_required_output_and_revision_gates": 1,
|
|
"test_json_noncompletion_blocks_publication": 2,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_execution_policy_service": {
|
|
"test_historical_restricted_context_tag_and_absence_decode_identically": 1,
|
|
"test_json_context_digest_covers_qualified_binding": 14,
|
|
"test_json_context_decodes_through_completion_and_requires_explicit_tag": 1,
|
|
"test_saved_pre_extraction_context_bytes_and_digest_are_unchanged": 3,
|
|
"test_saved_pre_extraction_context_refuses_json_fields_and_unknown_tags": 3,
|
|
},
|
|
"tests.unit_tests.core.dify_builder.test_execution_policy": {
|
|
"test_json_evidence_variant_and_receipt_are_strict": 1,
|
|
"test_json_success_evidence_requires_raw_boolean_seal": 5,
|
|
"test_json_non_success_evidence_allows_exact_false_seal_and_legacy_coercion_is_unchanged": 1,
|
|
},
|
|
}
|
|
# Exact additions/expanded cases after main integration; retain existing cases.
|
|
for module, functions in {
|
|
"tests.unit_tests.core.dify_builder.test_execution_policy": {
|
|
"test_admission_rejects_unsupported_effect_shapes": 12,
|
|
"test_all_submitted_values_must_be_scalars": 4,
|
|
"test_canonical_digests_reject_nonfinite_and_surrogates_preserve_array_order": 1,
|
|
"test_citation_display_absent_or_empty_metadata_compatibility": 2,
|
|
"test_citation_display_flag_never_admits_enabled_external_features": 5,
|
|
"test_citation_display_flag_never_admits_retrieval_model_or_tool_nodes": 3,
|
|
"test_citation_display_metadata_rejects_non_boolean_or_unknown_shape": 9,
|
|
"test_confirmed_completion_cannot_be_constructed_without_complete_confirmed_shape": 9,
|
|
"test_confirmed_evidence_literals_and_sanitized_action_metadata": 1,
|
|
"test_exact_implementation_identity_precedes_native_validation": 1,
|
|
"test_fixture_strict_integer_and_immutable": 1,
|
|
"test_http_default_finite_number_preserves_raw_binding": 4,
|
|
"test_http_default_large_integer_refused_before_native_validation": 4,
|
|
"test_invalid_fixture_rejected": 8,
|
|
"test_known_native_disabled_defaults_pass": 3,
|
|
"test_malformed_graph_identifiers_are_sanitized_refusals": 3,
|
|
"test_native_start_end_identity_and_raw_digest_binding": 1,
|
|
"test_normal_workflow_citation_display_metadata_admits_native_template": 2,
|
|
"test_raw_metadata_denied": 3,
|
|
"test_restricted_summary_cannot_carry_confirmed_metadata": 5,
|
|
"test_trusted_completion_accepts_either_context_variant_and_rejects_unknown_tags": 1,
|
|
"test_unknown_or_malformed_disabled_feature_forms_refuse": 4,
|
|
"test_untrusted_fixture_decoder_is_strict_and_sanitized": 1,
|
|
},
|
|
"tests.unit_tests.core.dify_builder.test_verification": {
|
|
"test_confirmed_card_has_ids_status_and_reasons_but_no_native_content": 3,
|
|
"test_confirmed_success_is_publishable_only_when_sealed_and_revision_exact": 1,
|
|
"test_observed_preparation_failure_has_specific_copy_without_entering_repair": 1,
|
|
"test_unknown_execution_asks_for_reconciliation_instead_of_rerun": 1,
|
|
"test_verification_evidence_denies": 4,
|
|
"test_verification_policy_denies": 6,
|
|
"test_verification_present_null_and_unknown_are_reviewable": 3,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_execution_policy_service": {
|
|
"test_all_handlers_persist_actual_server_stamp": 3,
|
|
"test_append_verifies_fixture_node_implementation_profile_and_bound_limit": 1,
|
|
"test_canonical_native_owner_and_proof_mutations": 14,
|
|
"test_complete_non_success_native_status_remains_native_failed": 3,
|
|
"test_fixture_stamp_lineage_stale_reuse_and_malformed_persistence": 1,
|
|
"test_full_owner_chain_required": 7,
|
|
"test_http_receipts_and_unknown_first_precedence": 6,
|
|
"test_incomplete_proof_seals_unknown": 5,
|
|
"test_launch_exactly_once_and_observation_binding": 1,
|
|
"test_malformed_snapshot_refusal_is_sanitized_before_revision": 15,
|
|
"test_metadata_refusal_precedes_revision_access": 4,
|
|
"test_native_predecessor_corroborates_chain_when_present": 9,
|
|
"test_native_rbac_agent_app_binding_precedes_maintainer_bypass": 2,
|
|
"test_native_rbac_plain_app_maintainer_bypass_is_persisted": 1,
|
|
"test_native_rbac_requires_both_scenes_and_allows_delegated_membership": 1,
|
|
"test_null_predecessor_http_retry_requires_all_attempt_proof": 5,
|
|
"test_null_predecessor_prefix_requires_failed_or_stopped_run": 4,
|
|
"test_optional_predecessor_change_cannot_rewrite_sealed_evidence": 1,
|
|
"test_owned_preparation_binds_both_inputs_and_does_not_infer_mock_mode": 1,
|
|
"test_owner_helpers_are_exported_once_for_shared_callers": 1,
|
|
"test_raw_tracing_refusal_in_prepare_and_fixture_stamp_precedes_revision": 1,
|
|
"test_revalidation_refuses_changed_execution": 11,
|
|
"test_seal_requires_authoritative_native_rows_and_is_idempotent": 1,
|
|
"test_seal_revalidates_constructed_preworker_origin": 5,
|
|
"test_sealed_append_and_tampered_full_context_refused": 1,
|
|
"test_supplied_workflow_identity_cannot_disagree_with_owned_row": 2,
|
|
},
|
|
"tests.unit_tests.services.dify_builder.test_template_presentation": {
|
|
"test_known_template_refusal_has_actionable_scene_without_native_content": 5,
|
|
"test_template_refusal_clears_staged_repairs_and_cannot_publish": 1,
|
|
"test_unknown_policy_reason_uses_fixed_sanitized_fallback": 1,
|
|
},
|
|
}.items():
|
|
json_contract_expected.setdefault(module, {}).update(functions)
|
|
# ENG-1417: value-free failed Code format facts and current failed-Run provenance.
|
|
json_contract_expected.setdefault("tests.unit_tests.services.dify_builder.test_condition_evidence", {}).update(
|
|
{
|
|
"test_failed_code_format_facts_reach_diagnosis_and_repair_without_values": 1,
|
|
"test_failed_code_format_classifies_only_observed_table_samples": 5,
|
|
"test_code_format_facts_require_unique_failed_historical_code": 5,
|
|
"test_code_format_facts_bound_samples_and_never_traverse_nested_values": 1,
|
|
"test_code_format_facts_do_not_claim_changed_bindings_or_unknown_run": 4,
|
|
"test_code_format_facts_keep_native_row_identity_after_redaction_collisions": 1,
|
|
"test_code_format_facts_bound_input_count_without_exposing_authored_keys": 1,
|
|
"test_code_format_facts_degrade_when_current_graph_is_malformed": 3,
|
|
}
|
|
)
|
|
for module, expected in {
|
|
json_policy_module: json_policy_expected,
|
|
**json_contract_expected,
|
|
**json_runtime_expected,
|
|
}.items():
|
|
actual = {}
|
|
for classname, name in identities:
|
|
if classname.removeprefix("api.") == module:
|
|
function = name.split("[", 1)[0]
|
|
actual[function] = actual.get(function, 0) + 1
|
|
for function, expected_count in expected.items():
|
|
if actual.get(function, 0) != expected_count:
|
|
problems.append(f"JSON case inventory mismatch {module}::{function}")
|
|
if (module == json_policy_module or module in json_runtime_expected) and set(actual) != set(expected):
|
|
problems.append(f"unexpected JSON test functions {module}")
|
|
print(f"COLLECTED total: {len(identities)} unit cases", flush=True)
|
|
for problem in problems:
|
|
print(f"COMPLETENESS {problem}", flush=True)
|
|
raise SystemExit(int(code) or (1 if problems else 0))
|