---
title: Check the week FantasySharks serves before storing it
type: task
status: completed
description: >-
  The FantasySharks importer labels whatever board its weekless endpoint serves as the active week,
  so once FantasySharks rolls forward early, next week's board overwrites the current week.
base_uri: user:task/league/check-the-week-fantasysharks-serves.md
created_at: '2026-10-29T20:26:57.752Z'
entity_id: b2008971-0e46-4330-8f6d-0fedc25b4056
finished_at: '2026-10-29T23:49:05.153Z'
owner_identity_uri: █████████████████████████
priority: Medium
public_read: true
relations:
  - relates [[███████████████████████-████-███████████-████-██████-██████-██████████]]
started_at: '2026-10-29T22:38:56.197Z'
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-10-29T23:49:05.153Z'
visibility_analyzed_at: '2026-11-05T23:48:29.737Z'
---

## Problem

`scripts/import-fantasysharks-projections.mjs` fetches `WeeklyProjections.php`, which takes no week parameter, and stores the board as `current_season.fantasy_active_week` with no check of the week served (around line 92). If FantasySharks rolls to next week before our Tuesday rollover, next week's projections overwrite the current week's. The 4for4 importer has the guard this lacks (its board's Season/Week columns are checked against the target week). Found 2026-10-29 by the importer audit.

## Plan

- [x] Find what the response carries about the served week, and confirm it from a live response. Done 2026-10-29: no season or week field; each row's `Opp` is the only coordinate.
- [x] Refuse, or skip, a board whose week is not the target week, with a spec covering both. Done 2026-10-29 (league `d75810ee6`): skips unless 90% of rows pair with that week's opponent; the live board passed week 8 and failed weeks 7 and 9.
- [x] Measure whether stored FantasySharks rows ever held a later week's board. Done 2026-10-29: never a later week's; 2024 week 17 holds week 16's board (420 of 441 rows identical), from the 2024-12-30 run the index kept.

## Done when

The importer stores a board only under the week it is for.
