Skip to content

fix(config): warn when restore-full-profile cannot run while login-reassert is disabled - #178

Merged
minekube-ai-engineer[bot] merged 1 commit into
mainfrom
fix/login-reassert-inert-warning
Oct 21, 2026
Merged

minekube-ai-engineer[bot] merged 1 commit into
mainfrom
fix/login-reassert-inert-warning

Conversation

@minekube-ai-engineer

Copy link
Copy Markdown

Root cause

login-reassert.restore-full-profile is read only from inside the late pre-login /
game-profile handlers (VelocityLateReassertListener, BungeeLateReassertListener), and
every one of them returns early while login-reassert.enabled is false. So the
combination enabled: false + restore-full-profile: true is inert: no warning, no error,
no log line naming the keys - the operator believes they restored Mojang UUIDs and nothing
changed.

Field impact (2026-10-21, endpoint servermc4321, Velocity + VeloAuth): through the
Connect tunnel the proxy saw the offline UUID c54a0640-449b-33a4-8c07-0505d5707171
(MD5 offline UUID of fraze_wireq) while a direct join produced the Mojang UUID
063f9b8a-2359-4818-af31-df4a43da1f7d. Backend LuckPerms flagged the player as non-Mojang
(type 3) and the join died at the auth/limbo stage. Diagnosis took hours of log reading on
both sides because neither log said the option could not act.

Changes

  • core/.../config/ConfigLoader.java - one WARN at startup when the loaded proxy config
    has login-reassert.enabled: false together with restore-full-profile: true
    (INERT_RESTORE_FULL_PROFILE_WARNING). ConfigLoader.load() is the single config path on
    Velocity and Bungee, so every proxy platform gets exactly one line; the instanceof ProxyConnectConfig guard keeps Spigot silent.
  • core/src/main/resources/proxy-config.yml - the restore-full-profile comment now
    states it only has an effect while login-reassert.enabled is true, in addition to the
    existing LibreLogin new-uuid-creator: MOJANG prerequisite.
  • docs/login-plugin-integration.md - same dependency stated for integrators.
  • velocity/.../VelocityLateReassertListener.java - DEBUG line naming Connect's profile
    UUID and the UUID the GameProfileRequestEvent actually carries when they differ (plus the
    current restore-full-profile value), so "right player, wrong UUID - but only through the
    tunnel" is diagnosable from the endpoint log alone.
  • velocity/AGENTS.md (the velocity/CLAUDE.md target) - records the inert combination
    so the guardrail is not silently deleted later.

No behaviour change: the re-assert floor, its ordering levers, both shipped defaults and
every fail-safe path are untouched. This is the operator-facing guardrail the report asked
for, not a functional fix.

Tests

RED first on the unfixed tree (assertions, not compile errors):

  • ConfigLoaderTest.warnsWhenRestoreFullProfileCannotRunBecauseLoginReassertIsDisabled -
    WantedButNotInvoked (nothing warned).
  • ConfigLoaderTest.shippedProxyTemplateMarksRestoreFullProfileAsConditionalOnEnabled -
    AssertionFailedError (template did not state the dependency).
  • VelocityLateReassertListenerTest.gameProfileLogsConnectAndEventUuidsAtDebugWhenALoginPluginLeftItsOwn
    • AssertionFailedError (no DEBUG line carried both UUIDs).

GREEN after the change, with the negative cases pinned so the warning cannot go noisy:

  • doesNotWarnForTheShippedLoginReassertDefaults (enabled: true / restore-full-profile: false)
  • doesNotWarnWhenOnlyOneLoginReassertKeyIsSet (enabled: false / restore-full-profile: false)
  • gameProfileDoesNotLogUuidsWhenTheProfileAlreadyMatches

Local gate: ./gradlew build on JDK 21 - green, including :core:test, :velocity:test,
:velocity:eventOrderTest (real VelocityEventManager) and :bungee:test/:spigot:test.
core/build/test-results/test/TEST-com.minekube.connect.config.ConfigLoaderTest.xml:
tests="12" failures="0" errors="0";
velocity/build/test-results/test/TEST-...VelocityLateReassertListenerTest.xml:
tests="13" failures="0" errors="0".

login-reassert.restore-full-profile is only read from inside the late
pre-login and game-profile handlers, and all of them return early while
login-reassert.enabled is false. An operator who flips only the second key
sees no change at all: no log line, no error, just the UUID they were
trying to replace (endpoint servermc4321, 2026-10-21: offline UUID
c54a0640-... through the tunnel vs Mojang 063f9b8a-... on a direct join).

- ConfigLoader warns once at startup for enabled: false + restore-full-profile:
  true; it is the single config path on both proxy platforms and stays silent
  on Spigot.
- proxy-config.yml and docs/login-plugin-integration.md now state that
  restore-full-profile only has an effect while enabled is true.
- Velocity's game-profile re-assert logs Connect's UUID and the UUID the event
  carries at DEBUG when they differ, so that class of report is diagnosable
  from the endpoint log alone.

No behaviour change: the floor, its ordering, and both defaults are untouched.
@minekube-ai-engineer
minekube-ai-engineer Bot merged commit 9e619f2 into main Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants