Repository navigation
fix(hooks): isolate script paths from shell effects - #436
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.
Why
Subshell assignments and command prefixes could select a different script from the one the shell executes.
Startup files and directory-changing wrapper options could also leave inspection using a stale directory.
Changes
Keep literal assignment facts within supported process scopes and refuse variable paths across uncertain control flow.
Preserve ordinary straight-line literal assignments and keep command-prefix assignments out of pre-command expansion facts.
Report an unresolved inspection when startup files, environment options, or dynamic shell bindings can change the directory.
Require literal spelling before an extensionless shebang read.
Keep legacy inspection and script linting on the same selected-file catalog.
Record the native parser and execution assumptions in the proposed ADR.
Validation
The planted scope and startup regressions failed before the corrections.
All 17 directory-flow tests passed on macOS after the corrections.
The normal project's dotfiles library suite passed 330 tests with five explicit native or service-dependent entries ignored.
Normal project stages passed.
The results include 113 PR workflow regressions and 16 profile manifests.
Strict workspace Clippy passed after a needless-borrow correction.
A fresh issue context and the complete staged hook gate passed on the final diff.
All 17 directory-flow tests also passed on native Windows.
The unchanged pure directory contract's Kani harness and rejecting probes remain unrun for the candidate.
Closes #435.
@coderabbitai ignore