Skip to content

docs(shell): fix stale FALSE NEGATIVE comment for path-prefixed detection - #3132

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-27813943748
Jun 19, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/clean-27813943748

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Nightly sweep finding: a stale code comment in the shell-detection tests.

The FALSE NEGATIVE: Path prefixes to binary section header in src/shell/detection.rs claimed / is not in the allowed preceding-character set, so paths like /usr/local/bin/wt "don't match". That has been false since / was added to the matches! set in is_valid_command_position (src/shell/detection.rs:235). The very next test, test_absolute_path, asserts these paths are detected, and its inline comment already says "now detected with '/' in allowed chars". The header comment was just never updated, so it now contradicts both the code and the tests directly below it.

This rewrites the comment to describe the current behavior. No behavior change — the tests (test_absolute_path, test_home_path, test_env_var_path) already cover and pass for the path-prefixed case.

Testing: comment-only change; cargo test --lib shell::detection passes (77 tests). No regression test is added because there is no behavior change — the existing tests already exercise the path-prefixed detection that the corrected comment describes.

…tion

The test-section header claimed '/' is not in the allowed preceding-char
set, so paths like /usr/local/bin/wt "don't match". That is contradicted
by is_valid_command_position (src/shell/detection.rs:235 includes '/') and
by the very next test, test_absolute_path, which asserts such paths *are*
detected. Update the comment to describe the current behavior.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Jun 19, 2026
@max-sixty
max-sixty merged commit 992e6be into main Jun 19, 2026
34 of 43 checks passed
@max-sixty
max-sixty deleted the nightly/clean-27813943748 branch June 19, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants