---
title: Re-type and re-grade the Pinnacle mis-scoped period markets
type: task
status: planned
description: >-
  Pinnacle first-half and first-quarter game lines are stored under full-game market types and
  graded against full-game scores, so about 10,400 settled 2025-26 selections carry wrong-period
  results.
base_uri: user:task/league/repair-mis-scoped-pinnacle-period-market-grades.md
created_at: '2026-09-27T03:54:36.349Z'
entity_id: 2f386675-f938-4f85-809c-535517839189
owner_identity_uri: █████████████████████████
priority: Medium
public_read: true
relations:
  - relates [[███████████████████████-███-██████-██████████-██████-██████-█████████]]
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-09-27T03:54:36.349Z'
visibility_analyzed_at: '2026-11-05T23:50:07.287Z'
---

## Overview

Pinnacle's first-half and first-quarter game lines are stored under the full-game market types. Settlement then grades them against full-game scores. About 10,400 graded selections across 2025-2026 carry a result computed on the wrong period. Re-type the period markets, re-grade them, and stop the importer minting new ones.

## Background

Pinnacle writes `source_market_id` as `${matchup.id}/s;<period>;<odds_key>`. The period code never reaches `market_type`. A first-half total (`/s;1;ou`) is stored as `GAME_MATCHUP_TOTAL` or `GAME_MATCHUP_ALT_TOTAL`, exactly like the full-game total (`/s;0;ou`).

Measured 2026-09-27 on 2026 settled Pinnacle rows:

- **Totals.** First-half rows (average line 22.5) carry the full-game total in `metric_result_value` on 708 of 720 rows. First-quarter rows (average line 8.4) do so on 198 of 198. The grades follow: first-half OVER wins 303 of 316 and first-quarter OVER wins 66 of 66, against 281 of 614 for full-game overs.
- **Moneylines and spreads.** Every period moneyline row inspected shows the full-game winner as its result (Seattle, San Francisco, Chicago, Cincinnati). Spreads and moneylines are two-sided, so the error cancels at 50% WON in aggregate. Only a per-row comparison against the period score shows it, the same masking the DraftKings campaign documents.

Graded period selections stored under full-game types, 2025-2026:

| Stored `market_type` | Graded selections |
| --- | --- |
| `GAME_MATCHUP_ALT_SPREAD` | 4,022 |
| `GAME_MATCHUP_ALT_TOTAL` | 3,972 |
| `GAME_MATCHUP_SPREAD` | 826 |
| `GAME_MATCHUP_TOTAL` | 814 |
| `GAME_MATCHUP_MONEYLINE` | 802 |

Period `1` is the first half and `3` the first quarter; both are confirmed by the average lines. Periods `4`, `5` and `6` appear on a few dozen markets and are unidentified. `GAME_TEAM_TOTAL` period rows (1,760 selections) are ungraded, so they carry no wrong grade yet. They carry the wrong type, which the fix must cover before they are ever graded.

Reproduction: group settled Pinnacle game-line selections by `split_part(source_market_id, ';', 2)`. Compare `metric_result_value` against `home_score + away_score` and the OVER win rate by period.

## Plan

- [ ] Identify periods `4`, `5` and `6` from a raw Pinnacle payload before mapping them.
- [ ] Map the period code to a period-scoped `market_type` in the Pinnacle market-type resolution (`libs-server/pinnacle.mjs`), using the period-scoped game-line constants where they exist. Where a constant is missing, classify the row null rather than full-game.
- [ ] Re-type the existing period markets, guarded exactly as `backfill-market-types.mjs` guards Pinnacle's alternate key.
- [ ] Re-grade the re-typed selections against period scores, or null their grades where no period operand exists yet.
- [ ] Re-measure the first-half and first-quarter OVER win rates, which should fall to roughly half.

## Notes

- Sibling of [[███████████████████████-███-██████-██████████-██████-██████-█████████]]: the same defect at another book, and the same two-sided masking.
- Consumers reading these grades (hit rates, outcome grading, any study of Pinnacle game lines) are wrong on period rows until this lands. The 2026 week-3 betting chain ruled none of these markets taken.
