Draft
Conversation
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.
Summary
概要
autoCommitAndPushが失敗した場合(例:git worktreeロックによる push エラー)、タスクがpr_failedではなくcompletedとしてマークされる。その結果、originへのpushもPR作成も行われないまま、ユーザーに何も通知されない。原因
autoCommit.jsでgit push <projectDir> HEADが例外をスローすると、メソッドは{ success: false }を返す。postExecution.jsでは PR作成ブロックがcommitResult.success && commitResult.commitHashで制御されているため、success: falseの場合はスキップされる:prFailedがセットされないため、taskExecution.jsはpersistPrFailedTaskResultではなくpersistTaskResult(status: 'completed')を呼び出す。再現シナリオ
feature-Xを git worktree としてチェックアウト.git/ディレクトリを共有している(例:Docker bind mount)taktを実行し、feature-Xブランチを対象とするタスクを処理git push <projectDir> HEADが失敗:refusing to update checked out branchcompletedとしてマークされる — push なし、PR なし、エラー表示なし影響
[INFO] Task "..." completedと表示されるが PR は作成されないpr_failedにならないためtakt listからリトライもできない期待される動作
auto-commit の push が失敗した場合、他の PR 作成失敗と同様に
pr_failedとしてマークされるべき。修正案
autoCommit.jsでコミット処理と push 処理を分離し、push 失敗時でもcommitHashが返るようにする:これにより
postExecution.jsが origin への push と PR 作成を試み、それらが失敗した場合に正しくpr_failedをセットできる。バージョン
Execution Report
Piece
takt-defaultcompleted successfully.Closes #526