fix(season): explain that season date-times must be quoted - #325
Merged
Merged
Conversation
An unquoted YAML date-time is resolved to a non-text type that avaje-config drops, so seasons.<id>.from/to read as missing. The message now says to quote them, at startup and in the live warning. The reader takes a Configuration so a test can load real YAML. Claude-Session: https://claude.ai/code/session_01A7aAe2E6wAEbi6jjnyPTWH
Contributor
Test results 264 files 264 suites 16m 16s ⏱️ Results for commit 0990e02. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With the documented unquoted form
from: 2026-12-01T00:00:00, the lobby refused to start withseasons.<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'sYamlLoaderSnakeonly 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.setPropertybypasses YAML entirely.Fix
from/tonow say(quote date-times: from: "2026-12-01T00:00:00").docs/lobby-modules.mdandseason.yamlshow quoted values.SeasonConfigReadertakes aConfiguration(production: the liveConfig.asConfiguration(), so the live kill switch keeps working).SeasonYamlQuotingTestloads real YAML: quoted values are read, unquotedfrom/toabort startup with the hint, and the live WARN is logged once.Rejected
Accepting the
Datedirectly: 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 buildis green.OpenSpec
openspec/changes/season-quoted-dateshttps://claude.ai/code/session_01A7aAe2E6wAEbi6jjnyPTWH