PR #576: Fix Steamer Tier 4 cascade — raise DraftEdge threshold 50→100 to unblock dispatch#446
Conversation
…h health gate DraftEdge returning 65 players was being accepted by Tier 4 (threshold >= 50) but then failing the pre-dispatch health gate in tasklets.py (requires >= 100). This mismatch silently blocked all dispatches for 3+ days. Raising threshold to >= 100 causes 65-player results to cascade to Tier 5 static CSV (5,663 players), which passes the health gate cleanly."
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Steamer tier-4 DraftEdge fallback now enforces a stricter minimum batter count of 100 projected players (raised from 50) before caching results. When DraftEdge provides fewer players, the system falls through to tier-5 CSV fallback. The corresponding log message was updated to reflect the new threshold condition. ChangesDraftEdge Tier-4 Fallback Threshold
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Docker | May 17, 2026 6:00p.m. | Review ↗ | |
| JavaScript | May 17, 2026 6:00p.m. | Review ↗ | |
| Python | May 17, 2026 6:00p.m. | Review ↗ | |
| SQL | May 17, 2026 6:00p.m. | Review ↗ | |
| Secrets | May 17, 2026 6:00p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request increases the minimum player threshold for DraftEdge data from 50 to 100 in steamer_layer.py. This adjustment ensures that degraded API responses, which typically return around 65 players, correctly trigger a fallback to the Tier 5 static CSV to maintain data integrity. I have no feedback to provide.
Root Cause
Dispatches have been silently blocked for 3+ days because of a threshold mismatch between
steamer_layer.pyand the pre-dispatch health gate intasklets.py.The exact failure chain:
65 >= 50→ ACCEPTS — stops at Tier 4 ❌tasklets.py:65 > 0 AND 65 < 100→ DISPATCH BLOCKED ❌The Tier 4 acceptance threshold (
>= 50) was set when DraftEdge returned only ~32 players at startup. It was never updated to match the health gate threshold (>= 100).Fix
steamer_layer.py— one-line change:if de_data and len(de_data) >= 50:→>= 100After this fix:
65 >= 100→ False → cascades to Tier 55663 < 100→ False → DISPATCH PASSES ✅Self-Healing Effect
After first deploy, Tier 5 writes 5,663 rows back to Postgres. Next day's startup reads PG cache (5,663 ≥ 100) → no API calls needed at all. Steamer is permanently healthy unless Postgres cache is wiped.
Impact
Summary by cubic
Raise Tier 4 DraftEdge acceptance threshold from 50 to 100 to match the pre-dispatch health gate and unblock dispatch. Thin (~65) DraftEdge results now fall through to Tier 5 static CSV so dispatch proceeds and the cache heals.
Written for commit bcd6850. Summary will update on new commits. Review in cubic
Summary by CodeRabbit