Skip to content

Add the extension point mechanism - #2439

Merged
pournasserian merged 1 commit into
v2from
2438-extension-point-mechanism
Oct 17, 2026
Merged

pournasserian merged 1 commit into
v2from
2438-extension-point-mechanism

Conversation

@pournasserian

Copy link
Copy Markdown
Member

Closes #2438

What

The mechanism every extension point uses, landed before any domain interface exists (first slice of #2429).

  • [ExtensionPoint] marks an interface in FluentCMS.Core.Extensions as a seam.
  • IExtensionCatalog lists every registered extension with its contract, implementation and whether it is built in (FluentCMS.Core.Builtin).
  • AddFluentCmsExtension<TContract, TImplementation>() registers explicitly; AddFluentCmsExtensions(assembly) discovers every concrete implementation of an extension-point interface. Both produce the same catalog entry and the same IEnumerable<TContract> resolution, and a discovered type already registered explicitly is not duplicated.
  • AddFluentCmsCore() discovers the Core assembly's built-ins through the same call a plugin assembly would use, so there is no privileged path (EXT-02).
  • CONTRIBUTING.md gains an "Extension points" section.

Why

Field types (F-SCH), check types (F-CHK), tool providers (F-MCP), storage, scorers and notification channels all need one registration and discovery story. Landing it first means each of those interfaces arrives with its first consumer on top of a mechanism that is already tested.

Tests

Explicit registration resolves and is catalogued; assembly discovery finds every implementation of an extension point and nothing else; discovery after an explicit registration does not duplicate; a contract without the attribute is rejected; Core provides a catalog with no built-ins yet.

Checklist

  • Linked to an issue a maintainer has confirmed
  • Targets v2
  • Tests or docs updated where behaviour changed
  • No tool-generated co-author trailers or footers

ExtensionPoint marker, extension catalog, and registration by explicit call or assembly discovery, with Core discovering its own built-ins the same way.

Refs #2438
@pournasserian pournasserian added this to the M1 Governance core milestone Oct 17, 2026
@pournasserian pournasserian added type:feature New capability v2 FluentCMS v2 (v2 branch) area:ext Extension points (EXT) labels Oct 17, 2026
@pournasserian
pournasserian merged commit aa151d6 into v2 Oct 17, 2026
2 checks passed
@pournasserian
pournasserian deleted the 2438-extension-point-mechanism branch October 17, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ext Extension points (EXT) type:feature New capability v2 FluentCMS v2 (v2 branch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extension point mechanism: marker, catalog and registration

1 participant