-
-
Notifications
You must be signed in to change notification settings - Fork 144
feat(engine): journal effect-driven combat membership as CR733 resolved commands #6650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Attackreceipts get no coherency validation.Every other family in this validator rejects self-contradicting receipts (no-op transforms, impossible counter predecessors, out-of-range allocator high-waters).
Attackis passed through unchecked even though one relation is statically decidable:AttackTarget::Player(p)must name the same player asresulting_defending_player(CR 506.2 / CR 508.1c — a creature attacking a player attacks the defending player). A corrupted or hand-crafted journal withresulting_defending_player: P0, resulting_attack_target: Player(P1)would validate and then be installed verbatim byapply_resolved_combat_membership, seating an attacker whose defender and target disagree.🛡️ Proposed check
match &command.edit { + // CR 508.1c: a creature attacking a player attacks the + // defending player it was seated against, so the recorded + // pair cannot name two different players. + ResolvedCombatMembershipEdit::Attack { + resulting_defending_player, + resulting_attack_target: AttackTarget::Player(player), + } if player != resulting_defending_player => { + return Err(ResolvedRulesJournalError::InvalidSerializedAuthority( + "combat-membership attack names a target player other than its \ + defending player" + .to_string(), + )); + } // CR 509.1a: a creature is chosen to block an attacking📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Path instructions