Skip to content

fix(scripts): say "not found on PATH", not "not installed" - #161

Merged
CybotTM merged 1 commit into
mainfrom
fix/hook-not-found-wording
Sep 23, 2026
Merged

CybotTM merged 1 commit into
mainfrom
fix/hook-not-found-wording

Conversation

@CybotTM

@CybotTM CybotTM commented Sep 23, 2026

Copy link
Copy Markdown
Member

Merging this makes the cli-tools hook say what it actually knows. For a command not found, it now says the name "was not found on PATH" instead of claiming the tool "is not installed". The advice after that (check type -P -a and hash -r first, then install) is unchanged.

The installed plugin was run live in a fresh session, and the model receiving the hook's context pointed out that "not installed" was not supported by the evidence: PATH had been emptied on purpose, and rg is installed. A shell only reports that a name did not resolve. The new test pins the wording and fails against the previous version. tests/test_detect_missing_tool.py passes (20 passed, 1 skipped where zsh is absent).

Assisted by claude-code:claude-opus-5-5 — Session

https://claude.ai/code/session_01NxSeVq1hDnGBCqKLGcjQ6m

A shell's "command not found" means the name did not resolve on PATH;
the tool may still be installed elsewhere or hidden by a stale hash. The
hook's advice already tells the model to check `type -P -a` and `hash -r`
first, but opened by asserting the opposite. A live run with the
installed plugin flagged exactly that: the model noted the claim was not
supported, since PATH had been emptied on purpose.

The advice now states what the hook knows. The new test fails against
the previous wording.

Assisted-by: claude-code:claude-opus-5-5
Agent-Session: https://claude.ai/code/session_01NxSeVq1hDnGBCqKLGcjQ6m
Agent-Host: 32116e
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Copilot AI lite review requested due to automatic review settings September 23, 2026 09:17
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: afecf187-ec21-4410-b326-b71b9f957671

📥 Commits

Reviewing files that changed from the base of the PR and between dd92e2b and 6bae2ed.

📒 Files selected for processing (2)
  • scripts/detect_missing_tool.py
  • tests/test_detect_missing_tool.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM

CybotTM commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Review before merge

CodeRabbit refused this head as rate limited and Copilot is out of quota, so the review of 6bae2ed is mine. The change is three message strings and one docstring line in detect_missing_tool.py. The new test asserts the advice says "not found on PATH" and never "not installed", and it fails against the previous wording. The second half of the sentence was reworded so it no longer contradicts the first ("installed elsewhere or the shell cached a stale path"). 21 checks pass; 0 unresolved threads.

@CybotTM

CybotTM commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Self-review: 6bae2ed

The bot review this pull request demands is unsatisfiable (Copilot quota wall or repeated bot failures on this head). The diff on this head was reviewed by the PR author; this comment is the on-the-record attestation the merge gate reads back. It stops matching on the next push.

@CybotTM
CybotTM merged commit 8df7818 into main Sep 23, 2026
25 of 26 checks passed
@CybotTM
CybotTM deleted the fix/hook-not-found-wording branch September 23, 2026 09:25
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.

2 participants