Repository navigation
fix(hooks): track script directories through shell wrappers - #433
Merged
Merged
Conversation
P4suta
marked this pull request as ready for review
October 25, 2026 01:57
This was referenced Oct 25, 2026
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.
Why
The inspector could use the original directory after a shell wrapper changed location, causing it to inspect the wrong relative script or omit a policy check.
Changes
Carry one typed invocation directory through legacy policy and script linting, and accept only supported location transitions whose control flow establishes success.
Refuse relative reads while the directory remains uncertain, including extensionless script probes, rather than inferring a destination.
Classify PowerShell
cd..,cd~, and drive-letter functions as unresolved location changes, while preserving caller-directory, shell-boundary, and absolute-entry behavior.Keep mandatory body checks and existing inspection limits intact.
Validation
Fifteen directory-flow tests passed on Windows.
Strict all-target Clippy for
dotfilesandrules, workspace formatting, andgit diff --checkpassed.Native CLI probes selected the expected script at a stable directory and after a supported PowerShell location change.
An unresolved location produced an explicit unavailable-inspection diagnostic without a planted-script finding.
The existing GitHub body restriction also refuses multi-command input.
The added Kani property and rejecting probes remain unrun, as does local Linux/macOS verification.
Native initial command bindings, filesystem identity, and the external execution bridge remain explicit assumptions.
Closes #426.
@coderabbitai ignore