Skip to content

Retire Extension::capabilities() as an authoring surface (cross-repo) #197

Description

@DamianReeves

What

Extension::capabilities() makes a wire aggregate into an authoring interface: an author hand-writes the negotiated payload, then separately registers the implementations that payload claims. That split is the root defect behind the role-registration work (#195 and the authoring-API PR that follows it).

The authoring-API PR makes every discovery path project from a single registration, and converts Extension::capabilities() into a fallible legacy bridge rather than an independent source of truth. It stops short of removing the trait method. This issue is that removal.

Why it was not done there

The migration crosses repositories. The parent finos/morphir implements the trait method in its playground provider:

  • crates/morphir/src/commands/ui/provider/playground.rs:661
  • crates/morphir/src/commands/ui/provider/playground.rs:751
  • crates/morphir/src/commands/ui/provider/playground.rs:809

Its SDK dependency is a direct submodule path, so removing the method breaks the parent the moment its pin moves. And the tempting middle option is worse than either: retaining the method but ignoring it would leave those extensions silently advertising nothing, which is a runtime behaviour change with no compile error to catch it.

Within this repository the same method is implemented by consumer tests and fixtures, none of which a cargo build compiles:

  • morphir-python-binding/tests/pipeline.rs:104
  • morphir-elm-binding/tests/frontend.rs:1255
  • morphir-avro-extension/tests/guest.rs:48
  • morphir-openapi-extension/tests/guest.rs:32
  • morphir-wasm-binding/src/lib.rs:92
  • morphir-daemon/tests/provider_registry.rs and the session tests
  • both MEP backend examples, the SDK prelude, and the documentation

Ready to pick up when

# Condition Check Expected
1 The authoring-API PR is merged the registration is the source for every discovery path rg 'E::capabilities\(\)' crates/morphir-extension-sdk/src/lib.rs returns only the legacy-bridge call site
2 The legacy bridge is fallible a mismatched aggregate is rejected, not reconciled the bridge's rejection tests exist and pass

What done looks like

  • Extension::capabilities() is gone; every in-repo implementation has migrated to descriptor-bearing registration.
  • The parent finos/morphir migrates its three playground implementations in the same change as its submodule pin bump, so the two never disagree.
  • An extension that has not migrated fails to compile, rather than silently advertising nothing. That is the whole point of removing the method rather than deprecating it.
  • Consumer crates' cargo test passes, not merely cargo build — the implementations are mostly in tests.

Sequencing note

Do not attempt this before the native workspace role lands, or the parent will need two coordinated pin bumps instead of one.

Related

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions