Skip to content

Release 0.6.4: install-agent keeps a narrowed hook matcher - #201

Merged
devmaxxx merged 5 commits into
mainfrom
fix/install-agent-keep-hook-matcher
Oct 17, 2026
Merged

devmaxxx merged 5 commits into
mainfrom
fix/install-agent-keep-hook-matcher

Conversation

@devmaxxx

@devmaxxx devmaxxx commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • fix(install-agent): keep the matcher already on our hook entry
  • fix(install-agent): stamp the hook with what it wrote
  • chore(release): bump to 0.6.4

A re-run of install-agent --claude replaced zerograph's hook entries whole, so a matcher a repository had narrowed on purpose (PreToolUse without Bash) went back to the default on every upgrade. The entry is still updated; its existing matcher is carried over, and only a new entry gets the default. The hook script's second line now records the release and the matchers it installed (// zerograph 0.6.4 wrote: PreToolUse=…); a re-run moves a matcher it wrote to the current default, so a future default change still reaches untouched installs, and keeps any other.

Test plan

  • a_matcher_set_on_our_entry_survives_a_re_run fails before the fix, passes after
  • a_matcher_the_stamp_records_moves_to_the_new_default covers the upgrade path
  • cargo test green, cargo clippy --all-targets -- -D warnings clean
  • zerograph --version prints 0.6.4

A re-run replaced the whole entry, so a matcher a repository had
narrowed (e.g. PreToolUse to "Grep|Glob|Agent", keeping the hook off
Bash) was reset to the default on every upgrade. The entry is still
replaced, but its existing matcher is carried over; only a fresh entry
gets the default.
…w default

Keeping every matcher on our entry also froze the ones we wrote, so a
default widened for a changed hook would never reach an existing install.
A matcher found in PAST_MATCHERS, or equal to the default, is ours and
takes the current default; any other is kept and named in a note beside
the default it hides.
…st list

The hook script's second line names the release and the matchers it
installed. A re-run reads it before rewriting: a matcher it wrote moves to
the current default, any other is kept. Drops PAST_MATCHERS and the note.
@devmaxxx
devmaxxx merged commit 2ced9d1 into main Oct 17, 2026
4 checks passed
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