Conversation
The bin: unit tests decode hundreds of hand-built binary modules and assert whether each is accepted, but those expectations were only ever checked against Wizard itself. BinParserTester now records every module a test decodes, along with the result the test expects, into test/regress/binary/<test>.bin.wast, so the corpus can be run through the reference interpreter or any other engine; recording is off unless --record-binary is passed. The externalized assertion records the phase the specification should reject a module in, and fill-messages.sh substitutes the message the reference interpreter itself reports wherever the two agree. Of 762 trials, 64 of 79 files agree with the reference outright and 18 trials do not; check.sh attributes them per trial, and test/regress/binary/disagree holds hand-written text sources, encoded by the reference interpreter rather than by Wizard, confirming the two that are real: readElemDecl never type checks a flags=0 element segment against its table, and for flags=4 it derives the expected type from the table itself, so the check can never fail. Three unit tests assert those modules are valid, so their expectations are wrong; not fixed here. The corpus also runs under regress.sh, where seven files are expected failures because they were recorded without the extensions that a regress run enables by default. Co-Authored-By: Claude Opus 5 (1M context) <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.
The bin: unit tests decode hundreds of hand-built binary modules and assert whether each is accepted, but those expectations were only ever checked against Wizard itself. BinParserTester now records every module a test decodes, along with the result the test expects, into test/regress/binary/.bin.wast, so the corpus can be run through the reference interpreter or any other engine; recording is off unless --record-binary is passed. The externalized assertion records the phase the specification should reject a module in, and fill-messages.sh substitutes the message the reference interpreter itself reports wherever the two agree. Of 762 trials, 64 of 79 files agree with the reference outright and 18 trials do not; check.sh attributes them per trial, and test/regress/binary/disagree holds hand-written text sources, encoded by the reference interpreter rather than by Wizard, confirming the two that are real: readElemDecl never type checks a flags=0 element segment against its table, and for flags=4 it derives the expected type from the table itself, so the check can never fail. Three unit tests assert those modules are valid, so their expectations are wrong; not fixed here. The corpus also runs under regress.sh, where seven files are expected failures because they were recorded without the extensions that a regress run enables by default.