Dogfood 实证(BlueHawkLock,husky v9 项目,后果已实际发生)
core.hooksPath = .husky/_(husky v9 标准),.git/hooks/* 整体被旁路。结果:post-commit 的 README_AI 再生从未在跑——
- 最近 7+ 个代码 commit 无一再生(含新增纯函数
interpretDownloadB1Verify,全库 README_AI.md 零命中)
apps/mobile/src/services/ble/utils/README_AI.md mtime 停留在最后一次手动 scan,早于其后所有代码提交
- CLAUDE.md(codeindex 生成段)把「post-commit hook 没触发」当例外场景列出三种情况(纯文档 commit / 刚启用 hook / 历史 stale),但在 husky 项目里是常态静默失效——用户以为索引在自动维护,实际全靠手动
附带诊断盲区:codeindex hooks status 只显示 pre-commit / pre-push 两行,post-commit 的在位状态不可见,无法诊断。
建议
hooks install/status 读 git config core.hooksPath
- 检测到 husky(
.husky/ 存在)时写 .husky/<hook>(husky v9 shim 会执行),否则警告 + 手动指引
hooks status 覆盖 post-commit 并做旁路检测
(同类问题已在 LoomGraph 开 issue:dreamlx/LoomGraph#164——两个项目的 hook 集成可以共用一套 hooksPath 探测逻辑。)
Dogfood 实证(BlueHawkLock,husky v9 项目,后果已实际发生)
core.hooksPath = .husky/_(husky v9 标准),.git/hooks/*整体被旁路。结果:post-commit 的 README_AI 再生从未在跑——interpretDownloadB1Verify,全库 README_AI.md 零命中)apps/mobile/src/services/ble/utils/README_AI.mdmtime 停留在最后一次手动 scan,早于其后所有代码提交附带诊断盲区:
codeindex hooks status只显示 pre-commit / pre-push 两行,post-commit 的在位状态不可见,无法诊断。建议
hooks install/status读git config core.hooksPath.husky/存在)时写.husky/<hook>(husky v9 shim 会执行),否则警告 + 手动指引hooks status覆盖 post-commit 并做旁路检测(同类问题已在 LoomGraph 开 issue:dreamlx/LoomGraph#164——两个项目的 hook 集成可以共用一套 hooksPath 探测逻辑。)