Skip to content

Fix Bedrock vote name collisions - #281

Merged
BenCodez merged 2 commits into
masterfrom
agent/fix-bedrock-name-collisions
Jul 31, 2026
Merged

Fix Bedrock vote name collisions#281
BenCodez merged 2 commits into
masterfrom
agent/fix-bedrock-name-collisions

Conversation

@BenCodez

@BenCodez BenCodez commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • make exact online, cached, or stored identities authoritative before trying prefixed/stripped Bedrock fallbacks
  • preserve explicit prefixed votes and automatic Bedrock matching when no exact identity exists
  • make the prefixed database fallback reachable by checking stored existence instead of treating a constructed user wrapper as proof
  • add regression coverage for Java/Bedrock same-name collisions, explicit prefixes, unique Bedrock fallback, and stored prefixed identities

Root cause

The resolver checked an online prefixed player (for example, .Name) before checking whether the exact unprefixed Java identity (Name) was already stored. That allowed an online Bedrock account to absorb an offline Java account's vote. The database fallback also depended on a null check even though getUser can construct a wrapper for a name that is not stored.

The VotingPlugin listener-side safeguard is in VotingPlugin#1538.

Behavior after this change

  • Name resolves to an existing exact Java identity, even while .Name is online.
  • .Name remains the Bedrock identity when the vote arrives explicitly prefixed.
  • Name can still fall back to .Name when no exact Java identity exists.

Validation

  • git diff --check
  • Added focused resolver regression tests.
  • Maven and a JDK were unavailable in the local execution environment, so compilation and test execution are left to GitHub CI.

AI disclosure

Created with assistance from OpenAI Codex.

@BenCodez
BenCodez marked this pull request as ready for review July 31, 2026 22:36
@BenCodez
BenCodez merged commit 29013dc into master Jul 31, 2026
4 checks passed
@BenCodez
BenCodez deleted the agent/fix-bedrock-name-collisions branch July 31, 2026 23:01
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.

1 participant