Repository navigation
fix(skills): git status を読めなかったとき skills の計画と CLI が「不明」と出す - #3456
Merged
Merged
Conversation
#3435 で skills の写し(readSkillGitTargetState)は読めなかった git status を dirty 側に倒しただけで、計画・画面・CLI が「未コミットの変更あり」と出していた。 表し方の根拠(#3435 の isDirty / statusUnknown に合わせる): - SkillGitTargetState.dirty は boolean のまま(不明でも true = 安全側)。 dirtyUnknown?: boolean を足し、読めなかったときだけ付ける(成功時はキー無し)。 - 計画の target DTO も workingTreeDirty: boolean は据え置き、 workingTreeUnknown?: true を不明のときだけ足す。三値化しないので既存の読み手 (SkillTargetSelector、CLI、e2e fixture、integration テスト)は壊れない。 - 警告は不明のとき WORKING_TREE_DIRTY の代わりに新設の SKILL_PREVIEW_WORKING_TREE_STATUS_UNKNOWN を出す(警告であることは保つ。clean にはしない)。install と update は workingTreeWarning() を共有する。 - 表示: 画面は target.workingTreeStatusUnknown / plan.warning.workingTreeStatusUnknown を ja / en にそろえた。CLI は ' [working tree status unknown]'(dirty / clean の 出力はバイト不変)。 対になる場所の洗い出し(grep workingTreeDirty|WORKING_TREE_DIRTY src tests docs): - 直した: preview-diff.ts(状態・警告)、install-plan / update-plan / uninstall-plan (DTO)、cli/types/api-responses.ts の 3 つの写し、cli/commands/skill-format.ts の 3 箇所、SkillPlanPreview.tsx の 2 箇所、skill-vocabulary.ts の警告ラベル、 locales/{ja,en}/skills.json。 - 直さない: SkillTargetSelector.tsx は #3435 で既に statusUnknown を null(未確認) として扱っている。tests/e2e/fixtures/skills-helpers.ts と tests/integration/skills-mvp-security-regression.test.ts は任意フィールドの追加で 影響なし(integration は本当に dirty な場合で WORKING_TREE_DIRTY のまま)。 docs には workingTreeDirty の記述無し。CLI の formatter は英語のみで ja 文言の 置き場所は無い(従来の ' [working tree dirty]' も英語のみ)。 - 古い動きを固定したテスト: git-status-unknown-3435 の「failed status を dirty と 扱う」は dirty=true を保つので変えずに通る。 テスト: git-status-unknown-3435 に dirtyUnknown の describe、uninstall-plan に DTO の describe、working-tree-unknown-3445(警告と CLI 表示)、 skill-plan-working-tree-unknown-3445(画面)を追加。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks
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
#3435(PR #3440)で、skills の写し(
readSkillGitTargetState)は読めなかった git status を dirty 側(警告側)に倒しただけで、計画・画面・CLI は「未コミットの変更あり」と出していた(#3445)。これを「不明」と区別して出す。表し方(#3435 の
isDirty/statusUnknownに合わせた):SkillGitTargetState.dirtyは boolean のまま(不明でもtrue=安全側)。読めなかったときだけdirtyUnknown?: trueを付けるworkingTreeDirty: booleanは据え置き、不明のときだけworkingTreeUnknown?: trueを足す。三値にしないので、既存の読み手(SkillTargetSelector・CLI・e2e の fixture・integration テスト)は壊れないWORKING_TREE_DIRTYの代わりに新設のSKILL_PREVIEW_WORKING_TREE_STATUS_UNKNOWNを出す(警告であることは保ち、clean にはしない)。install と update はworkingTreeWarning()を共有SkillPlanPreview)はtarget.workingTreeStatusUnknown/plan.warning.workingTreeStatusUnknown(ja / en)。CLI は[working tree status unknown](dirty / clean の出力は従来とまったく同じ)Refs #3445(develop 向けのため Closes は使わない)
Test plan
commandmatedev verify --task: work-evidence / scope / env-clean / lint / typecheck / unit(テスト全体)すべて PASS(exit 0)tests/unit/lib/skills/working-tree-unknown-3445.test.ts(警告と CLI 表示)、tests/unit/components/skill-plan-working-tree-unknown-3445.test.tsx(画面)。git-status-unknown-3435.test.tsとuninstall-plan.test.tsに describe を追加。fix(git): git status が読めないとき worktree を clean と表示する #3435 の「失敗した status を dirty と扱う」テストは無変更で通過npx tsc --noEmit、skills・git・CLI・guards・docs のテストが合格。既存のit/describeの削除 0 件🤖 Generated with Claude Code