Conversation
Added a multi-sub-roll `Group` target reject in `parseSort` after the deep dice-pool guard, throwing `INVALID_SORT_TARGET` with a deferred-status message via `unwrapTransparent` (the helper from #92). Removed the `should accept multi-sub-roll group` parser shape test and added `errors` cases for `{1d6, 2d8}s` and the parens-wrapped `({1d6, 2d8})s` variant. Refreshed the `evalSort` JSDoc to state that multi-sub-roll Groups are rejected at parse time instead of falling through to the flat-pool path. Co-Authored-By: Claude Opus 4.7 (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.
Rejected multi-sub-roll
Grouptargets ({a, b}s,({a, b})s) at parse time withINVALID_SORT_TARGETand a deferred-status message.evalSortflat-sorts produced dice and cannot honor Stage 3 spec §3 hierarchical sort, which6b6ffbc(#82) explicitly deferred — accepting the syntax until then would silently ship non-spec behaviour.unwrapTransparentwalk inparseSortafter thedeepContainsDicePoolguard; rejects when the unwrapped base is aGroupwith two or more sub-expressions.should accept multi-sub-roll groupparser shape test; addederrorscases for{1d6, 2d8}sand({1d6, 2d8})s.evalSortJSDoc to state that multi-sub-roll Groups are rejected at parse time.Closes #101
Drafted with AI assistance