Fix database-backed command execution and tab completion - #73
Merged
Conversation
remdui
marked this pull request as ready for review
July 27, 2026 15:15
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
/unban,/unmute, and/unbanipdatabase-backed suggestions through feature-scoped background tasks instead of Velocity command/Netty threadsMap.entry(...)sanction target resolution path with a null-safe persisted identity lookup that returns usernames only/fr acceptall,/fr denyall,/fr disable, and/fr enable, avoiding unrelated database queries on TAB/2fa reset <TAB>account-store and persisted-identity lookups through the feature task manager, with prefix filtering, limits, and failure isolationRepository-wide related-problem audit
Reviewed all
FeatureCommand.suggestAsyncimplementations, Brigadier suggestion providers, and command classes that directly reference ORM contexts or database-backed services.The remaining completion providers use online-player snapshots, immutable command metadata, configuration, or in-memory registries. They do not perform the database-backed identity resolution that caused the Friends/Sanctions failures. The additional related issue found was
/2fa reset <TAB>, which has now been fixed and covered by regression tests.Root causes
SanctionsService.suggestActiveTargetNamescreatedMap.entry(playerId, username)even when the username resolver returnednull;Map.entryrejects null values and caused the reported transaction stack trace.FriendCommand.suggestAsynceagerly loaded every friend/request/block collection before deciding which subcommand was being completed. This meant even/fr acceptall <TAB>queried unrelated data despite accepting no argument./fr listwhile caches were cold./2fa reset <TAB>synchronously called the ORM-backed account store and persisted player resolver from the command thread.Validation
Reported evidence
The supplied production trace points to
SanctionsService.suggestActiveTargetNamesandMap.entryas the immediate/unban//unmutetab-completion failure.