Repository navigation
validate switch cases against mapper values - #22
VasilisDragon wants to merge 2 commits 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.
|
Left numeric cases unchecked while keeping named-case validation, including mixed switches. Added generic controls for that boundary. I also verified the raw-ID passthrough added in ProtoDef #183. The package tests and unchanged ProtoDef suite pass, and private validation accepts all 113 physical PC/Bedrock protocol definitions without input mutation. Numeric acceptance remains an exclusion, not a guarantee of engine parity. |
|
Could a maintainer approve the pending CI run for the latest revision? GitHub is waiting for workflow approval, so the jobs haven't started yet. Thanks. |
Reject literal named switch cases that aren’t outputs of a known mapper, following ordinary container paths and unambiguous aliases. Leave unknown semantics and numeric cases unchecked where the engines differ.
Adds generic regression controls. Package tests pass on Node 24.15.0; private checks also pass the unchanged ProtoDef suite and all 113 physical PC/Bedrock protocol definitions.
Fixes #21.