Repository navigation
docs(shell): fix stale FALSE NEGATIVE comment for path-prefixed detection - #3132
Merged
Merged
Conversation
…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]>
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.
Nightly sweep finding: a stale code comment in the shell-detection tests.
The
FALSE NEGATIVE: Path prefixes to binarysection header insrc/shell/detection.rsclaimed/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 thematches!set inis_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::detectionpasses (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.