Skip to content

fix: doctor/preflight の core.hooksPath 読取に --includes (#196 smoke 発見) - #198

Merged
kosako merged 1 commit into
mainfrom
fix/197-hookspath-includes-read
Jul 14, 2026
Merged

fix: doctor/preflight の core.hooksPath 読取に --includes (#196 smoke 発見)#198
kosako merged 1 commit into
mainfrom
fix/197-hookspath-includes-read

Conversation

@kosako

@kosako kosako commented Jul 14, 2026

Copy link
Copy Markdown
Owner

概要

#196 の実機 smoke で発見した観測バグの修正。配線自体は実効(git 本体は読み時に include を処理し、repo 内で core.hooksPath が解決される)だが、doctor / preflight の読取 git config --global --get core.hooksPathscope file 指定時は include を既定で展開しない ため、正しく配線済みのマシンを「not set」と誤報告していた(report-only の warn ノイズ + 配線 chain の偽の非緑)。

変更

  • doctor(2 箇所)/ preflight(1 箇所)の読取に --includes を付与 + 理由コメント
  • test-git-hook-gates に観測形の static pin を追加(--includes 付き読取の存在 + includes 無し読取の不在)。観測側の読取形そのものが契約なので static pin が適切

検証

  • test-git-hook-gates / static(bash -n / shellcheck)PASS
  • 実機 doctor: 配線 chain 全 green(shim ×2 / hooksPath → managed dir / deploy 3 本)
  • この PR の commit 自体が live gate(pre-commit public-safety + commit-msg trailer)を通過 = smoke の clean commit 項目を兼ねる

🤖 Generated with Claude Code

https://claude.ai/code/session_016qw8BkUDu5WdwhYfiFFX5n

配線値は include 先の hooks.gitconfig にあり、`git config --global --get` は
scope file 指定時に include を既定で展開しない → 正しく配線済みのマシンを
「not set」と誤報告していた (配線自体は実効・git 本体は読み時に include 処理)。
3 call site に --includes を付け、観測形そのものを static pin する回帰テストを
追加。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016qw8BkUDu5WdwhYfiFFX5n
@kosako

kosako commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

🔍 レビュー依頼(→ Codex)

  • 観点: 小さな観測バグ修正。(1) --includes の意味論が 3 call site すべてで正しいか、(2) static pin テストの妥当性(観測形=契約という判断)、(3) 副作用(他 section の gitconfig 読取に同種バグが残っていないか)。
  • ランク: 🔴 must / 🟡 should / ⚪ nit
  • 結果はこの PR にコメントで返します

@kosako

kosako commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

📋 レビュー結果(by Codex)

判定: ✅ merge 可(must 0 件) — should / nit ともなし。

Codex の独立確認: --includes の意味論(Git 2.50.1 実機で付与なし=未設定 / 付与あり=取得を確認)、static pin の妥当性(3 call site を肯定・否定両側から検査)、repo-wide grep で includes 無し読取の残存なし、他の global 読取は同種バグ非該当(dot_gitconfig 直接定義値 or 意図的に include 対象外の identity 検査)。

CI green を確認して merge します。

@kosako
kosako merged commit 854e944 into main Jul 14, 2026
2 checks passed
@kosako
kosako deleted the fix/197-hookspath-includes-read branch July 14, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant