feat: Phase 7 — Refresh targets generation - #5
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, раскрыт ternary (review) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ь §5, тест why-fallback (review) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pytest.ini объявлял маркер live с комментарием «skipped by default», но механизма скипа не было → дефолтный прогон всегда падал на test_claude_score_live (нет ANTHROPIC_API_KEY). Добавлен addopts = -m "not live": дефолт зелёный (161 passed, 6 deselected), явный -m live переопределяет и запускает live-тесты. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Inline `from runner.scoring import hypothesis_ids` в score() (DryRun и Claude) ломал `python3 runner/orchestrator.py` (корень проекта не в sys.path → ModuleNotFoundError: No module named 'runner'). Поднял импорт на верхний уровень одним try/except-блоком (relative→absolute) по канону refresh.py, убрал оба inline. Скриптовый и модульный запуск оба отрабатывают end-to-end. 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.
Что это
Финальная фаза прогона deep-research —
Orchestrator.refresh(s)послеverify()(Phase 6.5), передreturn s.dir. Пишет<slug>/refresh_targets.md— точку входа для будущего дельта-ресёрчаupdate <slug>.Паттерн фазы как у scoring/capabilities/verify: чистый модуль
runner/refresh.py(5 pure-функций, без сети/I/O) + тонкий метод в оркестраторе.Ключевое решение
synthesize()сейчас — scaffold (отчёт без блоков M2/N1/A4, block-render не реализован). Поэтому Phase 7 извлекает данные из RunState (s.hypotheses/s.sources/s.triangulation/deviations.md), а не парсит отчёт. Чего нет в RunState (pricing-URL+hash, FRED series id, OpenAlex concept ids) — помечено машинно-видимыми<!-- TODO -->-маркерами для будущего block-render, не выдумано.Содержимое
refresh_targets.md(шаблон Z11)Frontmatter (slug, last_research_date, depth, update_cadence: deep→30d / иначе→90d) + 5 секций:
s.sourcesdeviations.md(not_pursued)Гейт:
if s.depth == "shallow": return(как Phase 3.5). Сети/subprocess нет → run()-тесты оффлайн. JSON-схем нет → guard-тест не затронут.Сверх скоупа Phase 7 (2 pre-existing инфра-фикса)
В ветку также вошли два независимых фикса pre-existing проблем (подтверждены на main, обнаружены при верификации):
02de15a—pytest.ini:addopts = -m "not live". Маркерliveобъявлялся, но механизма скипа не было → дефолтныйpytestпадал на live-тесте без API-ключа. Теперь дефолтный прогон зелёный, live запускаются явным-m live.41a69ae—runner/providers.py: try/except-импортhypothesis_ids(relative→absolute) по канону остальных модулей. ЧинитModuleNotFoundErrorпри запускеpython3 runner/orchestrator.pyкак скрипта.Верификация
python3 -m pytest -q→ 161 passed, 6 deselected (дефолт теперь зелёный благодаря фиксу выше)tests/test_refresh.py→ 25 тестов (юнит на голых dict/строках + оффлайн черезrun()на DryRunProvider)ruff check→ All checks passed!Каждая из 6 реализационных задач прошла spec + code-quality ревью; финальный review (pr-review-toolkit) — Ready to merge, 0 Critical/Important.
Дизайн:
docs/superpowers/specs/2026-06-15-phase7-refresh-design.mdПлан:
docs/superpowers/plans/2026-06-15-phase7-refresh.md🤖 Generated with Claude Code