fix: prevent self-referential EventAchievement infinite loops#4908
Open
wescopeland wants to merge 4 commits into
Open
fix: prevent self-referential EventAchievement infinite loops#4908wescopeland wants to merge 4 commits into
wescopeland wants to merge 4 commits into
Conversation
Jamiras
reviewed
May 21, 2026
| ) { | ||
| $fail('Source achievement cannot be the same as the event achievement.'); | ||
| } | ||
| }; |
Member
There was a problem hiding this comment.
Would we ever want to allow any event achievement to depend on another event achievement? Should the restriction just be "source achievement cannot be event achievement"?
Otherwise, we could still end up with an infinite loop if any achievement in the chain pointed back to the start node: A -> B -> C -> A
Member
Author
There was a problem hiding this comment.
Good point.
I've reverted most of the original implementation in latest (let's just treat it as a data issue if it happens in prod somehow) and tightened this rule.
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.
https://discord.com/channels/476211979464343552/1026595325038833725/1506645623003156500