@@ -67,7 +67,11 @@ def _run_phase(self, repo_dir: Path, prompt: str, model: str, phase_name: str) -
6767 if hasattr (self .claude_runner , "run_prompt" ):
6868 raw_result = self .claude_runner .run_prompt (repo_dir , prompt , model = model )
6969 if not (isinstance (raw_result , tuple ) and len (raw_result ) == 3 ) and hasattr (self .claude_runner , "run_code_review" ):
70- raw_result = self .claude_runner .run_code_review (repo_dir , prompt )
70+ try :
71+ raw_result = self .claude_runner .run_code_review (repo_dir , prompt , model = model )
72+ except TypeError :
73+ # Backward compatibility for legacy mocks/runners that don't accept model parameter.
74+ raw_result = self .claude_runner .run_code_review (repo_dir , prompt )
7175 if not (isinstance (raw_result , tuple ) and len (raw_result ) == 3 ):
7276 return False , {}, f"Invalid runner response for { phase_name } "
7377
@@ -217,7 +221,10 @@ def run(
217221 return False , {}, f"Validation phase failed: { err_v } "
218222
219223 validated : List [Dict [str , Any ]] = []
220- decisions = validation_result .get ("validated_findings" , [])
224+ has_validation_output = isinstance (validation_result , dict ) and "validated_findings" in validation_result
225+ decisions = validation_result .get ("validated_findings" , []) if isinstance (validation_result , dict ) else []
226+ if not isinstance (decisions , list ):
227+ decisions = []
221228 for decision in decisions :
222229 if not isinstance (decision , dict ):
223230 continue
@@ -235,10 +242,9 @@ def run(
235242 finding ["confidence" ] = float (confidence )
236243 validated .append (finding )
237244
238- # Fallback: keep merged findings if validation returned no decisions
239- if decisions and not validated :
240- validated = []
241- elif not decisions :
245+ # If validator did not return decisions at all, preserve candidates.
246+ # If it explicitly returned validated_findings (including empty list), trust validator output.
247+ if not has_validation_output :
242248 validated = all_candidates
243249
244250 # Apply existing filtering pipeline
0 commit comments