Skip to content

fix(hooks): isolate script paths from shell effects - #436

Merged
P4suta merged 1 commit into
mainfrom
fix/script-inspection-shell-effects
Oct 25, 2026
Merged

P4suta merged 1 commit into
mainfrom
fix/script-inspection-shell-effects

Conversation

@P4suta

@P4suta P4suta commented Oct 25, 2026

Copy link
Copy Markdown
Owner

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

@P4suta
P4suta marked this pull request as ready for review October 25, 2026 02:56
@P4suta
P4suta merged commit 5291d01 into main Oct 25, 2026
6 checks passed
@P4suta
P4suta deleted the fix/script-inspection-shell-effects branch October 25, 2026 02:56
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.

fix(hooks): isolate script paths from shell scope effects

1 participant