fix: 生成前の失敗も開発ログに記録する - #2
Merged
Merged
Conversation
プロンプト未設定時の早期 return により、ステージング失敗が記録から漏れていた。 失敗結果を先に判定して prompt が null のログを保存し、検証時のエラーも共通の終了処理へ流す。 正常なスキップは引き続き記録しない。
PR のチェックアウトが detached HEAD のため、実行元に main や現在ブランチがある前提の既存テストが失敗していた。 テスト専用リポジトリで明示的にブランチとコミットを作り、実行元の状態に依存しない検証へ変更する。
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.
概要
プロンプトを作る前にステージングなどで失敗すると、開発ログが作られず、
--quietで起動した実行を追跡できませんでした。生成前の失敗もresult.status = "failed"とresult.errorを保存し、未生成のプロンプトはnullとして記録します。原因
DevLog::finishがプロンプト未設定時に結果を確認せず戻っていました。また、App::runのリポジトリ検証エラーは共通のログ書き出しに到達していませんでした。変更内容
設計・レビュー
Claude に設計相談し、Codex の設計確認と差分レビューでも不具合の指摘はありませんでした。実行結果型の全面変更や panic 捕捉は通常エラーの記録漏れを直す今回の範囲を超えるため採用しません。スキーマ版は既存の nullable 化方針に従い維持します。ログ設定が確定する前の設定読み込み失敗は対象外です。
検証
make ci: pass(format、通常ビルドと Apple Intelligence 有効時の clippy、全テスト)。astro-sight review --dir . --git: API 変更・未参照シンボルの指摘なし。index.lockによるステージング失敗、Git 起動失敗、リポジトリ外の正常スキップ。Closes #1