Every Team page came back empty and every invite would have failed: the
organization lookup asked Keycloak for search=<slug>&exact=true, but exact
compares the display name, and the registry names organizations after the
company while the alias carries the slug. The demo tenant proved it — Keycloak
listed one member, the registry reported none.
It now asks for q=alias:<slug> and falls back to a substring search, comparing
the alias in both cases so a neighbouring slug (demo beside stage-demo) is
never returned instead. The fake in the tests now mirrors KC 26's three query
behaviours, and a regression test covers the name/alias mismatch, the
neighbour and the genuine miss.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB