feat: export resolution debug tooling from mloda.provider (#855) - #872
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Re-export the resolution-debug surface from
mloda.provider:resolve_featureFeatureResolutionErrorResolutionRecordResolutionDiagnosisThese were importable only from
mloda.userandmloda.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
mloda.user/mloda.stewarduse (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.resolve_featurefrommloda.provider(it already importsFeatureGroup/EmptyResultErrorfrom there);discover-plugins.mdgains a one-line note that plugin authors can use the provider import.discover-plugins.md/mloda-api.mdis left intact.Testing
New surface test
tests/test_core/test_abstract_plugins/test_provider_resolution_surface.py(public attr +__all__membership + object identity vs bothmloda.userandmloda.steward). Fulltoxgreen (pytest, ruff, licenses, mypy --strict, bandit).