Pipeline runner silently returns empty dict on JSON decode failure
Severity: Medium
File: backend/app/code/pipeline/pipeline_runner.py:129
When parsing LLM-generated JSON responses, the code attempts to extract JSON from text by finding { and }. If parsing fails, it logs a warning and returns an empty dict. Downstream code receives no signal that parsing failed.
except json.JSONDecodeError:
pass
# Return empty dict if parsing fails
logger.warning(f"Failed to parse JSON from response: {text[:200]}")
return {}
Why it matters
Pipeline steps that depend on structured LLM output proceed with empty data, causing cascading failures or incorrect code generation. The warning log is easily missed in production.
Pipeline runner silently returns empty dict on JSON decode failure
Severity: Medium
File:
backend/app/code/pipeline/pipeline_runner.py:129When parsing LLM-generated JSON responses, the code attempts to extract JSON from text by finding
{and}. If parsing fails, it logs a warning and returns an empty dict. Downstream code receives no signal that parsing failed.Why it matters
Pipeline steps that depend on structured LLM output proceed with empty data, causing cascading failures or incorrect code generation. The warning log is easily missed in production.