docs: document cross-season stat accumulation decision + season 11 start #195

Closed
opened 2026-04-08 00:16:16 +00:00 by cal · 1 comment
Owner

Decision

Refractor stat accumulation is cross-season by design — a card's progress accumulates across all seasons, not reset per season. This is the intended behavior.

Critical caveat: Accumulation starts at Season 11 (launching later this month, April 2026). Stats from seasons 1–10 must NOT count toward refractor progress.

Current State

The evaluator sums stats across all seasons with no season filter. The PRD (04-milestones.md) says "cumulative within a season" which contradicts the actual design intent.

Work Needed

  1. Verify the evaluator has a season floor — ensure PlayerSeasonStats queries filter to season_id >= 11 (or whatever the Season 11 ID is). If there's no filter, add one.
  2. Update the PRD — change "cumulative within a season" to "cumulative across all seasons, starting from Season 11"
  3. Add REFRACTOR_START_SEASON config — environment variable or constant so the season floor is configurable, not hardcoded

References

  • app/services/refractor_evaluator.py — evaluation logic
  • card-creation/docs/prd-evolution/04-milestones.md — stale spec text
## Decision Refractor stat accumulation is **cross-season by design** — a card's progress accumulates across all seasons, not reset per season. This is the intended behavior. **Critical caveat:** Accumulation starts at **Season 11** (launching later this month, April 2026). Stats from seasons 1–10 must NOT count toward refractor progress. ## Current State The evaluator sums stats across all seasons with no season filter. The PRD (`04-milestones.md`) says "cumulative within a season" which contradicts the actual design intent. ## Work Needed 1. **Verify the evaluator has a season floor** — ensure `PlayerSeasonStats` queries filter to `season_id >= 11` (or whatever the Season 11 ID is). If there's no filter, add one. 2. **Update the PRD** — change "cumulative within a season" to "cumulative across all seasons, starting from Season 11" 3. **Add `REFRACTOR_START_SEASON` config** — environment variable or constant so the season floor is configurable, not hardcoded ## References - `app/services/refractor_evaluator.py` — evaluation logic - `card-creation/docs/prd-evolution/04-milestones.md` — stale spec text
Claude added the
ai-working
label 2026-04-08 13:01:24 +00:00
Collaborator

PR #209 opened: #209

Approach:

  • Added REFRACTOR_START_SEASON = int(os.environ.get("REFRACTOR_START_SEASON", "11")) to db_engine.py alongside the existing game-config constants
  • Applied season >= REFRACTOR_START_SEASON filter to both BattingSeasonStats and PitchingSeasonStats queries in refractor_evaluator.py

Note on PRD: card-creation/docs/prd-evolution/04-milestones.md is untracked in the paper-dynasty-card-creation repo so the text update ("cumulative across all seasons, starting from Season 11") was applied locally but needs a separate commit in that repo.

PR #209 opened: https://git.manticorum.com/cal/paper-dynasty-database/pulls/209 **Approach:** - Added `REFRACTOR_START_SEASON = int(os.environ.get("REFRACTOR_START_SEASON", "11"))` to `db_engine.py` alongside the existing game-config constants - Applied `season >= REFRACTOR_START_SEASON` filter to both `BattingSeasonStats` and `PitchingSeasonStats` queries in `refractor_evaluator.py` **Note on PRD:** `card-creation/docs/prd-evolution/04-milestones.md` is untracked in the `paper-dynasty-card-creation` repo so the text update ("cumulative across all seasons, starting from Season 11") was applied locally but needs a separate commit in that repo.
Claude added
ai-pr-opened
and removed
ai-working
labels 2026-04-08 13:03:35 +00:00
cal closed this issue 2026-04-08 13:25:50 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-database#195
No description provided.