What's wrong
Coder/Serialization/YamlDeserializer.cs uses double.TryParse/int.TryParse/bool.TryParse at 14+ call sites (e.g. line 1263, and around lines 121-122, 1261-1262) with no CultureInfo/NumberStyles argument, so they parse against Thread.CurrentThread.CurrentCulture. YamlSerializer.SerializeLiteralExpression (YamlSerializer.cs:842) writes numeric literals through YamlDotNet's scalar emitter, which uses an invariant, dot-decimal representation (e.g. 3.14).
double.TryParse(string)'s default NumberStyles is Float | AllowThousands. On a culture where . is the group separator and , is the decimal separator (most of continental Europe: de-DE, fr-FR, es-ES, it-IT, ru-RU, pl-PL, nl-NL, etc.), "3.14" parses as 314 — a silent, wrong value, not an error. On cultures where parsing fails outright, the literal is silently dropped from the loaded AST.
Every generator and the inspector already parse/format with CultureInfo.InvariantCulture explicitly (Coder/Languages/LanguageGeneratorBase.cs:125,133, CSharpGenerator.cs:100,106, Coder.Graph/AstFields.cs:651), so this reads as an isolated oversight in YamlDeserializer.cs.
Failure scenario
Run Coder.Editor (or any consumer of YamlDeserializer) on a machine whose OS/thread culture is e.g. de-DE, open a .coder.yaml document containing a fraction literal such as 3.14; it loads back as 314.0 (or another wrong value) with no error reported, and round-tripping the file silently changes program behavior.
Suggested fix
Pass NumberStyles.Float, CultureInfo.InvariantCulture (and CultureInfo.InvariantCulture for the int/bool parses) at every TryParse in YamlDeserializer.cs, matching the pattern already used in AstFields.cs.
Acceptance criteria
A test that sets CultureInfo.CurrentCulture to de-DE around a serialize→deserialize round trip of a fraction literal asserts the value round-trips correctly.
What's wrong
Coder/Serialization/YamlDeserializer.csusesdouble.TryParse/int.TryParse/bool.TryParseat 14+ call sites (e.g. line 1263, and around lines 121-122, 1261-1262) with noCultureInfo/NumberStylesargument, so they parse againstThread.CurrentThread.CurrentCulture.YamlSerializer.SerializeLiteralExpression(YamlSerializer.cs:842) writes numeric literals through YamlDotNet's scalar emitter, which uses an invariant, dot-decimal representation (e.g.3.14).double.TryParse(string)'s defaultNumberStylesisFloat | AllowThousands. On a culture where.is the group separator and,is the decimal separator (most of continental Europe: de-DE, fr-FR, es-ES, it-IT, ru-RU, pl-PL, nl-NL, etc.),"3.14"parses as314— a silent, wrong value, not an error. On cultures where parsing fails outright, the literal is silently dropped from the loaded AST.Every generator and the inspector already parse/format with
CultureInfo.InvariantCultureexplicitly (Coder/Languages/LanguageGeneratorBase.cs:125,133,CSharpGenerator.cs:100,106,Coder.Graph/AstFields.cs:651), so this reads as an isolated oversight inYamlDeserializer.cs.Failure scenario
Run
Coder.Editor(or any consumer ofYamlDeserializer) on a machine whose OS/thread culture is e.g.de-DE, open a.coder.yamldocument containing a fraction literal such as3.14; it loads back as314.0(or another wrong value) with no error reported, and round-tripping the file silently changes program behavior.Suggested fix
Pass
NumberStyles.Float, CultureInfo.InvariantCulture(andCultureInfo.InvariantCulturefor the int/bool parses) at everyTryParseinYamlDeserializer.cs, matching the pattern already used inAstFields.cs.Acceptance criteria
A test that sets
CultureInfo.CurrentCulturetode-DEaround a serialize→deserialize round trip of a fraction literal asserts the value round-trips correctly.