---
title: Expose derived roster state in team context doc
type: task
status: planned
description: >-
  Add reserve eligibility, post-deadline salary and market salary to the roster rows of the per-team
  context document, reusing the shared helpers, so sessions stop re-deriving roster state from raw
  tables and getting it wrong.
base_uri: user:task/league/expose-derived-roster-state-in-team-context-doc.md
created_at: '2026-09-30T05:56:08.837Z'
entity_id: 02efbdcc-a59e-4bda-a367-d486c2787582
owner_identity_uri: █████████████████████████
priority: Low
public_read: true
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-10-03T03:08:21.821Z'
visibility_analyzed_at: '2026-11-05T23:49:13.585Z'
---

Three roster errors in the 2026-07-27 offseason pass came from sessions re-deriving roster state by hand. `libs-server/context-docs/generate-team-context.mjs` still exposes none of the derived fields as of 2026-09-30. Brief: [[██████████████████████-███████-█████████████-██████-█████-██-██████-███████-██████]].

## Plan

- [ ] Operator decides the audience: whether eligibility and market salary appear on every team's public document or only the requesting team's. Everything involved is already public read data.
- [ ] Add a reserve-eligible column via `libs-shared/is-reserve-eligible.mjs`, and make an ineligible reserve player prominent.
- [ ] Add post-deadline salary via `libs-shared/get-extension-amount.mjs`, and market salary from `league_format_player_projection_values`.
- [ ] Add a test under `test/`, run it against PG16, and deploy per `repository/active/league/CLAUDE.md`.
