Skip to content

fix: evalGroupModifier surfaces versusMetadata from dropped sub-rolls #99#111

Merged
edloidas merged 1 commit into
masterfrom
issue-99
Apr 29, 2026
Merged

fix: evalGroupModifier surfaces versusMetadata from dropped sub-rolls #99#111
edloidas merged 1 commit into
masterfrom
issue-99

Conversation

@edloidas
Copy link
Copy Markdown
Owner

Gated propagateMetadata in evalGroupModifier on !isDropped so dropped sub-rolls' Versus metadata no longer surfaces on RollResult.degree. The unconditional propagation contradicted the invariant that degree must reflect dice contributing to totalkh/kl/dh/dl over a Group with a vs sub-roll could leak the dropped outcome's degree.

  • Wrapped the per-sub propagateMetadata call in if (!isDropped) { … } and rewrote the inline comment to reflect kept-only propagation and the surviving NESTED_VERSUS collision path.
  • Added three tests under sub-roll mode (multi sub-roll with keep/drop): dropped vs sub leaves degree undefined, kept vs sub propagates Success, two kept vs subs (3-sub group with kh2) still throw NESTED_VERSUS.

Closes #99

Drafted with AI assistance

…99

Gated `propagateMetadata` call in `evalGroupModifier` on `!isDropped` so dropped sub-rolls' Versus metadata no longer leaks onto the outer `RollResult.degree`.
Updated inline comment to reflect kept-only propagation and the surviving `NESTED_VERSUS` collision path.
Added tests covering dropped-vs-sub erasure, kept-vs-sub propagation, and the `NESTED_VERSUS` collision when two kept sub-rolls carry metadata.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@edloidas edloidas self-assigned this Apr 29, 2026
@edloidas edloidas merged commit 1548717 into master Apr 29, 2026
10 checks passed
@edloidas edloidas deleted the issue-99 branch April 29, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: evalGroupModifier surfaces versusMetadata from dropped sub-rolls

1 participant