Skip to content

feat: add .yul-ignore file support to suppress known pins - #25

Closed
algomaster99 wants to merge 1 commit into
mainfrom
claude/version-suggestion-hook-cwtsau
Closed

feat: add .yul-ignore file support to suppress known pins#25
algomaster99 wants to merge 1 commit into
mainfrom
claude/version-suggestion-hook-cwtsau

Conversation

@algomaster99

Copy link
Copy Markdown
Member

Allow projects to maintain a .yul-ignore file at the root to explicitly suppress the hook's blocking of specific dependency pins the user has already decided to keep. This prevents the hook from repeatedly blocking the same write when a user has intentionally chosen an older version for compatibility or other reasons.

Key changes:

  • Added pkg/ignore package to read and parse .yul-ignore files, supporting comments and blank lines for documentation
  • Added filterIgnored() function in main.go to drop mismatches that match entries in the ignore set
  • Updated mismatch.Mismatch struct to include PURL (version-less package URL) field, enabling exact pin matching via <purl>@<version> keys
  • Updated all ecosystem checkers (pkg/githubactions, pkg/util/pins) to populate the PURL field in mismatches
  • Enhanced hook output to print suggested .yul-ignore entries when blocking a write, guiding users on how to suppress future blocks for the same pin
  • Updated README with documentation on the .yul-ignore file format and usage

The hook now loads .yul-ignore from the session's working directory and filters out any mismatches matching an ignored pin before deciding whether to block. A pin isn't grandfathered in forever — if the manifest is later changed to a different version, that's a fresh write checked against .yul-ignore anew.

https://claude.ai/code/session_018s16QPwCTMVAFDtiZcwitc

If a user rejects a suggested version bump in manual approval mode, the
hook had no way to learn that decision — it only ever sees the manifest
diff, never chat history or a permission denial — so it kept re-blocking
the same write, pushing Claude toward disabling or editing the hook
instead (#22).

Mismatch now carries the dependency's version-less PURL, so the hook can
match it against .yul-ignore, a project-root file of "<purl>@<version>"
entries (# comments and blank lines allowed) the user maintains. The
block message prints the exact line(s) to add and tells Claude to ask
the user and use that file rather than working around the hook.
@algomaster99

Copy link
Copy Markdown
Member Author

Closing for now see #22 .

@algomaster99
algomaster99 deleted the claude/version-suggestion-hook-cwtsau branch August 26, 2026 11:49
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.

2 participants