---
title: Fix red translation-record specs on league master Test
type: task
status: completed
description: >-
  League master Test is red on the two translation-record specs in
  test/scripts.import.players.spec.mjs, both failing with duplicate key idx_24798_gsisid on the
  player insert; fix the defect and return Test to green on a measured run. Dispatched per ruling
  #148303.
base_uri: user:task/league/fix-red-translation-record-specs.md
created_at: '2026-11-04T07:10:52.600Z'
entity_id: dea15a33-af86-4b74-bcce-19bbde416d35
finished_at: '2026-11-04T07:41:11.957Z'
observations:
  - ████████████████████████████████████████████████
owner_identity_uri: █████████████████████████
priority: High
public_read: true
relations:
  - relates [[███████████████████████-█████-██████-██████-██████████████]]
started_at: '2026-11-04T07:11:35.203Z'
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-11-04T07:41:14.206Z'
visibility_analyzed_at: '2026-11-05T23:49:28.458Z'
---

## Context

league master Test is red on the two red translation-record specs. Test has been red on master since 2026-11-02, 11 failed runs; the newest per-run failure is signal #148298 (run 41779905860, opened 2026-11-04 06:22 UTC, head commit the live game-page work). The failing head commits are the live game-page/game-path sessions' work; the red predates them, so this fix owns the defect and must not clobber the live lanes' un-applied tree work — live sessions today: ████████████████████████████, ████████████████████████████████, ██████████████████████████, █████████████████████████.

The two failing cases sit in `test/scripts.import.players.spec.mjs` (SCRIPTS /import-players translation record describe), both throwing `duplicate key idx_24798_gsisid` on the player insert (`player.gsis_player_id` unique index). Round gate: signal #147804 (advance), ruling #148303 (Go 2026-11-04 07:02 UTC).

The translation-record specs were added by commits 373c52d3d (2026-09-30) and ccd88de2f (2026-10-19) under task ██████████████████████████████████████ (completed); the red is a regression against that shipped work, not the specs themselves being new.

## Plan

- [x] Reproduce: the spec file alone passes (31 passing); the full suite fails exactly the two cases with duplicate key idx_24798_gsisid.
- [x] Find the leak: `test/scripts.import.players-sleeper.spec.mjs` (held-gsis describe, added 2026-11-02 by 66806f790) seeds rows holding gsis ids 00-0099001 to 00-0099004 and never deleted them; it sorts directly before `scripts.import.players.spec.mjs`, whose translation-record cases insert 00-0099001.
- [x] Fix: an afterEach in that describe deletes every row holding those gsis ids plus its two seeds without one.
- [x] Measure: the sleeper and import-players pair fails 2 without the fix and passes 76 with it; the full suite passes 18816 with 0 failing.
- [x] Commit to league master as 37c11b11b (one file); ████████ owns the push.

## Outcome

Signal #148298 closes on the first green CI Test run that carries 37c11b11b. Pushes are currently held fleet-wide by bulletin #1402 (finance push block), so that run may wait on it.

## Key locations

- `/home/user/league/test/scripts.import.players.spec.mjs` — the two failing cases (translation record describe)
- `libs-server/player-translation-run.mjs`, `scripts/import-players.mjs` — code under test
- CI: mistakia/league Test workflow, newest failure run 41779905860 (forensic link on signal #148298)
