Skip to content

OSS-383: read-only exact-identity lookup and per-server allowlist add - #538

Merged
athNdev merged 1 commit into
mainfrom
codex/prod-player-lookup
Nov 18, 2026
Merged

athNdev merged 1 commit into
mainfrom
codex/prod-player-lookup

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

OSS-383 — exact-identity player lookup and per-server allowlist add

What changed

  • Top-level Players → "Look up a player": resolves a previously unseen account by exact UUID (32/36 chars) or current username through the existing bounded internal/playerskin provider transport (Mojang session profile by UUID; verified first-party api.minecraftservices.com/minecraft/profile/lookup/name by name). Explicit FOUND / NOT_FOUND / AMBIGUOUS / UNAVAILABLE states; authoritative negatives only for 404 / empty-200, while timeouts, 5xx and transport failures are UNAVAILABLE. No name-history endpoint is queried and no identity is invented.
  • Lookup is read-only: the response is ephemeral (name, UUID, provenance, note). It creates no identity, session, access row, roster entry, presence claim or audit row. A generation guard discards out-of-order provider replies.
  • Server Players tab → "Add a player to this server's allowlist": adds an exact name/UUID before first join via the existing typed SetWhitelistEntry RPC with players:access:write on server_id, request id, player journal, audit row and undo. No duplicate command path. Java name/UUID entries use the negotiated Java adapter; Bedrock Gamertag/XUID requires an adapter proving support and is otherwise refused with a capability error. Provider outage/ambiguity never reaches an adapter and never persists an identity.
  • RBAC: new LookupPlayer mapped fail-closed to global players:read; frontend permission strings corrected to real RBAC actions.
  • MCP coverage catalog regenerated (internal/mcp/catalog_data.go) and RPC count updated to 221 for the new procedure.
  • ADR0017 + knowledge/architecture/player-management.md updated in the same commit.

Verification (final rebased head 6d9d0a4544bfcb58027428b1ec41d5571d2218b8)

  • Rebased onto current main 8d8c7b75c3428818c9ac18053c8c27370306564c (includes PR535/PR537).
  • go build ./..., go vet ./..., go test ./... -count=1 — all pass on local Go 1.27.4; CI runs pinned Go 1.26.11.
  • Pinned golangci-lint v2.13.2 findings addressed: De Morgan simplification at player.go classifyPlayerQuery; the four PR537 upload cleanup/cancel call sites in file.go/mod.go/modpack.go are explicitly discarded with _ = on rebased main; MCP drift gate fixed by regenerating catalog data + count.
  • bun install --frozen-lockfile, bun run check (0 errors/0 warnings), bun run test (363 pass), bun run lint clean.
  • buf lint clean; bun scripts/proto-generate.mjs --check → "Generated Go and TypeScript outputs match" (zero drift).
  • go run ./cmd/knowledge-lint -root . -fix then without -fix: 40/40 queries pass, indexes current.
  • Production frontend build via node ./node_modules/vite/bin/vite.js build (equivalent to scripts/web-build.sh on this host; WSL/Git-Bash wrappers unavailable): ✓ built, adapter-static wrote build/, .gitkeep restored.
  • Real Chromium QA (Playwright 1.49.1, owned browser): 11/11 scenarios PASS, 0 page errors, re-run after rebase. Scoped fixtures cover no-play-history username lookup, exact UUID, authoritative not-found, ambiguous, provider outage distinct from not-found, absent permission, server-scoped add + undo, add failure and cross-server denial, out-of-order replies (stale discarded), Bedrock capability refusal, mobile 390px and keyboard Enter. Evidence: scripts/manual-review/e2e/out/player-lookup/ (desktop-found.png, desktop-ambiguous.png, desktop-outage.png, mobile-found.png, results.json, browser.json).
  • Independent static review: initial REQUEST CHANGES (4 findings) → all fixed → APPROVE on re-check, with targeted tests confirming no identity write on outage/ambiguity, edition+source capability gate, UUID profile id cross-check, and documented observation semantics.

Evidence limits

  • Provider endpoints were verified by the parent with direct official HTTP checks; this work uses fixture-backed tests and did not contact a live provider from CI.
  • No live Minecraft server, controller mutation, Docker operation, deployment or registry action was performed.

Do not merge until CI is green on the final head.

…owlist add

OSS-383. Top-level Players can resolve a previously unseen account by exact
UUID or current username via the existing bounded identity-provider seam
(Mojang session profile / Minecraft Services name lookup). LookupPlayer is
read-only: the ephemeral result never creates an identity, session, access
row, roster entry, presence claim or audit row. FOUND / NOT_FOUND /
AMBIGUOUS / UNAVAILABLE are explicit; outages are never reported as absence
and no name-history service is consulted. The UI discards out-of-order
provider replies with a generation guard.

The server Players tab can add an exact name/UUID to that server's allowlist
before first join. It reuses the typed moderation RPC with players:access:write
on server_id, request id, journal, audit and undo. Only this separate mutation
persists an identity. Java name/UUID entries use the negotiated Java adapter;
Bedrock Gamertag/XUID entries require an adapter proving support and are
otherwise refused with a capability error. Provider outage or ambiguity never
reaches a command adapter.

Adds RBAC mapping/tests, provider and RPC seam tests, scoped real-browser QA
fixtures (desktop/mobile/keyboard, stale replies, outage vs not-found,
cross-server denial, Bedrock refusal), ADR0017 and knowledge updates.
@athNdev
athNdev force-pushed the codex/prod-player-lookup branch from 4a1517e to 6d9d0a4 Compare November 18, 2026 10:25
@athNdev
athNdev merged commit 1884633 into main Nov 18, 2026
25 checks passed
@athNdev
athNdev deleted the codex/prod-player-lookup branch November 18, 2026 10:36
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