Repository navigation
fix: reject staged artifacts at the exact temp root - #5308
Merged
Merged
Conversation
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.
A staged file or symlink named exactly
.autoskillit/tempcould pass the pre-commit hook, despite violating the tracked-temp policy. Use Git’s pathspec to select the root and descendants, anchor the query at the repository root, and prevent submodule-ignore configuration from hiding staged gitlinks. Deletions and legitimate non-temp staging remain permitted.Add regression coverage in the existing test module for root changes, containment boundaries, child-to-root replacement, hidden gitlinks, invocation directories, alternate indexes, and rejection through a real commit.
Validation:
task test-local-gatevia MCP: 15,204 passed, 197 skipped, 12 xfailed (conservative filtering, no explicit test-path scope).pre-commit run --all-filespassed.hook_exit=1with the refusal message naming.autoskillit/temp.Fixes #5303.