Codex-generated pull request#38
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23f10d0317
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| normalized_csv_text = str(payload.get("normalized_csv_text", "")) | ||
| if normalized_csv_text.strip(): |
There was a problem hiding this comment.
Handle null normalized_csv_text as missing
normalize_analysis_input converts normalized_csv_text to str before checking emptiness, so a JSON null becomes the literal 'None' and is treated as valid normalized CSV. In /api/analyze, a payload like {"normalized_csv_text": null, "csv_text": "a,b\n1,2\n"} will skip the legacy fallback and produce a summary for fake header None (often row_count=0), which silently corrupts analysis output instead of using the provided CSV text.
Useful? React with 👍 / 👎.
| raw_type = str(payload.get("input_type", "csv")).strip().lower() or "csv" | ||
| if raw_type not in VALID_INPUT_TYPES: | ||
| raise ValueError(f"unsupported input_type: {raw_type}") |
There was a problem hiding this comment.
Default null input_type to csv before validation
input_type is also string-coerced before defaulting, so JSON null is interpreted as 'none' and rejected as unsupported. This breaks backward-compatible analyze requests that send nullable input_type (common with optional client fields) even when valid CSV data is present; None/blank should resolve to the csv default prior to validation.
Useful? React with 👍 / 👎.
Codex generated this pull request, but encountered an unexpected error after generation. This is a placeholder PR message.
Codex Task