stack/09 yaml reader - #325
Merged
Merged
Conversation
amis92
force-pushed
the
stack/09-yaml-reader
branch
from
July 31, 2026 05:34
4682b52 to
0486c31
Compare
amis92
force-pushed
the
stack/09-yaml-reader
branch
from
July 31, 2026 05:40
0486c31 to
edae468
Compare
Adds WarHub.ArmouryModel.Source.Yaml with YamlBattleScribeReader.ReadSourceNode and YamlToXmlConverter, converting a YAML representation model into the XML shape expected by the existing BattleScribe deserializer. Covered by a single TDD test parsing a minimal gameSystem YAML document into a GamesystemNode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eader Address code review findings on the YAML-to-XML converter: unguarded YAML node casts now throw YamlBattleScribeFormatException naming the offending key instead of raw InvalidCastException; invalid XML attribute/element names (spaces, colons like xml:lang) now throw the same instead of raw XmlException; scalar keys that are XML child text elements per the XSD (comment, description, customNotes, readme) are now emitted as child elements instead of attributes, fixing silent data loss on deserialize; removed a fabricated "associations" collection mapping with no XSD/model backing; dropped the unused FluentAssertions test dependency; sharpened the raw-string round-trip test with an unquoted ambiguous scalar; and noted that multi-document YAML streams are intentionally unsupported. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, strict mode) Add two new test cases to YamlBattleScribeReaderTests: - ReadSourceNode_preserves_modifiers_costs_constraints_and_text: validates that a real-world catalogue fragment with modifiers, conditionGroups, costs, constraints, profiles with $text characteristics, and comment are all correctly parsed and preserved. - ReadSourceNode_throws_on_unknown_collection_key: verifies that the reader strictly validates collection keys and throws YamlBattleScribeFormatException for unknown collections. Both tests pass; all 6 tests in the suite pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcYK8hmTmXi8eLWpg9LGKJ
- Add StringComparison.Ordinal to Assert.Contains calls at lines 169 and 189 - Add missing assertions for condition group Type, constraint properties (Field, Value, Id), and entry Comment Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcYK8hmTmXi8eLWpg9LGKJ
Add Wh40kDataIntegrationTests, a theory over every *.yaml file in WH40K11E_DATA (wh40k-11e on branch json-to-yaml), plus a sanity check that the loaded root has a non-empty Name and at least one populated child collection (catches loads that "succeed" but are structurally hollow due to a scalar key that silently missed the attribute/TextElementNames paths). Extend YamlToXmlConverter to handle two real-data collection keys absent from Catalogue.xsd: `associations` -> `association` (a documented NewRecruit extension, object-shaped items, added to ItemElementNames) and `alias` (a scalar-list Rule extension with no XSD precedent, handled via a new RepeatedTextElementNames mechanism since its items aren't mappings). Also extend ModifierKind (replace, ceil, floor) and ConditionGroupKind (count) - real-data enum literals missing from wham's hand-written enums and from the bundled (stale) Catalogue.xsd. Purely additive, no exhaustive switches over these enums exist within this build's dependency graph. All 47 wh40k-11e files load successfully; largest file (Imperium - Space Marines.yaml, 4.4 MB) loads in ~372ms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds SetupFromFiles to SpecRosterEngineAdapter so specs/fixtures can drive the wham roster engine from real .cat/.gst (XML) or .yaml data files instead of inline protocol data, using YamlBattleScribeReader for YAML and DeserializeSourceNodeAuto for XML. Mirrors Setup's post-compilation wiring (_catalogCompilation, _coreEngine, _state) exactly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…taSource) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…upFromFiles parse errors Every_wh40k11e_file_loads now uses [Theory(SkipTestWithoutData = true)] so a clean CI run without WH40K11E_DATA skips the integration cases instead of hard-failing on empty MemberData. SpecRosterEngineAdapter.SetupFromFiles wraps per-file parsing so any parse failure (YAML or XML) is rethrown as an InvalidOperationException naming the offending file, with the original exception preserved as InnerException. Adds a regression test asserting the second (malformed) file's name appears in the thrown message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Picks up the New Recruit console host + public Docker image publishing work (feat/muster-support), needed by Muster's engine adapter chain.
amis92
force-pushed
the
stack/09-yaml-reader
branch
from
July 31, 2026 05:41
edae468 to
a0e3cbb
Compare
This was referenced Jul 31, 2026
amis92
added a commit
that referenced
this pull request
Jul 31, 2026
`[Unreleased]` had been empty since 0.14.0 (28 Feb) even though several changes had landed. Brings it up to date with everything currently on `main`: - the roster-engine stack (#315-#322) and the YAML reader (#325) - the NewRecruit format additions (#308) and the MSBuild targets file (#313) - the zipped-datafile fix (#324) and the dependency bump (#327) - the `prepend` documentation and tests (#326), crediting @The4D6 for the original contribution in #221 The `NodeFactory.Force` breaking change is called out explicitly with the migration, since it lands in the shipped `WarHub.ArmouryModel.Source` package. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬