Skip to content

feat: export resolution debug tooling from mloda.provider (#855) - #872

Merged
TomKaltofen merged 1 commit into
mainfrom
feat/855-provider-resolution-debug-exports
Jul 21, 2026
Merged

feat: export resolution debug tooling from mloda.provider (#855)#872
TomKaltofen merged 1 commit into
mainfrom
feat/855-provider-resolution-debug-exports

Conversation

@TKaltofen

Copy link
Copy Markdown
Collaborator

What

Re-export the resolution-debug surface from mloda.provider:

  • resolve_feature
  • FeatureResolutionError
  • ResolutionRecord
  • ResolutionDiagnosis

These were importable only from mloda.user and mloda.steward. A plugin author (provider) debugging "why does my feature group not match" now imports them from the same namespace as the base classes they already use, instead of reaching into another persona's namespace.

Why

Closes os-012 (migrated from #855). "Why does my feature group not match" is the plugin author's question, but the debugging entry points lived only in the user and steward namespaces.

Details

  • Imports come from the same source modules mloda.user/mloda.steward use (mloda.core.api.plugin_docs, mloda.core.prepare.identify_feature_group), so the re-exports are the exact same objects, not divergent copies. The surface test pins object identity against both namespaces.
  • Docs: the resolution-errors troubleshooting page now imports resolve_feature from mloda.provider (it already imports FeatureGroup/EmptyResultError from there); discover-plugins.md gains a one-line note that plugin authors can use the provider import.
  • Out of scope, deferred per the feat: exact-run resolution diagnostics (typed error, preflight, session report), deferred #759 decision record: serialization and persona renderers. The broader steward framing of discover-plugins.md/mloda-api.md is left intact.

Testing

New surface test tests/test_core/test_abstract_plugins/test_provider_resolution_surface.py (public attr + __all__ membership + object identity vs both mloda.user and mloda.steward). Full tox green (pytest, ruff, licenses, mypy --strict, bandit).

resolve_feature and the resolution error/record types (FeatureResolutionError,
ResolutionRecord, ResolutionDiagnosis) were importable only from mloda.user and
mloda.steward. Re-export them from mloda.provider so a plugin author debugging
"why does my feature group not match" reaches them next to the base classes
they already import. Repoint the resolution-errors troubleshooting doc at the
provider import, and note the provider import in discover-plugins.md.

The surface test pins object identity against both mloda.user and mloda.steward
so the re-exports can never diverge from the canonical objects.
@TKaltofen
TKaltofen requested a review from TomKaltofen as a code owner July 21, 2026 14:58
@TomKaltofen
TomKaltofen merged commit b8396ba into main Jul 21, 2026
33 of 35 checks passed
@TomKaltofen
TomKaltofen deleted the feat/855-provider-resolution-debug-exports branch July 21, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants