mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
Rewrite handle_test_affected_paths from a canned always-success stub to a live handler mirroring Build's handle_test_and_repair (A5): derive mock inputs once via start_schema/generate_mock_inputs and persist a TestInput (reused on retest), run run_draft (degrading to a synthesized failed Run on exception), and mint a real immutable Run. Pass -> edit.review with a green TestResultCard + summary. Fail -> real diagnose/propose_repair, stage fc.diagnosis/staged_repair/risk, emit a red TestResultCard + ErrorCard (+ ChangeSetCard when intents are proposed) -> edit.await_repair (the B1 gate). No auto-apply; apply_repair still runs only inside handle_await_repair's approve_repair branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>