Member Junction
    Preparing search index...
    • PE13 — [mutation] ⚠ EXPECTED RED: a single unresolvable ProviderClassName takes down the ENTIRE unified-permission aggregate for every user.

      THE DEFECT (found by this bundle, deliberately left failing — a product fix is a human decision):

      1. ClassFactory.CreateInstance(PermissionProviderBase, '<unknown key>') returns an instance of the ABSTRACT BASE rather than null, so PermissionEngine.instantiateProviders()'s intended "skip unresolvable domains" branch never runs (see PE11) and a method-less stub is installed as a live provider.
      2. GetAllUserPermissions does Promise.allSettled(providers.map(p => p.GetUserResources(user))). allSettled isolates rejections, but the stub's GetUserResources is undefined, so the mapper throws SYNCHRONOUSLY — inside .map(), BEFORE allSettled ever sees a promise. The whole call rejects with p.GetUserResources is not a function.

      IMPACT: one bad or tree-shaken provider class (exactly the failure LoadPermissionProviders() exists to prevent, and exactly what PE1 detects) turns the Sharing Center, the "what has been shared with me" inbox, and every GetAllUserPermissions-backed audit view into a hard error for ALL users — not a degraded view. Fail-loud, not fail-closed.

      SUGGESTED FIX (product decision, NOT made here): wrap the mapper — providers.map(p => Promise.resolve().then(() => p.GetUserResources(user))) — and/or have instantiateProviders() reject an instance whose constructor is the abstract base.

      This check is MUTATION-TIER (RUN_MUTATION_TESTS=1), so it does not block the default CI gate. It turns GREEN the moment either fix lands.

      Returns Promise<void>