Repository navigation
fix(agent-health): 日次確認の報告にツールごとの起動モデルを残す - #3442
Merged
Merged
Conversation
pass の check は evidence を残さず、ログも `seeded <path>` だけだったため、 どのモデルで確かめたか(#3428 の model.json の引き継ぎが効いたか)が報告から読めなかった。 - src/lib/agent-health/launched-model.ts(新規): 画面(本番の extractModelInfo。 opencode / opencode-v2 は `▣` 無しの step 行、最後に入力欄下の `Build · <モデル> <プロバイダ>` を screen-footer として丸ごと)→ hook の normalizeEvent().model → 無ければ null(不明)。seed した model.json の recent[0] は seeded として並べるだけで代わりには使わない。 - types.ts: AgentHealthToolResult.launchedModel?(省略可)。report.ts の buildToolResult は渡されたときだけ入れる。 - probe-tool.ts: look() ごとに画面のモデルを読み、終了後に hook・seed と合わせて ProbeOutcome.launchedModel を返す。ログに `<tool>: model <label>`。 - main.ts: launchedModel を buildToolResult へ渡す。 - coverage.ts の summarizeCoverage: 最後に「起動したモデル:」(起動したツールのみ。 項目の無い古いレポートは「不明」)。 - release-readiness(-html) はツールごとの表を持たず check の状態だけを読むため、 HTML には出さない(既存の表の形に合わせた判断)。 - docs/user-guide/agent-health.md: 要約とレポートの形に追記。 テスト: tests/unit/lib/agent-health/launched-model-3438.test.ts (opencode-agent-health-3021/・3420/ の実画面、model-info-captures.ts、 tests/fixtures/hooks/ の claude・antigravity の payload、古いレポートの読み取り)。 対になる場所の確認: - 画面からモデルを読む既存処理 src/lib/detection/model-info-extractor.ts を探した。 写しは作らず再利用。opencode2 の step 行(`▣` 無し)は extractor が読まないが、 extractor は範囲外のため agent-health 側で読む(本文に無い指摘: 下記)。 - 同じ値の写し: main.ts の時間切れ経路と probeLimitedTool(起動しないので launchedModel を付けない=「不明」。直さない)。 - docs の ja/en: docs/user-guide/agent-health.md のみ(en 版は無い)。 - 古い動きを固定したテスト: coverage-3313.test.ts の summary は toContain で 検査しており、追記した節で壊れない(変更なし)。 - release-readiness.ts の parseHealthReportDigest は checks しか読まない(変更不要)。 本文に無い指摘: - docs/agent-health/issue-template.md:10 「**ツール**: <tool> <version>…」に起動モデルの欄が無い(範囲外のため未変更)。 - src/lib/detection/model-info-extractor.ts:722 OPENCODE_STEP_MODEL_PATTERN は opencode2 2.0.18 の `▣` 無しの step 行(`Build · Mistral Large 4 · 721ms`)を読まない (本番の画面読み取りでも opencode-v2 のモデルが出ない可能性。範囲外のため未変更)。 - CommandMate の capture --json の .model は probe が CommandMate サーバを通らないため使えない(画面と hook を直接読む)。 実機: tmux・実エージェントの起動は禁止のため probe は走らせていない(手順は dev-reports/issue-3438-manual-check.md)。 作業前後の ls -la ~/.commandmate ~/.local/state: エントリの増減なし($HOME と ~/.local/state/commandagent の mtime のみ変化。本作業はどちらにも書いていない)。 service.json は触れていない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-health-model-name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 8, 2026
This was referenced Oct 8, 2026
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
日次確認(agent-health)は pass のチェックに evidence を残さず、ログも
seeded <path>だけだったため、どのモデルで確かめたか(#3428 のmodel.jsonの引き継ぎが効いたか)が報告から読めなかった。src/lib/agent-health/launched-model.ts(新規): 起動したモデルを、画面(本番のextractModelInfoを再利用。opencode / opencode-v2 は▣無しの step 行と入力欄下のBuild · <モデル> <プロバイダ>)→ hook のnormalizeEvent().modelの順に読む。無ければnull(不明)。seed したmodel.jsonのrecent[0]は参考として並べるだけで、代わりには使わないtypes.ts:AgentHealthToolResult.launchedModel?(省略可)。項目の無い古い報告もそのまま読めるprobe-tool.ts/main.ts: 画面を見るたびにモデルを読み、hook・seed と合わせて報告へ。ログに<tool>: model <label>coverage.tsの要約の最後に「起動したモデル:」(古い報告は「不明」)。release-readiness の HTML はツールごとの表を持たないので出さないdocs/user-guide/agent-health.mdに追記Refs #3438(develop 向けのため Closes は使わない。実機の確認は翌朝の日次確認で行う)
範囲外(この PR では扱わない。追跡 Issue にするかは run の完了報告で判断する)
src/lib/detection/model-info-extractor.ts:722のOPENCODE_STEP_MODEL_PATTERNは、opencode2 2.0.18 の▣無しの step 行を読まない。本番の画面読み取りでも opencode-v2 のモデル名が出ていない可能性がある(この PR は agent-health 側で読んで補った)docs/agent-health/issue-template.md:10の「ツール」欄に起動モデルが無いTest plan
commandmatedev verify --task: work-evidence / scope / env-clean / lint / typecheck / unit-related すべて PASS(exit 0)tests/unit/lib/agent-health/launched-model-3438.test.ts(opencode-agent-health-3021/・3420/の実画面、model-info-captures.ts、tests/fixtures/hooks/の claude・antigravity の payload、古い報告の読み取り)npx tsc --noEmit、tests/unit/lib/agent-health・tests/unit/scripts/agent-health・guards・docs が合格。既存のit/describeの削除 0 件🤖 Generated with Claude Code