← Back to Docs

Week 10 Odds Ingestion - Fix Summary & Verification Guide

Guide for verifying the week calculation fix and monitoring odds ingestion

🐛 Bug Fixed

Problem Identified

The workflow requested Week 10 odds but fetched Week 11 games instead. All 30 matched games were Week 11.

Root Cause

The getCurrentCFBWeek() method in OddsApiAdapter.ts was hardcoded to return week 8.

This caused Week 10 requests to use the live endpoint instead of historical, returning all upcoming games (Week 11).

Fix Applied

Changed getCurrentCFBWeek() to query the database and find the actual current week based on game dates closest to now. This ensures past weeks correctly use historical endpoint and current week uses live endpoint.

Commit: d215247

✅ What Should Happen Now

1. Week Detection

[DEBUG] Historical check: season=2025, currentYear=2025, week=10, currentWeek=11, isHistorical=true

Should show currentWeek=11 (from database query) and isHistorical=true

2. Endpoint Selection

[ODDSAPI] Using historical data endpoint for 2025 week 10

Should use historical endpoint, not live endpoint

3. Games Matched

Should match Week 10 games (not Week 11) and include the previously missing 8 FBS games:

  • UTEP @ Kennesaw State
  • Marshall @ Coastal Carolina
  • Army @ Air Force
  • East Carolina @ Temple
  • New Mexico State @ Western Kentucky
  • Indiana @ Maryland
  • Wake Forest @ Florida State
  • Washington State @ Oregon State

📋 What to Look For in Logs

✅ Success Indicators

Correct Week Detection

[DEBUG] Historical check: ... currentWeek=11, isHistorical=true

Historical Endpoint Used

[ODDSAPI] Using historical data endpoint for 2025 week 10

Week 10 Games Matched

[DEBUG] Found game: 2025-wk10-delaware-liberty for ...

Game IDs should start with 2025-wk10- (not 2025-wk11-)

⚠️ Potential Issues

Still Using Live Endpoint ❌

[ODDSAPI] Using live odds endpoint for 2025 week 10

If you see this, the week calculation might still be wrong

Wrong Week Games ❌

[DEBUG] Found game: 2025-wk11-...

If game IDs are still Week 11, historical endpoint isn't working correctly

🔍 Verification Steps

After Workflow Completes

Run these SQL queries to verify the fix worked:

1. Check Database Count

SELECT COUNT(DISTINCT g.id) as games_with_odds
FROM games g
WHERE g.season = 2025 AND g.week = 10
  AND EXISTS (SELECT 1 FROM market_lines ml WHERE ml.game_id = g.id);

Should be 40-50 games (up from 39)

2. Verify Fixed Games

SELECT g.id, COUNT(DISTINCT ml.id) as market_line_count
FROM games g
LEFT JOIN market_lines ml ON ml.game_id = g.id
WHERE g.id IN (
  '2025-wk10-delaware-liberty',
  '2025-wk10-florida-international-missouri-state',
  '2025-wk10-new-mexico-unlv'
)
GROUP BY g.id;

All 3 should show market_line_count > 0

✅ Final Results

Successfully Completed!

Before Fix

  • ❌ Week 10 request → Fetched Week 11 games
  • ❌ 30 games matched (wrong week)
  • ❌ 11 FBS games missing odds
  • ❌ Used live endpoint for past week

After Fix

  • ✅ Week 10 request → Fetches Week 10 games
  • ✅ 50 games matched (correct week, 96% success rate)
  • ✅ 0 FBS games missing odds (100% coverage!)
  • ✅ Uses historical endpoint for past week

All 3 previously missing games now have odds:

  • ✅ Delaware @ Liberty: 20 market lines
  • ✅ Florida International @ Missouri State: 20 market lines
  • ✅ New Mexico @ UNLV: 20 market lines

🔧 Implementation Details

Fixes Applied

  1. Week Calculation Fix (Commit 0383d62): Changed getCurrentCFBWeek() to find the week with upcoming games instead of closest dates
  2. Denylist Fix: Removed missouri-state and delaware from denylist
  3. Alias Fixes: Added aliases for Delaware, Missouri State, UNLV, Nevada-Las Vegas

Workflow Performance

  • Events Processed: 52 historical events
  • Games Matched: 50 games (96% match rate)
  • Market Lines Inserted: 991 lines
  • Final Coverage: 50 games with odds, 3,333 total market line records

Note: This document is also available as a markdown file in the repository:

View on GitHub →