---
title: Shorten the two over-budget data-view select_as aliases
type: task
status: planned
description: >-
  Two 61-byte aliases held out of the length gate truncate past Postgres 63 bytes at column index 10
  or beyond, blanking cells in production with no error and no log.
base_uri: user:task/league/data-views/shorten-over-budget-data-view-aliases.md
created_at: '2026-09-22T15:32:18.974Z'
entity_id: 44b69869-92c4-4a95-9f7f-773b909be853
owner_identity_uri: █████████████████████████
priority: Medium
public_read: true
tags:
  - user:tag/league-xo-football.md
  - user:tag/software-task.md
updated_at: '2026-09-22T15:32:18.974Z'
visibility_analyzed_at: '2026-11-05T23:49:01.467Z'
---

## Problem

`test/data-view-player-field-parity.spec.mjs:732` holds two aliases out of its length gate in `KNOWN_OVER_BUDGET` (verified still present 2026-09-22):

- `nfl_team_seasonlogs_receiving_yards_after_catch_over_expected`
- `nfl_team_seasonlogs_receiving_yards_after_catch_per_reception`

Both are 61 bytes, both from the 2026-08-18 `recv` to `receiving` conform (league `ac9c6ad63`, commit `66cf6ae4a`).

## Why it matters

`libs-server/data-views/select-string.mjs` emits `${select_as}_${column_index}`, a real SQL identifier. Postgres truncates one past 63 bytes with a NOTICE rather than an error. At 61 bytes each alias survives `_0` through `_9` at exactly the limit and truncates at column index 10 or beyond — so a view carrying eleven or more columns renders that cell blank in production. Nothing errors and nothing logs.

## Why no existing gate catches it

The parity spec's value-path assertions compare the client `player_value_path` to `select_as()` with BOTH sides untruncated, so they agree on a name the database will never return. The length assertion is the only thing that can see it, and it is holding these two out rather than failing.

## Plan

- [ ] **Shorten both aliases and their `player_value_path` reads in `app/core/data-views-fields/` in lockstep** — they must stay byte-identical or the cell blanks for a different reason. Follow the `adj` retirement precedent: drop a redundant token from the alias, leave the DB column and the persisted column id untouched. Do NOT shorten the persisted id, which is a saved-view contract.
- [ ] **Delete the two entries from `KNOWN_OVER_BUDGET`.**
- [ ] **Rule on the dead computed base name.** `app/core/data-views-fields/projected-table-fields.js` interpolates a `base_name` into both a persisted column id and a `player_value_path`; its `computed_base_names` set carries `points_added_positive_including_cap_savings`, conformed by the `adj` retirement. It is a DEAD lookup key today — no `create_field` call uses that base name, since those columns are defined in `fantasy-league-table-fields.js` rather than generated here. Not a live defect. Decide whether to delete the dead entry rather than maintain it; the retirement session deliberately left that judgment on a file it was only passing through.

## Resolution oracle

The spec's "holds out no alias that is already inside the budget" assertion FAILS when an entry is no longer over budget, so it reports completion and a stale exemption cannot linger. If the aliases turn out to have been shortened already, the whole job is deleting the two entries.

Verify with a run of that spec alone.

## Container

`league-test-pg` on `:5433`. Give the run its own database (`LEAGUE_DB_DATABASE=league_test_<slug>`) rather than sharing, and drop it when done.

## Key locations

- `test/data-view-player-field-parity.spec.mjs` — the gate and the held-out list
- `libs-server/data-views/select-string.mjs` — where `${select_as}_${column_index}` is emitted
- `app/core/data-views-fields/` — the `player_value_path` reads that must move in lockstep
- `repository/active/league/CLAUDE.md` — the truncation class, written up beside the two alias-hash traps (commit `cca454f08`)
