mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
handle_test_and_repair's AssistantTurnItem.cards was unconditional even though error/change_set cards are now only appended when propose_build_repair returns intents -- the manifest claimed cards that were never attached in the neutral (empty-repair) path. Make cards conditional to match what's actually appended, and assert it in both branches. Remove three noqa comments added in the prior commit that suppressed ARG001/ARG005 on new test code (the global constraint disallows noqa for non-enabled rules); switch the genuinely-unused monkeypatch args/lambda params to underscore-prefixed names instead, and drop a build_nodes monkeypatch that exercised nothing. Add test_remaining_build_methods_thread_model_and_tenant_args to cover propose_plan_v1/discover_resources/bind_resources/build_nodes/ learn_from_build's model/tenant_id/model_config threading, matching the existing analyze_goal coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>