feat: expose the conformance corpus from the crate - #13
Merged
Conversation
profiles.json declares which cases a restricted implementation may reject — tish-gba bakes to two sound chips and legitimately rejects most of the language. Nothing verified that declaration. The runner here only checks that every case is ACCOUNTED FOR in a profile, not that the implementation actually behaves that way, so a profile could claim a subset it did not have. The corpus ships inside the crate but a consumer cannot read a dependency's data files, so it was unreachable from the one place that needed it. Now it is embedded via include_str! and exposed as `deckfile::corpus::cases()` and `profiles()`, so a subset implementation can run the same inputs and prove it accepts everything it does not declare it rejects. Generated alongside the rest of the crate, so the embedded copy cannot drift from the corpus it came from.
… assert The gba profile listed 001, 002 and 004 under mustAccept. All three contain constructs the bake rejects by design — `scale`, `remove_track`, `transpose` — so the profile claimed a subset it did not have. Nothing noticed, because until now nothing ran the profile against the implementation. Moved those to mayReject with the actual reason, and added 012-gba-subset: a song built only from what the GBA bake supports, so mustAccept asserts something real instead of being empty. An empty mustAccept would make the test vacuous — it would pass no matter how far the subset shrank. The sharp-name parsing that 001 pins is still covered on the GBA side by 012.
3b87e8f described this change but did not contain it: a `git checkout` cleaning up after a negative test reverted profiles.json between the edit and the commit, so the message claimed a fix the content did not have. CI caught it — 012-gba-subset was unaccounted for in any profile. The correction itself is unchanged: 001, 002 and 004 move to mayReject because each uses a construct the GBA bake rejects by design (`scale`, `remove_track`, `transpose`), and mustAccept becomes 012-gba-subset so it asserts something real rather than being empty.
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.
profiles.jsondeclares which cases a restricted implementation may reject — tish-gba bakes to two sound chips and legitimately rejects most of the language.Nothing verified that declaration. The runner only checks each case is accounted for in a profile, not that the implementation behaves that way. A profile could claim a subset it didn't actually have, and the corpus would still pass.
The corpus ships inside the crate, but a consumer cannot read a dependency's data files — so it was unreachable from the one place that needed it.
Now embedded via
include_str!and exposed:so a subset implementation can run the same inputs and prove it accepts everything it doesn't declare it rejects.
Generated alongside the rest of the crate, so the embedded copy can't drift from the corpus it came from.
Unblocks the last item of the original plan: tish-gba running the shared corpus against its
gbaprofile.