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. |
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
Re-reviewed 913bef2 with the review skills prismarine-protocol-data-review (mapper outputs, numeric passthrough and switch semantics), prismarine-architecture-review (generic validation ownership and opaque/custom type boundaries), and prismarine-review (the earlier feedback, updated tests and CI).
The numeric-label concern in the previous Astra review is addressed: numeric case relationships are now explicitly left unchecked, while impossible named cases are still rejected, including in mixed numeric/named switches. The documentation states that numeric acceptance is not a promise of engine parity. This is a useful generic check in the correct owning package, rather than another Minecraft-specific checker.
Executed the package example and 43 regression checks. A further candidate-versus-exact-base comparison over 114 installed Java/Bedrock protocol files found 112 accepted by both and the same two historical Bedrock schema failures in both; there were no newly rejected files and no input mutation in that check. This comparison uses the local dependency fixtures, not a fresh extraction of game data.
I found no remaining code-level blocker. Integration condition: the current head has no completed GitHub test checks; the author reports its workflow is awaiting approval. Have that existing CI run execute before treating this as fully merge-ready. I have not approved or rerun workflows, and there is no new inline finding to duplicate.
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.