Skip to content

fix(connectors): hoist one-query-per-run guard to SingleQueryPerRunMixin, apply to all family bases#70

Merged
TomKaltofen merged 11 commits into
mloda-ai:mainfrom
TomKaltofen:fix/single-query-per-run-guard
Jun 11, 2026
Merged

fix(connectors): hoist one-query-per-run guard to SingleQueryPerRunMixin, apply to all family bases#70
TomKaltofen merged 11 commits into
mloda-ai:mainfrom
TomKaltofen:fix/single-query-per-run-guard

Conversation

@TKaltofen

Copy link
Copy Markdown
Collaborator

Summary

  • Closes chore(deps): bump the all-dependencies group across 1 directory with 5 updates #49. When run_all carries two features with the same root feature name but different options, the engine groups them into one FeatureSet. Previously all connector family bases except BaseRetrieveConnector had for feature in features.features: ... return ..., silently dropping every feature after the first.
  • Adds SingleQueryPerRunMixin to connectors/mixins.py with _assert_single_feature(features) that raises ValueError if the FeatureSet contains more than one feature.
  • Applies the mixin to all seven family bases: BaseRetrieveConnector (removes the inline guard), BaseGraphRagConnector, BaseRerankConnector, BaseGenerateConnector, BaseStructuredConnector, BaseOrchestratorConnector, BaseKnowledgeGraphSource.
  • Adds tests/connectors/test_single_query_guard.py with a parametrized test that pins the guard for all seven families.
  • Updates the mixins.py module docstring to name all five mixins.

Contract change: two same-named features with different options in one run_all call now raise ValueError instead of silently returning only the first result.

Test plan

  • 679 tests pass, 7 pre-existing skips
  • ruff format, ruff check, mypy --strict, bandit all clean
  • tests/connectors/test_single_query_guard.py (7 parametrized cases, one per family) all pass
  • Reviewed by Claude Opus (no blocking findings) and codex (clean pass)

TKaltofen added 11 commits June 10, 2026 09:47
…structured, orchestrator) (#31)

feat: RAG connector families (retrieve, rerank, generate, graph_rag, structured, orchestrator)
* docs: add Phase 0 RAG connector survey and family map
#35) (#40)

* refactor: extract shared connectors/mixins.py and connectors/errors.py
…#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.
Closes #37. The strategy issue (#25) proposed rag/ while PR #31 shipped
feature_groups/connectors/; this records the shipped path as canonical and
maps stale rag/ references. Also lists mixins.py and errors.py in the
package layout.
…#44)

* feat: fold FAISS path in as canonical dense backend of retrieve (#36)
…knowledge-graph source (#48)

* feat(connectors): cross-cutting RRF fusion, hybrid_rrf backend, graph_rag KG source (#45, #46, #47)
…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.
@TomKaltofen TomKaltofen merged commit 377ce04 into mloda-ai:main Jun 11, 2026
3 checks passed
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