Compare commits

...

1 Commits

Author SHA1 Message Date
freemo 3e6c1404c5 fix(plan_generation): properly parse LLM validation response instead of bypassing on code length
The _validate method previously used `or len(all_code) > 10` as a fallback,
which caused any code longer than 10 characters to auto-pass regardless of
the LLM's actual assessment. This made LLM validation completely ineffective.

The fix removes the code-length bypass and now correctly determines
validity based solely on whether the LLM explicitly responds with PASS or FAIL.

Fixes #10480
2026-05-12 02:32:47 +00:00
@@ -527,8 +527,8 @@ class PlanGenerationGraph:
)
validation = str(result)
# Simple validation check (in real implementation, parse the LLM response)
is_valid = "PASS" in validation.upper() or len(all_code) > 10
# Check whether the LLM explicitly indicated the code passes validation
is_valid = "FAIL" not in validation.upper() and "PASS" in validation.upper()
return {
"validation_result": {