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):
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.
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.
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):
ClassFactory.CreateInstance(PermissionProviderBase, '<unknown key>')returns an instance of the ABSTRACT BASE rather than null, soPermissionEngine.instantiateProviders()'s intended "skip unresolvable domains" branch never runs (see PE11) and a method-less stub is installed as a live provider.GetAllUserPermissionsdoesPromise.allSettled(providers.map(p => p.GetUserResources(user))).allSettledisolates rejections, but the stub'sGetUserResourcesisundefined, so the mapper throws SYNCHRONOUSLY — inside.map(), BEFOREallSettledever sees a promise. The whole call rejects withp.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 everyGetAllUserPermissions-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 haveinstantiateProviders()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.