mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 06:52:20 +02:00
Separate documentation freshness years from product identifiers
This commit is contained in:
@@ -2,6 +2,20 @@ from services.search import core
|
||||
import pytest
|
||||
|
||||
|
||||
def test_documentation_freshness_year_is_not_a_product_model_number():
|
||||
result = {'title': 'Enhanced Tracking Protection in Firefox',
|
||||
'url': 'https://support.mozilla.org/en-US/kb/enhanced-tracking-protection-firefox-desktop',
|
||||
'snippet': 'Firefox privacy settings and tracking protection documentation.'}
|
||||
assert core._result_has_query_overlap('Mozilla Firefox privacy documentation latest 2026', result)
|
||||
|
||||
|
||||
def test_documentation_filter_keeps_real_product_number_requirements():
|
||||
result = {'title': 'WIKING Miro 3 manual', 'url': 'https://example.org/wiking-miro-3', 'snippet': 'WIKING Miro installation guide'}
|
||||
assert core._result_has_query_overlap('WIKING Miro 3 manual latest 2026', result)
|
||||
assert not core._result_has_query_overlap('WIKING Miro 4 manual latest 2026', result)
|
||||
assert not core._result_has_query_overlap('WIKING Miro 2026 manual', result)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('comprehensive', [False, True])
|
||||
@pytest.mark.parametrize('transient_error', [False, True])
|
||||
def test_empty_results_advance_provider_but_transport_errors_get_one_retry(monkeypatch, tmp_path, comprehensive, transient_error):
|
||||
|
||||
@@ -85,6 +85,9 @@ async def test_runtime_does_not_append_unverified_search_result_as_citation(monk
|
||||
assert 'old-release' not in final
|
||||
assert '[Source:' not in final
|
||||
assert not any(event.get('type') == 'error' for event in events)
|
||||
metrics = next(event['data'] for event in events if event.get('type') == 'metrics')
|
||||
assert metrics['temperature'] == 0.0
|
||||
assert metrics['max_output_tokens'] == 768
|
||||
|
||||
|
||||
def test_news_intent_survives_query_rewording_without_changing_other_fresh_queries():
|
||||
|
||||
Reference in New Issue
Block a user