feat(hooks): surface leftover post-commit hooks (#167 follow-up) - #172
Merged
Conversation
A post-commit hook installed by codeindex < 0.37 survives the upgrade silently: the dead wrapper errors into ~/.codeindex/hooks/post-commit.log (|| true swallows the exit code) while every commit still pays one Python startup. Nothing showed it — status only iterated SUPPORTED_HOOKS, and uninstall --all likewise skipped it. - hooks status: flags a codeindex-managed post-commit with the exact cleanup command (RETIRED_HOOKS seam for future retirements) - hooks uninstall --all: removes the leftover along with supported hooks
dreamlx
added a commit
that referenced
this pull request
Aug 15, 2026
P1 (docs, #169 residual): active user-facing surfaces still advertising the removed post-commit workflow — codeindex init's final output, README_zh.md (bullet/workflow/skill-table; EN was clean), examples/ai-integration-guide.md (whole Post-commit section + doc-only scenario), team-workflow-guide ('Three hooks'). All removed/updated; version-history mentions intentionally kept. P2 (#171): _has_js_test_files walked .venv and duplicated the skip-set — now shares _WALK_SKIP_DIRS with detect_languages (venv/.tox/.eggs pruned), uncapped-walk rationale documented. P2 (#172): leftover-hook read_text now catches OSError — status is informational, must not crash on an unreadable file.
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.
问题(#167 直接删的遗留面)
升级到 0.37 后,装过 post-commit hook 的项目:
.git/hooks/post-commit,每次 commit 触发 →codeindex hooks run post-commit(子命令已删)→ 报错进~/.codeindex/hooks/post-commit.log,|| true吞掉hooks status只 iterate SUPPORTED_HOOKS → 残留不可见;uninstall --all同样跳过它修法
hooks status:检测 codeindex-managed 的残留 post-commit(RETIRED_HOOKS常量留 future retirement 的 seam)→ warning + 精确清理命令uninstall --all:残留一并清掉Verification
--all清残留)