Merge pull request #354 from dinakars777/fix/parallel-web-backend-source
fix: route parallel web backend through grounding
This commit is contained in:
@@ -52,6 +52,36 @@ class PipelineV3Tests(unittest.TestCase):
|
||||
# At least one per-subquery line.
|
||||
self.assertIn("[Planner] sq1 label=", output)
|
||||
|
||||
def test_parallel_web_backend_enables_grounding_source(self):
|
||||
plan = {
|
||||
"intent": "news",
|
||||
"freshness_mode": "balanced_recent",
|
||||
"cluster_mode": "timeline",
|
||||
"subqueries": [
|
||||
{
|
||||
"label": "primary",
|
||||
"search_query": "test topic",
|
||||
"ranking_query": "What happened with test topic?",
|
||||
"sources": ["grounding"],
|
||||
}
|
||||
],
|
||||
"source_weights": {"grounding": 1.0},
|
||||
}
|
||||
report = pipeline.run(
|
||||
topic="test topic",
|
||||
config={"LAST30DAYS_REASONING_PROVIDER": "auto"},
|
||||
depth="quick",
|
||||
requested_sources=["grounding"],
|
||||
web_backend="parallel",
|
||||
external_plan=plan,
|
||||
)
|
||||
# Anchor on the stable source key, not the exact wording of the
|
||||
# grounding.py error message. Phrasing can shift (e.g., when the
|
||||
# missing-key check moves or the message is reworded) without
|
||||
# changing the contract that the grounding source registers an
|
||||
# error when its required backend key is unset.
|
||||
self.assertIn("grounding", report.errors_by_source)
|
||||
|
||||
|
||||
class TestSourceFetchCap(unittest.TestCase):
|
||||
"""X source fetch count must be capped by MAX_SOURCE_FETCHES."""
|
||||
|
||||
Reference in New Issue
Block a user