Repository navigation
validate switch cases against mapper values - #22
VasilisDragon wants to merge 1 commit into
Conversation
|
Found one edge here: mapper output |
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
The generic mapper/switch check belongs in this validator and the opaque-scope skips are appropriate, but the numeric-key ambiguity already identified here still needs handling. Mapper output "1" can match switch key "0x1" in the supported compiler while this literal-string membership check rejects it.
Leave ambiguous numeric relationships unchecked until the engine contract is unified, while retaining strict validation of semantic named cases. Add that control to the generic tests. I have no additional root cause to duplicate inline and did not rerun the full protocol matrix.
Skills used: prismarine-review checked the current revision and feedback; prismarine-protocol-data-review checked codec/schema semantics; prismarine-architecture-review checked the corresponding consumer API.
Reject literal switch cases that aren't outputs of a known mapper. Resolves container paths and aliases, and skips relationships with unknown semantics.
Adds generic tests.
npm testpasses on Node 14 and 24; the unchanged Minecraft protocol suite and all 112 physical PC/Bedrock protocol definitions pass.Fixes #21.