Uh oh!
There was an error while loading. Please reload this page.
Fix: cross-refactoring の収束ループが終わらない不具合を直す(v8.5.1) - #130
Merged
Conversation
4 回目の実機試行(PR #128)で見つけた 2 件を直した。 - 収束ループが終わらない `judge-review` の変更要求の出口は 2 つあり、差し戻し上限から落ちる側だけが 修正フェーズの起点(`fix_base_sha`)を記録していなかった。起点が無いと `merge-fix` が範囲を確定できずに弾かれ、`fix_rounds` が進まないため `should-abandon` の上限へ永久に到達しない。起点の記録を `_prepare_fix_phase` へ集め、範囲を確定できないときも修正ラウンドを進める - レビュー結果の欠落が実装担当へ回る 結果ファイルを残さなかったレビュー担当がいるときは、変更要求ではなく 進行の中断(終了コード 4)として扱う。結果を残さなかったのはレビュー担当の プロセスが動かなかったということで、実装担当が直せる指摘ではない Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016xTBtHVcCLsYnLdwfgW4xx
takemi-ohama
left a comment
ContributorAuthor
There was a problem hiding this comment.
🤖 cross-review | round 1 | codex | APPROVE
修正が必要な指摘はありません。
takemi-ohama
left a comment
ContributorAuthor
There was a problem hiding this comment.
🤖 cross-review | round 1 | gemini | APPROVE
修正フェーズの起点(fix_base_sha)の記録漏れによる無限ループと、結果ファイルの欠落時に適切に中断(ABORT)する修正が正しく実装されていることを確認しました。
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 freeto 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.
目的
4 回目の実機試行(Draft PR #128)で見つけた 2 件を直す。どちらも v8.5.0 で入ったもの
ではなく、v8.3.0 にも同じ構造がある。試行の記録は #129 にある。
直したこと
1. 収束ループが終わらない
進行が止まらない。 レビュー結果が 2 回続けて欠けた後、修正フェーズと再レビューを
無限に往復する。実測ではラウンド 2 で 3 巡し、手で止めるまで終わらなかった。
cmd_judge_reviewには変更要求を返す出口が 2 つあり、起点の記録が片方にしか無かった。fix_base_sha起点が無いと
cmd_merge_fixはcommits_in_range()からNoneを受け取り、修正の範囲を確定できずに終了コード 2 で弾かれる。このとき
fix_roundsが増えないため、cmd_should_abandonが見送りへ移る条件(fix_roundsが上限に達する)を永久に満たさない。直し方: 起点と試行番号の記録を
_prepare_fix_phase()へ集め、両方の出口から呼ぶ。あわせて
cmd_merge_fixが範囲を確定できずに終わるときもfix_roundsを進め、見送りへ必ず到達させる(二重の歯止め)。
2. レビュー結果の欠落が実装担当へ回る
結果の欠落は、対象の改善項目を持たない指摘として記録されていた。
{"reviewer": "cross-refactoring", "item_id": null, "summary": "レビュー結果の形式が 2 回続けて不正だった: codex のレビュー結果がありません", "resolved": false}どこを直せば解決するのか書かれておらず、実装担当は受け取っても何もできない。
直し方:
judge()が返すinvalidのうち、結果ファイルが無いケースと形が違うケースを分ける。上限に達したとき、結果を残さなかったレビュー担当がいれば
変更要求にせず中断する(終了コード 4)。結果を残さなかったのはレビュー担当のプロセスが
動かなかったということで、実装担当への指摘ではない。状態は残るので、原因を直して
同じコマンド列を叩き直せば再開できる。
変更内容
scripts/refactor.py_prepare_fix_phase()を新設。欠落と形式不正を分けて中断。merge-fixが範囲不定でもfix_roundsを進めるdocs/02-apply-and-review.mdSKILL.mdtests/配布物 3 系統は
scripts/build-runtime-plugins.shで同期済み。テスト
先に落ちるテストを書き、修正で通した。追加した 3 件はいずれも修正前に失敗する。
test_missing_result_at_the_limit_abortstest_invalid_format_at_the_limit_records_the_fix_basetest_merge_fix_advances_when_the_range_is_undeterminable共通編集元と配布物 3 系統で 466 passed(修正前は 463)。
claude plugin validate ./check-skill-frontmatter.py/check-markdown-links.pyも通した。