Conversation
omartinma
approved these changes
Sep 29, 2026
ryzizub
force-pushed
the
fix/validate-layers-hook-scoping
branch
from
September 30, 2026 08:57
d693799 to
4e493b9
Compare
The hook now exits 0 unless tool_name is Edit, MultiEdit, or Write, per the hook scoping rule (a matcher is a filter, not a guarantee). The dart check moves next to the validator run so unrelated edits stay silent. Adds hooks/validate_layers_test.sh and a Script Tests CI job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryzizub
force-pushed
the
fix/validate-layers-hook-scoping
branch
from
October 1, 2026 13:40
4e493b9 to
44fcc4f
Compare
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.
Makes
hooks/validate_layers.shconfirmtool_namefrom the payload and exit 0 unless it isEdit,MultiEdit, orWrite, following the hook scoping rule.Edit|MultiEdit|Write. README, CLAUDE.md## Hooks, and the AGENTS.md tree updated to match.dartavailability check now runs just before the validator, so edits outside FFCA pubspecs no longer print "dart not found".hooks/validate_layers_test.sh(15 cases) usingscripts/test/fixtures, added as a step in the existing 🪝 Hook Tests CI job, which now sets up Dart. Three of its cases fail against the old hook.Reviewer note: the tests pass
HOMEthrough to the hook because version-manager shims (asdf, fvm) need it to finddart.🤖 Generated with Claude Code