You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use shared character sessions for gathering identity - #9
Gathering now uses TLibs' authoritative character session for discovery ownership and visibility. When the provider is absent or character setup is still pending, normal character actions have no identity; they never substitute an account UUID. Existing discoveries keep their stored character UUIDs across reconnects and switches.
The direct RPCharacters dependency remains narrowly for creation-layer wisdom and intelligence. Its active model must match the shared session before supplying attributes. Using MMOCore totals instead would change discovery probability. Admin bypass and the existing chance calculation remain unchanged.
Validation: Java 21 mvn clean verify passed all 36 tests, with 100% instruction, branch and line coverage (5,383 instructions, 652 branches, 1,143 lines). Tests exercise provider absence, pending readiness, mismatched character models, uppercase UUIDs, switching, provider unregistration, unchanged probability and admin bypass. Astra review passed. No server deployment is included.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Summary
Summary by CodeRabbit
Bug Fixes
Active character details now match the character selected in the current session, including when character IDs differ only by letter case.
Character identity now reflects session changes immediately and is unavailable when there is no active session.
Chores
Updated supporting components to newer versions.
Walkthrough
The character bridge now obtains the active character ID from the current session. It returns the RPC character only when its ID matches the session ID. Dependency versions and integration tests are also updated.
Changes
Character identity
Layer / File(s)
Summary
Session-based character lookup pom.xml, src/main/java/net/tfminecraft/gathering/utils/CharacterBridge.java, src/test/java/net/tfminecraft/gathering/IntegrationTest.java
The rpcharacters and tlibs versions are updated. UUID lookup now uses the current session ID. Active-character lookup returns the RPC character only when its ID matches the session ID, ignoring case. Tests cover missing sessions, changing identities, mismatches and provider unregistration.
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
size:S10-29 effective changed lines (tests excluded in mixed PRs).
1 participant
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.
Gathering now uses TLibs' authoritative character session for discovery ownership and visibility. When the provider is absent or character setup is still pending, normal character actions have no identity; they never substitute an account UUID. Existing discoveries keep their stored character UUIDs across reconnects and switches.
The direct RPCharacters dependency remains narrowly for creation-layer wisdom and intelligence. Its active model must match the shared session before supplying attributes. Using MMOCore totals instead would change discovery probability. Admin bypass and the existing chance calculation remain unchanged.
Pins TLibs 2.3.0 and the published RPCharacters 2.16.0 provider. Part of TF-Minecraft/RPCharacters#89. Documentation: TF-Minecraft/Docs#161.
Validation: Java 21
mvn clean verifypassed all 36 tests, with 100% instruction, branch and line coverage (5,383 instructions, 652 branches, 1,143 lines). Tests exercise provider absence, pending readiness, mismatched character models, uppercase UUIDs, switching, provider unregistration, unchanged probability and admin bypass. Astra review passed. No server deployment is included.