---
title: Select the main game line in the simulation
type: task
status: draft
description: >-
  The game environment loader takes whichever sportsbook selection the database returns first, which
  can be an alternate spread or total; pick the main line by odds closest to even and adopt it only
  if the calibration harness holds.
base_uri: user:task/league/select-the-main-game-line-in-the-simulation.md
created_at: '2026-09-27T04:57:21.531Z'
entity_id: 5a38da1e-8753-4dbc-ae0c-f078fccd08c0
owner_identity_uri: █████████████████████████
priority: Low
public_read: true
relations:
  - blocked_by [[█████████████████████████-██████-██████████-██████████████]]
  - blocked_by [[████████████████████-██████████-███████████-█████████-████-███████]]
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-09-27T07:35:06.604Z'
visibility_analyzed_at: '2026-11-05T23:50:22.209Z'
---

# Select the main game line in the simulation

## Problem

`load_game_environment` (`libs-server/simulation/load-game-environment.mjs`) sorts a game's closing selections by source priority and takes the first, but a book carries alternate spreads and totals under the same market type. The chosen line is whichever the database returns first. A 2026 week 3 comparison on 2026-09-27 showed that ordering by latest `closing_observed_at` instead picks GB +20.5 over the -4.5 main line — the current result is right only by row order.

## Status

Blocked on [[████████████████████-██████████-███████████-█████████-████-███████]]. Since league commit `c1d7425b9` (2026-09-27) the simulation reads no game lines: its only consumer, the game-total spread scale, measured at zero effect and was retired with `load_game_environment`, which is recoverable from the parent of league commit `41e02eda2`. Main-line selection belongs with whatever gives lines a consumer again.

## Intent

- Pick the main line per game and book: the selection pair whose odds are closest to even (decimal 2.0), rather than the first row.
- Measure it with the calibration harness from `[[█████████████████████████-██████-██████████-██████████████]]` on the same seeds before adopting, because it changes live output.
