Add comprehensive mod conflict and mode-specific validation#144
Open
Add comprehensive mod conflict and mode-specific validation#144
Conversation
- Add all invalid mod combinations to conflict check: - NF/RX/AP + SD (fail prevention + sudden death) - NF/RX/AP + PF (fail prevention + perfect) - RX/AP + NF (redundant fail prevention) - PF + SD (redundant/conflicting fail conditions) - SO + RX/AP (spunout + auto-aim conflicts) - Existing: DT+HT, EZ+HR, RX+AP, HD+FI, multiple keymods - Add mode-specific mod validation: - SpunOut (SO) and Autopilot (AP): Standard mode only - FadeIn (FI), Random (RN), Key mods: Mania mode only - Update score submission to check mode compatibility - Restrict users who submit invalid mod combinations This prevents future submissions like NF+RX that were found in historical data (1,544 relax scores with NF bit, 36 autopilot scores with NF bit).
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.
Summary
This PR implements comprehensive validation for mod combinations and mode-specific mods to prevent invalid score submissions.
Changes
Mod Conflict Validation
Added detection for all invalid mod combinations:
Mode-Specific Validation
Added
incompatible_with_mode()method to check mode restrictions:Score Submission
Updated score submission endpoint to validate both:
.conflictcheck.incompatible_with_mode()checkUsers will be auto-restricted if they attempt to submit invalid combinations.
Context
During achievement backfill analysis, we discovered 1,544 relax scores and 36 autopilot scores with the NF (NoFail) mod bit set, which is semantically meaningless since RX/AP already prevent failure. This validation prevents such submissions in the future.
Testing
All validation logic was tested with 37 test cases covering:
All tests passed ✓