#8188·elsa-core

Shell features that own FastEndpoints omit IFastEndpointsShellFeature (Labels, TenantManagementEndpoints, JavaScript)

Author: sfmskywalkerCreated Sep 20, 2026Updated Sep 20, 2026
Labelsbugcoreprio lowelsa 3triaged

Problem

On CShells hosts, FastEndpoints discovery is not whole-assembly scanning. CShells.FastEndpoints maps endpoints only from assemblies of active features that implement IFastEndpointsShellFeature (see Elsa.Foundation.Host Program.cs comments and doc/wiki/extension-guide.md).

Several first-party modules still register endpoints the classic way (Module.AddFastEndpointsAssembly(...)) but their shell counterparts implement plain IShellFeature only. Enabling those shell features wires DI stores/services and leaves the HTTP surface unmapped.

Evidence (main)

Module Classic Shell today Endpoints present
Labels LabelsFeatureAddFastEndpointsAssembly(GetType()) Elsa.Labels.ShellFeatures.LabelsFeature : IShellFeature only Endpoints/Labels/*, Endpoints/WorkflowDefinitionLabels/*
Tenant management API TenantManagementEndpointsFeatureAddFastEndpointsAssembly …ShellFeatures.TenantManagementEndpointsFeature : IShellFeature; comment claims “registered via assembly scanning” Elsa.Tenants/Endpoints/Tenants/*
JavaScript expressions JavaScriptFeatureAddFastEndpointsAssembly …ShellFeatures.JavaScriptFeature : IShellFeature only Endpoints/TypeDefinitions/Endpoint.cs

Contrast (correct pattern): WorkflowsApiFeature, IdentityFeature, SecretsFeature, diagnostics Console/OTel/StructuredLogs, Alterations, etc. implement IFastEndpointsShellFeature (and usually depend on ElsaFastEndpointsFeature / host FastEndpoints).

ElsaFastEndpointsFeature registers the Elsa serializer configurator, authorization, and AddPermissionDescriptorsFromLoadedAssemblies() — it does not substitute for the per-feature IFastEndpointsShellFeature marker that drives endpoint assembly selection.

Why it matters

  • CShells hosts that enable Labels / Tenant Management Endpoints / JavaScript get stores and filters but 404 on the matching REST routes.
  • Studio / operators see the feature as installed (#7910 aside) while Labels CRUD, tenant admin API, and JS type-definition endpoints never bind.
  • Accidental complexity: two registration stories (classic module bag vs shell marker) that diverged without a check.

Proposed subtractive direction

  1. Change the three shell features above to implement IFastEndpointsShellFeature (empty ConfigureServices body is fine when DI is already registered — mirror Agents API / Webhooks).
  2. Fix the TenantManagementEndpoints shell comment (drop the false “assembly scanning” claim).
  3. Prefer DependsOn ElsaFastEndpointsFeature (or host FastEndpoints) where sibling API features already do, so auth/serializer configurator is present.
  4. Optional ratchet: a small test or analyzer that fails when an assembly under **/Endpoints/** has a shell feature that does not implement IFastEndpointsShellFeature.

Do not invent a third discovery path.

Not a duplicate of

  • #7910 — /features/installed reports catalog vs enabled (enablement truth); this is endpoint discovery for features that are enabled.
  • #8170 — Labels Page.TotalCount Memory vs EF.
  • Closed #1038 (studio) — Studio Labels RemoteFeature gate.
  • Closed Labels Memory tenant work (#8089/#8090/#8091).

Milestone

Unset — Elsa 3 Issue Triage / Crew Lead place. Soft suggestion: Backlog; patch-relevant for any CShells host that relies on these APIs. Do not auto-assign Engineer.

Refs

  • src/modules/Elsa.Labels/Features/LabelsFeature.cs vs ShellFeatures/LabelsFeature.cs
  • src/modules/Elsa.Tenants/Features/TenantManagementEndpointsFeature.cs vs ShellFeatures/TenantManagementEndpointsFeature.cs
  • src/modules/Elsa.Expressions.JavaScript/Features/JavaScriptFeature.cs vs ShellFeatures/JavaScriptFeature.cs
  • src/common/Elsa.Api.Common/ShellFeatures/ElsaFastEndpointsFeature.cs
  • src/common/Elsa.Api.Common/Extensions/ModuleExtensions.cs (AddFastEndpointsAssembly)
  • doc/wiki/extension-guide.md (shell features: IFastEndpointsShellFeature)
  • Foundation host comment: elsa-foundation Elsa.Foundation.Host/Program.cs (CShells.FastEndpoints scans active IFastEndpointsShellFeature assemblies)

Source: elsa-workflows/elsa-core