Conversation
_ensure_history() (путь publish_review → record_run) не вызывал init_schema, а её применял только lifespan reviewer serve. После апгрейда деплоя, где record_run пишет outcome/reject_reason в непромигрированную общую БД, INSERT падал → fail-soft → тихая потеря истории всего прогона, пока кто-то не перезапустит serve. Фикс по образцу mcp/session_store: флаг _schema_ready + ленивый init_schema в _connect (init_schema берёт соединение из пула напрямую — без рекурсии). Любой reviewer-mcp сам домигрирует БД идемпотентно при первом publish_review, без зависимости от reviewer serve. Integration-тест: старая схема (drop колонок) → свежий ReviewHistory.record_run домигрирует и пишет, а не fail-soft None.
…ную гонку Ревью 0.3.5 (Minor): (1) test_record_run_self_migrates_missing_columns восстанавливает схему в finally — падение не каскадирует на последующие integration-тесты (не полагается на self-heal фикса). (2) Документирована допустимость гонки флага без блокировки в _connect (идемпотентность + самоизлечение), как в session_store.
Бамп 0.3.4 → 0.3.5 + пересинк манифестов (Codex 0.3.5+codex.4ead526f7ad6). Релиз фикса самомиграции ReviewHistory: запись истории на MCP-пути домигрирует общую БД сама, без зависимости от reviewer serve.
fix(web): самомиграция схемы истории на MCP-пути (0.3.5)
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.
Релиз 0.3.5
Промоут dev → main → PyPI
rag-reviewer==0.3.5.Фикс (PR #119)
ReviewHistoryлениво самомигрирует схему истории на MCP-путиpublish_review. Раньше миграциюoutcome/reject_reason(0.3.4) применял толькоreviewer serve; у команды с общей БД, где reviewer-mcp обновился по@latest, аserveне перезапускался, запись истории тихо ломалась (fail-soft). Теперь любой reviewer-mcp домигрирует БД сам при первомpublish_review— доставка фичи наблюдаемости через плагин действительно zero-touch.Паттерн — по образцу
mcp/session_store(_schema_ready+ ленивыйinit_schema).Проверки
web 46 passed (integration RED/GREEN self-migrate), install 266, полный unit 1367; ruff чист. Независимое ревью (Sonnet): Ready to merge — Yes.