fix(connectors): hoist one-query-per-run guard to SingleQueryPerRunMixin, apply to all family bases#70
Merged
TomKaltofen merged 11 commits intoJun 11, 2026
Conversation
…structured, orchestrator) (#31) feat: RAG connector families (retrieve, rerank, generate, graph_rag, structured, orchestrator)
…#33) (#41) * docs: add connectors family-map README; link from top-level README Phase 2 (#33): move the per-family connector prose from the top-level README into rag_integration/feature_groups/connectors/README.md as a family-map table (contract, backends, no-Docker concrete, pedigree) plus per-family detail, cross-linked to docs/rag-connector-base-classes.md and each family's contract suite. The top-level README now links there instead of duplicating the detail (one source of truth). * docs: clarify per-family selector keys and pedigree/dep wording in connectors README
…roups Upstream mloda will validate PROPERTY_MAPPING defaults at class-definition time (FeatureChainParser.validate_property_mapping_defaults called from FeatureGroup.__init_subclass__). Add a repo-wide test that applies the same invariant now: every strict default must be one of the key's accepted values. Delegates to the upstream validator when the installed mloda provides it, otherwise replicates the logic on FeatureChainParser helpers from 0.8.x.
Review findings: walk_packages silently ignores ImportError without onerror, and the per-module except hid internal import regressions. Collect every import failure and fail the test. Tighten the discovery floor to the current count of 74 and add a validation_function case to the anti-vacuous guard.
…xin, apply to all family bases Closes #49. All six family bases (graph_rag, rerank, generate, structured, orchestrator, kg_source) now raise ValueError on multi-feature FeatureSets instead of silently dropping every feature after the first. The guard is extracted from BaseRetrieveConnector into a new SingleQueryPerRunMixin in connectors/mixins.py and applied uniformly. Tests in tests/connectors/test_single_query_guard.py pin the guard for every family.
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.
Summary
run_allcarries two features with the same root feature name but different options, the engine groups them into oneFeatureSet. Previously all connector family bases exceptBaseRetrieveConnectorhadfor feature in features.features: ... return ..., silently dropping every feature after the first.SingleQueryPerRunMixintoconnectors/mixins.pywith_assert_single_feature(features)that raisesValueErrorif theFeatureSetcontains more than one feature.BaseRetrieveConnector(removes the inline guard),BaseGraphRagConnector,BaseRerankConnector,BaseGenerateConnector,BaseStructuredConnector,BaseOrchestratorConnector,BaseKnowledgeGraphSource.tests/connectors/test_single_query_guard.pywith a parametrized test that pins the guard for all seven families.mixins.pymodule docstring to name all five mixins.Contract change: two same-named features with different options in one
run_allcall now raiseValueErrorinstead of silently returning only the first result.Test plan
ruff format,ruff check,mypy --strict,banditall cleantests/connectors/test_single_query_guard.py(7 parametrized cases, one per family) all pass