Skip to content

Registering a farm sibling whose Wiki ID is not a valid Source key fails fatally #1372

Description

@JeroenDeDauw

Follows-up to #1265.

SourceRegistry::registerSource() exempts only this wiki's own key from the Source-key grammar ([A-Za-z][A-Za-z0-9_-]{0,63}). A farm sibling's key must be its Wiki ID (that is what its bare ids canonicalize to), and Wiki IDs ($wgDBname$wgDBprefix) may start with a digit or contain a dot — e.g. 2wiki, wiki.example. Such a sibling cannot be registered: the InvalidArgumentException escapes the registration hook during service wiring and takes the referencing wiki down rather than degrading.

The inside-out half (a wiki whose own id is not a valid key still resolves its bare ids) is documented in NeoWikiConfigFactory; the outside-in half is not documented anywhere. Options: widen the key grammar to what Wiki IDs can actually be, register-with-warning-and-skip instead of throwing, or a key-mapping affordance for siblings.

AI-authored — Claude Code, Fable 5 (max); surfaced by the consumer-vantage review of #1265, filed on Jeroen's behalf; issue text not human-reviewed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions