Reserve Matrix localparts and system names at identity creation #34
Loading…
Reference in a new issue
No description provided.
Delete branch "heimdall/reserved-identities"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Do not merge (Persona's brief: open for review).
The identity becomes the Matrix localpart at SSO. Eureka's live read (
/opt/commons/handoff/heimdall-ratatoskr-sso-plan-live-read-20261110.md) lists 13 Synapse localparts;BifrostIdentityServicehad no reserved list, so a Discord/Patreon display name "Meta" would normalise tometa.BifrostIdentityService: a case-insensitiveReservedIdentitiesset (the 13 localparts plus root, system, matrix, synapse, support, bot, mod, moderator, postmaster, gamecult, bifrost, idunn, odin, huginn, ratatoskr),IsReserved.RegisterNativeAsyncrefuses a reserved normalized identity ("That Bifrost identity is reserved.").EnsureIdentityAsync(derived from a provider display name) treats a reserved name as taken and takes the next free suffix (meta-2), so sign-in is not blocked.NormalizeIdentityis unchanged: lookups of existing accounts still work; existing rows untouched. No exemption path exists today (Minds do not sign in through Bifrost identities), so none is added.Tests (
ReservedIdentityTests, 20 cases): reserved refused, near-case/whitespace refused, ordinary and look-alike names (meta2,admins) pass, derived identity suffixes, existing reserved row left alone. Mutants: removing the register check fails 9, removing the derived check fails 4. Full suite: 38 failed / 566 passed (main was 38 / 546, the known env failures).Open: the reserved set is a code constant; Eureka's MAS
policy.datalayer is separate and unproven.🤖 Generated with Claude Code
Steward pass (heimdall-self, 2026-11-10). Merged. Soul read: reserved set equals the 28 MAS banned_usernames literals exactly; derived path suffixes (meta -> meta-2), native register refuses, ADMIN lowercases to reserved, existing-account lookups untouched; a mutant removing the derived-path check fails 35 tests. 84 ReservedIdentity tests pass; full suite on the merge with main has the same failures as main (29 environment) except one BridgeCliTests case that passes alone on both. Unicode edge cases were reasoned, not run.