feat(retrieval): Phase 5 Stage 2 — живой ClaudeProvider.search() через web_search - #4
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…signals Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Что
Phase 5 Stage 2: заменяет
NotImplementedErrorвClaudeProvider.search()на живой two-callweb_searchflow, возвращающий blob в форме, которую читаетrunner.adaptive.parse_signals. Закрывает последний содержательный кусок дорожной карты deep-research скилла — после этого адаптивный цикл (Phase 4) работает на реальных источниках, а не на DryRun-фикстурах.Как (two-call)
Структурный вывод несовместим с citations (web_search их эмитит) → один вызов с обоими = HTTP 400. Поэтому два:
web_search_20260209БЕЗoutput_config→ сырые источники + текст ответа.output_config.format=SIGNALS_SCHEMAБЕЗ web_search → строгий JSON{sources, signals}.Модель прибита к
mid(claude-sonnet-4-6) независимо от tier: Haiku 4.5 не поддерживаетweb_search_20260209(подтверждено докой claude-api).model_overrideвсё ещё побеждает.Состав (7 TDD-задач)
SIGNALS_SCHEMA+_SIGNAL_SCHEMA/_SOURCE_SCHEMA— structured-output-safe (additionalProperties:false, без min/max)ClaudeProvider._search_model(tier)— хардкод mid_collect_call1(resp)— текст + источники изweb_search_tool_result_parse_call2(resp, sqid)+_empty_signals()— JSON→blob, fail-safe на refusal/мусор (зеркалитparse_signals)search()two-call +_SEARCH_PROMPT/_SIGNALS_PROMPT+pause_turnguard (до 5 итераций)-m livesmoke (skip безANTHROPIC_API_KEY)test_claude_search_not_implemented_yet(стаб ушёл — намеренно)Верификация
pytest -q→ 99 passed, 5 skipped (baseline Stage 1 был 90/4)scripts/stamp_docs.py --check→ exit 0ruff check .(0.15.1, как в CI) → cleantest_claude_search_blob_feeds_parse_signalsпинит round-trip с движком циклаВсе тесты — mock-based (fake
anthropicclient). Живой путь — opt-in-m live, в сеть в обычном прогоне/CI не ходит.🤖 Generated with Claude Code