---
title: 'league: 3 residual Test failures surfaced after CI infra unblock'
type: task
status: completed
description: >-
  After the install/lint/private/roles/RFA CI cascade was fixed (league Test now runs 2054 passing),
  3 app-level test failures remain: 2 roster year-rollover shortfalls and 1 data-view adp_format
  duplicate-key isolation.
base_uri: user:task/league-residual-test-failures-after-ci-unblock.md
created_at: '2026-06-25T13:22:54.377Z'
entity_id: d0c98ba2-5dae-4dde-b144-6625b24bfad7
finished_at: '2026-06-25T15:01:39.733Z'
observations:
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
owner_identity_uri: █████████████████████████
priority: Medium
public_read: true
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-06-25T15:01:39.733Z'
visibility_analyzed_at: '2026-11-05T23:48:06.401Z'
---

## Context

The league `Test` job was red for ~5 weeks, masked at the `Clean install` step by a `git+ssh` lockfile-resolution break. Fixing that (commit 35a0491f) plus the downstream cascade — lint (27851acf), `#private` barrel import (75ee9b5e), CI postgres roles (f30ad242), and the RFA `seasons`-vs-`leagues` column bug (a1d34e49) — took the suite from "0 tests run" to 2054 passing / 3 failing (run 28172793819). These 3 are pre-existing app/test bugs that were never exercised while CI was red.

## Plan

Investigate and fix the residual failures below, then confirm the league `Test` job is green on master.

### 1. Roster year-rollover shortfall (2 failures) — ownerless, needs roster-gen domain investigation

- `test/scripts.generate.roster.spec.mjs`:
  - "generate rosters for next year" — `run()` throws `row-count shortfall: written=0 expected=12`
  - "scrubs non-REGULAR tags during year-rollover" — `written=1 expected=12 for (lid=1, year=2027, week=0)`
- Oracle: `scripts/generate-rosters.mjs:145` (`source_team_count` = 12 teams; the post-write `countDistinct(tid)` on `rosters_players` filtered by `{lid, year, week=nextWeek}` returns 0-1).
- Confirmed NOT a schema/column issue: `rosters_players` has `lid/year/week/tid` (all NOT NULL) and the `inserts` map (generate-rosters.mjs:86) populates them. So either the rollover path writes rows to a different slice than the oracle checks, or the rollover genuinely under-generates. The post-write oracle was added recently (same pattern as the RFA shortfall oracle) — it may be correctly detecting a pre-existing rollover bug, or its expectation is wrong for the year-boundary (week=0) case. Needs a local repro (PG + `test/scripts.generate.roster.spec.mjs`) to determine oracle-bug vs generation-bug before fixing — roster generation is core data, do not guess.

### 2. Data-view adp_format duplicate-key (1 failure) — concurrent session's active domain

- `Data View > Result Equivalence > player_adp single year_offset ...`: `INSERT INTO adp_format (id...) VALUES ('test-adp-fmt-zz'...) duplicate key value violates unique constraint "adp_format_axis_unique"`.
- A test-isolation collision on a hardcoded `adp_format` id. As of this writing a concurrent session was actively pushing data-views test fixes (commits 5ae68b3b, 1cb6f52f, 66c1e6fe) for exactly the Result-Equivalence suite, so this is expected to be resolved by that work — verify before independently touching it.

## Done-when

- `test/scripts.generate.roster.spec.mjs` passes locally and in CI.
- league `Test` job green on master.
