Skip to content

fix: catch csv.Error in estimate CSV loading#28

Merged
bk86a merged 1 commit intomainfrom
fix/csv-error-handling
Feb 23, 2026
Merged

fix: catch csv.Error in estimate CSV loading#28
bk86a merged 1 commit intomainfrom
fix/csv-error-handling

Conversation

@bk86a
Copy link
Owner

@bk86a bk86a commented Feb 23, 2026

Summary

  • Add csv.Error to the exception tuple in _load_estimates_from_csv() to restore graceful degradation for malformed CSV files

Without this, a corrupt estimates CSV (NUL bytes, parser-level corruption) would bubble up and crash startup instead of logging a warning and continuing without estimates. Flagged by Codex review on PR #27.

Test plan

  • pytest tests/ -v — 69 tests pass
  • ruff check app/ — passes

Malformed CSV files (NUL bytes, parser corruption) would bubble up and
crash startup instead of logging a warning and continuing without
estimates. Restores graceful degradation for this optional input path.
Copy link
Owner Author

@bk86a bk86a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to go

@bk86a bk86a merged commit 1c9163a into main Feb 23, 2026
10 checks passed
@bk86a bk86a deleted the fix/csv-error-handling branch February 23, 2026 20:33
bk86a added a commit that referenced this pull request Mar 12, 2026
fix: catch csv.Error in estimate CSV loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant