Repository navigation
fix: reject invalid hook settings before rewriting configuration - #85
Draft
Aliciawque wants to merge 1 commit into
Draft
Aliciawque wants to merge 1 commit into
Aliciawque wants to merge 1 commit into
Conversation
|
@Aliciawque is attempting to deploy a commit to the Together AI Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Summary
Reject a non-object
hookscontainer before changing.claude/settings.jsonin the lint-hook installer.With valid JSON such as
{"hooks": []}, the current installer assignsPostToolUseas an array property.JSON.stringifydrops that property, so the command exits successfully and says the hook was installed, but no hook is saved. Both install and remove also rewrite the original settings bytes. Primitive containers instead fail with an unhandled TypeError.This change refuses arrays and primitives with a clear diagnostic, without writing the file. Missing/null containers keep their existing initialization behavior. Unrelated configuration, shared third-party hooks, idempotent installation, and removal behavior are preserved.
Tests
refcheck.mjs: clean across 99 reference files.node --checkandgit diff --checkpass.Known baseline limitation
The existing theme-index freshness command fails on both the unchanged base and this patch because generation updates only
builtfrom 2026-10-22 to today's date. That generated date-only change is excluded from this PR; this does not claim the complete existing CI command is green.This is separate from #80, which concerns theme run-history validation, not hook settings. No user/global configuration was modified during testing. Prepared with AI assistance and independently reviewed.