Skip to content

fix(season): explain that season date-times must be quoted - #325

Merged
TheMeinerLP merged 5 commits into
mainfrom
fix/season-quoted-dates
Sep 29, 2026
Merged

TheMeinerLP merged 5 commits into
mainfrom
fix/season-quoted-dates

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Problem

With the documented unquoted form from: 2026-12-01T00:00:00, the lobby refused to start with seasons.<id>.from: is required. Found in a local test of #321.

Root cause

avaje-config uses SnakeYAML when it is on the classpath (transitively the case in the app). SnakeYAML resolves unquoted date-times to java.util.Date, and avaje-config's YamlLoaderSnake only keeps String/Number/Boolean values, so the key is silently dropped.

The tests missed it: there was no SnakeYAML on the season test classpath, and Config.setProperty bypasses YAML entirely.

Fix

  • Date-times must be quoted. The startup error and the live WARN for a missing from/to now say (quote date-times: from: "2026-12-01T00:00:00").
  • README, docs/lobby-modules.md and season.yaml show quoted values.
  • SeasonConfigReader takes a Configuration (production: the live Config.asConfiguration(), so the live kill switch keeps working).
  • SnakeYAML is added to the season test runtime.
  • New SeasonYamlQuotingTest loads real YAML: quoted values are read, unquoted from/to abort startup with the hint, and the live WARN is logged once.

Rejected

Accepting the Date directly: avaje-config has no hook for it, it would need our own YAML loading, and it raises UTC vs local time conversion issues.

Operator note

Existing configs with unquoted date-times must quote them.

Tests

./gradlew build is green.

OpenSpec

openspec/changes/season-quoted-dates

https://claude.ai/code/session_01A7aAe2E6wAEbi6jjnyPTWH

@TheMeinerLP
TheMeinerLP requested a review from a team as a code owner September 29, 2026 13:39
@github-actions

Copy link
Copy Markdown
Contributor

Test results

  264 files    264 suites   16m 16s ⏱️
  444 tests   443 ✅ 1 💤 0 ❌
1 332 runs  1 329 ✅ 3 💤 0 ❌

Results for commit 0990e02.

@TheMeinerLP
TheMeinerLP merged commit fc3924d into main Sep 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant