Skip to content

Prevent self-chaining in local hook dispatcher and clean up local hooks on uninstall - #152

Open
mvanhorn wants to merge 1 commit into
HexmosTech:mainfrom
mvanhorn:fix/144-local-hook-self-chaining
Open

mvanhorn wants to merge 1 commit into
HexmosTech:mainfrom
mvanhorn:fix/144-local-hook-self-chaining

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Nov 23, 2026 •

Copy link
Copy Markdown

🔍 LiveReview

⚙️ Customize risk-based approval policy for this repository or your organization.


Summary

It addresses the behavior reported in issue #144.

fix: prevent self-chaining in local hook dispatcher and clean up local hooks on uninstall

Linked Issue

Fixes #144

Validation

The targeted tests for the git-lrc uninstallGitHookSurface change pass locally.
The tests passed with the git-lrc uninstallGitHookSurface change applied; a run with it reverted gave no clear result, so no test is shown to catch this bug.
The changed test hooks/templates_test.go did not run here: no test runner for it was available.
The changed test internal/appcore/hooks_management_test.go did not run here: no test runner for it was available.

Checklist

  • This PR fulfills an agreed issue.
  • I kept the change narrow and scoped.
  • I ran the most specific relevant validation and described it above.
  • If I changed behavior, I called that out clearly in this PR.
  • If I touched UI, I attached a GIF or video walkthrough. This is required.
  • If I changed storage/ responsibilities, I updated storage/storage_status.md and ran make check-status-doc.
  • If I changed network/ responsibilities, I updated network/network_status.md and ran make check-status-doc.
  • If this change touches security, disclosure flow, credentials, storage, network behavior, or remote data handling, I reviewed SECURITY.md and updated related documentation if needed.

Notes For Reviewers

Anything specific you want reviewers to focus on.

AI was used for assistance.

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.

[Bug]: lrc hooks install --local creates an infinite self-chaining pre-commit hook

1 participant