with one click
review-provider
// Review a Merino suggest provider implementation against codebase patterns and best practices
// Review a Merino suggest provider implementation against codebase patterns and best practices
| name | review-provider |
| description | Review a Merino suggest provider implementation against codebase patterns and best practices |
Review the provider specified in $ARGUMENTS against Merino's patterns and best practices. If no provider is specified, ask which provider to review.
Read all files in merino/providers/suggest/{provider_name}/ including:
provider.pybackends/protocol.py (if exists)Also read the provider's registration in merino/providers/suggest/manager.py (find the matching ProviderType and case block).
Read the provider's config section in merino/configs/default.toml.
Read tests in tests/unit/providers/suggest/{provider_name}/ and tests/integration/providers/suggest/{provider_name}/.
Review each of these areas and report findings. For each area, state PASS, WARN, or FAIL with an explanation.
Provider and extends BaseProvider__init__ stores self._name, self._enabled_by_default, self._query_timeout_sec__init__ calls super().__init__() (at end, without arguments, or with **kwargs)initialize() is asyncquery() returns list[BaseSuggestion]shutdown() is implemented (even if no-op)logger = logging.getLogger(__name__) at module levelquery() catches backend errors and returns [] instead of crashingwarning level (not error unless truly fatal)except: clauses (should catch specific exceptions)normalize_query() is implemented if the provider uses keyword matchingmetrics_client for timing external calls (e.g., self.metrics_client.timeit(...))RedisAdapter / NoCacheAdapter pattern from managerdefault.toml with type, backend, enabled_by_default, score, query_timeout_secproviders.*)ProviderType enumcase in _create_provider() factoryCustomDetails pattern (not top-level fields on BaseSuggestion)custom_details.pyProtocol classBackendError subclass on failuresmocker.AsyncMock(spec=BackendProtocol)@pytest.mark.asynciomerino/utils/cron.py Job class for periodic refreshasyncio.create_task() in initialize()_should_fetch() condition functionPresent findings as a checklist with PASS/WARN/FAIL for each area. Include: