Open
Conversation
1kuna
added a commit
that referenced
this pull request
Dec 9, 2025
## Critical Fixes (Data Correctness) ### Empty responses on trading days (#1) - Added `_is_trading_day()` helper using XNYS calendar with weekday fallback - Empty on trading day → AMBER (needs re-check), not GREEN - Empty on weekend/holiday → GREEN with NO_SESSION ### Finnhub fundamentals phantom GREEN (#2) - Changed to return EMPTY with qc_code="STORAGE_NOT_IMPLEMENTED" - Worker now marks STORAGE_NOT_IMPLEMENTED as AMBER gap, not GREEN ### Nested date paths (#3) - Fixed 8 occurrences of Parquet writes using parent.parent - Prevents creating date=X/date=X/data.parquet nested paths ### Weekends marked RED (#4) - Added trading day check in rows_by_date processing - Non-trading days with 0 rows → GREEN/NO_SESSION in both workers ## Critical Fixes (Reliability) ### PARTIAL success handling (#5) - Added FetchStatus.PARTIAL enum value - Added failed_at_date and original_end_date to FetchResult - Worker saves successful days, creates follow-up task for remaining - Preserves original task.kind for follow-up tasks ### HTTP retry for 5xx errors (#6) - Added retry with 2-4s jitter backoff for 500/502/503/504 - Counts retry attempts in budget ### Failed calls not counted in budget (#7) - Moved budget.spend() before raise_for_status() - Now counts ALL API calls for accurate rate limiting ## Medium Fixes ### Multi-day head-of-line blocking (#8) - Added MAX_TASK_DAYS config per dataset (minute: 7, EOD: 30, fundamentals: 90) - enqueue_task() auto-chunks large date ranges - Prevents single task blocking vendor for hours ### Budget crash recovery (#9, #10, #11) - Debounced saves (once/second) instead of every 10 calls - Anti-burst protection: stale tokens reset to 1 on restart - Explicit warning for missing state file, backup for corrupted files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68f0a7871d2c8326bf51e7844bef8cde